|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.repository.xml.RemoveService
public class RemoveService
This service is used to remove items from a repository. The items to remove are selected by passing a set of "match" properties to use to select the items, and the value from the incoming instance document is matched with.
Field Summary | |
---|---|
static java.lang.String |
CHECKOUT_TAG
|
static java.lang.String |
CLASS_VERSION
|
static java.lang.String |
REMOVE_SERVICE_OP_NAME
|
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
RemoveService()
|
Method Summary | |
---|---|
protected void |
deleteItem(RepositoryItem pItem)
Internal method to delete the items from the repository |
java.lang.String[] |
deleteItemsInIndTransaction(RepositoryItem[] pItems)
Removes the repository items with separate transaction for each item. |
AddService |
getAddService()
Returns the AddService nucleus component |
java.lang.String[] |
getMatchProperties()
Returns Properties to match in item descriptor |
int |
getMaxSelectedItems()
Returns Maximum number of items that can be removed with the given search criteria from the repository |
RepositoryXMLTools |
getRepositoryXMLTools()
Returns RepositoryXMLTools. |
javax.transaction.TransactionManager |
getTransactionManager()
Returns Transaction Manger |
protected DetailedRemoveException |
populateException(java.util.Map pMap,
java.util.List pList,
RepositoryItem pItem)
Internal to populate the DetailedRemoveException exception. |
protected DetailedRemoveException |
populateException(java.util.Map pMap,
java.util.List pList,
RepositoryItem pItem,
java.lang.Exception pFirstException)
Internal to populate the DetailedRemoveException exception. |
java.lang.String[] |
removeItems(org.xml.sax.InputSource pInputSource,
java.util.Map pMatchValues,
boolean pInOneTransaction)
Parses the XML Instance document to retrive the RepositoryItems and removes them from the repository. |
java.lang.String[] |
removeItems(org.xml.sax.InputSource pInputSource,
java.lang.String[] pMatchProperties,
boolean pInOneTransaction)
Parses the XML Instance document to retrive the RepositoryItems and removes them from the repository. |
java.lang.String[] |
removeItems(java.io.InputStream pInputStream,
java.util.Map pMatchValues,
boolean pInOneTransaction)
Parses the XML Instance document to retrive the RepositoryItems and removes them from the repository. |
java.lang.String[] |
removeItems(java.io.InputStream pInputStream,
java.lang.String[] pMatchProperties,
boolean pInOneTransaction)
Parses the XML Instance document to retrive the RepositoryItems and removes them from the repository. |
java.lang.String[] |
removeItems(java.io.Reader pReader,
java.util.Map pMatchValues,
boolean pInOneTransaction)
Parses the XML Instance document to retrive the RepositoryItems and removes them from the repository. |
java.lang.String[] |
removeItems(java.io.Reader pReader,
java.lang.String[] pMatchProperties,
boolean pInOneTransaction)
Parses the XML Instance document to retrive the RepositoryItems and removes them from the repository. |
java.lang.String[] |
removeItems(java.lang.String pXMLString,
java.util.Map pMatchValues,
boolean pInOneTransaction)
Parses the XML Instance document to retrive the RepositoryItems and removes them from the repository. |
java.lang.String[] |
removeItems(java.lang.String pXMLString,
java.lang.String[] pMatchProperties,
boolean pInOneTransaction)
Parses the XML Instance document to retrive the RepositoryItems and removes them from the repository. |
void |
setAddService(AddService pAddService)
Sets Properties to match in item descriptor |
void |
setMatchProperties(java.lang.String[] pMatchProperties)
Sets Properties to match in item descriptor |
void |
setMaxSelectedItems(int pMaxSelectedItems)
Sets Maximum number of items that can be removed with the given search criteria from the repository |
void |
setRepositoryXMLTools(RepositoryXMLTools pRepositoryXMLTools)
Sets RepositoryXMLTools |
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Sets Transaction Manger |
void |
verifyProperties(java.lang.String[] pMatchProperties,
RepositoryItemDescriptor pItemDescriptor)
Verifies whether the matched properties passed are simple type properties or not as defined in the Repository. |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
public static final java.lang.String CHECKOUT_TAG
public static final java.lang.String REMOVE_SERVICE_OP_NAME
Constructor Detail |
---|
public RemoveService()
Method Detail |
---|
public RepositoryXMLTools getRepositoryXMLTools()
public void setRepositoryXMLTools(RepositoryXMLTools pRepositoryXMLTools)
pRepositoryXMLTools
- a RepositoryXMLTools
valuepublic int getMaxSelectedItems()
public void setMaxSelectedItems(int pMaxSelectedItems)
MaxSelectedItems
- public javax.transaction.TransactionManager getTransactionManager()
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
TransactionManager
- public java.lang.String[] getMatchProperties()
public void setMatchProperties(java.lang.String[] pMatchProperties)
MatchProperties
- public AddService getAddService()
public void setAddService(AddService pAddService)
MatchProperties
- public java.lang.String[] removeItems(java.io.Reader pReader, java.lang.String[] pMatchProperties, boolean pInOneTransaction) throws RemoveException, DetailedRemoveException, MaxNumberItemsException, MatchException
pReader
- the reader that reads the incoming XML streampMatchProperties
- array of top-level properties that should be used
to select items out of the repository for deletion.pInOneTransaction
- should all selected items be deleted in one
transaction, or in their own separate transaction.
RemoveException
- if an error occurs
DetailedRemoveException
- if more then one item was removed,
then this will contain an entry for each item removed
MaxNumberItemsException
- if more items were selected from the
repository then the allowable number. (as defined by the maxNumberSelectedItems)
property.
MatchException
public java.lang.String[] removeItems(java.io.InputStream pInputStream, java.lang.String[] pMatchProperties, boolean pInOneTransaction) throws RemoveException, DetailedRemoveException, MaxNumberItemsException, MatchException
pInputStream
- the reader that reads the incoming XML streampMatchProperties
- array of top-level properties that should be used
to select items out of the repository for deletion.pInOneTransaction
- should all selected items be deleted in one
transaction, or in their own separate transaction.
RemoveException
- if an error occurs
DetailedRemoveException
- if more then one item was removed,
then this will contain an entry for each item removed
MaxNumberItemsException
- if more items were selected from the
repository then the allowable number. (as defined by the maxNumberSelectedItems)
property.
MatchException
public java.lang.String[] removeItems(java.lang.String pXMLString, java.lang.String[] pMatchProperties, boolean pInOneTransaction) throws RemoveException, DetailedRemoveException, MaxNumberItemsException, MatchException
pXMLString
- the XML documentpMatchProperties
- array of top-level properties that should be used
to select items out of the repository for deletion.pInOneTransaction
- should all selected items be deleted in one
transaction, or in their own separate transaction.
RemoveException
- if an error occurs
DetailedRemoveException
- if more then one item was removed,
then this will contain an entry for each item removed
MaxNumberItemsException
- if more items were selected from the
repository then the allowable number. (as defined by the maxNumberSelectedItems)
property.
MatchException
public java.lang.String[] removeItems(org.xml.sax.InputSource pInputSource, java.lang.String[] pMatchProperties, boolean pInOneTransaction) throws RemoveException, MaxNumberItemsException, DetailedRemoveException, MatchException
pInputSource
- the reader that reads the incoming XML streampMatchProperties
- array of top-level properties that should be used
to select items out of the repository for deletion.pInOneTransaction
- should all selected items be deleted in one
transaction, or in their own separate transaction.
RemoveException
- if an error occurs
DetailedRemoveException
- if more then one item was removed,
then this will contain an entry for each item removed
MaxNumberItemsException
- if more items were selected from the
repository then the allowable number. (as defined by the maxNumberSelectedItems)
property.
MatchException
public java.lang.String[] removeItems(java.io.Reader pReader, java.util.Map pMatchValues, boolean pInOneTransaction) throws RemoveException, DetailedRemoveException, MaxNumberItemsException, MatchException
pReader
- the reader that reads the incoming XML streampMatchValues
- Set of key/value pairs that we should match on.
Items will be selected out
of the repository whose properties (corresponding to the key
in the pMatchValues) have values equal to corresponding the values
in the pMatchValues.pInOneTransaction
- should all selected items be deleted in one
transaction, or in their own separate transaction.
RemoveException
- if an error occurs
DetailedRemoveException
- if more then one item was removed,
then this will contain an entry for each item removed
MaxNumberItemsException
- if more items were selected from the
repository then the allowable number. (as defined by the maxNumberSelectedItems)
property.
MatchException
public java.lang.String[] removeItems(java.io.InputStream pInputStream, java.util.Map pMatchValues, boolean pInOneTransaction) throws RemoveException, DetailedRemoveException, MaxNumberItemsException, MatchException
pInputStream
- the reader that reads the incoming XML streampMatchValues
- Set of key/value pairs that we should match on.
Items will be selected out
of the repository whose properties (corresponding to the key
in the pMatchValues) have values equal to corresponding the values
in the pMatchValues.pInOneTransaction
- should all selected items be deleted in one
transaction, or in their own separate transaction.
RemoveException
- if an error occurs
DetailedRemoveException
- if more then one item was removed,
then this will contain an entry for each item removed
MaxNumberItemsException
- if more items were selected from the
repository then the allowable number. (as defined by the maxNumberSelectedItems)
property.
MatchException
public java.lang.String[] removeItems(java.lang.String pXMLString, java.util.Map pMatchValues, boolean pInOneTransaction) throws RemoveException, DetailedRemoveException, MaxNumberItemsException, MatchException
pXMLString
- the XML documentpMatchValues
- Set of key/value pairs that we should match on.
Items will be selected out
of the repository whose properties (corresponding to the key
in the pMatchValues) have values equal to corresponding the values
in the pMatchValues.pInOneTransaction
- should all selected items be deleted in one
transaction, or in their own separate transaction.
RemoveException
- if an error occurs
DetailedRemoveException
- if more then one item was removed,
then this will contain an entry for each item removed
MaxNumberItemsException
- if more items were selected from the
repository then the allowable number. (as defined by the maxNumberSelectedItems)
property.
MatchException
public java.lang.String[] removeItems(org.xml.sax.InputSource pInputSource, java.util.Map pMatchValues, boolean pInOneTransaction) throws RemoveException, MaxNumberItemsException, DetailedRemoveException, MatchException
pInputSource
- the reader that reads the incoming XML streampMatchValues
- Set of key/value pairs that we should match on.
Items will be selected out
of the repository whose properties (corresponding to the key
in the pMatchValues) have values equal to corresponding the values
in the pMatchValues.pInOneTransaction
- should all selected items be deleted in one
transaction, or in their own separate transaction.
RemoveException
- if an error occurs
DetailedRemoveException
- if more then one item was removed,
then this will contain an entry for each item removed
MaxNumberItemsException
- if more items were selected from the
repository then the allowable number. (as defined by the maxNumberSelectedItems)
property.
MatchException
public java.lang.String[] deleteItemsInIndTransaction(RepositoryItem[] pItems) throws RemoveException, DetailedRemoveException
pItems
- array of items that should all be removed in one transaction
RemoveException
- if an error occured
DetailedRemoveException
- if more then one item was removed,
this will contain an entry for each item removed and the associatd error.protected DetailedRemoveException populateException(java.util.Map pMap, java.util.List pList, RepositoryItem pItem)
DetailedRemoveException
exception.
pMap
- map of item to exceptionpList
- list of items that were supposed to be removedpItem
- the item that was attempted to be removedn
protected DetailedRemoveException populateException(java.util.Map pMap, java.util.List pList, RepositoryItem pItem, java.lang.Exception pFirstException)
DetailedRemoveException
exception.
pMap
- map of item to exceptionpList
- list of items that were supposed to be removedpItem
- the item that was attempted to be removednpFirstException
- the first exception encountered in
the remove process.
protected void deleteItem(RepositoryItem pItem) throws RepositoryException
pItem
- the item that should be removed from the repository.
RepositoryException
- if an error occurspublic void verifyProperties(java.lang.String[] pMatchProperties, RepositoryItemDescriptor pItemDescriptor) throws RemoveException
pMatchProperties
- properties to check forpItemDescriptor
- RepositoryItemDescriptor to check against.
RemoveException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |