atg.markers
Class RepositoryMarkerManager

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.markers.RepositoryMarkerManager
All Implemented Interfaces:
MarkerConstants, MarkerValidatorContainer, NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener
Direct Known Subclasses:
ProfileMarkerManager

public class RepositoryMarkerManager
extends GenericService
implements MarkerConstants, MarkerValidatorContainer

This is the base implementation class for a Repository Marker Manager.

A Marker is a repository item that has a standard set of string properties named key, value and data. There is also one standard property of type Date named creationDate. All extensions of the marker item should have the standard properties.

A marker is always referenced in the context of a marked(owning) repository item. The API provides that ability to create or remove a marker from a particular owner and determine if a particular owner has a specific marker by matching any combination of the key, value, and data property values.

A marked item is a repository item that has a multi-valued(Collection) of marker items.

Additional properties can be added to the marker item and provided to the API using the extendedProperties map. The extended properties map can be specified when adding, removing or testing for marker items. The map must contain a property name to value mapping.

The marked and marker items must be defined in the same repository.

Whenever specifying a string property value in the API, an empty string is considered the same as NULL.

This implementation supports marker collections of type List and Set. For Sets, the API methods that rely on ordinal position will sort the Set by marker creationDate.

Adding and removing markers:
Applications that add and remove markers must provide the marked item as a mutable repository item and perform the final update of the marked item. For example,
mutItem = repository.getItemForUpdate(item);
repositoryMarkerManager.addMarkerToItem(mutItem,.....)
repository.updateItem(mutItem)

Dealing with duplicate markers:
When adding a new marker to an item, a duplication mode can be specified to optionally allow duplicates, replace duplicates, or to prevent a new duplicate marker from being added(no duplicates).

Comparator components are used to determine if there are duplicate markers when adding a new marker. These components are global instances of MarkerDuplicateComparator. A comparator is called once for each marker in the item's current marker collection to determine if the marker is a duplicate of the new marker.

A default comparator component is defined using the property defaultDuplicateMarkerComparator.

There's also a map of comparator components defined by the property markerDuplicateComparators. By default, the new marker's key value is used to lookup the appropriate comparator in the map.

When using the NO_DUPLICATES or REPLACE_DUPLICATES option at least one comparator must be defined to determine the duplicates. If a comparator is not found in the map, the default comparator is used.

Validating markers:
Validator components are used to validate markers before they're added. Each validator is mapped by a marker key. The alwaysValidate boolean property can be set to true to force validation of all new markers. In that case, there must be a validator defined for all new markers. If alwaysValidate is set to false, only the new markers with a matching validator are validated.

Testing marked items for specific markers:
Some API methods, such as hasMarker, can be used to test if an item has a specific marker using any combination of the key, value and data properties. These methods allow the caller to provide a subset of property values to use in the comparison. For instance, the caller can determine if an item has a marker with a key of "test", where only the key value is used in the comparison, regardless of all other properties on the marker.

If the caller provides a property value that is NULL or an empty string, that value must also be NULL on the marker for a successful match. If the caller doesn't want to include a property in the comparison, they can specify a special string token that tells the RepositoryMarkerManager to ignore the property during the comparison. This special token is defined in the MarkerConstants class.

Example of determining if a marked item has a particular marker:
hasMarker(markedItem, "Campaigns","OctoberSale",MarkerConstants.ANY_VALUE);

Configurable properties:
The following properties can be configured on the RepositoryMarkerManager.

repository
The repository used by the marker manager to create new marker items.
defaultDuplicationMode
The default duplication mode used when adding new marker items.
defaultMarkerItemType
The default marker item type in the repository.
markerValidators
map of MarkerValidator components
alwaysValidate
boolean. If true, all new markers created by the marker manager must be validated. If false, only the new markers with a matching validator are validated.
markerDuplicationComparators
A map of MarkerDuplicatorComparator components.
defaultMarkerDuplicationComparator
The instance of MarkerDuplicateComparator used when one is not found in the map.
defaultMarkerPropertyName
The default property name on the marked item that contains the collection of markers.
defaultMarkerSortPropertyName
The property used by default to sort a collection of markers.
requiredExtendedProperties
An array of property names that are required in the extended properties map when adding new markers.
transactionManager
The TransactionManager used for transactional processing.
generateEvents
boolean. If true, marker events are generated.
markerMessageSource
The marker message source component used to send marker events.
addMessageJMSType
The jms type used to send marker added messages.
removeMessageJMSType
The jms type used to send marker removed messages.
replaceMessageJMSType
The jms type used to send marker replaced messages.

See Also:
getMarkerDuplicateComparators(), getDefaultMarkerDuplicateComparator(), MarkerDuplicateComparator, CompareByProperties, getMarkerValidators(), MarkerValidator, ConfigurableMarkerValidator

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  java.lang.String mAddMessageJMSType
           
protected  boolean mAlwaysValidate
           
protected  java.lang.String mDefaultDuplicationMode
           
protected  java.lang.String mDefaultMarkedItemType
           
protected  MarkerDuplicateComparator mDefaultMarkerDuplicateComparator
           
protected  java.lang.String mDefaultMarkerItemType
           
protected  java.lang.String mDefaultMarkerPropertyName
           
protected  java.lang.String mDefaultMarkerSortPropertyName
           
protected  boolean mGenerateEvents
           
protected  ServiceMap mMarkerDuplicateComparators
           
protected  MarkerMessageSource mMarkerMessageSource
           
protected  ServiceMap mMarkerValidators
           
protected  int mMaxItemsPerTransaction
           
protected  java.lang.String mRemoveMessageJMSType
           
protected  java.lang.String mReplaceMessageJMSType
           
protected  MutableRepository mRepository
           
protected  java.lang.String[] mRequiredExtendedProperties
           
protected  javax.transaction.TransactionManager mTransactionManager
           
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.markers.MarkerConstants
ALLOW_DUPLICATES, ANY_VALUE, DEFAULT_MARKER_ID_PROPERTY_NAME, DEFAULT_MARKER_ITEM_TYPE, DEFAULT_MARKER_PROPERTY_NAME, DEFAULT_MARKER_SORT_PROPERTY_NAME, MARKER_CREATIONDATE_PROPERTY_NAME, MARKER_DATA_PROPERTY_NAME, MARKER_DUPLICATIONMODE_PROPERTY_NAME, MARKER_KEY_PROPERTY_NAME, MARKER_OWNER_PROPERTY_NAME, MARKER_RESOURCE_NAME, MARKER_VALUE_PROPERTY_NAME, NO_DUPLICATES, PARAM_DATA, PARAM_DUPMODE, PARAM_EXTENDED_PROPERTIES, PARAM_ITEM, PARAM_ITEM_ID, PARAM_KEY, PARAM_MARKED_ITEM_TYPE, PARAM_MARKER_ITEM_TYPE, PARAM_MARKER_MANAGER, PARAM_MARKER_PROPERTY_NAME, PARAM_VALUE, REPLACE_DUPLICATES, sResourceBundle
 
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
RepositoryMarkerManager()
           
 
Method Summary
 boolean addMarkerItemToItem(MutableRepositoryItem pMarkedItem, RepositoryItem pMarkerItem, java.lang.String pMarkerPropertyName, java.lang.String pDuplicationMode)
          Adds a marker item to a marked item.
 RepositoryItem addMarkerToItem(MutableRepositoryItem pMarkedItem, java.lang.String pKey, java.lang.String pValue, java.lang.String pData)
          Creates a new marker item using the provided property values and adds it to the specified item.
 RepositoryItem addMarkerToItem(MutableRepositoryItem pMarkedItem, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.util.Map pExtendedProperties, java.lang.String pDuplicationMode)
          Creates a new marker item using the provided property values and adds it to the specified item.
 RepositoryItem addMarkerToItem(MutableRepositoryItem pMarkedItem, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.lang.String pDuplicationMode)
          Creates a new marker item using the provided property values and adds it to the specified item.
 RepositoryItem addMarkerToItem(MutableRepositoryItem pMarkedItem, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.lang.String pMarkerPropertyName, java.util.Map pExtendedProperties, java.lang.String pDuplicationMode)
          Creates a new marker item using the provided property values and adds it to the specified item.
 RepositoryItem addMarkerToItem(MutableRepositoryItem pMarkedItem, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.lang.String pMarkerItemType, java.lang.String pMarkerPropertyName, java.util.Map pExtendedProperties, java.lang.String pDuplicationMode)
          Creates a new marker item using the provided property values and adds it to the specified item.
 RepositoryItem addMarkerToItem(java.lang.String pMarkedItemId, java.lang.String pKey, java.lang.String pValue, java.lang.String pData)
          Creates a new marker item using the provided property values and adds it to the specified item.
 RepositoryItem addMarkerToItem(java.lang.String pMarkedItemId, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.util.Map pExtendedProperties, java.lang.String pDuplicationMode)
          Creates a new marker item using the provided property values and adds it to the specified item.
 RepositoryItem addMarkerToItem(java.lang.String pMarkedItemId, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.lang.String pDuplicationMode)
          Creates a new marker item using the provided property values and adds it to the specified item.
 RepositoryItem addMarkerToItem(java.lang.String pMarkedItemId, java.lang.String pMarkedItemType, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.lang.String pMarkerItemType, java.lang.String pMarkerPropertyName, java.util.Map pExtendedProperties, java.lang.String pDuplicationMode)
          Creates a new marker item using the provided property values and adds it to the specified item.
protected  void addMarkerToItemsCollection(MutableRepositoryItem pMarkedItem, RepositoryItem pMarkerItem, java.lang.String pMarkerPropertyName)
          Adds a marker item to an item's collection of markers.
 void addMarkerValidator(java.lang.String pKey, MarkerValidator pMarkerValidator)
          Adds a marker validator.
protected  boolean areMarkerPropertiesEqual(RepositoryItem pMarkerItem, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.util.Map pExtendedProperties)
          Compares the marker item property values to the parameter values.
protected  boolean compareDefaultPropertyValues(RepositoryItem pMarkerItem, java.lang.String pKey, java.lang.String pValue, java.lang.String pData)
          Compares key, value and data to the values in the marker.
protected  boolean compareExtendedPropertyValues(RepositoryItem pMarkerItem, java.util.Map pExtendedProperties)
          This method compares a marker item's extended property values to those in the extended properties map.
protected  MarkerAddedEventMessage createAddedEventMessage(java.lang.String pMarkedItemId, java.lang.String pMarkedItemType, java.lang.String pMarkerPropertyName, RepositoryItem pAddedMarkerItem)
          Creates a marker event message for add operations.
protected  MarkerAddedEventMessage createAddedEventMessage(java.lang.String pMarkedItemId, java.lang.String pMarkedItemType, java.lang.String pMarkerPropertyName, RepositoryItem pAddedMarkerItem, java.lang.String pSiteId)
          Creates a marker event message for add operations.
protected  MarkerData createAddedMarkerData(RepositoryItem pAddedMarkerItem)
          Creates a new MarkerData object for the marker item that has been added by calling the generateMarkerData method.
protected  RepositoryItem createMarkerItem(java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.lang.String pMarkerItemType, java.util.Map pExtendedProperties)
          Creates a new transient marker item and sets the default and extended properties.
protected  MarkerRemovedEventMessage createRemovedEventMessage(java.lang.String pMarkedItemId, java.lang.String pMarkedItemType, java.lang.String pMarkerPropertyName, RepositoryItem pRemovedMarkerItem)
          Creates a marker event message for remove operations.
protected  MarkerRemovedEventMessage createRemovedEventMessage(java.lang.String pMarkedItemId, java.lang.String pMarkedItemType, java.lang.String pMarkerPropertyName, RepositoryItem pRemovedMarkerItem, java.lang.String pSiteId)
          Creates a marker event message for remove operations.
protected  MarkerData createRemovedMarkerData(RepositoryItem pRemovedMarkerItem)
          Creates a new MarkerData object for the marker item that has been removed by calling the generateMarkerData method.
protected  MarkerReplacedEventMessage createReplacedEventMessage(java.lang.String pMarkedItemId, java.lang.String pMarkedItemType, RepositoryItem pAddedMarkerItem, java.lang.String pMarkerPropertyName, RepositoryItem pReplacedMarkerItem)
          Creates a marker event message for replace operations.
protected  MarkerReplacedEventMessage createReplacedEventMessage(java.lang.String pMarkedItemId, java.lang.String pMarkedItemType, RepositoryItem pAddedMarkerItem, java.lang.String pMarkerPropertyName, RepositoryItem pReplacedMarkerItem, java.lang.String pSiteId)
          Creates a marker event message for replace operations.
protected  MarkerData createReplacedMarkerData(RepositoryItem pReplacedMarkerItem)
          Creates a new MarkerData object for the marker item that has been replaced by calling the generateMarkerData method.
 java.lang.Object[] createSortedArrayOfMarkers(java.util.Collection pMarkers, java.lang.String pMarkerSortPropertyName)
          Create a sorted array of items in ascending order using the marker sort property name provided.
 int deleteMarkers(java.lang.String pMarkedItemType, java.lang.String pMarkerItemType, java.lang.String pMarkerPropertyName, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.util.Map pExtendedProperties)
          This method will delete marker items with matching values.
 void doStartService()
          This method is called as service startup.
protected  MarkerDuplicateComparator findComparator(java.lang.String pComparatorKey)
          Returns the MarkerDuplicateComparator from the MarkerDuplicateComparators map using the pComparatorKey.
protected  java.util.Collection findDuplicates(RepositoryItem pMarkedItem, RepositoryItem pMarkerItem, java.lang.String pMarkerPropertyName)
          Finds duplicate markers on the item.
protected  RepositoryItem findLastMarkerOnItem(RepositoryItem pMarkedItem, java.lang.String pMarkerPropertyName)
          This method returns the last marker in the marker collection.
protected  MarkerValidator findMarkerValidator(RepositoryItem pMarkedItem, RepositoryItem pMarkerItem)
          Locates a marker validator component in the marker validator service map.
 MarkerValidator findMarkerValidator(java.lang.String pKey)
          Locates a marker validator component in the marker validator service map.
 java.util.Collection findMatchingMarkers(RepositoryItem pMarkedItem, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.lang.String pMarkerPropertyName, java.util.Map pExtendedProperties)
          This method returns the markers from the item that match the values provided.
 java.util.Collection findMatchingMarkers(java.lang.String pMarkedItemId, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.util.Map pExtendedProperties)
          This method returns the markers from the item that match the values provided.
 java.util.Collection findMatchingMarkers(java.lang.String pMarkedItemId, java.lang.String pMarkedItemType, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.lang.String pMarkerPropertyName, java.util.Map pExtendedProperties)
          This method returns the markers from the item that match the values provided.
 java.util.Collection findValidKeys()
          The method exposes the keys used to map MarkerValidators.
 java.util.List findValidValuesForKey(java.lang.String pMarkerKey)
          This returns the valid values for the given markerKey.
protected  MarkerAddedEventMessage generateAddMessage()
          This method is called by createAddedEventMessage to instantiate an object of type MarkerAddedEventMessage.
protected  MarkerData generateMarkerData()
          This method instantiates an object of the type MarkerData.
protected  Query generateMarkerExtendedPropertyQuery(QueryBuilder pQueryBuilder, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.util.Map pExtendedProperties)
          This method is called by getItemsWithMarker and deleteMarkers.
 Query generateMarkerQualifyingAndedQuery(java.lang.String pMarkerItemType, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.util.Map pExtendedProperties)
          This method will create a query object for the marker item which qualifies markers by the key, value, data and extended properties.
protected  MarkerRemovedEventMessage generateRemoveMessage()
          This method is called by createRemovedEventMessage to instantiate an object of type MarkerRemovedEventMessage.
protected  MarkerReplacedEventMessage generateReplaceMessage()
          This method is called by createReplacedEventMessage to instantiate an object of type MarkerReplacedEventMessage.
 java.lang.String getAddMessageJMSType()
          Returns the JMS Message type used when sending marked added messages.
 java.util.Collection getAllMarkersFromItem(RepositoryItem pMarkedItem)
          This method returns a copy of the current marker collection from the given item.
 java.util.Collection getAllMarkersFromItem(RepositoryItem pMarkedItem, java.lang.String pMarkerPropertyName)
          This method returns a copy of the current marker collection from the given item.
 java.util.Collection getAllMarkersFromItem(java.lang.String pMarkedItemId)
          This method returns a copy of the current marker collection from the given item.
 java.util.Collection getAllMarkersFromItem(java.lang.String pMarkedItemId, java.lang.String pMarkedItemType, java.lang.String pMarkerPropertyName)
          This method returns a copy of the current marker collection from the given item.
protected  java.lang.String getComparatorKey(RepositoryItem pMarkerItem)
          This method returns the key used to lookup the MarkerDuplicateComparator in the MarkerDuplicateComparators map.
 java.lang.String getDefaultDuplicationMode()
          Returns the default duplication mode.
 java.lang.String getDefaultMarkedItemType()
          Returns the default marked item type used when referencing a marked item by id.
 MarkerDuplicateComparator getDefaultMarkerDuplicateComparator()
          Returns the default marker duplicate comparator.
 java.lang.String getDefaultMarkerItemType()
          Returns the default marker item type used when creating new markers.
 java.lang.String getDefaultMarkerPropertyName()
          Returns the default property name for storing markers on an item.
 java.lang.String getDefaultMarkerSortPropertyName()
          Returns the default property name for sorting markers.
 Query getDefaultPropertyQuery(QueryBuilder pQueryBuilder, java.lang.String pPropertyNameOnMarker, java.lang.String pValue)
          This method creates the query object for comparing a value of a marker property to the provided value.
protected  java.lang.String getDuplicationMode(java.lang.String pDuplicationMode)
          This method is called by other internal methods that require a duplicationMode.
 RepositoryItem[] getItemsWithMarker(java.lang.String pKey, java.lang.String pValue, java.lang.String pData)
          This method queries for marked items in the repository that have markers whose key, value and data match the provided parameter values.
 RepositoryItem[] getItemsWithMarker(java.lang.String pMarkedItemType, java.lang.String pMarkerItemType, java.lang.String pMarkerPropertyName, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.util.Map pExtendedProperties)
          This method queries for marked items in the repository that have markers with a matching key, value and data values.
protected  java.lang.String getMarkedItemType(java.lang.String pMarkedItemType)
          This method is called by other internal methods that require a markedItemType.
protected  java.util.Collection getMarkerCollectionFromItem(RepositoryItem pMarkedItem, java.lang.String pMarkerPropertyName)
          Util method for returning the marker collection from an item.
 ServiceMap getMarkerDuplicateComparators()
          Returns the map of MarkerDuplicateComparator components.
protected  java.lang.String getMarkerEventProfileId(java.lang.String pMarkedItemId, java.lang.String pMarkedItemType, RepositoryItem pMarkerItem)
          This method is called to return the profile id that will be associated with a marker event.
protected  java.lang.String getMarkerItemType(java.lang.String pMarkerItemType)
          This method is called by other internal methods that require a markerItemType.
 MarkerMessageSource getMarkerMessageSource()
          Returns the message source that sends marker JMS messages.
protected  java.lang.String getMarkerPropertyName(java.lang.String pMarkerPropertyName)
          This method is called by other internal methods that require a markerPropertyName.
protected  java.lang.String getMarkerSortPropertyName(java.lang.String pMarkerSortPropertyName)
          This method is called by other internal methods that require a markerSortPropertyName.
 ServiceMap getMarkerValidators()
          Returns the map of MarkerValidator Components.
 int getMaxItemsPerTransaction()
          Returns property maxItemsPerTransaction Default value is 1000.
 java.lang.String getRemoveMessageJMSType()
          Returns the JMS Message type used when sending marked removed messages.
 java.lang.String getReplaceMessageJMSType()
          Returns the JMS Message type used when sending marked replaced messages.
 MutableRepository getRepository()
          Returns the repository used by the marker manager .
 java.lang.String[] getRequiredExtendedProperties()
          Returns the default array of extended property names that are required when creating a new marker.
 javax.transaction.TransactionManager getTransactionManager()
          Transaction Manager
 java.util.Map getValidatedKeysAndValues()
          Generates a map of the validate keys and their possible values.
protected  boolean hasDuplicates(RepositoryItem pMarkedItem, RepositoryItem pMarkerItem, java.lang.String pMarkerPropertyName)
          Checks for a duplicate marker on the item.
 boolean hasMarker(RepositoryItem pMarkedItem, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.util.Map pExtendedProperties)
          This method determines if a marked item contains a marker with the specified property values.
 boolean hasMarker(RepositoryItem pMarkedItem, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.lang.String pMarkerPropertyName, java.util.Map pExtendedProperties)
          This method determines if a marked item contains a marker with the specified property values.
 boolean hasMarker(java.lang.String pMarkedItemId, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.util.Map pExtendedProperties)
          This method determines if a marked item contains a marker with the specified property values.
 boolean hasMarker(java.lang.String pMarkedItemId, java.lang.String pMarkedItemType, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.lang.String pMarkerPropertyName, java.util.Map pExtendedProperties)
           
protected  java.util.Collection identifyMissingExtendedProperties(java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.lang.String pMarkerItemType, java.util.Map pExtendedProperties)
          This method identifies the properties that are missing from the extendedProperties map using the configured requiredExtendedProperties array.
 boolean isAlwaysValidate()
          Boolean property that determines if all markers must be validated.
protected  boolean isDuplicateMarker(RepositoryItem pMarker1, RepositoryItem pMarker2, MarkerDuplicateComparator pComparator)
          This method calls the appropriate comparator component to determine if the two markers are duplicates of each other.
 boolean isGenerateEvents()
          Boolean flag for optionally generating JMS events.
 boolean isValidKey(java.lang.String pKey)
           
 boolean isValidValueForKey(java.lang.String pKey, java.lang.String pValue)
           
 RepositoryItem matchLastMarker(RepositoryItem pMarkedItem, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.util.Map pExtendedProperties)
          This method returns the item's last marker only if it has a matching key, value, data and extendedProperties.
 RepositoryItem matchLastMarker(RepositoryItem pMarkedItem, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.lang.String pMarkerPropertyName, java.util.Map pExtendedProperties)
          This method returns the item's last marker only if it has a matching key, value, data and extendedProperties.
 RepositoryItem matchLastMarker(java.lang.String pMarkedItemId, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.util.Map pExtendedProperties)
          This method returns the item's last marker only if it has a matching key, value, data and extendedProperties.
 RepositoryItem matchLastMarker(java.lang.String pMarkedItemId, java.lang.String pMarkedItemType, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.lang.String pMarkerPropertyName, java.util.Map pExtendedProperties)
          This method returns the item's last marker only if it has a matching key, value, data and extendedProperties.
 RepositoryItem matchLastMarkerWithKey(RepositoryItem pMarkedItem, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.util.Map pExtendedProperties)
          This method returns the last marker with a given key only if it has a matching value, data and extendedProperties.
 RepositoryItem matchLastMarkerWithKey(RepositoryItem pMarkedItem, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.lang.String pMarkerPropertyName, java.util.Map pExtendedProperties)
          This method returns the last marker with a given key only if it has a matching value, data and extendedProperties.
 RepositoryItem matchLastMarkerWithKey(java.lang.String pMarkedItemId, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.util.Map pExtendedProperties)
          This method returns the last marker with a given key only if it has a matching value, data and extendedProperties.
 RepositoryItem matchLastMarkerWithKey(java.lang.String pMarkedItemId, java.lang.String pMarkedItemType, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.lang.String pMarkerPropertyName, java.util.Map pExtendedProperties)
          This method returns the last marker with a given key only if it has a matching value, data and extendedProperties.
 int removeAllMarkersFromItem(MutableRepositoryItem pMarkedItem)
          Removes all markers from the marked item.
 int removeAllMarkersFromItem(MutableRepositoryItem pMarkedItem, java.lang.String pMarkerPropertyName)
          Removes all markers from the marked item.
 int removeAllMarkersFromItem(java.lang.String pMarkedItemId)
          Removes all markers from the marked item.
 int removeAllMarkersFromItem(java.lang.String pMarkedItemId, java.lang.String pMarkedItemType, java.lang.String pMarkerPropertyName)
          Removes all markers from the marked item.
 int removeMarkersFromItem(MutableRepositoryItem pMarkedItem, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.util.Map pExtendedProperties)
          This method removes the markers from the item that match the values provided.
 int removeMarkersFromItem(MutableRepositoryItem pMarkedItem, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.lang.String pMarkerPropertyName, java.util.Map pExtendedProperties)
          This method removes the markers from the item that match the values provided.
 int removeMarkersFromItem(java.lang.String pMarkedItemId, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.util.Map pExtendedProperties)
          This method removes the markers from the item that match the values provided.
 int removeMarkersFromItem(java.lang.String pMarkedItemId, java.lang.String pMarkedItemType, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.lang.String pMarkerPropertyName, java.util.Map pExtendedProperties)
          This method removes the markers from the item that match the values provided.
protected  void removeMarkersFromItemsCollection(MutableRepositoryItem pMarkedItem, java.util.Collection pMarkerItems, java.lang.String pMarkerPropertyName)
          Removes a collection of markers from a item's collection of markers.
 void removeMarkerValidator(java.lang.String pKey)
          Remove a marker validator.
 void setAddMessageJMSType(java.lang.String pAddMessageJMSType)
          property AddMessageJMSType Sets the JMS Message type used when sending marked added messages.
 void setAlwaysValidate(boolean pAlwaysValidate)
          Sets the boolean property for determining if markers must always be validated.
protected  void setBaseMarkerData(RepositoryItem pMarkerItem, MarkerData pMarkerData)
          Sets the base properties of the MarkerData object based on the marker item.
protected  void setBaseMarkerEventProperties(java.lang.String pMarkedItemId, java.lang.String pMarkerItemType, RepositoryItem pMarkerItem, java.lang.String pMarkerPropertyName, MarkerEventMessage pMessage)
          Sets the base property values of the marker event message.
protected  void setBaseMarkerEventProperties(java.lang.String pMarkedItemId, java.lang.String pMarkerItemType, RepositoryItem pMarkerItem, java.lang.String pMarkerPropertyName, MarkerEventMessage pMessage, java.lang.String pSiteId)
          Sets the base property values of the marker event message.
 void setDefaultDuplicationMode(java.lang.String pDefaultDuplicationMode)
          Sets the default duplication mode.
 void setDefaultMarkedItemType(java.lang.String pDefaultMarkedItemType)
          Sets the default marked item type used when referencing a marked item by id.
 void setDefaultMarkerDuplicateComparator(MarkerDuplicateComparator pDefaultMarkerDuplicateComparator)
          Sets the default marker duplicate comparator.
 void setDefaultMarkerItemType(java.lang.String pDefaultMarkerItemType)
          Sets the default marker item type used when creating new markers.
protected  void setDefaultMarkerProperties(MutableRepositoryItem pMarkerItem, java.lang.String pKey, java.lang.String pValue, java.lang.String pData)
          Set the default property values of a marker.
 void setDefaultMarkerPropertyName(java.lang.String pDefaultMarkerPropertyName)
          Sets the default property name for storing markers.
 void setDefaultMarkerSortPropertyName(java.lang.String pDefaultMarkerSortPropertyName)
          Sets the default property name for sorting markers.
protected  void setExtendedMarkerData(RepositoryItem pMarkerItem, MarkerData pMarkerData)
          This method is called by the createAddedMarkerData, createReplacedMarkerData and createRemovedMarkerData methods to set the extended properties of the MarkerData object.
protected  void setExtendedMarkerProperties(MutableRepositoryItem pMarkerItem, java.lang.String pKey, java.lang.String pValue, java.lang.String pData, java.util.Map pExtendedProperties)
          Sets the extended properties of a marker.
 void setGenerateEvents(boolean pGenerateEvents)
          Sets the boolean flag for optionally generating JMS events
 void setMarkerDuplicateComparators(ServiceMap pMarkerDuplicateComparators)
          Sets the map of MarkerDuplicateComparator components.
 void setMarkerMessageSource(MarkerMessageSource pMarkerMessageSource)
          Sets the message source that sends marker JMS messages.
 void setMarkerValidators(ServiceMap pMarkerValidators)
           
 void setMaxItemsPerTransaction(int pMaxItemsPerTransaction)
          Sets property maxItemsPerTransaction
 void setRemoveMessageJMSType(java.lang.String pRemoveMessageJMSType)
          property RemoveMessageJMSType Sets the JMS Message type used when sending marked removed messages Remove messages are sent whenever a marker is removed from a marked item.
 void setReplaceMessageJMSType(java.lang.String pReplaceMessageJMSType)
          property ReplaceMessageJMSType Sets the JMS Message type used when sending marked replaced messages Replace messages are sent whenever a marker is replaced by a new marker.
 void setRepository(MutableRepository pRepository)
          Sets the repository used by the marker manager.
 void setRequiredExtendedProperties(java.lang.String[] pRequiredExtendedProperties)
          Sets the default array of extended property names that are required when creating a new marker.
 void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
          Sets the Transaction Manager.
protected  void validateMarker(RepositoryItem pMarkedItem, RepositoryItem pMarkerItem)
          This method is called by addMarkerItemToItem to validate a new marker.
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, 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, reResolveThis, 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


mAlwaysValidate

protected boolean mAlwaysValidate

mAddMessageJMSType

protected java.lang.String mAddMessageJMSType

mRemoveMessageJMSType

protected java.lang.String mRemoveMessageJMSType

mReplaceMessageJMSType

protected java.lang.String mReplaceMessageJMSType

mMarkerMessageSource

protected MarkerMessageSource mMarkerMessageSource

mRepository

protected MutableRepository mRepository

mDefaultMarkerDuplicateComparator

protected MarkerDuplicateComparator mDefaultMarkerDuplicateComparator

mMarkerDuplicateComparators

protected ServiceMap mMarkerDuplicateComparators

mMarkerValidators

protected ServiceMap mMarkerValidators

mDefaultMarkerSortPropertyName

protected java.lang.String mDefaultMarkerSortPropertyName

mDefaultMarkerPropertyName

protected java.lang.String mDefaultMarkerPropertyName

mDefaultMarkerItemType

protected java.lang.String mDefaultMarkerItemType

mDefaultMarkedItemType

protected java.lang.String mDefaultMarkedItemType

mRequiredExtendedProperties

protected java.lang.String[] mRequiredExtendedProperties

mDefaultDuplicationMode

protected java.lang.String mDefaultDuplicationMode

mGenerateEvents

protected boolean mGenerateEvents

mTransactionManager

protected javax.transaction.TransactionManager mTransactionManager

mMaxItemsPerTransaction

protected int mMaxItemsPerTransaction
Constructor Detail

RepositoryMarkerManager

public RepositoryMarkerManager()
Method Detail

isAlwaysValidate

public boolean isAlwaysValidate()
Boolean property that determines if all markers must be validated. If this property is true, there must be a validator component defined for validating every marker created. If false, a marker is only validated if there is a matching validator component.

Returns:
true if there must be a validator component defined for validating every marker created.

setAlwaysValidate

public void setAlwaysValidate(boolean pAlwaysValidate)
Sets the boolean property for determining if markers must always be validated.


setAddMessageJMSType

public void setAddMessageJMSType(java.lang.String pAddMessageJMSType)
property AddMessageJMSType Sets the JMS Message type used when sending marked added messages. Add messages are sent whenever a marker is added to a marked item,


getAddMessageJMSType

public java.lang.String getAddMessageJMSType()
Returns the JMS Message type used when sending marked added messages. Default value is "atg.repository.marker.added".


setRemoveMessageJMSType

public void setRemoveMessageJMSType(java.lang.String pRemoveMessageJMSType)
property RemoveMessageJMSType Sets the JMS Message type used when sending marked removed messages Remove messages are sent whenever a marker is removed from a marked item.


getRemoveMessageJMSType

public java.lang.String getRemoveMessageJMSType()
Returns the JMS Message type used when sending marked removed messages. Default value is "atg.repository.marker.removed".


setReplaceMessageJMSType

public void setReplaceMessageJMSType(java.lang.String pReplaceMessageJMSType)
property ReplaceMessageJMSType Sets the JMS Message type used when sending marked replaced messages Replace messages are sent whenever a marker is replaced by a new marker.


getReplaceMessageJMSType

public java.lang.String getReplaceMessageJMSType()
Returns the JMS Message type used when sending marked replaced messages. Default value is "atg.repository.marker.replaced".


setMarkerMessageSource

public void setMarkerMessageSource(MarkerMessageSource pMarkerMessageSource)
Sets the message source that sends marker JMS messages.


getMarkerMessageSource

public MarkerMessageSource getMarkerMessageSource()
Returns the message source that sends marker JMS messages.


setRepository

public void setRepository(MutableRepository pRepository)
Sets the repository used by the marker manager. All marked and marker items must live in this repository.


getRepository

public MutableRepository getRepository()
Returns the repository used by the marker manager . All marked and marker items must live in this repository.


setDefaultMarkerDuplicateComparator

public void setDefaultMarkerDuplicateComparator(MarkerDuplicateComparator pDefaultMarkerDuplicateComparator)
Sets the default marker duplicate comparator. The default is used when a comparator is not found in the comparators map defined the by property markerDuplicateComparators


getDefaultMarkerDuplicateComparator

public MarkerDuplicateComparator getDefaultMarkerDuplicateComparator()
Returns the default marker duplicate comparator. The default is used when a comparator is not found in the comparators map defined the by property markerDuplicateComparators


setMarkerDuplicateComparators

public void setMarkerDuplicateComparators(ServiceMap pMarkerDuplicateComparators)
Sets the map of MarkerDuplicateComparator components.

Use this map to define comparator components other than the default comparator. When locating a comparator during a duplicate check, this map is consulted first using the marker's key value. If a comparator is not defined in the map, the defaultComparator is used.

For example, to define a comparator that is used for markers with a key of "test".
test=/atg/MyTestMarkerComparator

See Also:
findComparator(java.lang.String)

getMarkerDuplicateComparators

public ServiceMap getMarkerDuplicateComparators()
Returns the map of MarkerDuplicateComparator components.


setMarkerValidators

public void setMarkerValidators(ServiceMap pMarkerValidators)

getMarkerValidators

public ServiceMap getMarkerValidators()
Returns the map of MarkerValidator Components.


setDefaultMarkerSortPropertyName

public void setDefaultMarkerSortPropertyName(java.lang.String pDefaultMarkerSortPropertyName)
Sets the default property name for sorting markers.


getDefaultMarkerSortPropertyName

public java.lang.String getDefaultMarkerSortPropertyName()
Returns the default property name for sorting markers. Default value is "creationDate".


setDefaultMarkerPropertyName

public void setDefaultMarkerPropertyName(java.lang.String pDefaultMarkerPropertyName)
Sets the default property name for storing markers.


getDefaultMarkerPropertyName

public java.lang.String getDefaultMarkerPropertyName()
Returns the default property name for storing markers on an item. Default value is "markers".


setDefaultMarkerItemType

public void setDefaultMarkerItemType(java.lang.String pDefaultMarkerItemType)
Sets the default marker item type used when creating new markers.


getDefaultMarkerItemType

public java.lang.String getDefaultMarkerItemType()
Returns the default marker item type used when creating new markers. Default value is "marker".


setDefaultMarkedItemType

public void setDefaultMarkedItemType(java.lang.String pDefaultMarkedItemType)
Sets the default marked item type used when referencing a marked item by id.


getDefaultMarkedItemType

public java.lang.String getDefaultMarkedItemType()
Returns the default marked item type used when referencing a marked item by id.


setRequiredExtendedProperties

public void setRequiredExtendedProperties(java.lang.String[] pRequiredExtendedProperties)
Sets the default array of extended property names that are required when creating a new marker.


getRequiredExtendedProperties

public java.lang.String[] getRequiredExtendedProperties()
Returns the default array of extended property names that are required when creating a new marker.


setDefaultDuplicationMode

public void setDefaultDuplicationMode(java.lang.String pDefaultDuplicationMode)
Sets the default duplication mode. The default duplicationMode.


getDefaultDuplicationMode

public java.lang.String getDefaultDuplicationMode()
Returns the default duplication mode. Default value is "allow duplicates".


setGenerateEvents

public void setGenerateEvents(boolean pGenerateEvents)
Sets the boolean flag for optionally generating JMS events


isGenerateEvents

public boolean isGenerateEvents()
Boolean flag for optionally generating JMS events. Default value is false.


setTransactionManager

public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Sets the Transaction Manager.


getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()
Transaction Manager


setMaxItemsPerTransaction

public void setMaxItemsPerTransaction(int pMaxItemsPerTransaction)
Sets property maxItemsPerTransaction


getMaxItemsPerTransaction

public int getMaxItemsPerTransaction()
Returns property maxItemsPerTransaction Default value is 1000.


doStartService

public void doStartService()
                    throws ServiceException
This method is called as service startup. It verifies all the property configurations are properly set.

Overrides:
doStartService in class GenericService
Throws:
ServiceException - if the Service had a problem starting up

addMarkerToItem

public RepositoryItem addMarkerToItem(MutableRepositoryItem pMarkedItem,
                                      java.lang.String pKey,
                                      java.lang.String pValue,
                                      java.lang.String pData,
                                      java.lang.String pMarkerItemType,
                                      java.lang.String pMarkerPropertyName,
                                      java.util.Map pExtendedProperties,
                                      java.lang.String pDuplicationMode)
                               throws MarkerException,
                                      InvalidMarkerException
Creates a new marker item using the provided property values and adds it to the specified item.

Parameters:
pMarkedItem - (required)The repository item being marked.
pKey - (required)The marker item key.
pValue - The marker item value.
pData - The marker item data.
pMarkerItemType - The repository item type of the marker definition to use when creating the new marker.
pMarkerProperty - The property name containing the collection of markers on the item. Defaults to the value configured in the marker manager.
pExtendedProperties - A map containing the extended marker property names/values. Use this map to specify any non-default marker property values that have been added to the marker item definition.
pDuplicationMode - Controls processing in cases where the item already contains duplicate markers.
MarkerContants.ALLOW_DUPLICATES
(default)no duplicate check.
MarkerContants.NO_DUPLICATES
If duplicates exist, don't add the new marker.
MarkerContants.REPLACE_DUPLICATES
Replace the duplicate markers with the new one.
Returns:
The marker repository item that was added.
Throws:
MarkerException - if errors occur during processing
InvalidMarkerException - if the marker is rejected as invalid.
See Also:
getDefaultMarkerPropertyName()

addMarkerToItem

public RepositoryItem addMarkerToItem(MutableRepositoryItem pMarkedItem,
                                      java.lang.String pKey,
                                      java.lang.String pValue,
                                      java.lang.String pData)
                               throws MarkerException,
                                      InvalidMarkerException
Creates a new marker item using the provided property values and adds it to the specified item.

Throws:
MarkerException
InvalidMarkerException
See Also:
addMarkerToItem(atg.repository.MutableRepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map, java.lang.String)

addMarkerToItem

public RepositoryItem addMarkerToItem(MutableRepositoryItem pMarkedItem,
                                      java.lang.String pKey,
                                      java.lang.String pValue,
                                      java.lang.String pData,
                                      java.lang.String pDuplicationMode)
                               throws MarkerException,
                                      InvalidMarkerException
Creates a new marker item using the provided property values and adds it to the specified item.

Throws:
MarkerException
InvalidMarkerException
See Also:
addMarkerToItem(atg.repository.MutableRepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map, java.lang.String)

addMarkerToItem

public RepositoryItem addMarkerToItem(MutableRepositoryItem pMarkedItem,
                                      java.lang.String pKey,
                                      java.lang.String pValue,
                                      java.lang.String pData,
                                      java.util.Map pExtendedProperties,
                                      java.lang.String pDuplicationMode)
                               throws MarkerException,
                                      InvalidMarkerException
Creates a new marker item using the provided property values and adds it to the specified item.

Throws:
MarkerException
InvalidMarkerException
See Also:
addMarkerToItem(atg.repository.MutableRepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map, java.lang.String)

addMarkerToItem

public RepositoryItem addMarkerToItem(MutableRepositoryItem pMarkedItem,
                                      java.lang.String pKey,
                                      java.lang.String pValue,
                                      java.lang.String pData,
                                      java.lang.String pMarkerPropertyName,
                                      java.util.Map pExtendedProperties,
                                      java.lang.String pDuplicationMode)
                               throws MarkerException,
                                      InvalidMarkerException
Creates a new marker item using the provided property values and adds it to the specified item.

Throws:
MarkerException
InvalidMarkerException
See Also:
addMarkerToItem(atg.repository.MutableRepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map, java.lang.String)

addMarkerItemToItem

public boolean addMarkerItemToItem(MutableRepositoryItem pMarkedItem,
                                   RepositoryItem pMarkerItem,
                                   java.lang.String pMarkerPropertyName,
                                   java.lang.String pDuplicationMode)
                            throws MarkerException,
                                   InvalidMarkerException
Adds a marker item to a marked item.

Parameters:
pMarkedItem - (required)The RepositoryItem being marked.
pMarkerItem - The marker item to be added.
pMarkerPropertyName - The property name containing the collection of markers on the item. Defaults to the value configured in the marker manager.
pDuplicationMode - Controls processing in cases where the item already contains duplicate markers.
MarkerContants.ALLOW_DUPLICATES
(default)no duplicate check.
MarkerContants.NO_DUPLICATES
If duplicates exist, don't add the new marker.
MarkerContants.REPLACE_DUPLICATES
Replace the duplicate markers with the new one.
Returns:
true if marked was added
Throws:
MarkerException - if errors occur during processing
InvalidMarkerException - if the marker is rejected as invalid.
See Also:
getDefaultMarkerPropertyName()

addMarkerToItem

public RepositoryItem addMarkerToItem(java.lang.String pMarkedItemId,
                                      java.lang.String pKey,
                                      java.lang.String pValue,
                                      java.lang.String pData)
                               throws MarkerException,
                                      InvalidMarkerException
Creates a new marker item using the provided property values and adds it to the specified item.

Throws:
MarkerException
InvalidMarkerException
See Also:
addMarkerToItem(atg.repository.MutableRepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map, java.lang.String)

addMarkerToItem

public RepositoryItem addMarkerToItem(java.lang.String pMarkedItemId,
                                      java.lang.String pKey,
                                      java.lang.String pValue,
                                      java.lang.String pData,
                                      java.lang.String pDuplicationMode)
                               throws MarkerException,
                                      InvalidMarkerException
Creates a new marker item using the provided property values and adds it to the specified item.

Throws:
MarkerException
InvalidMarkerException
See Also:
addMarkerToItem(atg.repository.MutableRepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map, java.lang.String)

addMarkerToItem

public RepositoryItem addMarkerToItem(java.lang.String pMarkedItemId,
                                      java.lang.String pKey,
                                      java.lang.String pValue,
                                      java.lang.String pData,
                                      java.util.Map pExtendedProperties,
                                      java.lang.String pDuplicationMode)
                               throws MarkerException,
                                      InvalidMarkerException
Creates a new marker item using the provided property values and adds it to the specified item.

Throws:
MarkerException
InvalidMarkerException
See Also:
addMarkerToItem(atg.repository.MutableRepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map, java.lang.String)

addMarkerToItem

public RepositoryItem addMarkerToItem(java.lang.String pMarkedItemId,
                                      java.lang.String pMarkedItemType,
                                      java.lang.String pKey,
                                      java.lang.String pValue,
                                      java.lang.String pData,
                                      java.lang.String pMarkerItemType,
                                      java.lang.String pMarkerPropertyName,
                                      java.util.Map pExtendedProperties,
                                      java.lang.String pDuplicationMode)
                               throws MarkerException,
                                      InvalidMarkerException
Creates a new marker item using the provided property values and adds it to the specified item. This method will locate and load the marked item using the item id and item type provided. It will also call updateItem after adding the new marker.

Throws:
MarkerException
InvalidMarkerException
See Also:
addMarkerToItem(atg.repository.MutableRepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map, java.lang.String)

setDefaultMarkerProperties

protected void setDefaultMarkerProperties(MutableRepositoryItem pMarkerItem,
                                          java.lang.String pKey,
                                          java.lang.String pValue,
                                          java.lang.String pData)
                                   throws MarkerException
Set the default property values of a marker.

Default properties are key, value, data and creationDate.

A property is not set if it is null or has a length of 0.

creationDate defaults to the current time.

Parameters:
pMarkerItem - the marker item.
pKey - the marker key.
pValue - the marker value.
pData - the marker data.
Throws:
MarkerException

setExtendedMarkerProperties

protected void setExtendedMarkerProperties(MutableRepositoryItem pMarkerItem,
                                           java.lang.String pKey,
                                           java.lang.String pValue,
                                           java.lang.String pData,
                                           java.util.Map pExtendedProperties)
                                    throws MarkerException
Sets the extended properties of a marker.

Each entry in the extended properties map corresponds to a property on the marker item where the map key = property name.

This method sets each property in the marker to the corresponding value in the map.

Property values of type String must have a length greater than 0 to be set, otherwise they are ignored and left as null.

Parameters:
pMarkerItem - the marker repository item.
pKey - the marker key.
pValue - the marker value.
pData - the marker data.
pExtendedProperties - the Map containing the property name to value mappings.
Throws:
MarkerException

addMarkerToItemsCollection

protected void addMarkerToItemsCollection(MutableRepositoryItem pMarkedItem,
                                          RepositoryItem pMarkerItem,
                                          java.lang.String pMarkerPropertyName)
                                   throws MarkerException
Adds a marker item to an item's collection of markers.

Parameters:
pMarkedItem - the mutable item with the collection of markers.
pMarkerItem - the marker item .
pMarkerPropertyName - the name of the item's marker collection property .
Throws:
MarkerException

removeMarkersFromItemsCollection

protected void removeMarkersFromItemsCollection(MutableRepositoryItem pMarkedItem,
                                                java.util.Collection pMarkerItems,
                                                java.lang.String pMarkerPropertyName)
                                         throws MarkerException
Removes a collection of markers from a item's collection of markers.

Parameters:
pMarkedItem - the mutable repository item containing the marker to be removed.
pMarkerItems - the collection of markers to remove.
pMarkerPropertyName - the name of the property containing the Collection of markers.
Throws:
MarkerException

identifyMissingExtendedProperties

protected java.util.Collection identifyMissingExtendedProperties(java.lang.String pKey,
                                                                 java.lang.String pValue,
                                                                 java.lang.String pData,
                                                                 java.lang.String pMarkerItemType,
                                                                 java.util.Map pExtendedProperties)
This method identifies the properties that are missing from the extendedProperties map using the configured requiredExtendedProperties array.

This method uses the same requiredExtendedProperties array for all marker types.

The key, value, data and markerItem types are not used by the base implementation but are provided to enable extensions to define different required extended properties based on these values.

Parameters:
pKey - the new markers key.
pValue - the new markers value.
pData - the new markers data.
pMarkerItemType - the type of marker being created in addMarkerToItem.
pExtendedProperties - the map of extended properties provided to addMarkerToItem.

findDuplicates

protected java.util.Collection findDuplicates(RepositoryItem pMarkedItem,
                                              RepositoryItem pMarkerItem,
                                              java.lang.String pMarkerPropertyName)
                                       throws MarkerException
Finds duplicate markers on the item.

Parameters:
pMarkedItem - the item with markers
pMarkerItem - the marker used in the duplicate check
pMarkerPropertyName - the property containing the markers
Returns:
a collection of duplicate marker items
Throws:
MarkerException

hasDuplicates

protected boolean hasDuplicates(RepositoryItem pMarkedItem,
                                RepositoryItem pMarkerItem,
                                java.lang.String pMarkerPropertyName)
                         throws MarkerException
Checks for a duplicate marker on the item.

Parameters:
pMarkedItem - the item with markers
pMarkerItem - the marker used in the duplicate check
pMarkerPropertyName - the property containing the markers
Returns:
true if a duplicate marker is found
Throws:
MarkerException

isDuplicateMarker

protected boolean isDuplicateMarker(RepositoryItem pMarker1,
                                    RepositoryItem pMarker2,
                                    MarkerDuplicateComparator pComparator)
                             throws MarkerException
This method calls the appropriate comparator component to determine if the two markers are duplicates of each other.

Parameters:
pMarker1 - a marker used in the comparison. this marker item is passed to the method getComparatorKey to determine the comparator lookup key.
pMarker2 - a marker used in the comparison.
pComparator - the MarkerDuplicateComparator to use in the comparison. If null, findComparator is used to determine the appropriate comparator component.
Returns:
true if the markers are considered duplicates of each other.
Throws:
MarkerException
See Also:
getComparatorKey(atg.repository.RepositoryItem), findComparator(java.lang.String)

getComparatorKey

protected java.lang.String getComparatorKey(RepositoryItem pMarkerItem)
This method returns the key used to lookup the MarkerDuplicateComparator in the MarkerDuplicateComparators map.

The markerItem's key value is returned by default.

Parameters:
pMarkerItem - the marker item for which the appropriate comparator should be returned.
Returns:
the key to looking up the comparator in the map.

findComparator

protected MarkerDuplicateComparator findComparator(java.lang.String pComparatorKey)
Returns the MarkerDuplicateComparator from the MarkerDuplicateComparators map using the pComparatorKey. If a comparator is not found in the map, the defaultMarkerDuplicateComparator is returned.

Parameters:
pComparatorKey - the key to identify the comparator in the MarkerDuplicateComparators map.
Returns:
an instance of marker duplication comparator that can be used to compare two markers.
See Also:
isDuplicateMarker(atg.repository.RepositoryItem, atg.repository.RepositoryItem, atg.markers.MarkerDuplicateComparator)

createMarkerItem

protected RepositoryItem createMarkerItem(java.lang.String pKey,
                                          java.lang.String pValue,
                                          java.lang.String pData,
                                          java.lang.String pMarkerItemType,
                                          java.util.Map pExtendedProperties)
                                   throws MarkerException
Creates a new transient marker item and sets the default and extended properties.

Parameters:
pKey - The marker item key.
pValue - The marker item value.
pData - The marker item data.
pMarkerItemType - The marker item type in the repository.
pExtendedProperties - A Map containing the property name to value pairs used to set the default and extended property values.
Returns:
The transient marker repository item that was created.
Throws:
MarkerException

findMatchingMarkers

public java.util.Collection findMatchingMarkers(RepositoryItem pMarkedItem,
                                                java.lang.String pKey,
                                                java.lang.String pValue,
                                                java.lang.String pData,
                                                java.lang.String pMarkerPropertyName,
                                                java.util.Map pExtendedProperties)
                                         throws MarkerException
This method returns the markers from the item that match the values provided. Each marker in the item's collection is compared to each of the property values provided. If all the properties match, the marker is included in the return collection.

If the parameter values are NULL then the marker property must also be NULL. If you want to exclude/ignore a property, specify MarkerConstants.ANY_VALUE.

Parameters:
pMarkedItem - The marked repository item.
pKey - The key value used to match markers.
pValue - The value value used to match markers .
pData - The data value used to match markers .
pMarkerPropertyName - The property name where the markers are stored on pMarkedItem.
pExtendedProperties - a map of property values used to match the marker items. If the map contains a NULL entry value, the matching marker property must also be NULL. If Map is NULL the extended properties are not included in the test.
Returns:
a Collection of matching markers. It is either a List or Set depending on the marker collection type on the marked item.
Throws:
MarkerException
See Also:
areMarkerPropertiesEqual(atg.repository.RepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.util.Map), MarkerConstants.ANY_VALUE

findMatchingMarkers

public java.util.Collection findMatchingMarkers(java.lang.String pMarkedItemId,
                                                java.lang.String pKey,
                                                java.lang.String pValue,
                                                java.lang.String pData,
                                                java.util.Map pExtendedProperties)
                                         throws MarkerException
This method returns the markers from the item that match the values provided. Each marker in the item's collection is compared to each of the property values provided. If all the properties match, the marker is included in the return collection.

Throws:
MarkerException
See Also:
findMatchingMarkers(atg.repository.RepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

findMatchingMarkers

public java.util.Collection findMatchingMarkers(java.lang.String pMarkedItemId,
                                                java.lang.String pMarkedItemType,
                                                java.lang.String pKey,
                                                java.lang.String pValue,
                                                java.lang.String pData,
                                                java.lang.String pMarkerPropertyName,
                                                java.util.Map pExtendedProperties)
                                         throws MarkerException
This method returns the markers from the item that match the values provided. Each marker in the item's collection is compared to the key, value, data and extendProperties provided. If all the properties match, the marker is included in the return collection.

Throws:
MarkerException
See Also:
findMatchingMarkers(atg.repository.RepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

removeMarkersFromItem

public int removeMarkersFromItem(MutableRepositoryItem pMarkedItem,
                                 java.lang.String pKey,
                                 java.lang.String pValue,
                                 java.lang.String pData,
                                 java.lang.String pMarkerPropertyName,
                                 java.util.Map pExtendedProperties)
                          throws MarkerException
This method removes the markers from the item that match the values provided. Each marker in the item's collection is compared to each of the property values provided. If all the properties match, the marker is removed.

If a parameter value is NULL, the marker property must be NULL to match. If the marker property value can be any value, use the constant value specified in the MarkerConstants.

Parameters:
pMarkedItem - The item containing the markers.
pKey - The key value used to match markers.
pValue - The value value used to match markers.
pData - The data value used to match markers.
pMarkerPropertyName - The property on the bean that contains the collection of markers.
pExtendedProperties - a map of property values used to match the marker items. If the map contains a NULL entry value, the matching marker property must also be NULL. If Map is NULL the extended properties are not included in the test.
Returns:
total number of markers removed.
Throws:
MarkerException
See Also:
MarkerConstants.ANY_VALUE

removeMarkersFromItem

public int removeMarkersFromItem(java.lang.String pMarkedItemId,
                                 java.lang.String pKey,
                                 java.lang.String pValue,
                                 java.lang.String pData,
                                 java.util.Map pExtendedProperties)
                          throws MarkerException
This method removes the markers from the item that match the values provided. Each marker in the item's collection is compared to each of the property values provided. If all the properties match, the marker is removed.

Throws:
MarkerException
See Also:
removeMarkersFromItem(atg.repository.MutableRepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

removeMarkersFromItem

public int removeMarkersFromItem(java.lang.String pMarkedItemId,
                                 java.lang.String pMarkedItemType,
                                 java.lang.String pKey,
                                 java.lang.String pValue,
                                 java.lang.String pData,
                                 java.lang.String pMarkerPropertyName,
                                 java.util.Map pExtendedProperties)
                          throws MarkerException
This method removes the markers from the item that match the values provided. Each marker in the item's collection is compared to each of the property values provided. If all the properties match, the marker is removed.

Throws:
MarkerException
See Also:
removeMarkersFromItem(atg.repository.MutableRepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

removeMarkersFromItem

public int removeMarkersFromItem(MutableRepositoryItem pMarkedItem,
                                 java.lang.String pKey,
                                 java.lang.String pValue,
                                 java.lang.String pData,
                                 java.util.Map pExtendedProperties)
                          throws MarkerException
This method removes the markers from the item that match the values provided. Each marker in the item's collection is compared to each of the property values provided. If all the properties match, the marker is removed.

Throws:
MarkerException
See Also:
removeMarkersFromItem(atg.repository.MutableRepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

createRemovedEventMessage

protected MarkerRemovedEventMessage createRemovedEventMessage(java.lang.String pMarkedItemId,
                                                              java.lang.String pMarkedItemType,
                                                              java.lang.String pMarkerPropertyName,
                                                              RepositoryItem pRemovedMarkerItem)
                                                       throws MarkerException
Creates a marker event message for remove operations.

This method first calls generateRemoveMessage to instantiate a MarkerRemovedEventMessage event object, then it fills in all the base properties of the removed event, as well as the MarkerData object that represents the removed marker's property values.

To extend the MarkerRemovedEventMessage, extend the generateRemoveMessage method, and this method. In the extension of this method be sure to call super() first to fill in the base event properties.

Parameters:
pMarkedItemId - the marked item id
pMarkedItemType - the item type of the marked item
pMarkerPropertyName - the name of the property on the marked item that referenced the marker.
pRemovedMarkerItem - the marker item that was removed
Returns:
the event message
Throws:
MarkerException
See Also:
generateRemoveMessage(), setBaseMarkerEventProperties(java.lang.String, java.lang.String, atg.repository.RepositoryItem, java.lang.String, atg.markers.MarkerEventMessage), createRemovedMarkerData(atg.repository.RepositoryItem)

createRemovedEventMessage

protected MarkerRemovedEventMessage createRemovedEventMessage(java.lang.String pMarkedItemId,
                                                              java.lang.String pMarkedItemType,
                                                              java.lang.String pMarkerPropertyName,
                                                              RepositoryItem pRemovedMarkerItem,
                                                              java.lang.String pSiteId)
                                                       throws MarkerException
Creates a marker event message for remove operations.

This method first calls generateRemoveMessage to instantiate a MarkerRemovedEventMessage event object, then it fills in all the base properties of the removed event, as well as the MarkerData object that represents the removed marker's property values.

To extend the MarkerRemovedEventMessage, extend the generateRemoveMessage method, and this method. In the extension of this method be sure to call super() first to fill in the base event properties.

Parameters:
pMarkedItemId - the marked item id
pMarkedItemType - the item type of the marked item
pMarkerPropertyName - the name of the property on the marked item that referenced the marker.
pRemovedMarkerItem - the marker item that was removed
pSiteId - the site id associated with an event
Returns:
the event message
Throws:
MarkerException
See Also:
generateRemoveMessage(), setBaseMarkerEventProperties(java.lang.String, java.lang.String, atg.repository.RepositoryItem, java.lang.String, atg.markers.MarkerEventMessage), createRemovedMarkerData(atg.repository.RepositoryItem)

createReplacedEventMessage

protected MarkerReplacedEventMessage createReplacedEventMessage(java.lang.String pMarkedItemId,
                                                                java.lang.String pMarkedItemType,
                                                                RepositoryItem pAddedMarkerItem,
                                                                java.lang.String pMarkerPropertyName,
                                                                RepositoryItem pReplacedMarkerItem)
                                                         throws MarkerException
Creates a marker event message for replace operations.

This method first calls generateReplaceMessage to instantiate a MarkerReplacedEventMessage event object, then it fills in all the base properties of the replace event, as well as the MarkerData objects that represent the replaced and added marker's property values.

To extend the MarkerReplacedEventMessage, extend the generateReplaceMessage method, and this method. In the extension of this method be sure to call super() first to fill in the base event properties.

Parameters:
pMarkedItemId - the marked item id
pMarkedItemType - the item type of the marked item
pAddedMarkerItem - the marker item that was added
pMarkerPropertyName - the name of the property on the marked item that referenced the marker.
pReplacedMarkerItem - the marker item that was replaced
Returns:
the event message
Throws:
MarkerException
See Also:
generateReplaceMessage(), setBaseMarkerEventProperties(java.lang.String, java.lang.String, atg.repository.RepositoryItem, java.lang.String, atg.markers.MarkerEventMessage), createReplacedMarkerData(atg.repository.RepositoryItem), createAddedMarkerData(atg.repository.RepositoryItem)

createReplacedEventMessage

protected MarkerReplacedEventMessage createReplacedEventMessage(java.lang.String pMarkedItemId,
                                                                java.lang.String pMarkedItemType,
                                                                RepositoryItem pAddedMarkerItem,
                                                                java.lang.String pMarkerPropertyName,
                                                                RepositoryItem pReplacedMarkerItem,
                                                                java.lang.String pSiteId)
                                                         throws MarkerException
Creates a marker event message for replace operations.

This method first calls generateReplaceMessage to instantiate a MarkerReplacedEventMessage event object, then it fills in all the base properties of the replace event, as well as the MarkerData objects that represent the replaced and added marker's property values.

To extend the MarkerReplacedEventMessage, extend the generateReplaceMessage method, and this method. In the extension of this method be sure to call super() first to fill in the base event properties.

Parameters:
pMarkedItemId - the marked item id
pMarkedItemType - the item type of the marked item
pAddedMarkerItem - the marker item that was added
pMarkerPropertyName - the name of the property on the marked item that referenced the marker.
pReplacedMarkerItem - the marker item that was replaced
pSiteId - the site id associated with an event
Returns:
the event message
Throws:
MarkerException
See Also:
generateReplaceMessage(), setBaseMarkerEventProperties(java.lang.String, java.lang.String, atg.repository.RepositoryItem, java.lang.String, atg.markers.MarkerEventMessage), createReplacedMarkerData(atg.repository.RepositoryItem), createAddedMarkerData(atg.repository.RepositoryItem)

createAddedEventMessage

protected MarkerAddedEventMessage createAddedEventMessage(java.lang.String pMarkedItemId,
                                                          java.lang.String pMarkedItemType,
                                                          java.lang.String pMarkerPropertyName,
                                                          RepositoryItem pAddedMarkerItem)
                                                   throws MarkerException
Creates a marker event message for add operations.

This method first calls generateAddMessage to instantiate a MarkerAddedEventMessage event object, then it fills in all the base properties of the add event, as well as the MarkerData object that represents the added marker's property values.

To extend the MarkerAddedEventMessage, extend the generateAddMessage method, and this method. In the extension of this method be sure to call super() first to fill in the base event properties.

Parameters:
pMarkedItemId - the marked item id
pMarkedItemType - the item type of the marked item
pMarkerPropertyName - the name of the property on the marked item that references the marker.
pAddedMarkerItem - the marker item that was added
Returns:
the event message
Throws:
MarkerException
See Also:
generateAddMessage(), setBaseMarkerEventProperties(java.lang.String, java.lang.String, atg.repository.RepositoryItem, java.lang.String, atg.markers.MarkerEventMessage), createAddedMarkerData(atg.repository.RepositoryItem)

createAddedEventMessage

protected MarkerAddedEventMessage createAddedEventMessage(java.lang.String pMarkedItemId,
                                                          java.lang.String pMarkedItemType,
                                                          java.lang.String pMarkerPropertyName,
                                                          RepositoryItem pAddedMarkerItem,
                                                          java.lang.String pSiteId)
                                                   throws MarkerException
Creates a marker event message for add operations.

This method first calls generateAddMessage to instantiate a MarkerAddedEventMessage event object, then it fills in all the base properties of the add event, as well as the MarkerData object that represents the added marker's property values.

To extend the MarkerAddedEventMessage, extend the generateAddMessage method, and this method. In the extension of this method be sure to call super() first to fill in the base event properties.

Parameters:
pMarkedItemId - the marked item id
pMarkedItemType - the item type of the marked item
pMarkerPropertyName - the name of the property on the marked item that references the marker.
pAddedMarkerItem - the marker item that was added
pSiteId - the site id associated with an event
Returns:
the event message
Throws:
MarkerException
See Also:
generateAddMessage(), setBaseMarkerEventProperties(java.lang.String, java.lang.String, atg.repository.RepositoryItem, java.lang.String, atg.markers.MarkerEventMessage), createAddedMarkerData(atg.repository.RepositoryItem)

setBaseMarkerEventProperties

protected void setBaseMarkerEventProperties(java.lang.String pMarkedItemId,
                                            java.lang.String pMarkerItemType,
                                            RepositoryItem pMarkerItem,
                                            java.lang.String pMarkerPropertyName,
                                            MarkerEventMessage pMessage)
                                     throws MarkerException
Sets the base property values of the marker event message. The properties set in this method are common to all marker event messages.

Parameters:
pMarkedItemId - the id of the marked item
pMarkerItem - the marker item that is the subject of the event
pMarkerPropertyName - the name of the property on the marked item that references the marker.
pMessage - the marker event object when the properties will be set
Throws:
MarkerException

setBaseMarkerEventProperties

protected void setBaseMarkerEventProperties(java.lang.String pMarkedItemId,
                                            java.lang.String pMarkerItemType,
                                            RepositoryItem pMarkerItem,
                                            java.lang.String pMarkerPropertyName,
                                            MarkerEventMessage pMessage,
                                            java.lang.String pSiteId)
                                     throws MarkerException
Sets the base property values of the marker event message. The properties set in this method are common to all marker event messages.

Parameters:
pMarkedItemId - the id of the marked item
pMarkerItem - the marker item that is the subject of the event
pMarkerPropertyName - the name of the property on the marked item that references the marker.
pMessage - the marker event object when the properties will be set
pSiteId - the site id associated with an event
Throws:
MarkerException

generateAddMessage

protected MarkerAddedEventMessage generateAddMessage()
This method is called by createAddedEventMessage to instantiate an object of type MarkerAddedEventMessage.

Override this method to return extended versions of the MarkerAddedEventMessage.

See Also:
createAddedEventMessage(java.lang.String, java.lang.String, java.lang.String, atg.repository.RepositoryItem)

generateRemoveMessage

protected MarkerRemovedEventMessage generateRemoveMessage()
This method is called by createRemovedEventMessage to instantiate an object of type MarkerRemovedEventMessage.

Override this method to return extended versions of the MarkerRemovedEventMessage.

See Also:
createRemovedEventMessage(java.lang.String, java.lang.String, java.lang.String, atg.repository.RepositoryItem)

generateReplaceMessage

protected MarkerReplacedEventMessage generateReplaceMessage()
This method is called by createReplacedEventMessage to instantiate an object of type MarkerReplacedEventMessage.

Override this method to return extended versions of the MarkerReplacedEventMessage.

See Also:
createReplacedEventMessage(java.lang.String, java.lang.String, atg.repository.RepositoryItem, java.lang.String, atg.repository.RepositoryItem)

generateMarkerData

protected MarkerData generateMarkerData()
This method instantiates an object of the type MarkerData.

This method is called by the createAddedMarkerData, createReplacedMarkerData and createRemovedMarkerData methods to create the MarkerData object.

Extend this method to create extended versions of the MarkerData class.

See Also:
createAddedMarkerData(atg.repository.RepositoryItem), createRemovedMarkerData(atg.repository.RepositoryItem), createReplacedMarkerData(atg.repository.RepositoryItem)

createAddedMarkerData

protected MarkerData createAddedMarkerData(RepositoryItem pAddedMarkerItem)
                                    throws MarkerException
Creates a new MarkerData object for the marker item that has been added by calling the generateMarkerData method.

Calls setBaseMarkerData to set the base properties of the MarkerData object, followed by setExtendedMarkerData to set the extended properties values.

Throws:
MarkerException
See Also:
generateMarkerData(), setBaseMarkerData(atg.repository.RepositoryItem, atg.markers.MarkerData), setExtendedMarkerData(atg.repository.RepositoryItem, atg.markers.MarkerData)

createRemovedMarkerData

protected MarkerData createRemovedMarkerData(RepositoryItem pRemovedMarkerItem)
                                      throws MarkerException
Creates a new MarkerData object for the marker item that has been removed by calling the generateMarkerData method.

Calls setBaseMarkerData to set the base properties of the MarkerData object, followed by setExtendedMarkerData to set the extended properties values.

Throws:
MarkerException
See Also:
generateMarkerData(), setBaseMarkerData(atg.repository.RepositoryItem, atg.markers.MarkerData), setExtendedMarkerData(atg.repository.RepositoryItem, atg.markers.MarkerData)

createReplacedMarkerData

protected MarkerData createReplacedMarkerData(RepositoryItem pReplacedMarkerItem)
                                       throws MarkerException
Creates a new MarkerData object for the marker item that has been replaced by calling the generateMarkerData method.

Calls setBaseMarkerData to set the base properties of the MarkerData object, followed by setExtendedMarkerData to set the extended properties values.

Throws:
MarkerException
See Also:
generateMarkerData(), setBaseMarkerData(atg.repository.RepositoryItem, atg.markers.MarkerData), setExtendedMarkerData(atg.repository.RepositoryItem, atg.markers.MarkerData)

setBaseMarkerData

protected void setBaseMarkerData(RepositoryItem pMarkerItem,
                                 MarkerData pMarkerData)
                          throws MarkerException
Sets the base properties of the MarkerData object based on the marker item.

Throws:
MarkerException
See Also:
createAddedMarkerData(atg.repository.RepositoryItem), createRemovedMarkerData(atg.repository.RepositoryItem), createReplacedMarkerData(atg.repository.RepositoryItem)

setExtendedMarkerData

protected void setExtendedMarkerData(RepositoryItem pMarkerItem,
                                     MarkerData pMarkerData)
                              throws MarkerException
This method is called by the createAddedMarkerData, createReplacedMarkerData and createRemovedMarkerData methods to set the extended properties of the MarkerData object.

The base implementation doesn't modify the MarkerData object at all.

Extend this method if you have extended the MarkerData object to include extended properties.

Throws:
MarkerException

getMarkerEventProfileId

protected java.lang.String getMarkerEventProfileId(java.lang.String pMarkedItemId,
                                                   java.lang.String pMarkedItemType,
                                                   RepositoryItem pMarkerItem)
This method is called to return the profile id that will be associated with a marker event.

The base implementation returns the profile id associated with the current session.

Parameters:
pMarkedItemId - the marked item's repository id
pMarkedItemType - the marked item's repository type
pMarkerItem - the marker repository item

removeAllMarkersFromItem

public int removeAllMarkersFromItem(MutableRepositoryItem pMarkedItem,
                                    java.lang.String pMarkerPropertyName)
                             throws MarkerException
Removes all markers from the marked item.

Parameters:
pMarkedItem - The repository item containing markers.
pMarkerPropertyName - The property on the bean that contains the collection of markers.
Returns:
total number of markers removed.
Throws:
MarkerException

removeAllMarkersFromItem

public int removeAllMarkersFromItem(java.lang.String pMarkedItemId)
                             throws MarkerException
Removes all markers from the marked item.

Throws:
MarkerException
See Also:
removeAllMarkersFromItem(atg.repository.MutableRepositoryItem, java.lang.String)

removeAllMarkersFromItem

public int removeAllMarkersFromItem(java.lang.String pMarkedItemId,
                                    java.lang.String pMarkedItemType,
                                    java.lang.String pMarkerPropertyName)
                             throws MarkerException
Removes all markers from the marked item.

Throws:
MarkerException
See Also:
removeAllMarkersFromItem(atg.repository.MutableRepositoryItem, java.lang.String)

removeAllMarkersFromItem

public int removeAllMarkersFromItem(MutableRepositoryItem pMarkedItem)
                             throws MarkerException
Removes all markers from the marked item.

Throws:
MarkerException
See Also:
removeAllMarkersFromItem(atg.repository.MutableRepositoryItem, java.lang.String)

areMarkerPropertiesEqual

protected boolean areMarkerPropertiesEqual(RepositoryItem pMarkerItem,
                                           java.lang.String pKey,
                                           java.lang.String pValue,
                                           java.lang.String pData,
                                           java.util.Map pExtendedProperties)
                                    throws MarkerException
Compares the marker item property values to the parameter values.

compareDefaultPropertyValues is called first, followed by compareExtendedPropertyValues.

Parameters:
pMarkerItem - the marker item.
pKey - the key to compare.
pValue - the value to compare.
pData - the data to compare.
pExtendedProperties - the map of extended properties to compare.
Returns:
true if all provided values equal. if all the parameters are null, false is returned.
Throws:
MarkerException
See Also:
compareDefaultPropertyValues(atg.repository.RepositoryItem, java.lang.String, java.lang.String, java.lang.String), compareDefaultPropertyValues(atg.repository.RepositoryItem, java.lang.String, java.lang.String, java.lang.String), findMatchingMarkers(atg.repository.RepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

compareDefaultPropertyValues

protected boolean compareDefaultPropertyValues(RepositoryItem pMarkerItem,
                                               java.lang.String pKey,
                                               java.lang.String pValue,
                                               java.lang.String pData)
Compares key, value and data to the values in the marker.

If a parameter value is NULL, the marker property must be NULL to match. If the marker property value can be any value, use the constant value specified in the MarkerConstants.

Parameters:
pMarkerItem - the markerItem.
pKey - the key to compare .
pValue - the value to compare.
pData - the data to compare.
Returns:
true if values equal.
See Also:
MarkerConstants.ANY_VALUE

compareExtendedPropertyValues

protected boolean compareExtendedPropertyValues(RepositoryItem pMarkerItem,
                                                java.util.Map pExtendedProperties)
                                         throws MarkerException
This method compares a marker item's extended property values to those in the extended properties map.

Each value in the map is compared the markers matching property value. False is returned if the the values are NOT the same.

If a entry value is NULL, the marker property must be NULL to match. If the marker property value can be any value, use the constant value specified in the MarkerConstants.

If the extended properties map is null or empty, the comparison is considered successful and true is returned.

Parameters:
pMarkerItem - the marker repository item.
pExtendedProperties - (required)a map of property name to values used to compare with the marker item.
Returns:
true if the marker properties compare successfully.
Throws:
MarkerException
See Also:
MarkerConstants.ANY_VALUE

hasMarker

public boolean hasMarker(RepositoryItem pMarkedItem,
                         java.lang.String pKey,
                         java.lang.String pValue,
                         java.lang.String pData,
                         java.lang.String pMarkerPropertyName,
                         java.util.Map pExtendedProperties)
                  throws MarkerException
This method determines if a marked item contains a marker with the specified property values.

If a parameter value is NULL, the marker property must be NULL to match. If the marker property value can be any value, use the constant value specified in the MarkerConstants.

Parameters:
pMarkedItem - The item containing the markers.
pKey - The key value used to match markers.
pValue - The value value used to match markers.
pData - The data value used to match markers.
pMarkerPropertyName - the property containing the collection of markers.
pExtendedProperties - a map of property values used to match the marker items. If the map contains a NULL entry value, the matching marker property must also be NULL. If Map is NULL the extended properties are not included in the test.
Returns:
true if the item contains a matching marker.
Throws:
MarkerException
See Also:
MarkerConstants.ANY_VALUE

hasMarker

public boolean hasMarker(java.lang.String pMarkedItemId,
                         java.lang.String pKey,
                         java.lang.String pValue,
                         java.lang.String pData,
                         java.util.Map pExtendedProperties)
                  throws MarkerException
This method determines if a marked item contains a marker with the specified property values.

Throws:
MarkerException
See Also:
hasMarker(atg.repository.RepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

hasMarker

public boolean hasMarker(java.lang.String pMarkedItemId,
                         java.lang.String pMarkedItemType,
                         java.lang.String pKey,
                         java.lang.String pValue,
                         java.lang.String pData,
                         java.lang.String pMarkerPropertyName,
                         java.util.Map pExtendedProperties)
                  throws MarkerException
Throws:
MarkerException

hasMarker

public boolean hasMarker(RepositoryItem pMarkedItem,
                         java.lang.String pKey,
                         java.lang.String pValue,
                         java.lang.String pData,
                         java.util.Map pExtendedProperties)
                  throws MarkerException
This method determines if a marked item contains a marker with the specified property values.

Throws:
MarkerException
See Also:
hasMarker(atg.repository.RepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

matchLastMarkerWithKey

public RepositoryItem matchLastMarkerWithKey(RepositoryItem pMarkedItem,
                                             java.lang.String pKey,
                                             java.lang.String pValue,
                                             java.lang.String pData,
                                             java.lang.String pMarkerPropertyName,
                                             java.util.Map pExtendedProperties)
                                      throws MarkerException
This method returns the last marker with a given key only if it has a matching value, data and extendedProperties.

For example, it first retrieves all markers with the given key. Then it tests the last one of those markers against the other provided property values.

If the parameter values are NULL then the marker property must also be NULL. If you want to exclude/ignore a property, specify MarkerConstants.ANY_VALUE.

Parameters:
pMarkedItem - The item containing the markers.
pKey - (required) The key value used to match markers.
pValue - The value value used to match markers.
pData - The data value used to match markers.
pMarkerPropertyName - the property containing the collection of markers.
pExtendedProperties - a map of property values used to match the marker items. If the map contains a NULL entry value, the matching marker property must also be NULL. If Map is NULL the extended properties are not included in the test.
Returns:
the matching item, otherwise null.
Throws:
MarkerException
See Also:
MarkerConstants.ANY_VALUE

matchLastMarkerWithKey

public RepositoryItem matchLastMarkerWithKey(java.lang.String pMarkedItemId,
                                             java.lang.String pKey,
                                             java.lang.String pValue,
                                             java.lang.String pData,
                                             java.util.Map pExtendedProperties)
                                      throws MarkerException
This method returns the last marker with a given key only if it has a matching value, data and extendedProperties.

For example, it first retrieves all markers with the given key. Then it tests the last one of those markers against the other provided property values.

Throws:
MarkerException
See Also:
matchLastMarkerWithKey(atg.repository.RepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

matchLastMarkerWithKey

public RepositoryItem matchLastMarkerWithKey(java.lang.String pMarkedItemId,
                                             java.lang.String pMarkedItemType,
                                             java.lang.String pKey,
                                             java.lang.String pValue,
                                             java.lang.String pData,
                                             java.lang.String pMarkerPropertyName,
                                             java.util.Map pExtendedProperties)
                                      throws MarkerException
This method returns the last marker with a given key only if it has a matching value, data and extendedProperties.

For example, it first retrieves all markers with the given key. Then it tests the last one of those markers against the other provided property values.

Throws:
MarkerException
See Also:
matchLastMarkerWithKey(atg.repository.RepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

matchLastMarkerWithKey

public RepositoryItem matchLastMarkerWithKey(RepositoryItem pMarkedItem,
                                             java.lang.String pKey,
                                             java.lang.String pValue,
                                             java.lang.String pData,
                                             java.util.Map pExtendedProperties)
                                      throws MarkerException
This method returns the last marker with a given key only if it has a matching value, data and extendedProperties.

For example, it first retrieves all markers with the given key. Then it tests the last one of those markers against the other provided property values.

Throws:
MarkerException
See Also:
matchLastMarkerWithKey(atg.repository.RepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

matchLastMarker

public RepositoryItem matchLastMarker(RepositoryItem pMarkedItem,
                                      java.lang.String pKey,
                                      java.lang.String pValue,
                                      java.lang.String pData,
                                      java.lang.String pMarkerPropertyName,
                                      java.util.Map pExtendedProperties)
                               throws MarkerException
This method returns the item's last marker only if it has a matching key, value, data and extendedProperties.

If the collection is a list, the last item in the list is checked. If the collection is a set, the collection is sorted by creationDate and the last item is checked.

If a parameter value is NULL, the marker property must be NULL to match. If the marker property value can be any value, use the constant value specified in the MarkerConstants.

Parameters:
pMarkedItem - The item containing the markers.
pKey - The key value used to match markers.
pValue - The value value used to match markers.
pData - The data value used to match markers.
pMarkerPropertyName - the property containing the collection of markers.
pExtendedProperties - a map of property values used to match the marker items. If the map contains a NULL entry value, the matching marker property must also be NULL. If Map is NULL the extended properties are not included in the test.
Returns:
the matching item, otherwise null.
Throws:
MarkerException
See Also:
MarkerConstants.ANY_VALUE

matchLastMarker

public RepositoryItem matchLastMarker(java.lang.String pMarkedItemId,
                                      java.lang.String pKey,
                                      java.lang.String pValue,
                                      java.lang.String pData,
                                      java.util.Map pExtendedProperties)
                               throws MarkerException
This method returns the item's last marker only if it has a matching key, value, data and extendedProperties.

Throws:
MarkerException
See Also:
matchLastMarker(atg.repository.RepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

matchLastMarker

public RepositoryItem matchLastMarker(java.lang.String pMarkedItemId,
                                      java.lang.String pMarkedItemType,
                                      java.lang.String pKey,
                                      java.lang.String pValue,
                                      java.lang.String pData,
                                      java.lang.String pMarkerPropertyName,
                                      java.util.Map pExtendedProperties)
                               throws MarkerException
This method returns the item's last marker only if it has a matching key, value, data and extendedProperties.

Throws:
MarkerException
See Also:
matchLastMarker(atg.repository.RepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

matchLastMarker

public RepositoryItem matchLastMarker(RepositoryItem pMarkedItem,
                                      java.lang.String pKey,
                                      java.lang.String pValue,
                                      java.lang.String pData,
                                      java.util.Map pExtendedProperties)
                               throws MarkerException
This method returns the item's last marker only if it has a matching key, value, data and extendedProperties.

Throws:
MarkerException
See Also:
matchLastMarker(atg.repository.RepositoryItem, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

getAllMarkersFromItem

public java.util.Collection getAllMarkersFromItem(RepositoryItem pMarkedItem,
                                                  java.lang.String pMarkerPropertyName)
                                           throws MarkerException
This method returns a copy of the current marker collection from the given item.

Parameters:
pMarkedItem - the marked item.
pMarkerPropertyName - the marker collection property name.
Returns:
Collection of markers.
Throws:
MarkerException

getAllMarkersFromItem

public java.util.Collection getAllMarkersFromItem(java.lang.String pMarkedItemId)
                                           throws MarkerException
This method returns a copy of the current marker collection from the given item.

Throws:
MarkerException
See Also:
getAllMarkersFromItem(atg.repository.RepositoryItem, java.lang.String)

getAllMarkersFromItem

public java.util.Collection getAllMarkersFromItem(java.lang.String pMarkedItemId,
                                                  java.lang.String pMarkedItemType,
                                                  java.lang.String pMarkerPropertyName)
                                           throws MarkerException
This method returns a copy of the current marker collection from the given item.

Throws:
MarkerException
See Also:
getAllMarkersFromItem(atg.repository.RepositoryItem, java.lang.String)

getAllMarkersFromItem

public java.util.Collection getAllMarkersFromItem(RepositoryItem pMarkedItem)
                                           throws MarkerException
This method returns a copy of the current marker collection from the given item.

Throws:
MarkerException
See Also:
getAllMarkersFromItem(atg.repository.RepositoryItem, java.lang.String)

getMarkerCollectionFromItem

protected java.util.Collection getMarkerCollectionFromItem(RepositoryItem pMarkedItem,
                                                           java.lang.String pMarkerPropertyName)
                                                    throws MarkerException
Util method for returning the marker collection from an item.

Parameters:
pMarkedItem - the item containing the marker collection
pMarkerPropertyName - the collection property name
Returns:
the collection of markers
Throws:
MarkerException

findLastMarkerOnItem

protected RepositoryItem findLastMarkerOnItem(RepositoryItem pMarkedItem,
                                              java.lang.String pMarkerPropertyName)
                                       throws MarkerException
This method returns the last marker in the marker collection.

If the collection is a list, the last item in the list is returned. If the collection is a set, the collection is sorted by creationDate and the last item is returned.

Parameters:
pMarkedItem - the marked repository item.
pMarkerPropertyName - the marker collection property name.
Returns:
the last marker item.
Throws:
MarkerException

createSortedArrayOfMarkers

public java.lang.Object[] createSortedArrayOfMarkers(java.util.Collection pMarkers,
                                                     java.lang.String pMarkerSortPropertyName)
                                              throws MarkerException
Create a sorted array of items in ascending order using the marker sort property name provided.

This method is called by other methods that rely on order for their result. Such as, findLastMarkerOnItem and matchLastMarkerWithKey.

Parameters:
pMarkers - the collection of markers to be sorted in ascending order.
pMarkerSortPropertyName - the marker property name to use in the sort. Defaults to defaulMarkerSortPropertyName
Returns:
sorted marker item array.
Throws:
MarkerException

getItemsWithMarker

public RepositoryItem[] getItemsWithMarker(java.lang.String pMarkedItemType,
                                           java.lang.String pMarkerItemType,
                                           java.lang.String pMarkerPropertyName,
                                           java.lang.String pKey,
                                           java.lang.String pValue,
                                           java.lang.String pData,
                                           java.util.Map pExtendedProperties)
                                    throws MarkerException
This method queries for marked items in the repository that have markers with a matching key, value and data values.

generateMarkerExtendedPropertyQuery method is called to provide an additional Query object to further qualify the markers based on the extended properties.

Parameters:
pMarkedItemType - the type of the item being queried
pMarkerItemType - the marker item type
pMarkerPropertyName - the property name containing the collection of markers
pKey - marker key
pValue - marker value
pData - marker data
pExtendedProperties - extended property map. Not used in the base implementation.
Returns:
the marked items with matching markers
Throws:
MarkerException
See Also:
generateMarkerExtendedPropertyQuery(atg.repository.QueryBuilder, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

generateMarkerQualifyingAndedQuery

public Query generateMarkerQualifyingAndedQuery(java.lang.String pMarkerItemType,
                                                java.lang.String pKey,
                                                java.lang.String pValue,
                                                java.lang.String pData,
                                                java.util.Map pExtendedProperties)
                                         throws MarkerException
This method will create a query object for the marker item which qualifies markers by the key, value, data and extended properties. generateMarkerExtendedPropertyQuery is called to generate the query for the extended properties. This query is anded together with the other queries for key, value and data.

Throws:
MarkerException

getItemsWithMarker

public RepositoryItem[] getItemsWithMarker(java.lang.String pKey,
                                           java.lang.String pValue,
                                           java.lang.String pData)
                                    throws MarkerException
This method queries for marked items in the repository that have markers whose key, value and data match the provided parameter values.

Throws:
MarkerException
See Also:
getItemsWithMarker(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

generateMarkerExtendedPropertyQuery

protected Query generateMarkerExtendedPropertyQuery(QueryBuilder pQueryBuilder,
                                                    java.lang.String pKey,
                                                    java.lang.String pValue,
                                                    java.lang.String pData,
                                                    java.util.Map pExtendedProperties)
                                             throws MarkerException
This method is called by getItemsWithMarker and deleteMarkers. Using the provided QueryByuilder, the implementer can create a query object to further constrain the Query used qualify markers in the repository.

The query object returned by this method can be anded together to form the final query.

For instance, get all items that have markers with name = x, and value =y, and {this query}......

Parameters:
pQueryBuilder - the QueryBuilder object to use for creating the new query object
pKey - marker key
pValue - marker value
pData - marker data
pExtendedProperites - a map containg the property to value mappings
Returns:
An query object that will be anded with the Queries used to qualify markers
Throws:
MarkerException

deleteMarkers

public int deleteMarkers(java.lang.String pMarkedItemType,
                         java.lang.String pMarkerItemType,
                         java.lang.String pMarkerPropertyName,
                         java.lang.String pKey,
                         java.lang.String pValue,
                         java.lang.String pData,
                         java.util.Map pExtendedProperties)
                  throws MarkerException
This method will delete marker items with matching values. This method can be used to delete markers that are contained in a Set and is not supported for marker items that are contained in a List.

generateMarkerExtendedPropertyQuery method is called to provide an additional Query object for further qualify the markers.

Parameters:
pMarkedItemType - the repository item type of the item that contains the Set relationship to the marker items.
pMarkerItemType - the repository item type of the marker items.
pMarkerPropertyName - the property on the pMarkedItemType that is the marker set
pKey - marker key
pValue - marker value
pData - marker data
pExtendedProperites - a map containg the property to value mappings
Returns:
total number of markers deleted
Throws:
MarkerException
See Also:
generateMarkerExtendedPropertyQuery(atg.repository.QueryBuilder, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

getDefaultPropertyQuery

public Query getDefaultPropertyQuery(QueryBuilder pQueryBuilder,
                                     java.lang.String pPropertyNameOnMarker,
                                     java.lang.String pValue)
                              throws RepositoryException
This method creates the query object for comparing a value of a marker property to the provided value.

Returns:
Either an IsNull or Comparison Query object, or Null. Null is returned if pValue is the any value token specified by atg.markers.MarkerConstants.ANY_VALUE
Throws:
RepositoryException

getMarkerPropertyName

protected java.lang.String getMarkerPropertyName(java.lang.String pMarkerPropertyName)
                                          throws MarkerException
This method is called by other internal methods that require a markerPropertyName. Each method calls this method passing the value it received. If that value is not null, the same value is returned back. If the value is null, the defaultMarkerPropertyName is returned.

Throws:
MarkerException

getMarkerSortPropertyName

protected java.lang.String getMarkerSortPropertyName(java.lang.String pMarkerSortPropertyName)
                                              throws MarkerException
This method is called by other internal methods that require a markerSortPropertyName. Each method calls this method passing the value it received. If that value is not null, the same value is returned back. If the value is null, the defaultMarkerSortPropertyName is returned.

Throws:
MarkerException

getMarkerItemType

protected java.lang.String getMarkerItemType(java.lang.String pMarkerItemType)
                                      throws MarkerException
This method is called by other internal methods that require a markerItemType. Each method calls this method passing the value it received. If that value is not null, the same value is returned back. If the value is null, the defaultMarkerItemType is returned.

Throws:
MarkerException

getMarkedItemType

protected java.lang.String getMarkedItemType(java.lang.String pMarkedItemType)
                                      throws MarkerException
This method is called by other internal methods that require a markedItemType. Each method calls this method passing the value it received. If that value is not null, the same value is returned back. If the value is null, the defaultMarkedItemType is returned.

Throws:
MarkerException

getDuplicationMode

protected java.lang.String getDuplicationMode(java.lang.String pDuplicationMode)
                                       throws MarkerException
This method is called by other internal methods that require a duplicationMode. Each method calls this method passing the value it received. If that value is not null, the same value is returned back. If the value is null, the defaultDuplicationMode is returned.

Throws:
MarkerException

validateMarker

protected void validateMarker(RepositoryItem pMarkedItem,
                              RepositoryItem pMarkerItem)
                       throws MarkerException,
                              InvalidMarkerException
This method is called by addMarkerItemToItem to validate a new marker. The marker key is used to lookup to the appropriate validator in the MarkerValidatorComponentsMap.

Parameters:
pMarkedItem - the item being marked
pMarkerItem - the new marker item
Throws:
MarkerException - if an error occurs in the MarkerValidator.
InvalidMarkerException - if the marker is rejected as invalid.
See Also:
#addMarkerItemtoItem,


findMarkerValidator

protected MarkerValidator findMarkerValidator(RepositoryItem pMarkedItem,
                                              RepositoryItem pMarkerItem)
Locates a marker validator component in the marker validator service map. By default, the new marker key is used to lookup the validator in the map.

Parameters:
pMarkedItem - the item being marked
pMarkerItem - the new marker item
Returns:
the MarkerValidator

findMarkerValidator

public MarkerValidator findMarkerValidator(java.lang.String pKey)
Locates a marker validator component in the marker validator service map.

Specified by:
findMarkerValidator in interface MarkerValidatorContainer
Parameters:
pKey - the key used to lookup the validator.
Returns:
the MarkerValidator.

addMarkerValidator

public void addMarkerValidator(java.lang.String pKey,
                               MarkerValidator pMarkerValidator)
Adds a marker validator.

Specified by:
addMarkerValidator in interface MarkerValidatorContainer
Parameters:
pKey - the key used to identify the validator.
pMarkerValidator - the marker validator

removeMarkerValidator

public void removeMarkerValidator(java.lang.String pKey)
Remove a marker validator.

Specified by:
removeMarkerValidator in interface MarkerValidatorContainer
Parameters:
pKey - the key used to identify the validator.

findValidKeys

public java.util.Collection findValidKeys()
The method exposes the keys used to map MarkerValidators.

Returns:
a Collection of keys to which the validators are mapped.

findValidValuesForKey

public java.util.List findValidValuesForKey(java.lang.String pMarkerKey)
This returns the valid values for the given markerKey. First the MarkerValidator is located in the MarkerValidator map. If it's an instanceof ValidateMarkerByPossibleValue, the possible values are returned.

A null is returned as the last element in the list if null is a valid value for the key.

Parameters:
pMarkerKey - the key used to identify possible values.
Returns:
a List of possible values for the given key. null if explicit possible values are not defined.

getValidatedKeysAndValues

public java.util.Map getValidatedKeysAndValues()
Generates a map of the validate keys and their possible values. This method is used by the scenario editor to generate the key/value options for the repository actions and expressions

Returns:
Map of keys to possible values where possibleValues are in a collection. If a key does not have possibleValues defined, it is mapped to a null in the map.

isValidKey

public boolean isValidKey(java.lang.String pKey)
Returns:
true if the key is valid for this marker manager

isValidValueForKey

public boolean isValidValueForKey(java.lang.String pKey,
                                  java.lang.String pValue)
Returns:
true if the value is valid for the key