atg.repository
Class RepositoryServices

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.repository.RepositoryServices
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, atg.repository.RepositoryServiceConstants, java.util.EventListener

public class RepositoryServices
extends GenericService
implements atg.repository.RepositoryServiceConstants

A collection of web service methods pertaining to repositories


Field Summary
static java.lang.String ADD_ITEM_METHOD
          Constants for the names of methods that can be used as web services, used by the Web Services HTML Wizard for making repository services
static java.lang.String ADD_TO_COLLECTION_PROPERTY_METHOD
           
static java.lang.String ADD_TO_MAP_PROPERTY_METHOD
           
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String GET_ITEM_METHOD
           
static java.lang.String GET_MAP_PROPERTY_METHOD
           
static java.lang.String GET_PROPERTY_METHOD
           
static int NO_POSITION
           
static java.lang.String REMOVE_FROM_COLLECTION_PROPERTY_METHOD
           
static java.lang.String REMOVE_FROM_MAP_PROPERTY_METHOD
           
static java.lang.String REMOVE_ITEM_METHOD
           
static java.lang.String SET_PROPERTY_METHOD
           
static java.lang.String UPDATE_ITEM_METHOD
           
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.repository.RepositoryServiceConstants
ADD_ITEM_NULL, INVALID_ARRAY_ADD_INDEX, INVALID_ARRAY_INDEX, INVALID_ARRAY_REMOVE, INVALID_ARRAY_REMOVE_INDEX, INVALID_CLASS, INVALID_LIST_ADD_INDEX, INVALID_LIST_REMOVE, INVALID_LIST_REMOVE_INDEX, INVALID_SET_REMOVE, NULL_DESC, NULL_DESC_NAME, NULL_ID, NULL_ITEM, NULL_MAP_KEY, NULL_MAP_VALUE, NULL_PROP_DESC, NULL_REP, NULL_REP_PATH, NULL_RQL, RESOURCE_BUNDLE_NAME, sResourceBundle, UPDATE_ITEM_NULL
 
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
RepositoryServices()
           
 
Method Summary
 void addArrayPropertyValue(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId, java.lang.String pPropertyName, java.lang.Object pValueToAdd)
          Adds a value to an array property
 void addArrayPropertyValueAtIndex(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId, java.lang.String pPropertyName, java.lang.Object pValueToAdd, int pIndex)
          Adds a value to an array property at the specified index
 void addCollectionPropertyValue(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId, java.lang.String pPropertyName, java.lang.Object pValueToAdd)
          Adds a value to a collection property i.e.
 void addListPropertyValue(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId, java.lang.String pPropertyName, java.lang.Object pValueToAdd)
          Adds a value to a List property.
 void addListPropertyValueAtIndex(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId, java.lang.String pPropertyName, java.lang.Object pValueToAdd, int pIndex)
          Adds a value to a List property at the specified index
 void addMapPropertyValue(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId, java.lang.String pPropertyName, java.lang.String pMapKey, java.lang.Object pPropertyValue)
          Adds a value to a Map property
 java.lang.String addRepositoryItem(java.lang.String pItemAsXML)
          Adds an item to the repository
 java.lang.String addRepositoryItem(java.lang.String pItemAsXML, java.lang.String pMappingFile)
          Adds an item to the repository
 void addSetPropertyValue(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId, java.lang.String pPropertyName, java.lang.Object pValueToAdd)
          Adds a value to a Set property
protected  void commitTransaction()
          Commits the current transaction
protected  javax.transaction.Transaction ensureTransaction()
          This method ensures that a transaction exists before returning.
 atg.repository.xml.ItemDescriptorMappingManager getMappingManager()
          Get property MappingManager
 java.lang.Object getMapPropertyValue(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId, java.lang.String pPropertyName, java.lang.String pKey)
          Gets a map property value from a repository item specified by the required arguments
 java.lang.String[] getPropertyNamesForItem(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName)
          Returns an array of String containing the property names for a given repository item.
 java.lang.Object getPropertyValue(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId, java.lang.String pPropertyName)
          Gets a property value from a repository item specified by the required arguments
 java.lang.String getRepositoryItem(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId)
          Gets a repository item in XML format with the given id and item descriptor from the given repository
 java.lang.String getRepositoryItem(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId, java.lang.String pMappingFile)
          Gets a repository item in XML format with the given id and item descriptor from the given repository
 javax.transaction.TransactionManager getTransactionManager()
          Get property TransactionManager
 AddService getXmlAddService()
          Get property XmlAddService
 GetService getXmlGetService()
          Get property XmlGetService
 UpdateService getXmlUpdateService()
          Get property XmlUpdateService
 boolean isUseDefaultMappings()
          Get property UseDefaultMappings
 int performRQLCountQuery(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRQLQuery)
          Performs an RQL query using the given query statement against the given repository and item descriptor
 java.lang.String[] performRQLQuery(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRQLQuery)
          Performs an RQL query using the given query statement against the given repository and item descriptor
 java.lang.String[] performRQLQuery(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRQLQuery, java.lang.String pMappingFile)
          Performs an RQL query using the given query statement against the given repository and item descriptor
 void removeArrayPropertyValue(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId, java.lang.String pPropertyName, java.lang.Object pValueToRemove)
          Removes a value from an array property
 void removeArrayPropertyValueAtIndex(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId, java.lang.String pPropertyName, int pIndex)
          Removes a value from an array property
 void removeCollectionPropertyValue(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId, java.lang.String pPropertyName, java.lang.Object pValueToRemove)
          Removes a value from a collection property i.e.
 void removeListPropertyValue(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId, java.lang.String pPropertyName, java.lang.Object pValueToRemove)
          Removes a value from a List property
 void removeListPropertyValueAtIndex(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId, java.lang.String pPropertyName, int pIndex)
          Removes a value from a List property
 java.lang.Object removeMapPropertyValue(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId, java.lang.String pPropertyName, java.lang.String pMapKey)
          Removes a value from a Map property
 void removeRepositoryItem(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId)
          Removes an item from a repository.
 void removeSetPropertyValue(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId, java.lang.String pPropertyName, java.lang.Object pValueToRemove)
          Removes a value from a Set property
 void setMappingManager(atg.repository.xml.ItemDescriptorMappingManager pMappingManager)
          Set property MappingManager
 void setPropertyValue(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pRepositoryId, java.lang.String pPropertyName, java.lang.Object pPropertyValue)
          Sets pPropertyName to pPropertyValue on the item specified by pRepositoryId found in the given repository
 void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
          Set property TransactionManager
 void setUseDefaultMappings(boolean pUseDefaultMappings)
          Set property UseDefaultMappings
 void setXmlAddService(AddService pXmlAddService)
          Set property XmlAddService
 void setXmlGetService(GetService pXmlGetService)
          Set property XmlGetService
 void setXmlUpdateService(UpdateService pXmlUpdateService)
          Set property XmlUpdateService
 java.lang.Object translatePropertyValue(java.lang.String pRepositoryPath, java.lang.String pItemDescriptorName, java.lang.String pPropertyName, java.lang.String pRepositoryId, java.lang.Object pPassedInValue)
          Translates the given property value depending on the class of the given property.
 void updateRepositoryItem(java.lang.String pItemAsXML)
          Updates a repository item
 void updateRepositoryItem(java.lang.String pItemAsXML, java.lang.String[] pMatchedProperties)
          Updates a repository item
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
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

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


ADD_ITEM_METHOD

public static final java.lang.String ADD_ITEM_METHOD
Constants for the names of methods that can be used as web services, used by the Web Services HTML Wizard for making repository services

See Also:
Constant Field Values

GET_ITEM_METHOD

public static final java.lang.String GET_ITEM_METHOD
See Also:
Constant Field Values

REMOVE_ITEM_METHOD

public static final java.lang.String REMOVE_ITEM_METHOD
See Also:
Constant Field Values

UPDATE_ITEM_METHOD

public static final java.lang.String UPDATE_ITEM_METHOD
See Also:
Constant Field Values

SET_PROPERTY_METHOD

public static final java.lang.String SET_PROPERTY_METHOD
See Also:
Constant Field Values

GET_PROPERTY_METHOD

public static final java.lang.String GET_PROPERTY_METHOD
See Also:
Constant Field Values

ADD_TO_COLLECTION_PROPERTY_METHOD

public static final java.lang.String ADD_TO_COLLECTION_PROPERTY_METHOD
See Also:
Constant Field Values

REMOVE_FROM_COLLECTION_PROPERTY_METHOD

public static final java.lang.String REMOVE_FROM_COLLECTION_PROPERTY_METHOD
See Also:
Constant Field Values

ADD_TO_MAP_PROPERTY_METHOD

public static final java.lang.String ADD_TO_MAP_PROPERTY_METHOD
See Also:
Constant Field Values

REMOVE_FROM_MAP_PROPERTY_METHOD

public static final java.lang.String REMOVE_FROM_MAP_PROPERTY_METHOD
See Also:
Constant Field Values

GET_MAP_PROPERTY_METHOD

public static final java.lang.String GET_MAP_PROPERTY_METHOD
See Also:
Constant Field Values

NO_POSITION

public static final int NO_POSITION
See Also:
Constant Field Values
Constructor Detail

RepositoryServices

public RepositoryServices()
Method Detail

setTransactionManager

public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Set property TransactionManager

Parameters:
pTransactionManager - the transaction manager for all web services

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()
Get property TransactionManager

Returns:
the transaction manager for all web services

setXmlGetService

public void setXmlGetService(GetService pXmlGetService)
Set property XmlGetService

Parameters:
pXmlGetService - the service that turns a RepositoryItem into an XML file

getXmlGetService

public GetService getXmlGetService()
Get property XmlGetService

Returns:
the service that turns a RepositoryItem into an XML file

setXmlAddService

public void setXmlAddService(AddService pXmlAddService)
Set property XmlAddService

Parameters:
pXmlAddService - the service that adds a RepositoryItem in XML format to a Repository

getXmlAddService

public AddService getXmlAddService()
Get property XmlAddService

Returns:
the service that adds a RepositoryItem in XML format to a Repository

setXmlUpdateService

public void setXmlUpdateService(UpdateService pXmlUpdateService)
Set property XmlUpdateService

Parameters:
pXmlUpdateService - the service that updates a RepositoryItem in XML format

getXmlUpdateService

public UpdateService getXmlUpdateService()
Get property XmlUpdateService

Returns:
the service that updates a RepositoryItem in XML format

setMappingManager

public void setMappingManager(atg.repository.xml.ItemDescriptorMappingManager pMappingManager)
Set property MappingManager

Parameters:
pMappingManager - the service that controls mapping files for all item descriptors

getMappingManager

public atg.repository.xml.ItemDescriptorMappingManager getMappingManager()
Get property MappingManager

Returns:
the service that controls mapping files for all item descriptors

setUseDefaultMappings

public void setUseDefaultMappings(boolean pUseDefaultMappings)
Set property UseDefaultMappings

Parameters:
pUseDefaultMappings - true if services that return Repo2Xml items should use default mapping files supplied by the ItemMappingManager configured for this component. This property is ignored if a mapping file is explicitly passed to the service

isUseDefaultMappings

public boolean isUseDefaultMappings()
Get property UseDefaultMappings

Returns:
true if services that return Repo2Xml items should use default mapping files supplied by the ItemMappingManager configured for this component. This property is ignored if a mapping file is explicitly passed to the service

getRepositoryItem

public java.lang.String getRepositoryItem(java.lang.String pRepositoryPath,
                                          java.lang.String pItemDescriptorName,
                                          java.lang.String pRepositoryId)
                                   throws RepositoryException
Gets a repository item in XML format with the given id and item descriptor from the given repository

Parameters:
pRepositoryPath - the nucleus path of the repository that holds the requested item
pItemDescriptorName - the name of the item type to retrieve
pRepositoryId - the id of the item to retrieve
Returns:
the requested RepositoryItem in XML format
Throws:
RepositoryException - if a repository error occurs

getRepositoryItem

public java.lang.String getRepositoryItem(java.lang.String pRepositoryPath,
                                          java.lang.String pItemDescriptorName,
                                          java.lang.String pRepositoryId,
                                          java.lang.String pMappingFile)
                                   throws RepositoryException
Gets a repository item in XML format with the given id and item descriptor from the given repository

Parameters:
pRepositoryPath - the nucleus path of the repository that holds the requested item
pItemDescriptorName - the name of the item type to retrieve
pRepositoryId - the id of the item to retrieve
pMappingFile - a file that can cull property values from the returned XML file, so that not everything is transmitted back to the client e.g. for a "user", you might want to not return the value of the "password" property
Returns:
the requested RepositoryItem in XML format
Throws:
RepositoryException - if a repository error occurs

addRepositoryItem

public java.lang.String addRepositoryItem(java.lang.String pItemAsXML)
                                   throws RepositoryException
Adds an item to the repository

Parameters:
pItemAsXML - the item to add in XML format. The name of the repository and the item's type are present in the XML format, so those do not need to be supplied as arguments
Returns:
the added item in XML format
Throws:
RepositoryException - if an error occurs adding the item

addRepositoryItem

public java.lang.String addRepositoryItem(java.lang.String pItemAsXML,
                                          java.lang.String pMappingFile)
                                   throws RepositoryException
Adds an item to the repository

Parameters:
pItemAsXML - the item to add in XML format. The name of the repository and the item's type are present in the XML format, so those do not need to be supplied as arguments
pMappingFile - a file that can cull property values from the returned XML file, so that not everything is transmitted back to the client e.g. for a "user", you might want to not return the value of the "password" property
Returns:
the added item in XML format
Throws:
RepositoryException - if an error occurs adding the item

updateRepositoryItem

public void updateRepositoryItem(java.lang.String pItemAsXML)
                          throws RepositoryException
Updates a repository item

Parameters:
pItemAsXML - the item to update in XML format. The name of the repository and the item's type are present in the XML format, so those do not need to be supplied as arguments. This method will determine which known RepositoryItem to update based on the id specified in the pItemAsXML. If there is no existing item which matches that id, then the item will be added to the repository if the xmlUpdateService component has its addWhenNoMatchedItems flag set to true.
Throws:
RepositoryException - if an error occurs updating the item in the repository

updateRepositoryItem

public void updateRepositoryItem(java.lang.String pItemAsXML,
                                 java.lang.String[] pMatchedProperties)
                          throws RepositoryException
Updates a repository item

Parameters:
pItemAsXML - the item to update in XML format. The name of the repository and the item's type are present in the XML format, so those do not need to be supplied as arguments. This method will determine which known RepositoryItem to update based on the values of the properties listed in pMatchedProperties present in the pItemAsXML, or if that argument is null, the repositoryId will be used to match items. If there is no existing item which matches those property values, then the item will be added to the repository if the xmlUpdateService component has its addWhenNoMatchedItems flag set to true.
pMatchedProperties - an array of property names that will be used to match up values between the given pItemAsXML and an existing RepositoryItem object (note: use "repositoryId" to specify the matching of ids)
Throws:
RepositoryException - if an error occurs updating the item in the repository

removeRepositoryItem

public void removeRepositoryItem(java.lang.String pRepositoryPath,
                                 java.lang.String pItemDescriptorName,
                                 java.lang.String pRepositoryId)
                          throws RepositoryException
Removes an item from a repository.

Parameters:
pRepositoryPath - the nucleus path of the repository that contains the item to remove
pItemDescriptorName - the item type of the item to remove
pRepositoryId - the id of the item to remove
Throws:
RepositoryException - if an error occurs removing the item

performRQLCountQuery

public int performRQLCountQuery(java.lang.String pRepositoryPath,
                                java.lang.String pItemDescriptorName,
                                java.lang.String pRQLQuery)
                         throws RepositoryException
Performs an RQL query using the given query statement against the given repository and item descriptor

Parameters:
pRepositoryPath - the nucleus path of the repository to perform the query against
pItemDescriptorName - the item type of the returned items
pRQLQuery - the query string to execute. This rql query must not contain parameters i.e. all values must be filled
Returns:
the number of items that matches the given query
Throws:
RepositoryException - if a repository error occurs

performRQLQuery

public java.lang.String[] performRQLQuery(java.lang.String pRepositoryPath,
                                          java.lang.String pItemDescriptorName,
                                          java.lang.String pRQLQuery)
                                   throws RepositoryException
Performs an RQL query using the given query statement against the given repository and item descriptor

Parameters:
pRepositoryPath - the nucleus path of the repository to perform the query against
pItemDescriptorName - the item type of the returned items
pRQLQuery - the query string to execute. This RQL query must not contain parameters i.e. all values must be filled
Returns:
an array of RepositoryItems in XML format
Throws:
RepositoryException - if a repository error occurs

performRQLQuery

public java.lang.String[] performRQLQuery(java.lang.String pRepositoryPath,
                                          java.lang.String pItemDescriptorName,
                                          java.lang.String pRQLQuery,
                                          java.lang.String pMappingFile)
                                   throws RepositoryException
Performs an RQL query using the given query statement against the given repository and item descriptor

Parameters:
pRepositoryPath - the nucleus path of the repository to perform the query against
pItemDescriptorName - the item type of the returned items
pRQLQuery - the query string to execute. This RQL query must not contain parameters i.e. all values must be filled
pMappingFile - a file that can cull property values from the returned XML file, so that not everything is transmitted back to the client e.g. for a "user", you might want to not return the value of the "password" property
Returns:
an array of RepositoryItems in XML format
Throws:
RepositoryException - if a repository error occurs

addCollectionPropertyValue

public void addCollectionPropertyValue(java.lang.String pRepositoryPath,
                                       java.lang.String pItemDescriptorName,
                                       java.lang.String pRepositoryId,
                                       java.lang.String pPropertyName,
                                       java.lang.Object pValueToAdd)
                                throws RepositoryException
Adds a value to a collection property i.e. List, Set or array

Parameters:
pRepositoryPath - the nucleus path of the repository that contains the item to set the property on
pItemDescriptorName - the item type of the item to set the property on
pRepositoryId - the id of the item to set the property on
pPropertyName - the name of the collection property to add a value to
pValueToAdd - the value to add to the collection
Throws:
RepositoryException - if any of the arguments are invalid, or an error occurs adding the item to the collection

removeCollectionPropertyValue

public void removeCollectionPropertyValue(java.lang.String pRepositoryPath,
                                          java.lang.String pItemDescriptorName,
                                          java.lang.String pRepositoryId,
                                          java.lang.String pPropertyName,
                                          java.lang.Object pValueToRemove)
                                   throws RepositoryException
Removes a value from a collection property i.e. List, Set or array

Parameters:
pRepositoryPath - the nucleus path of the repository that contains the item to remove the property value from
pItemDescriptorName - the item type of the item to remove the property value from
pRepositoryId - the id of the item to remove the property value from
pPropertyName - the name of the collection property to remove a property value from
pValueToRemove - the value to remove from the collection. For List and array properties, this will be the first occurrance of the item in the List or array.
Throws:
RepositoryException - if any of the arguments are invalid, or an error occurs removing the item from the collection

addListPropertyValue

public void addListPropertyValue(java.lang.String pRepositoryPath,
                                 java.lang.String pItemDescriptorName,
                                 java.lang.String pRepositoryId,
                                 java.lang.String pPropertyName,
                                 java.lang.Object pValueToAdd)
                          throws RepositoryException
Adds a value to a List property. The value is added to the end of the list

Parameters:
pRepositoryPath - the nucleus path of the repository that contains the item to set the property on
pItemDescriptorName - the item type of the item to set the property on
pRepositoryId - the id of the item to set the property on
pPropertyName - the name of the List property to add a value to
pValueToAdd - the value to add to the end of the list
Throws:
RepositoryException - if any of the arguments are invalid, the given property does not evaluate to a list, or an error occurs adding the item to the collection

addListPropertyValueAtIndex

public void addListPropertyValueAtIndex(java.lang.String pRepositoryPath,
                                        java.lang.String pItemDescriptorName,
                                        java.lang.String pRepositoryId,
                                        java.lang.String pPropertyName,
                                        java.lang.Object pValueToAdd,
                                        int pIndex)
                                 throws RepositoryException
Adds a value to a List property at the specified index

Parameters:
pRepositoryPath - the nucleus path of the repository that contains the item to set the property on
pItemDescriptorName - the item type of the item to set the property on
pRepositoryId - the id of the item to set the property on
pPropertyName - the name of the List property to add a value to
pValueToAdd - the value to add to the list
pIndex - the index to add the value at
Throws:
RepositoryException - if any of the arguments are invalid, the given property does not evaluate to a list, or an error occurs adding the item to the collection

removeListPropertyValue

public void removeListPropertyValue(java.lang.String pRepositoryPath,
                                    java.lang.String pItemDescriptorName,
                                    java.lang.String pRepositoryId,
                                    java.lang.String pPropertyName,
                                    java.lang.Object pValueToRemove)
                             throws RepositoryException
Removes a value from a List property

Parameters:
pRepositoryPath - the nucleus path of the repository that contains the item to remove the property value from
pItemDescriptorName - the item type of the item to remove the property value from
pRepositoryId - the id of the item to remove the property value from
pPropertyName - the name of the List property to remove a property value from
pValueToRemove - the value to remove from the collection. This will be the first occurrance of the item in the List
Throws:
RepositoryException - if any of the arguments are invalid, or an error occurs removing the item from the List

removeListPropertyValueAtIndex

public void removeListPropertyValueAtIndex(java.lang.String pRepositoryPath,
                                           java.lang.String pItemDescriptorName,
                                           java.lang.String pRepositoryId,
                                           java.lang.String pPropertyName,
                                           int pIndex)
                                    throws RepositoryException
Removes a value from a List property

Parameters:
pRepositoryPath - the nucleus path of the repository that contains the item to remove the property value from
pItemDescriptorName - the item type of the item to remove the property value from
pRepositoryId - the id of the item to remove the property value from
pPropertyName - the name of the List property to remove a property value from
pIndex - the index of the element to remove
Throws:
RepositoryException - if any of the arguments are invalid, or an error occurs removing the item from the List

addSetPropertyValue

public void addSetPropertyValue(java.lang.String pRepositoryPath,
                                java.lang.String pItemDescriptorName,
                                java.lang.String pRepositoryId,
                                java.lang.String pPropertyName,
                                java.lang.Object pValueToAdd)
                         throws RepositoryException
Adds a value to a Set property

Parameters:
pRepositoryPath - the nucleus path of the repository that contains the item to set the property on
pItemDescriptorName - the item type of the item to set the property on
pRepositoryId - the id of the item to set the property on
pPropertyName - the name of the Set property to add a value to
pValueToAdd - the value to add to the set
Throws:
RepositoryException - if any of the arguments are invalid, the given property does not evaluate to a set, or an error occurs adding the item to the collection

removeSetPropertyValue

public void removeSetPropertyValue(java.lang.String pRepositoryPath,
                                   java.lang.String pItemDescriptorName,
                                   java.lang.String pRepositoryId,
                                   java.lang.String pPropertyName,
                                   java.lang.Object pValueToRemove)
                            throws RepositoryException
Removes a value from a Set property

Parameters:
pRepositoryPath - the nucleus path of the repository that contains the item to remove the property value from
pItemDescriptorName - the item type of the item to remove the property value from
pRepositoryId - the id of the item to remove the property value from
pPropertyName - the name of the Set property to remove a property value from
pValueToRemove - the value to remove from the set.
Throws:
RepositoryException - if any of the arguments are invalid, or an error occurs removing the item from the Set

addMapPropertyValue

public void addMapPropertyValue(java.lang.String pRepositoryPath,
                                java.lang.String pItemDescriptorName,
                                java.lang.String pRepositoryId,
                                java.lang.String pPropertyName,
                                java.lang.String pMapKey,
                                java.lang.Object pPropertyValue)
                         throws RepositoryException
Adds a value to a Map property

Parameters:
pRepositoryPath - the nucleus path of the repository that contains the item to set the property on
pItemDescriptorName - the item type of the item to set the property on
pRepositoryId - the id of the item to set the property on
pPropertyName - the name of the map property to add a value to
pMapKey - the key of the entry to add
pPropertyValue - the value of the entry to add
Throws:
RepositoryException - if any of the arguments are invalid, the given property does not evaluate to a map, or an error occurs adding the item to the collection

removeMapPropertyValue

public java.lang.Object removeMapPropertyValue(java.lang.String pRepositoryPath,
                                               java.lang.String pItemDescriptorName,
                                               java.lang.String pRepositoryId,
                                               java.lang.String pPropertyName,
                                               java.lang.String pMapKey)
                                        throws RepositoryException
Removes a value from a Map property

Parameters:
pRepositoryPath - the nucleus path of the repository that contains the item to remove the property value from
pItemDescriptorName - the item type of the item to remove the property value from
pRepositoryId - the id of the item to remove the property value from
pPropertyName - the name of the Map property to remove a property entry from
pMapKey - the key of the entry to remove
Returns:
the value of the removed entry
Throws:
RepositoryException - if any of the arguments are invalid, or an error occurs removing the item from the Set

addArrayPropertyValue

public void addArrayPropertyValue(java.lang.String pRepositoryPath,
                                  java.lang.String pItemDescriptorName,
                                  java.lang.String pRepositoryId,
                                  java.lang.String pPropertyName,
                                  java.lang.Object pValueToAdd)
                           throws RepositoryException
Adds a value to an array property

Parameters:
pRepositoryPath - the nucleus path of the repository that contains the item to set the property on
pItemDescriptorName - the item type of the item to set the property on
pRepositoryId - the id of the item to set the property on
pPropertyName - the name of the array property to add a value to
pValueToAdd - the value to add to the array
Throws:
RepositoryException - if any of the arguments are invalid, the given property does not evaluate to a array, or an error occurs adding the item to the array

addArrayPropertyValueAtIndex

public void addArrayPropertyValueAtIndex(java.lang.String pRepositoryPath,
                                         java.lang.String pItemDescriptorName,
                                         java.lang.String pRepositoryId,
                                         java.lang.String pPropertyName,
                                         java.lang.Object pValueToAdd,
                                         int pIndex)
                                  throws RepositoryException
Adds a value to an array property at the specified index

Parameters:
pRepositoryPath - the nucleus path of the repository that contains the item to set the property on
pItemDescriptorName - the item type of the item to set the property on
pRepositoryId - the id of the item to set the property on
pPropertyName - the name of the array property to add a value to
pValueToAdd - the value to add to the array
pIndex - the index to add the value at
Throws:
RepositoryException - if any of the arguments are invalid, the given property does not evaluate to a array, or an error occurs adding the item to the array

removeArrayPropertyValue

public void removeArrayPropertyValue(java.lang.String pRepositoryPath,
                                     java.lang.String pItemDescriptorName,
                                     java.lang.String pRepositoryId,
                                     java.lang.String pPropertyName,
                                     java.lang.Object pValueToRemove)
                              throws RepositoryException
Removes a value from an array property

Parameters:
pRepositoryPath - the nucleus path of the repository that contains the item to remove the property value from
pItemDescriptorName - the item type of the item to remove the property value from
pRepositoryId - the id of the item to remove the property value from
pPropertyName - the name of the array property to remove a property value from
pValueToRemove - the value to remove from the array. This will be the first occurrance of the item in the array
Throws:
RepositoryException - if any of the arguments are invalid, or an error occurs removing the item from the array

removeArrayPropertyValueAtIndex

public void removeArrayPropertyValueAtIndex(java.lang.String pRepositoryPath,
                                            java.lang.String pItemDescriptorName,
                                            java.lang.String pRepositoryId,
                                            java.lang.String pPropertyName,
                                            int pIndex)
                                     throws RepositoryException
Removes a value from an array property

Parameters:
pRepositoryPath - the nucleus path of the repository that contains the item to remove the property value from
pItemDescriptorName - the item type of the item to remove the property value from
pRepositoryId - the id of the item to remove the property value from
pPropertyName - the name of the array property to remove a property value from
pIndex - the index of the element to remove
Throws:
RepositoryException - if any of the arguments are invalid, or an error occurs removing the item from the array

getPropertyNamesForItem

public java.lang.String[] getPropertyNamesForItem(java.lang.String pRepositoryPath,
                                                  java.lang.String pItemDescriptorName)
                                           throws RepositoryException,
                                                  java.rmi.RemoteException
Returns an array of String containing the property names for a given repository item. This method requires both the Nucleus path to the repository, pRepositoryPath and the name of the item descriptor in that Repository, pItemDescriptor name.
Example: String [] names = getPropertyNamesForItem ( "/atg/userprofiling/ProfileAdapterRepository, "user" );

Parameters:
pRepositoryPath - Nucleus path to the Repository to be inspected.
pItemDescriptorName - The item descriptor name for the given repository.
Returns:
Throws:
RepositoryException
java.rmi.RemoteException

setPropertyValue

public void setPropertyValue(java.lang.String pRepositoryPath,
                             java.lang.String pItemDescriptorName,
                             java.lang.String pRepositoryId,
                             java.lang.String pPropertyName,
                             java.lang.Object pPropertyValue)
                      throws RepositoryException
Sets pPropertyName to pPropertyValue on the item specified by pRepositoryId found in the given repository

Parameters:
pRepositoryPath - the nucleus path of the repository where the item lives
pItemDescriptorName - the item type of the item to set the property on
pRepositoryId - the id of the item to set the property on
pPropertyName - the name of the property to set
pPropertyValue - the value to set the property to
Throws:
RepositoryException - if the item to set the property on cannot be found, or there is an error setting the value for the given property

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.String pRepositoryPath,
                                         java.lang.String pItemDescriptorName,
                                         java.lang.String pRepositoryId,
                                         java.lang.String pPropertyName)
                                  throws RepositoryException
Gets a property value from a repository item specified by the required arguments

Parameters:
pRepositoryPath - the nucleus path of the repository that contains the item to get the property value from
pItemDescriptorName - the type of the item to get
pRepositoryId - the id of the item to get
pPropertyName - the name of the property whose value is to be retrieved
Returns:
the current value of the specified item's property (can be null)
Throws:
RepositoryException - if an error occurs retrieving the property

getMapPropertyValue

public java.lang.Object getMapPropertyValue(java.lang.String pRepositoryPath,
                                            java.lang.String pItemDescriptorName,
                                            java.lang.String pRepositoryId,
                                            java.lang.String pPropertyName,
                                            java.lang.String pKey)
                                     throws RepositoryException
Gets a map property value from a repository item specified by the required arguments

Parameters:
pRepositoryPath - the nucleus path of the repository that contains the item to get the map property value from
pItemDescriptorName - the type of the item to get
pRepositoryId - the id of the item to get
pPropertyName - the name of the map property whose value is to be retrieved
pKey - the key of the entry to retrieve
Returns:
the current value of the specified item's property (can be null)
Throws:
RepositoryException - if an error occurs retrieving the property

translatePropertyValue

public java.lang.Object translatePropertyValue(java.lang.String pRepositoryPath,
                                               java.lang.String pItemDescriptorName,
                                               java.lang.String pPropertyName,
                                               java.lang.String pRepositoryId,
                                               java.lang.Object pPassedInValue)
                                        throws RepositoryException
Translates the given property value depending on the class of the given property. Currently, this just takes RepositoryItems in XML format, and returns the RepositoryItem object

Parameters:
pRepositoryPath - the nucleus path of the repository that contains the property
pItemDescriptorName - the name of the descriptor that contains the property
pPropertyName - the name of the property
pRepositoryId - the id of the user whose property is being set or retrieved
pPassedInValue - the given value before translation
Returns:
the translated value, if any
Throws:
RepositoryException - if an error occurs

ensureTransaction

protected javax.transaction.Transaction ensureTransaction()
This method ensures that a transaction exists before returning. If there is an existing transaction, it returns a reference to it. This is a performance thing so it is not very intuitive, but you should use this returned transaction both as a signal that we did NOT create the transaction, and you can use that to avoid having to get the current transaction again (thus saving a hashtable lookup which may add up for methods like getPropertyValue).


commitTransaction

protected void commitTransaction()
Commits the current transaction