public class AddService
extends atg.repository.xml.ModifyService
addItem()
method that can be called to actually perform
the work of adding an item.
This class will also keep track of performance statistics via
the PerformanceMonitor. The PerformanceMonitor component can be inspected
to track how this method performs.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ADD_SERVICE_OP_NAME |
static java.lang.String |
CHECKOUT_TAG
Tag supplied to the ResourcePools as an identifier for this
service.
|
static java.lang.String |
CLASS_VERSION |
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 |
---|
AddService() |
Modifier and Type | Method and Description |
---|---|
RepositoryItem |
addItem(java.io.InputStream pXMLInput)
This method adds an item to a particular repository.
|
RepositoryItem |
addItem(java.io.InputStream pXMLInput,
boolean pIsValidate,
boolean pEmptyTagIsNull,
boolean pMissingTagIsNull,
boolean pIsPersistItem,
boolean pIsEmptyTagIsEmptyString)
This method adds an item to a particular repository.
|
RepositoryItem |
addItem(java.io.Reader pXMLInput)
This method adds an item to a particular repository.
|
RepositoryItem |
addItem(java.io.Reader pXMLInput,
boolean pIsValidate,
boolean pEmptyTagIsNull,
boolean pMissingTagIsNull,
boolean pIsPersistItem,
boolean pIsEmptyTagIsEmptyString)
This method adds an item to a particular repository.
|
RepositoryItem |
addItem(java.io.Reader pXMLInput,
boolean pIsValidate,
boolean pEmptyTagIsNull,
boolean pMissingTagIsNull,
boolean pIsPersistItem,
boolean pIsEmptyTagIsEmptyString,
java.lang.String pTopLevelId)
This method adds an item to a particular repository.
|
RepositoryItem |
addItem(java.lang.String pXMLInput)
This method adds an item to a particular repository.
|
RepositoryItem |
addItem(java.lang.String pXMLInput,
boolean pIsValidate,
boolean pEmptyTagIsNull,
boolean pMissingTagIsNull,
boolean pIsPersistItem,
boolean pIsEmptyTagIsEmptyString)
This method adds an item to a particular repository.
|
atg.repository.xml.ModifyHandlerResourcePool |
getAddHandlerPool()
Maintain a pool of ContentHandlers that will be used to process
an instance document.
|
void |
setAddHandlerPool(atg.repository.xml.ModifyHandlerResourcePool pAddHandlerPool)
Set the AddHandlerPool property.
|
void |
setPropertiesOnContentHandler(atg.repository.xml.AddHandler pContentHandler,
boolean pEmptyTagIsNull,
boolean pMissingTagIsNull,
boolean pIsPersistItem,
boolean pEmptyTagIsEmptyString)
This method will set properties on the contentHandler
that control how the contentHandler will process a given
instance document.
|
clearGsaIdCache, error, fatalError, getCache, getCache, getDateFormat, getGsaIdCache, getRepositoryXMLTools, getSAXParserPool, getSchemaManager, getTransactionManager, isEmptyTagIsEmptyString, isEmptyTagIsNull, isLogWarningOnReadOnly, isMissingTagIsNull, isPersistItem, isUseGsaIdCache, isValidate, prepopulateCache, setDateFormat, setEmptyTagIsEmptyString, setEmptyTagIsNull, setFeaturesForXMLReader, setHandlersForXMLReader, setLogWarningOnReadOnly, setMissingTagIsNull, setPersistItem, setRepositoryXMLTools, setSAXParserPool, setSchemaManager, setTransactionManager, setUseGsaIdCache, setValidate, warning
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 ADD_SERVICE_OP_NAME
public atg.repository.xml.ModifyHandlerResourcePool getAddHandlerPool()
public void setAddHandlerPool(atg.repository.xml.ModifyHandlerResourcePool pAddHandlerPool)
pAddHandlerPool
- public RepositoryItem addItem(java.lang.String pXMLInput) throws AddException
pXMLInput
parameter.
Whether to validate, treat empty tags as null, missing tags as null
and to persist the item to the repository will be controlled by their
respective properties on this class.pXMLInput
- the instance document representing a repository item
to add.AddException
- if an error occurs.public RepositoryItem addItem(java.io.InputStream pXMLInput) throws AddException
pXMLInput
parameter.
Whether to validate, treat empty tags as null, missing tags as null
and to persist the item to the repository will be controlled by their
respective properties on this class.pXMLInput
- the instance document representing a repository item
to add.AddException
- if an error occurs.public RepositoryItem addItem(java.io.Reader pXMLInput) throws AddException
pXMLInput
parameter.
Whether to validate, treat empty tags as null, missing tags as null
and to persist the item to the repository will be controlled by their
respective properties on this class.pXMLInput
- the instance document representing a repository item
to add.AddException
- if an error occurs.public RepositoryItem addItem(java.lang.String pXMLInput, boolean pIsValidate, boolean pEmptyTagIsNull, boolean pMissingTagIsNull, boolean pIsPersistItem, boolean pIsEmptyTagIsEmptyString) throws AddException
pXMLInput
parameter.pXMLInput
- the instance document representing a repository item
to add.pIsValidate
- should the incoming instance document be validated.
Setting this to true will ensure safety of the instance documents but
will slow down processingpEmptyTagIsNull
- should empty tags be treated as null. For example,
if an element appeared in an instance document that looked like
<firstName/> this could either result in the firstName property
being set to null explicitly on the repository item, or skip setting
any value on the property. If this parameter is true, then null is set
explicitly, else no property is set.pMissingTagIsNull
- if this property is set to true, then all
tags that fail appear in a given instance document will have their
corresponding properties set to null on the repository item. For example,
if the firstName element had failed to appear in an instance document then
if this property was true null would be set for the firstName property.pIsPersistItem
- if this is true, then any item created will also
be persisted to the repository by calling the addItem() method.pIsEmptyTagIsEmptyString
- if this is true, then any empty tags
will result in setting the empty string assigned to the corresponding
propertyAddException
- if an error occurs.public RepositoryItem addItem(java.io.InputStream pXMLInput, boolean pIsValidate, boolean pEmptyTagIsNull, boolean pMissingTagIsNull, boolean pIsPersistItem, boolean pIsEmptyTagIsEmptyString) throws AddException
pXMLInput
parameter.pXMLInput
- the instance document representing a repository item
to add.pIsValidate
- should the incoming instance document be validated.
Setting this to true will ensure safety of the instance documents but
will slow down processingpEmptyTagIsNull
- should empty tags be treated as null. For example,
if an element appeared in an instance document that looked like
<firstName/> this could either result in the firstName property
being set to null explicitly on the repository item, or skip setting
any value on the property. If this parameter is true, then null is set
explicitly, else no property is set.pMissingTagIsNull
- if this property is set to true, then all
tags that fail appear in a given instance document will have their
corresponding properties set to null on the repository item. For example,
if the firstName element had failed to appear in an instance document then
if this property was true null would be set for the firstName property.pIsPersistItem
- if this is true, then any item created will also
be persisted to the repository by calling the addItem() method.pIsEmptyTagIsEmptyString
- if this is true, then any empty tags
will result in setting the empty string assigned to the corresponding
propertyAddException
- if an error occurs.public RepositoryItem addItem(java.io.Reader pXMLInput, boolean pIsValidate, boolean pEmptyTagIsNull, boolean pMissingTagIsNull, boolean pIsPersistItem, boolean pIsEmptyTagIsEmptyString) throws AddException
pXMLInput
parameter.pXMLInput
- the instance document representing a repository item
to add.pIsValidate
- should the incoming instance document be validated.
Setting this to true will ensure safety of the instance documents but
will slow down processingpEmptyTagIsNull
- should empty tags be treated as null. For example,
if an element appeared in an instance document that looked like
<firstName/> this could either result in the firstName property
being set to null explicitly on the repository item, or skip setting
any value on the property. If this parameter is true, then null is set
explicitly, else no property is set.pMissingTagIsNull
- if this property is set to true, then all
tags that fail appear in a given instance document will have their
corresponding properties set to null on the repository item. For example,
if the firstName element had failed to appear in an instance document then
if this property was true null would be set for the firstName property.pIsPersistItem
- if this is true, then any item created will also
be persisted to the repository by calling the addItem() method.pIsEmptyTagIsEmptyString
- if this is true, then any empty tags
will result in setting the empty string assigned to the corresponding
propertyAddException
- if an error occurs.public RepositoryItem addItem(java.io.Reader pXMLInput, boolean pIsValidate, boolean pEmptyTagIsNull, boolean pMissingTagIsNull, boolean pIsPersistItem, boolean pIsEmptyTagIsEmptyString, java.lang.String pTopLevelId) throws AddException
pXMLInput
parameter.pXMLInput
- the instance document representing a repository item
to add.pIsValidate
- should the incoming instance document be validated.
Setting this to true will ensure safety of the instance documents but
will slow down processingpEmptyTagIsNull
- should empty tags be treated as null. For example,
if an element appeared in an instance document that looked like
<firstName/> this could either result in the firstName property
being set to null explicitly on the repository item, or skip setting
any value on the property. If this parameter is true, then null is set
explicitly, else no property is set.pMissingTagIsNull
- if this property is set to true, then all
tags that fail appear in a given instance document will have their
corresponding properties set to null on the repository item. For example,
if the firstName element had failed to appear in an instance document then
if this property was true null would be set for the firstName property.pIsPersistItem
- if this is true, then any item created will also
be persisted to the repository by calling the addItem() method.pIsEmptyTagIsEmptyString
- if this is true, then any empty tags
will result in setting the empty string assigned to the corresponding
propertypTopLevelId
- the string that, if not null, should be used as the id of the
"top level" repository itemAddException
- if an error occurs.public void setPropertiesOnContentHandler(atg.repository.xml.AddHandler pContentHandler, boolean pEmptyTagIsNull, boolean pMissingTagIsNull, boolean pIsPersistItem, boolean pEmptyTagIsEmptyString) throws java.io.IOException, MappingException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, RepositoryException
pContentHandler
parameter passed to this method.
Additionally, the AddService
property is set on the
contentHandler, which is set to this AddService object.pContentHandler
- the contentHandler that will have its properties
setpEmptyTagIsNull
- are empty tags treated as explicit nullpMissingTagIsNull
- are missing tags from the instance document
treated as explicit nullpIsPersistItem
- should the created item be added to the repositorypEmptyTagIsEmptyString
- are empty tags treated as empty String
for String propertiesjava.io.IOException
MappingException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
RepositoryException