public class RemoveService extends GenericService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CHECKOUT_TAG |
static java.lang.String |
CLASS_VERSION |
static java.lang.String |
REMOVE_SERVICE_OP_NAME |
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
RemoveService() |
Modifier and Type | Method and Description |
---|---|
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.
|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
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
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 occursDetailedRemoveException
- if more than one item was removed,
then this will contain an entry for each item removedMaxNumberItemsException
- 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 occursDetailedRemoveException
- if more than one item was removed,
then this will contain an entry for each item removedMaxNumberItemsException
- 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 occursDetailedRemoveException
- if more than one item was removed,
then this will contain an entry for each item removedMaxNumberItemsException
- 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 occursDetailedRemoveException
- if more than one item was removed,
then this will contain an entry for each item removedMaxNumberItemsException
- 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 occursDetailedRemoveException
- if more than one item was removed,
then this will contain an entry for each item removedMaxNumberItemsException
- 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 occursDetailedRemoveException
- if more than one item was removed,
then this will contain an entry for each item removedMaxNumberItemsException
- 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 occursDetailedRemoveException
- if more than one item was removed,
then this will contain an entry for each item removedMaxNumberItemsException
- 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 occursDetailedRemoveException
- if more than one item was removed,
then this will contain an entry for each item removedMaxNumberItemsException
- 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 transactionRemoveException
- if an error occuredDetailedRemoveException
- if more than 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 removednprotected 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