Class RecordsManagementAdminServiceImpl
- java.lang.Object
-
- org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminBase
-
- org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminServiceImpl
-
- All Implemented Interfaces:
EventListener
,RecordsManagementAdminService
,RecordsManagementCustomModel
,NodeServicePolicies.OnAddAspectPolicy
,NodeServicePolicies.OnCreateNodePolicy
,NodeServicePolicies.OnRemoveAspectPolicy
,ClassPolicy
,Policy
,org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
,org.springframework.core.Ordered
public class RecordsManagementAdminServiceImpl extends RecordsManagementAdminBase implements RecordsManagementAdminService, RecordsManagementCustomModel, NodeServicePolicies.OnAddAspectPolicy, NodeServicePolicies.OnRemoveAspectPolicy, NodeServicePolicies.OnCreateNodePolicy, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>, org.springframework.core.Ordered
Records Management AdminService Implementation.- Author:
- Neil McErlean, janv
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy
Policy.Arg
-
-
Field Summary
-
Fields inherited from class org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminBase
logger
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnAddAspectPolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateNodePolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnRemoveAspectPolicy
QNAME
-
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Fields inherited from interface org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementCustomModel
ASPECT_CUSTOM_ASSOCIATIONS, ASPECT_SUPPLEMENTAL_MARKING_LIST, CONSTRAINT_CUSTOM_SMLIST, CUSTOM_REF_CROSSREFERENCE, CUSTOM_REF_OBSOLETES, CUSTOM_REF_RENDITION, CUSTOM_REF_SUPERSEDES, CUSTOM_REF_SUPPORTS, CUSTOM_REF_VERSIONS, PROP_SUPPLEMENTAL_MARKING_LIST, RM_CUSTOM_MODEL, RM_CUSTOM_PREFIX, RM_CUSTOM_URI
-
-
Constructor Summary
Constructors Constructor Description RecordsManagementAdminServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QName
addCustomAssocDefinition(String label)
This method creates a new custom association, using the given label as the title.QName
addCustomChildAssocDefinition(String source, String target)
This method creates a new custom child association, combining the given source and target and using the combined String as the title.void
addCustomConstraintDefinition(QName constraintName, String title, boolean caseSensitive, List<String> allowedValues, RMListOfValuesConstraint.MatchLogic matchLogic)
This method adds a Constraint definition to the custom model.QName
addCustomPropertyDefinition(QName propId, QName aspectName, String label, QName dataType, String title, String description)
Add custom property definition Note: no default value, single valued, optional, not system protected, no constraintsQName
addCustomPropertyDefinition(QName propId, QName aspectName, String label, QName dataType, String title, String description, String defaultValue, boolean multiValued, boolean mandatory, boolean isProtected, QName lovConstraint)
Add custom property definition with one optional constraint referencevoid
addCustomReference(NodeRef fromNode, NodeRef toNode, QName refId)
This method adds the specified custom reference instance between the specified nodes.void
changeCustomConstraintTitle(QName constraintName, String title)
void
changeCustomConstraintValues(QName constraintName, List<String> newAllowedValues)
Update custom constraint definition with new list of values (replaces existing list, if any)boolean
existsCustomProperty(QName propertyName)
Indicates whether the custom property exists.String
getCompoundIdFor(String sourceId, String targetId)
This method retrieves a compound ID (client-side) for the specified sourceId and targetId.List<ChildAssociationRef>
getCustomChildReferences(NodeRef node)
Fetches all child associations of the given source.List<ConstraintDefinition>
getCustomConstraintDefinitions(QName modelQName)
This method returns ConstraintDefinition objects defined in the given model (note: not property references or in-line defs) The custom constraint definitions are retrieved from the dictionaryService which is notified of any newly created definitions on transaction commit.Set<QName>
getCustomisable()
Get a list of all registered customisable types and aspects.Set<QName>
getCustomisable(NodeRef nodeRef)
Get a list of all the registered customisable types and aspects present on a given node reference.List<ChildAssociationRef>
getCustomParentReferences(NodeRef node)
Fetches all child associations where the given node is the child.Map<QName,PropertyDefinition>
getCustomPropertyDefinitions()
This method returns the custom properties that have been defined for all of the specified customisable RM elements.Map<QName,PropertyDefinition>
getCustomPropertyDefinitions(QName customisableType)
This method returns the custom properties that have been defined for the specified customisable RM element.Map<QName,AssociationDefinition>
getCustomReferenceDefinitions()
This method returns the custom references that have been defined in the custom model.List<AssociationRef>
getCustomReferencesFrom(NodeRef node)
Fetches all associations from the given source.List<AssociationRef>
getCustomReferencesTo(NodeRef node)
Returns a List of all associations to the given node.int
getOrder()
Indicate that this application content listener must be executed with the lowest precedence.QName
getQNameForClientId(String localName)
This method iterates over the custom properties, references looking for one whose id exactly matches that specified.protected RelationshipService
getRelationshipService()
Gets the relationship service instanceboolean
isCustomisable(QName type)
Indicates whether a type (or aspect) is customisable.boolean
isCustomMapInit()
Helper method to indicate whether the custom map is initialised or not.void
makeCustomisable(QName type)
Makes a type customisable.void
onAddAspect(NodeRef nodeRef, QName aspectTypeQName)
void
onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
Load the custom properties mapvoid
onCreateNode(ChildAssociationRef childAssocRef)
Make sure any custom property aspects are applied to newly created nodes.void
onRemoveAspect(NodeRef nodeRef, QName aspectTypeQName)
void
removeCustomConstraintDefinition(QName constraintName)
Remove custom constraint definition - if not referenced (by any properties)void
removeCustomPropertyDefinition(QName propQName)
Remove custom property definitionQName
removeCustomPropertyDefinitionConstraints(QName propQName)
Removes all list of values constraints from the custom property definition.void
removeCustomReference(NodeRef fromNode, NodeRef toNode, QName assocId)
This method removes the specified custom reference instance from the specified node.void
setCustomisableTypes(List<String> customisableTypes)
QName
setCustomPropertyDefinitionConstraint(QName propQName, QName newLovConstraint)
Sets a new list of values constraint on the custom property definition.QName
setCustomPropertyDefinitionLabel(QName propQName, String newLabel)
Update the custom property definition's label (title).void
setJobLockService(JobLockService jobLockService)
void
setRelationshipService(RelationshipService relationshipService)
void
setTransactionService(TransactionService transactionService)
String[]
splitSourceTargetId(String sourceTargetId)
Given a compound id for source and target strings (as used with parent/child custom references), this method splits the String and returns an array containing the source and target IDs separately.void
unmakeCustomisable(QName type)
Assuming the custom properties are not in use, makes a type no longer customisable.QName
updateCustomAssocDefinition(QName refQName, String newLabel)
This method updates the label value for the specified association.QName
updateCustomChildAssocDefinition(QName refQName, String newSource, String newTarget)
This method updates the source and target values for the specified child association.QName
updateCustomPropertyDefinitionName(QName propQName, String newName)
Update the name and label of the custom property definition.-
Methods inherited from class org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminBase
composeAssociationDefinitionTitle, existsTitle, getContentService, getCustomAssociations, getCustomModelRef, getDictionaryRepositoryBootstrap, getDictionaryService, getNamespaceService, getNodeService, readCustomContentModel, setContentService, setDictionaryRepositoryBootstrap, setDictionaryService, setNamespaceService, setNodeService, splitAssociationDefinitionTitle, writeCustomContentModel
-
-
-
-
Method Detail
-
setTransactionService
public void setTransactionService(TransactionService transactionService)
- Parameters:
transactionService
- transaction service
-
setRelationshipService
public void setRelationshipService(RelationshipService relationshipService)
- Parameters:
relationshipService
- The relationship service instance
-
getRelationshipService
protected RelationshipService getRelationshipService()
Gets the relationship service instance- Returns:
- The relationship service instance
-
setJobLockService
public void setJobLockService(JobLockService jobLockService)
- Parameters:
jobLockService
- The Job Lock service
-
getOrder
public int getOrder()
Indicate that this application content listener must be executed with the lowest precedence. (ie last)- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
- See Also:
Ordered.getOrder()
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
Load the custom properties map- Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
- See Also:
ApplicationListener.onApplicationEvent(org.springframework.context.ApplicationEvent)
-
isCustomMapInit
public boolean isCustomMapInit()
Helper method to indicate whether the custom map is initialised or not.- Returns:
- boolean true if initialised, false otherwise
-
onCreateNode
public void onCreateNode(ChildAssociationRef childAssocRef)
Make sure any custom property aspects are applied to newly created nodes.
-
setCustomisableTypes
public void setCustomisableTypes(List<String> customisableTypes)
- Parameters:
customisableTypes
- list of string representations of the type qnames that are customisable
-
getCustomisable
public Set<QName> getCustomisable()
Description copied from interface:RecordsManagementAdminService
Get a list of all registered customisable types and aspects.- Specified by:
getCustomisable
in interfaceRecordsManagementAdminService
- Returns:
- Set of <
QName
>s of customisable types and aspects - See Also:
RecordsManagementAdminService.getCustomisable()
-
getCustomisable
public Set<QName> getCustomisable(NodeRef nodeRef)
Description copied from interface:RecordsManagementAdminService
Get a list of all the registered customisable types and aspects present on a given node reference.- Specified by:
getCustomisable
in interfaceRecordsManagementAdminService
- Parameters:
nodeRef
- node reference- Returns:
- Set of <
QName
>s of customisable types and aspects, empty if none - See Also:
RecordsManagementAdminService.getCustomisable(org.alfresco.service.cmr.repository.NodeRef)
-
isCustomisable
public boolean isCustomisable(QName type)
Description copied from interface:RecordsManagementAdminService
Indicates whether a type (or aspect) is customisable.- Specified by:
isCustomisable
in interfaceRecordsManagementAdminService
- Parameters:
type
- customisable typeQName
- Returns:
- boolean true if type customisable, false otherwise
- See Also:
RecordsManagementAdminService.isCustomisable(org.alfresco.service.namespace.QName)
-
makeCustomisable
public void makeCustomisable(QName type)
Description copied from interface:RecordsManagementAdminService
Makes a type customisable.- Specified by:
makeCustomisable
in interfaceRecordsManagementAdminService
- Parameters:
type
- typeQName
to make customisable- See Also:
RecordsManagementAdminService.makeCustomisable(org.alfresco.service.namespace.QName)
-
unmakeCustomisable
public void unmakeCustomisable(QName type)
Description copied from interface:RecordsManagementAdminService
Assuming the custom properties are not in use, makes a type no longer customisable.- Specified by:
unmakeCustomisable
in interfaceRecordsManagementAdminService
- Parameters:
type
- typeQName
to make customisable- See Also:
RecordsManagementAdminService.unmakeCustomisable(org.alfresco.service.namespace.QName)
-
existsCustomProperty
public boolean existsCustomProperty(QName propertyName)
Description copied from interface:RecordsManagementAdminService
Indicates whether the custom property exists.- Specified by:
existsCustomProperty
in interfaceRecordsManagementAdminService
- Parameters:
propertyName
- propertiesQName
- Returns:
- boolean true if property exists, false otherwise
- See Also:
RecordsManagementAdminService.existsCustomProperty(org.alfresco.service.namespace.QName)
-
getCustomPropertyDefinitions
public Map<QName,PropertyDefinition> getCustomPropertyDefinitions()
Description copied from interface:RecordsManagementAdminService
This method returns the custom properties that have been defined for all of the specified customisable RM elements.Note: the custom property definitions are retrieved from the dictionaryService which is notified of any newly created definitions on transaction commit. Therefore custom properties created in the current transaction will not appear in the result of this method.
- Specified by:
getCustomPropertyDefinitions
in interfaceRecordsManagementAdminService
- Returns:
- Map of <
QName
,PropertyDefinition
>s of custom properties definitions - See Also:
RecordsManagementAdminService.getCustomPropertyDefinitions()
-
getCustomPropertyDefinitions
public Map<QName,PropertyDefinition> getCustomPropertyDefinitions(QName customisableType)
Description copied from interface:RecordsManagementAdminService
This method returns the custom properties that have been defined for the specified customisable RM element.Note: the custom property definitions are retrieved from the dictionaryService which is notified of any newly created definitions on transaction commit. Therefore custom properties created in the current transaction will not appear in the result of this method.
- Specified by:
getCustomPropertyDefinitions
in interfaceRecordsManagementAdminService
- Returns:
- Map of <
QName
,PropertyDefinition
>s of custom properties definitions - See Also:
RecordsManagementAdminService.getCustomPropertyDefinitions(QName)
-
addCustomPropertyDefinition
public QName addCustomPropertyDefinition(QName propId, QName aspectName, String label, QName dataType, String title, String description) throws CustomMetadataException
Description copied from interface:RecordsManagementAdminService
Add custom property definition Note: no default value, single valued, optional, not system protected, no constraints- Specified by:
addCustomPropertyDefinition
in interfaceRecordsManagementAdminService
- Parameters:
propId
- - If a value for propId is provided it will be used to identify property definitions within URLs and in QNames. Therefore it must contain URL/QName-valid characters only. It must also be unique. If a null value is passed, an id will be generated.aspectName
- - mandatory. The aspect within which the property is to be defined. This must be one of the CustomisableRmElements.label
- - mandatorydataType
- - mandatorytitle
- - optionaldescription
- - optional- Returns:
- the propId, whether supplied as a parameter or generated.
- Throws:
CustomMetadataException
- See Also:
RecordsManagementAdminService.addCustomPropertyDefinition(org.alfresco.service.namespace.QName, org.alfresco.service.namespace.QName, java.lang.String, org.alfresco.service.namespace.QName, java.lang.String, java.lang.String)
-
addCustomPropertyDefinition
public QName addCustomPropertyDefinition(QName propId, QName aspectName, String label, QName dataType, String title, String description, String defaultValue, boolean multiValued, boolean mandatory, boolean isProtected, QName lovConstraint) throws CustomMetadataException
Description copied from interface:RecordsManagementAdminService
Add custom property definition with one optional constraint reference- Specified by:
addCustomPropertyDefinition
in interfaceRecordsManagementAdminService
- Parameters:
propId
- - If a value for propId is provided it will be used to identify property definitions within URLs and in QNames. Therefore it must contain URL/QName-valid characters only. It must also be unique. If a null value is passed, an id will be generated.aspectName
- - mandatory. The aspect within which the property is to be defined. This must be one of the CustomisableRmElements.label
- - mandatorydataType
- - mandatorytitle
- - optionaldescription
- - optionaldefaultValue
- - optionalmultiValued
- - TRUE if multi-valued propertymandatory
- - TRUE if mandatory propertyisProtected
- - TRUE if protected propertylovConstraint
- - optional custom constraint- Returns:
- the propId, whether supplied as a parameter or generated.
- Throws:
CustomMetadataException
- See Also:
RecordsManagementAdminService.addCustomPropertyDefinition(org.alfresco.service.namespace.QName, org.alfresco.service.namespace.QName, java.lang.String, org.alfresco.service.namespace.QName, java.lang.String, java.lang.String, java.lang.String, boolean, boolean, boolean, org.alfresco.service.namespace.QName)
-
updateCustomPropertyDefinitionName
public QName updateCustomPropertyDefinitionName(QName propQName, String newName) throws CustomMetadataException
Description copied from interface:RecordsManagementAdminService
Update the name and label of the custom property definition.- Specified by:
updateCustomPropertyDefinitionName
in interfaceRecordsManagementAdminService
- Parameters:
propQName
- The qname of the existing property definitionnewName
- THe new name for both the custom property and its label.- Returns:
- Throws:
CustomMetadataException
- See Also:
RecordsManagementAdminService.updateCustomPropertyDefinitionName(org.alfresco.service.namespace.QName, java.lang.String)
-
setCustomPropertyDefinitionLabel
public QName setCustomPropertyDefinitionLabel(QName propQName, String newLabel)
Description copied from interface:RecordsManagementAdminService
Update the custom property definition's label (title).- Specified by:
setCustomPropertyDefinitionLabel
in interfaceRecordsManagementAdminService
- Parameters:
propQName
- the qname of the property definitionnewLabel
- the new value for the label.- Returns:
- the propId.
- See Also:
RecordsManagementAdminService.setCustomPropertyDefinitionLabel(org.alfresco.service.namespace.QName, java.lang.String)
-
setCustomPropertyDefinitionConstraint
public QName setCustomPropertyDefinitionConstraint(QName propQName, QName newLovConstraint)
Description copied from interface:RecordsManagementAdminService
Sets a new list of values constraint on the custom property definition.- Specified by:
setCustomPropertyDefinitionConstraint
in interfaceRecordsManagementAdminService
- Parameters:
propQName
- the qname of the property definitionnewLovConstraint
- the List-Of-Values constraintRef.- Returns:
- the propId.
- See Also:
RecordsManagementAdminService.setCustomPropertyDefinitionConstraint(org.alfresco.service.namespace.QName, org.alfresco.service.namespace.QName)
-
removeCustomPropertyDefinitionConstraints
public QName removeCustomPropertyDefinitionConstraints(QName propQName)
Description copied from interface:RecordsManagementAdminService
Removes all list of values constraints from the custom property definition.- Specified by:
removeCustomPropertyDefinitionConstraints
in interfaceRecordsManagementAdminService
- Parameters:
propQName
- the qname of the property definition- Returns:
- the propId.
- See Also:
RecordsManagementAdminService.removeCustomPropertyDefinitionConstraints(org.alfresco.service.namespace.QName)
-
removeCustomPropertyDefinition
public void removeCustomPropertyDefinition(QName propQName)
Description copied from interface:RecordsManagementAdminService
Remove custom property definition
-
getCustomReferenceDefinitions
public Map<QName,AssociationDefinition> getCustomReferenceDefinitions()
Description copied from interface:RecordsManagementAdminService
This method returns the custom references that have been defined in the custom model. Note: the custom reference definitions are retrieved from the dictionaryService which is notified of any newly created definitions on transaction commit. Therefore custom references created in the current transaction will not appear in the results.- Specified by:
getCustomReferenceDefinitions
in interfaceRecordsManagementAdminService
- Returns:
- The Map of custom references (both parent-child and standard).
- See Also:
RecordsManagementAdminService.getCustomReferenceDefinitions()
-
addCustomReference
public void addCustomReference(NodeRef fromNode, NodeRef toNode, QName refId)
Description copied from interface:RecordsManagementAdminService
This method adds the specified custom reference instance between the specified nodes. Only one instance of any custom reference type is allowed in a given direction between two given records.- Specified by:
addCustomReference
in interfaceRecordsManagementAdminService
refId
- the server-side qname e.g. {http://www.alfresco.org/model/rmcustom/1.0}abcd-12-efgh-4567- See Also:
RecordsManagementAdminService.addCustomReference(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.namespace.QName)
-
removeCustomReference
public void removeCustomReference(NodeRef fromNode, NodeRef toNode, QName assocId)
Description copied from interface:RecordsManagementAdminService
This method removes the specified custom reference instance from the specified node.- Specified by:
removeCustomReference
in interfaceRecordsManagementAdminService
assocId
- the server-side qname e.g. {http://www.alfresco.org/model/rmcustom/1.0}abcd-12-efgh-4567- See Also:
RecordsManagementAdminService.removeCustomReference(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.namespace.QName)
-
getCustomReferencesFrom
public List<AssociationRef> getCustomReferencesFrom(NodeRef node)
Description copied from interface:RecordsManagementAdminService
Fetches all associations from the given source.- Specified by:
getCustomReferencesFrom
in interfaceRecordsManagementAdminService
- Parameters:
node
- the node from which the associations start.- Returns:
- a List of associations.
- See Also:
RecordsManagementAdminService.getCustomReferencesFrom(org.alfresco.service.cmr.repository.NodeRef)
-
getCustomChildReferences
public List<ChildAssociationRef> getCustomChildReferences(NodeRef node)
Description copied from interface:RecordsManagementAdminService
Fetches all child associations of the given source. i.e. all associations where the given node is the parent.- Specified by:
getCustomChildReferences
in interfaceRecordsManagementAdminService
- Returns:
- See Also:
RecordsManagementAdminService.getCustomChildReferences(org.alfresco.service.cmr.repository.NodeRef)
-
getCustomReferencesTo
public List<AssociationRef> getCustomReferencesTo(NodeRef node)
Description copied from interface:RecordsManagementAdminService
Returns a List of all associations to the given node.- Specified by:
getCustomReferencesTo
in interfaceRecordsManagementAdminService
- Parameters:
node
- the node to which the associations point.- Returns:
- a List of associations.
- See Also:
RecordsManagementAdminService.getCustomReferencesTo(org.alfresco.service.cmr.repository.NodeRef)
-
getCustomParentReferences
public List<ChildAssociationRef> getCustomParentReferences(NodeRef node)
Description copied from interface:RecordsManagementAdminService
Fetches all child associations where the given node is the child.- Specified by:
getCustomParentReferences
in interfaceRecordsManagementAdminService
- Returns:
- See Also:
RecordsManagementAdminService.getCustomParentReferences(org.alfresco.service.cmr.repository.NodeRef)
-
addCustomAssocDefinition
public QName addCustomAssocDefinition(String label)
Description copied from interface:RecordsManagementAdminService
This method creates a new custom association, using the given label as the title.- Specified by:
addCustomAssocDefinition
in interfaceRecordsManagementAdminService
- Parameters:
label
- the title of the association definition- Returns:
- the QName of the newly-created association.
- See Also:
note: currently RMC custom assocs only
-
addCustomChildAssocDefinition
public QName addCustomChildAssocDefinition(String source, String target)
Description copied from interface:RecordsManagementAdminService
This method creates a new custom child association, combining the given source and target and using the combined String as the title.- Specified by:
addCustomChildAssocDefinition
in interfaceRecordsManagementAdminService
- Returns:
- the QName of the newly-created association.
- See Also:
note: currently RMC custom assocs only
-
updateCustomChildAssocDefinition
public QName updateCustomChildAssocDefinition(QName refQName, String newSource, String newTarget)
Description copied from interface:RecordsManagementAdminService
This method updates the source and target values for the specified child association. The source and target will be combined into a single string and stored in the title property. Source and target are String metadata for RM parent/child custom references.- Specified by:
updateCustomChildAssocDefinition
in interfaceRecordsManagementAdminService
- Parameters:
refQName
- qname of the child association.newSource
- the new value for the source field.newTarget
- the new value for the target field.- See Also:
note: currently RMC custom assocs only
-
updateCustomAssocDefinition
public QName updateCustomAssocDefinition(QName refQName, String newLabel)
Description copied from interface:RecordsManagementAdminService
This method updates the label value for the specified association. The label will be stored in the title property. Label is String metadata for bidirectional custom references.- Specified by:
updateCustomAssocDefinition
in interfaceRecordsManagementAdminService
- Parameters:
refQName
- qname of the child association.newLabel
- the new value for the label field.- See Also:
note: currently RMC custom assocs only
-
addCustomConstraintDefinition
public void addCustomConstraintDefinition(QName constraintName, String title, boolean caseSensitive, List<String> allowedValues, RMListOfValuesConstraint.MatchLogic matchLogic)
Description copied from interface:RecordsManagementAdminService
This method adds a Constraint definition to the custom model. The implementation of this method would have to go into the M2Model and insert the relevant M2Objects for this new constraint. param type not included as it would always be RMListOfValuesConstraint for RM.- Specified by:
addCustomConstraintDefinition
in interfaceRecordsManagementAdminService
- Parameters:
constraintName
- the name e.g. rmc:footitle
- the human-readable title e.g. My foo listallowedValues
- the allowed values listmatchLogic
- AND (all values must match), OR (at least one values must match)- See Also:
RecordsManagementAdminService.addCustomConstraintDefinition(org.alfresco.service.namespace.QName, java.lang.String, boolean, java.util.List, org.alfresco.module.org_alfresco_module_rm.caveat.RMListOfValuesConstraint.MatchLogic)
-
changeCustomConstraintValues
public void changeCustomConstraintValues(QName constraintName, List<String> newAllowedValues)
Description copied from interface:RecordsManagementAdminService
Update custom constraint definition with new list of values (replaces existing list, if any)- Specified by:
changeCustomConstraintValues
in interfaceRecordsManagementAdminService
- Parameters:
constraintName
- the name e.g. rmc:foo- See Also:
RecordsManagementAdminService.changeCustomConstraintValues(org.alfresco.service.namespace.QName, java.util.List)
-
changeCustomConstraintTitle
public void changeCustomConstraintTitle(QName constraintName, String title)
-
getCustomConstraintDefinitions
public List<ConstraintDefinition> getCustomConstraintDefinitions(QName modelQName)
Description copied from interface:RecordsManagementAdminService
This method returns ConstraintDefinition objects defined in the given model (note: not property references or in-line defs) The custom constraint definitions are retrieved from the dictionaryService which is notified of any newly created definitions on transaction commit. Therefore custom constraints created in the current transaction will not appear in the results.
-
removeCustomConstraintDefinition
public void removeCustomConstraintDefinition(QName constraintName)
Description copied from interface:RecordsManagementAdminService
Remove custom constraint definition - if not referenced (by any properties)- Specified by:
removeCustomConstraintDefinition
in interfaceRecordsManagementAdminService
- Parameters:
constraintName
- the name e.g. rmc:foo- See Also:
RecordsManagementAdminService.removeCustomConstraintDefinition(org.alfresco.service.namespace.QName)
-
getQNameForClientId
public QName getQNameForClientId(String localName)
Description copied from interface:RecordsManagementAdminService
This method iterates over the custom properties, references looking for one whose id exactly matches that specified.- Specified by:
getQNameForClientId
in interfaceRecordsManagementAdminService
- Parameters:
localName
- the localName part of the qname of the property or reference definition.- Returns:
- the QName of the property, association definition which matches, or null.
- See Also:
RecordsManagementAdminService.getQNameForClientId(java.lang.String)
-
splitSourceTargetId
public String[] splitSourceTargetId(String sourceTargetId)
Description copied from interface:RecordsManagementAdminService
Given a compound id for source and target strings (as used with parent/child custom references), this method splits the String and returns an array containing the source and target IDs separately.- Specified by:
splitSourceTargetId
in interfaceRecordsManagementAdminService
- Parameters:
sourceTargetId
- the compound ID.- Returns:
- a String array, where result[0] == sourceId and result[1] == targetId.
- See Also:
RecordsManagementAdminService.splitSourceTargetId(java.lang.String)
-
getCompoundIdFor
public String getCompoundIdFor(String sourceId, String targetId)
Description copied from interface:RecordsManagementAdminService
This method retrieves a compound ID (client-side) for the specified sourceId and targetId.- Specified by:
getCompoundIdFor
in interfaceRecordsManagementAdminService
- Returns:
- See Also:
RecordsManagementAdminService.getCompoundIdFor(java.lang.String, java.lang.String)
-
-