public class Dropper extends AbstractImplementation implements ExecutableIF
Dropper.DROPPER_REF_NAME
.ImplementationIF
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CACHE_REF_NAME
The cache reference name (value="DROPPER_CACHE").
|
static java.lang.String |
DROPPER_REF_NAME
The dropper reference name (value="DROPPER").
|
static java.lang.String |
ODSCACHEFIELD
This is the reference name of the ASAM ODS change.
|
static java.lang.String |
REFERENCEFIELD
This is the reference name of the referencefield, that holds the file references.
|
static java.lang.String |
TARGETFIELD
This is the reference name of the targetfield, that holds the ids to be deleted.
|
arguments, ctx, descriptor, NEW_LINE
Constructor and Description |
---|
Dropper()
Create the using a context.
|
Dropper(XSDContextIF ctx)
The transformer constructor.
|
Dropper(XSDContextIF ctx,
Dropper dropperXSD)
Create the Dropper using a context.
|
Dropper(XSDContextIF ctx,
java.util.Properties properties)
The transformer constructor.
|
Dropper(XSDContextIF ctx,
java.util.Properties arguments,
Dropper dropperXSD)
Create the Dropper using a context.
|
Modifier and Type | Method and Description |
---|---|
void |
add(ElemId id,
boolean recursive,
boolean delete,
boolean deletefiles,
boolean deleterefs)
Add elem Ids to the dropper list.
|
void |
add(TargetElement element)
Add an element to the dropper list.
|
protected static void |
checkDescriptor(java.lang.Object descriptor)
Check the descriptor.
|
static Dropper |
createInstance(XSDContextIF ctx,
java.io.InputStream is)
Use this method to create a Dropper object from XML input stream
|
static Dropper |
createInstance(XSDContextIF ctx,
java.lang.String buf)
Use this method to create a Dropper object XML string
|
static Dropper |
createInstance(XSDContextIF ctx,
java.lang.String[] buf)
Use this method to create a Dropper object from XML string array
|
static Dropper |
createInstance(XSDContextIF ctx,
java.lang.StringBuffer buf)
Use this method to create a object from XML string buffer
|
AoSession |
createSession()
Create a session from XML aosession descriptor.
|
void |
dropFiles(CORBAFileServerIF server)
Drop the files.
|
protected void |
dropTargets()
Drop the targets.
|
void |
dump()
Dump the id to the file.
|
void |
dumpRefs(java.io.PrintStream printer)
Dump the references to the file.
|
void |
dumpTargets(java.io.PrintStream printer)
Dump the id to the file.
|
void |
execute()
Execute the dropper.
|
protected static void |
execute(XSDContextIF ctx,
ExecutableIF executable,
java.util.logging.Logger messenger,
java.lang.String classname,
java.lang.String method)
Execute an implementation.
|
static void |
executeSequence(XSDContextIF ctx,
java.lang.String classname,
java.lang.String ident,
Implementationseq implSeq)
Execute a sequence of executable interfaces.
|
java.util.Vector<TargetElement> |
getAll()
Get all elements of the dropper list.
|
static java.lang.String |
getLocalFilename(XSDContextIF ctx,
java.lang.String filename)
Get the local filename.
|
int |
getMaxRows()
Get the total number rows to be selected.
|
java.lang.String |
getReferenceField()
Get the external reference reference name.
|
AoSession |
getSession()
Get the internal session.
|
java.lang.String |
getTargetField()
Get the target id reference name.
|
boolean |
handleTransaction()
Get the simulate flag.
|
void |
init()
Initialize the program.
|
boolean |
isSimulate()
Get the simulate flag.
|
static void |
main(java.lang.String[] args)
The main program to execute an Dropper XML fromn commandline.
|
void |
setDescriptor(java.lang.Object descriptor)
Set the XML tree descriptor.
|
void |
setReferenceField(java.lang.String referencefield)
Set the external reference reference name.
|
void |
setSession(AoSession aoSession)
Set the session.
|
void |
setTargetField(java.lang.String targetField)
Set the target id reference name.
|
void |
terminate()
Terminate the dropper.
|
addAttributesToNameValueUnitArray, addAttributeToNameValueUnitArray, addStringValueToNameValueUnitArray, checkDirectoy, checkDirectoy, checkDirectoy, checkFile, checkFile, checkFile, checkIntValue, checkStringValue, compressNvuArray, createMessageFromPropertyFile, createMessageFromPropertyFile, createMessageFromPropertyFile, createTsUnionFromObject, deleteRowWithAttributes, getArguments, getContext, getDescriptor, getListFromProperty, getMandatoryProperty, getMandatoryProperty, getMandatoryPropertyAsInt, getMandatoryPropertyAsList, getMandatoryPropertyWithRuleException, getNvuArrayFromMap, getNvuArrayFromMap, getNvuObjectWithName, getNvuObjectWithName, getNvuObjectWithName, getOdsCacheFromProperty, getOptioanlPropertyAsInt, getOptionalProperty, getOptionalProperty, getOptionalProperty, getOptionalProperty, getOptionalPropertyAsBoolean, getOptionalPropertyAsBoolean, getOptionalPropertyAsBoolean, getOptionalPropertyAsList, makeUpperCaseKeyword, removeAttributeFromNameValueUnitArray, removeAttributeFromNameValueUnitArray, setArguments, setContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContext, getDescriptor, setArguments, setContext
public static final java.lang.String DROPPER_REF_NAME
public static final java.lang.String CACHE_REF_NAME
public static final java.lang.String ODSCACHEFIELD
public static final java.lang.String TARGETFIELD
public static final java.lang.String REFERENCEFIELD
public Dropper()
public Dropper(XSDContextIF ctx) throws InvalidArgumentException, InvalidDescriptorException
ctx
- the context in that the model mapper should run.InvalidArgumentException
InvalidDescriptorException
public Dropper(XSDContextIF ctx, java.util.Properties properties) throws InvalidArgumentException, InvalidDescriptorException
ctx
- the context in that the model mapper should run.properties
- the arguments.InvalidArgumentException
InvalidDescriptorException
public Dropper(XSDContextIF ctx, java.util.Properties arguments, Dropper dropperXSD) throws InvalidArgumentException, InvalidDescriptorException
ctx
- the context in that the query should run.arguments
- the arguments (may be null)dropperXSD
- the XML tree node of the drop job.InvalidArgumentException
- if arguments are invalid.InvalidDescriptorException
- if descriptor is invalid.public Dropper(XSDContextIF ctx, Dropper dropperXSD) throws InvalidArgumentException, InvalidDescriptorException
ctx
- the context in that the query should run.dropperXSD
- the XML tree node of the drop job.InvalidArgumentException
- if arguments are invalid.InvalidDescriptorException
- if descriptor is invalid.public static Dropper createInstance(XSDContextIF ctx, java.lang.StringBuffer buf) throws java.io.FileNotFoundException, javax.xml.bind.JAXBException, java.io.IOException, InvalidArgumentException, InvalidDescriptorException, InitializationFailedException
ctx
- the contextbuf
- the string bufferjava.io.FileNotFoundException
- if schema file was not found.javax.xml.bind.JAXBException
- if the XML context was wrong.java.io.IOException
- if an IO problem occurs.InvalidArgumentException
- if there are wrong arguments for the implementation.InvalidDescriptorException
- if the descriptor is wrong.InitializationFailedException
- if initialization fails.public static Dropper createInstance(XSDContextIF ctx, java.lang.String[] buf) throws java.io.FileNotFoundException, javax.xml.bind.JAXBException, java.io.IOException, InvalidArgumentException, InvalidDescriptorException, InitializationFailedException
ctx
- the contextbuf
- the string arrayjava.io.FileNotFoundException
- if schema file was not found.javax.xml.bind.JAXBException
- if the XML context was wrong.java.io.IOException
- if an IO problem occurs.InvalidArgumentException
- if there are wrong arguments for the implementation.InvalidDescriptorException
- if the descriptor is wrong.InitializationFailedException
- if initialization fails.public static Dropper createInstance(XSDContextIF ctx, java.lang.String buf) throws java.io.FileNotFoundException, javax.xml.bind.JAXBException, java.io.IOException, InvalidArgumentException, InvalidDescriptorException, InitializationFailedException
ctx
- the contextbuf
- the stringjava.io.FileNotFoundException
- if schema file was not found.javax.xml.bind.JAXBException
- if the XML context was wrong.java.io.IOException
- if an IO problem occurs.InvalidArgumentException
- if there are wrong arguments for the implementation.InvalidDescriptorException
- if the descriptor is wrong.InitializationFailedException
- if initialization fails.public static Dropper createInstance(XSDContextIF ctx, java.io.InputStream is) throws java.io.FileNotFoundException, javax.xml.bind.JAXBException, java.io.IOException, InvalidArgumentException, InvalidDescriptorException, InitializationFailedException
ctx
- the contextis
- the input streamjava.io.FileNotFoundException
- if schema file was not found.javax.xml.bind.JAXBException
- if the XML context was wrong.java.io.IOException
- if an IO problem occurs.InvalidArgumentException
- if there are wrong arguments for the implementation.InvalidDescriptorException
- if the descriptor is wrong.InitializationFailedException
- if initialization fails.public void setDescriptor(java.lang.Object descriptor) throws InvalidDescriptorException
setDescriptor
in interface ImplementationIF
setDescriptor
in class AbstractImplementation
descriptor
- the tree node.InvalidDescriptorException
- if descriptor is not valid.protected static void checkDescriptor(java.lang.Object descriptor) throws InvalidDescriptorException
descriptor
- the descriptor.InvalidDescriptorException
- if descriptor is invliad.public void init() throws InitializationFailedException
init
in interface ImplementationIF
init
in class AbstractImplementation
InitializationFailedException
- if initialization fails.public void setTargetField(java.lang.String targetField)
targetField
- the new value.public int getMaxRows()
public boolean isSimulate()
public boolean handleTransaction()
public java.lang.String getTargetField()
public void setReferenceField(java.lang.String referencefield)
referencefield
- the new value.public java.lang.String getReferenceField()
public void execute() throws ExecutableException
execute
in interface ExecutableIF
ExecutableException
- if execution fails.public void add(ElemId id, boolean recursive, boolean delete, boolean deletefiles, boolean deleterefs)
id
- the element id.recursive
- true if this element should be dropped recursively.delete
- true if element should be dropped.deletefiles
- true if external references should also be deleted.deleterefs
- true if cold references should also be deleted.public void add(TargetElement element)
element
- the new target element.protected void dropTargets() throws AoException
AoException
- if ASAm ODS fails.public void dropFiles(CORBAFileServerIF server)
server
- the CROAB files server instance.public java.util.Vector<TargetElement> getAll()
public void dumpTargets(java.io.PrintStream printer) throws java.io.IOException
printer
- the printer.java.io.IOException
- if printing fails.public void dumpRefs(java.io.PrintStream printer) throws java.io.IOException
printer
- the printer.java.io.IOException
- if printing fails.public void dump() throws java.io.IOException
java.io.IOException
- if printing fails.public void terminate()
terminate
in interface ExecutableIF
public static void executeSequence(XSDContextIF ctx, java.lang.String classname, java.lang.String ident, Implementationseq implSeq) throws java.io.FileNotFoundException, InvalidDescriptorException, InvalidArgumentException, InitializationFailedException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
ident
- The method ident.implSeq
- the sequence.java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.io.IOException
InitializationFailedException
InvalidArgumentException
InvalidDescriptorException
java.io.FileNotFoundException
protected static void execute(XSDContextIF ctx, ExecutableIF executable, java.util.logging.Logger messenger, java.lang.String classname, java.lang.String method)
ctx
- the context.executable
- the executable definition.messenger
- the messenger.method
- the name of the method that calls this method.public void setSession(AoSession aoSession) throws AoException
aoSession
- the ASAM ODS session.AoException
- if ASAM ODS call fails.public AoSession createSession() throws AoException, java.lang.Exception
AoException
java.lang.Exception
public AoSession getSession()
public static void main(java.lang.String[] args)
args
- the command line arguments.public static java.lang.String getLocalFilename(XSDContextIF ctx, java.lang.String filename) throws java.io.IOException
a
- filename spec.java.io.IOException