public class CutAndPasteSupport
extends java.lang.Object
ArooaConfiguration
.Modifier and Type | Class and Description |
---|---|
static class |
CutAndPasteSupport.ReplaceResult<P extends ParseContext<P>>
Result for replace.
|
Constructor and Description |
---|
CutAndPasteSupport(ArooaContext instanceContext)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
copy(ParseContext<?> context)
Copy a Parse Context's configuration to XML.
|
void |
cut(ArooaContext childContext)
Remove the component who's context is given.
|
static int |
cut(ParseContext<?> parentContext,
ParseContext<?> childContext)
Cut when the parent context is known.
|
ConfigurationHandle<ArooaContext> |
paste(int index,
ArooaConfiguration config)
Paste the
ArooaConfiguration . |
static <P extends ParseContext<P>> |
paste(P parentContext,
int index,
ArooaConfiguration config)
Add any configuration to the parent context.
|
CutAndPasteSupport.ReplaceResult<ArooaContext> |
replace(ArooaContext childContext,
ArooaConfiguration config)
Replace the childContext with the given configuration.
|
static <P extends ParseContext<P>> |
replace(P parentContext,
P childContext,
ArooaConfiguration config)
Replaces a child context with the contents of the configuration.
|
boolean |
supportsPaste()
Does this instance support pasting.
|
public CutAndPasteSupport(ArooaContext instanceContext)
instanceContext
- The context of the component we are providing
the support for.public boolean supportsPaste()
public void cut(ArooaContext childContext) throws ArooaConfigurationException
childContext
- ArooaConfigurationException
public ConfigurationHandle<ArooaContext> paste(int index, ArooaConfiguration config) throws ArooaParseException, ArooaConfigurationException
ArooaConfiguration
.index
- config
- ArooaParseException
ArooaConfigurationException
public CutAndPasteSupport.ReplaceResult<ArooaContext> replace(ArooaContext childContext, ArooaConfiguration config) throws ArooaParseException, ArooaConfigurationException
childContext
- config
- ArooaParseException
ArooaConfigurationException
public static int cut(ParseContext<?> parentContext, ParseContext<?> childContext) throws ArooaConfigurationException
parentContext
- childContext
- ArooaConfigurationException
public static <P extends ParseContext<P>> ConfigurationHandle<P> paste(P parentContext, int index, ArooaConfiguration config) throws ArooaParseException
parentContext
- index
- ArooaParseException
public static <P extends ParseContext<P>> CutAndPasteSupport.ReplaceResult<P> replace(P parentContext, P childContext, ArooaConfiguration config) throws ArooaParseException, ArooaConfigurationException
parentContext
- childContext
- config
- ArooaParseException
ArooaConfigurationException
public static java.lang.String copy(ParseContext<?> context)
context
- The parse context.