mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-752 (RM Dependency upgrade to 4.2)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@51839 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -13,7 +13,7 @@ dependencies {
|
|||||||
testRuntime files(testResourceDir)
|
testRuntime files(testResourceDir)
|
||||||
|
|
||||||
alfrescoDeps group: alfrescoGroupId, name: 'alfresco', version: alfrescoBaseVersion, type: 'war'
|
alfrescoDeps group: alfrescoGroupId, name: 'alfresco', version: alfrescoBaseVersion, type: 'war'
|
||||||
alfrescoDeps group: alfrescoGroupId, name: 'alfresco-solr', version: alfrescoBaseVersion, type: 'zip'
|
alfrescoDeps group: alfrescoGroupId, name: 'alfresco-solr', version: alfrescoBaseSolrVersion, type: 'zip'
|
||||||
}
|
}
|
||||||
|
|
||||||
task fetchSOLR(type:Copy) {
|
task fetchSOLR(type:Copy) {
|
||||||
|
@@ -199,6 +199,7 @@
|
|||||||
<property name="recordsManagementService" ref="recordsManagementService"/>
|
<property name="recordsManagementService" ref="recordsManagementService"/>
|
||||||
<property name="recordService" ref="recordService"/>
|
<property name="recordService" ref="recordService"/>
|
||||||
<property name="recordsManagementAdminService" ref="recordsManagementAdminService"/>
|
<property name="recordsManagementAdminService" ref="recordsManagementAdminService"/>
|
||||||
|
<property name="dictionaryService" ref="DictionaryService" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="rmNodeFormFilter"
|
<bean id="rmNodeFormFilter"
|
||||||
|
@@ -8,4 +8,4 @@ module.title=Records Management
|
|||||||
module.description=Alfresco Record Management Extension
|
module.description=Alfresco Record Management Extension
|
||||||
module.version=2.1
|
module.version=2.1
|
||||||
|
|
||||||
module.repo.version.min=4.1.3
|
module.repo.version.min=4.2
|
@@ -1397,11 +1397,12 @@
|
|||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- Site service work around (see https://issues.alfresco.com/jira/browse/RM-387) -->
|
<!-- Site service work around (see https://issues.alfresco.com/jira/browse/RM-387) -->
|
||||||
<bean name="siteGetChildrenCannedQueryFactory" class="org.alfresco.module.org_alfresco_module_rm.site.GetChildrenCannedQueryFactory">
|
<bean name="siteGetChildrenCannedQueryFactory" class="org.alfresco.module.org_alfresco_module_rm.site.GetChildrenCannedQueryFactory">
|
||||||
<property name="registry" ref="siteCannedQueryRegistry"/>
|
<property name="registry" ref="siteCannedQueryRegistry"/>
|
||||||
<property name="dictionaryService" ref="dictionaryService"/>
|
<property name="dictionaryService" ref="dictionaryService"/>
|
||||||
<property name="tenantService" ref="tenantService"/>
|
<property name="tenantService" ref="tenantService"/>
|
||||||
<property name="nodeDAO" ref="nodeDAO"/>
|
<property name="nodeDAO" ref="nodeDAO"/>
|
||||||
|
<property name="nodeService" ref="nodeService"/>
|
||||||
<property name="qnameDAO" ref="qnameDAO"/>
|
<property name="qnameDAO" ref="qnameDAO"/>
|
||||||
<property name="localeDAO" ref="localeDAO"/>
|
<property name="localeDAO" ref="localeDAO"/>
|
||||||
<property name="contentDataDAO" ref="contentDataDAO"/>
|
<property name="contentDataDAO" ref="contentDataDAO"/>
|
||||||
@@ -1514,6 +1515,9 @@
|
|||||||
<property name="zoneAuthorityCache">
|
<property name="zoneAuthorityCache">
|
||||||
<ref bean="zoneToAuthorityCache" />
|
<ref bean="zoneToAuthorityCache" />
|
||||||
</property>
|
</property>
|
||||||
|
<property name="singletonCache">
|
||||||
|
<ref bean="immutableSingletonCache" />
|
||||||
|
</property>
|
||||||
<property name="policyComponent">
|
<property name="policyComponent">
|
||||||
<ref bean="policyComponent"/>
|
<ref bean="policyComponent"/>
|
||||||
</property>
|
</property>
|
||||||
@@ -1523,6 +1527,15 @@
|
|||||||
<property name="aclDAO">
|
<property name="aclDAO">
|
||||||
<ref bean="aclDAO" />
|
<ref bean="aclDAO" />
|
||||||
</property>
|
</property>
|
||||||
|
<property name="authorityBridgeDAO">
|
||||||
|
<ref bean="authorityBridgeDAO" />
|
||||||
|
</property>
|
||||||
|
<property name="authorityBridgeTableCache">
|
||||||
|
<ref bean="authorityBridgeTableCache" />
|
||||||
|
</property>
|
||||||
|
<property name="useBridgeTable">
|
||||||
|
<value>${authority.useBridgeTable}</value>
|
||||||
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
@@ -68,6 +68,7 @@
|
|||||||
class="org.alfresco.module.org_alfresco_module_rm.script.CustomReferenceDefinitionsGet"
|
class="org.alfresco.module.org_alfresco_module_rm.script.CustomReferenceDefinitionsGet"
|
||||||
parent="webscript">
|
parent="webscript">
|
||||||
<property name="recordsManagementAdminService" ref="RecordsManagementAdminService" />
|
<property name="recordsManagementAdminService" ref="RecordsManagementAdminService" />
|
||||||
|
<property name="dictionaryService" ref="DictionaryService" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- REST impl for PUT Custom Reference Definitions -->
|
<!-- REST impl for PUT Custom Reference Definitions -->
|
||||||
@@ -89,6 +90,7 @@
|
|||||||
class="org.alfresco.module.org_alfresco_module_rm.script.CustomRefsGet"
|
class="org.alfresco.module.org_alfresco_module_rm.script.CustomRefsGet"
|
||||||
parent="rmBaseWebscript">
|
parent="rmBaseWebscript">
|
||||||
<property name="recordsManagementAdminService" ref="RecordsManagementAdminService" />
|
<property name="recordsManagementAdminService" ref="RecordsManagementAdminService" />
|
||||||
|
<property name="dictionaryService" ref="DictionaryService" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- REST impl for POST Custom Reference Instance -->
|
<!-- REST impl for POST Custom Reference Instance -->
|
||||||
@@ -155,6 +157,7 @@
|
|||||||
parent="webscript">
|
parent="webscript">
|
||||||
<property name="dispositionService" ref="DispositionService" />
|
<property name="dispositionService" ref="DispositionService" />
|
||||||
<property name="namespaceService" ref="NamespaceService" />
|
<property name="namespaceService" ref="NamespaceService" />
|
||||||
|
<property name="dictionaryService" ref="DictionaryService" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- REST impl for GET Records MetaData aspects -->
|
<!-- REST impl for GET Records MetaData aspects -->
|
||||||
|
@@ -1,181 +1,184 @@
|
|||||||
##
|
##
|
||||||
# RM Method security for Alfresco code services
|
# RM Method security for Alfresco code services
|
||||||
#
|
#
|
||||||
# Note: add alfresco/extension/rm-method-security.properties to extend
|
# Note: add alfresco/extension/rm-method-security.properties to extend
|
||||||
##
|
##
|
||||||
|
|
||||||
## Node Service
|
## Node Service
|
||||||
|
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getStores=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getStores=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.createStore=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.createStore=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.exists=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.exists=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getNodeStatus=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getNodeStatus=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getAllRootNodes=RM.Read.0,AFTER_RM.FilterNode
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getAllRootNodes=RM.Read.0,AFTER_RM.FilterNode
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getRootNode=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getRootNode=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.createNode=RM.Create.0.3
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.createNode=RM.Create.0.3
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.moveNode=RM.Move.0.1
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.moveNode=RM.Move.0.1
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.setChildAssociationIndex=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.setChildAssociationIndex=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getType=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getType=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.setType=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.setType=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.addAspect=RM.Update.0.1.2
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.addAspect=RM.Update.0.1.2
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.removeAspect=RM.Update.0.1
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.removeAspect=RM.Update.0.1
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.hasAspect=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.hasAspect=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getAspects=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getAspects=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.deleteNode=RM.Delete.0
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.deleteNode=RM.Delete.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.addChild=RM.Create.0.1.2
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.addChild=RM.Create.0.1.2
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.removeChild=RM.Delete.0.1
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.removeChild=RM.Delete.0.1
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.removeChildAssociation=RM.Delete.0
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.removeChildAssociation=RM.Delete.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getProperties=RM.Read.0,AFTER_RM.FilterProperty
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getProperties=RM.Read.0,AFTER_RM.FilterProperty
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getProperty=RM.Read.0,RM.ReadProperty.0.1
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getProperty=RM.Read.0,RM.ReadProperty.0.1
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.setProperties=RM.UpdateProperties.0.1
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.setProperties=RM.UpdateProperties.0.1
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.addProperties=RM.UpdateProperties.0.1
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.addProperties=RM.UpdateProperties.0.1
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.setProperty=RM.UpdateProperties.0.1.2
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.setProperty=RM.UpdateProperties.0.1.2
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.removeProperty=RM.UpdateProperties.0.1
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.removeProperty=RM.UpdateProperties.0.1
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getParentAssocs=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getParentAssocs=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getChildAssocs=RM.Read.0,AFTER_RM.FilterNode
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getChildAssocs=RM.Read.0,AFTER_RM.FilterNode
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getChildByName=RM.Read.0,AFTER_RM.FilterNode
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getChildByName=RM.Read.0,AFTER_RM.FilterNode
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getChildrenByName=RM.Read.0,AFTER_RM.FilterNode
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getChildrenByName=RM.Read.0,AFTER_RM.FilterNode
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getPrimaryParent=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getPrimaryParent=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.createAssociation=RM.Assoc.0.1
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.createAssociation=RM.Assoc.0.1
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.removeAssociation=Assoc.0.1
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.removeAssociation=Assoc.0.1
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getTargetAssocs=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getTargetAssocs=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getSourceAssocs=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getSourceAssocs=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getAssoc=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getAssoc=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getPath=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getPath=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getPaths=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getPaths=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getStoreArchiveNode=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getStoreArchiveNode=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.restoreNode=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.restoreNode=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getChildAssocsWithoutParentAssocsOfType=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getChildAssocsWithoutParentAssocsOfType=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getNodeRef=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getNodeRef=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getChildAssocsByPropertyValue=RM.Read.0,AFTER_RM.FilterNode
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.getChildAssocsByPropertyValue=RM.Read.0,AFTER_RM.FilterNode
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.countChildAssocs=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.countChildAssocs=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.*=RM_DENY
|
rm.methodsecurity.org.alfresco.service.cmr.repository.NodeService.*=RM_DENY
|
||||||
|
|
||||||
## File Folder Service
|
## File Folder Service
|
||||||
|
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.list=RM.Read.0,AFTER_RM.FilterNode
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.list=RM.Read.0,AFTER_RM.FilterNode
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.listFiles=RM.Read.0,AFTER_RM.FilterNode
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.listFiles=RM.Read.0,AFTER_RM.FilterNode
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.listFolders=RM.Read.0,AFTER_RM.FilterNode
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.listFolders=RM.Read.0,AFTER_RM.FilterNode
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.listDeepFolders=RM.Read.0,AFTER_RM.FilterNode
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.listDeepFolders=RM.Read.0,AFTER_RM.FilterNode
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.getLocalizedSibling=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.getLocalizedSibling=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.search=RM.Read.0,AFTER_RM.FilterNode
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.search=RM.Read.0,AFTER_RM.FilterNode
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.searchSimple=RM.Read.0,AFTER_RM.FilterNode
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.searchSimple=RM.Read.0,AFTER_RM.FilterNode
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.rename=RM.Update.0
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.rename=RM.Update.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.move=RM.Move.0.1
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.move=RM.Move.0.1
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.moveFrom=RM.Move.0.2
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.moveFrom=RM.Move.0.2
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.copy=RM.Read.0,RM.Create.1.0
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.copy=RM.Read.0,RM.Create.1.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.create=RM.Create.0.2
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.create=RM.Create.0.2
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.delete=RM.Delete.0
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.delete=RM.Delete.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.getNamePath=RM.Read.1
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.getNamePath=RM.Read.1
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.resolveNamePath=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.getNameOnlyPath=RM.Read.1
|
||||||
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.resolveNamePath=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.getFileInfo=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.getFileInfo=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.getReader=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.getReader=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.getWriter=RM.WriteContent.0
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.getWriter=RM.WriteContent.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.exists=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.exists=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.getType=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.getType=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.*=RM_DENY
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.isHidden=RM.Read.0
|
||||||
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.setHidden=RM.Update.0
|
||||||
|
rm.methodsecurity.org.alfresco.service.cmr.model.FileFolderService.*=RM_DENY
|
||||||
|
|
||||||
## Content Service
|
## Content Service
|
||||||
|
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.getStoreTotalSpace=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.getStoreTotalSpace=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.getStoreFreeSpace=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.getStoreFreeSpace=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.getRawReader=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.getRawReader=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.getReader=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.getReader=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.getWriter=RM.WriteContent.0
|
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.getWriter=RM.WriteContent.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.isTransformable=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.isTransformable=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.getTransformer=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.getTransformer=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.getMaxSourceSizeBytes=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.getMaxSourceSizeBytes=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.getImageTransformer=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.getImageTransformer=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.transform=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.transform=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.getTempWriter=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.getTempWriter=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.*=RM_DENY
|
rm.methodsecurity.org.alfresco.service.cmr.repository.ContentService.*=RM_DENY
|
||||||
|
|
||||||
## Search Service
|
## Search Service
|
||||||
|
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.search.SearchService.query=RM_QUERY,AFTER_RM.FilterNode
|
rm.methodsecurity.org.alfresco.service.cmr.search.SearchService.query=RM_QUERY,AFTER_RM.FilterNode
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.search.SearchService.selectNodes=RM_QUERY,AFTER_RM.FilterNode
|
rm.methodsecurity.org.alfresco.service.cmr.search.SearchService.selectNodes=RM_QUERY,AFTER_RM.FilterNode
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.search.SearchService.selectProperties=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.search.SearchService.selectProperties=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.search.SearchService.contains=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.search.SearchService.contains=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.search.SearchService.like=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.search.SearchService.like=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.search.SearchService.*=RM_DENY
|
rm.methodsecurity.org.alfresco.service.cmr.search.SearchService.*=RM_DENY
|
||||||
|
|
||||||
## Category Service
|
## Category Service
|
||||||
|
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.getChildren=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.getChildren=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.getCategories=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.getCategories=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.getClassifications=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.getClassifications=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.getRootCategories=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.getRootCategories=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.getClassificationAspects=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.getClassificationAspects=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.createClassification=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.createClassification=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.createRootCategory=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.createRootCategory=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.createCategory=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.createCategory=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.deleteClassification=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.deleteClassification=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.deleteCategory=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.deleteCategory=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.getTopCategories=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.getTopCategories=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.*=RM_DENY
|
rm.methodsecurity.org.alfresco.service.cmr.search.CategoryService.*=RM_DENY
|
||||||
|
|
||||||
## Lock Service
|
## Lock Service
|
||||||
|
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.lock.LockService.lock=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.lock.LockService.lock=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.lock.LockService.unlock=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.lock.LockService.unlock=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.lock.LockService.getLockStatus=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.lock.LockService.getLockStatus=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.lock.LockService.getLockType=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.lock.LockService.getLockType=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.lock.LockService.checkForLock=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.lock.LockService.checkForLock=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.lock.LockService.getLocks=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.lock.LockService.getLocks=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.lock.LockService.*=RM_DENY
|
rm.methodsecurity.org.alfresco.service.cmr.lock.LockService.*=RM_DENY
|
||||||
|
|
||||||
## Multilingual Content Service
|
## Multilingual Content Service
|
||||||
|
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.getTranslationContainer=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.getTranslationContainer=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.getTranslations=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.getTranslations=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.getTranslationForLocale=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.getTranslationForLocale=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.getMissingTranslations=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.getMissingTranslations=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.getPivotTranslation=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.getPivotTranslation=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.isTranslation=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.isTranslation=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.makeTranslation=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.makeTranslation=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.unmakeTranslation=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.unmakeTranslation=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.addTranslation=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.addTranslation=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.addEmptyTranslation=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.addEmptyTranslation=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.copyTranslationContainer=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.copyTranslationContainer=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.moveTranslationContainer=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.moveTranslationContainer=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.deleteTranslationContainer=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.deleteTranslationContainer=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.*=RM_DENY
|
rm.methodsecurity.org.alfresco.service.cmr.ml.MultilingualContentService.*=RM_DENY
|
||||||
|
|
||||||
## Edition Service
|
## Edition Service
|
||||||
|
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.EditionService.createEdition=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.ml.EditionService.createEdition=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.EditionService.getEditions=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.ml.EditionService.getEditions=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.EditionService.getVersionedTranslations=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.ml.EditionService.getVersionedTranslations=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.EditionService.getVersionedMetadatas=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.ml.EditionService.getVersionedMetadatas=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.ml.EditionService.*=RM_DENY
|
rm.methodsecurity.org.alfresco.service.cmr.ml.EditionService.*=RM_DENY
|
||||||
|
|
||||||
## Check Out Check In Service
|
## Check Out Check In Service
|
||||||
|
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.coci.CheckOutCheckInService.checkout=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.coci.CheckOutCheckInService.checkout=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.coci.CheckOutCheckInService.checkin=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.coci.CheckOutCheckInService.checkin=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.coci.CheckOutCheckInService.cancelCheckout=RM_ABSTAIN
|
rm.methodsecurity.org.alfresco.service.cmr.coci.CheckOutCheckInService.cancelCheckout=RM_ABSTAIN
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.coci.CheckOutCheckInService.getWorkingCopy=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.coci.CheckOutCheckInService.getWorkingCopy=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.coci.CheckOutCheckInService.getCheckedOut=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.coci.CheckOutCheckInService.getCheckedOut=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.coci.CheckOutCheckInService.isWorkingCopy=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.coci.CheckOutCheckInService.isWorkingCopy=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.coci.CheckOutCheckInService.isCheckedOut=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.coci.CheckOutCheckInService.isCheckedOut=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.coci.CheckOutCheckInService.*=RM_DENY
|
rm.methodsecurity.org.alfresco.service.cmr.coci.CheckOutCheckInService.*=RM_DENY
|
||||||
|
|
||||||
## Permission Service
|
## Permission Service
|
||||||
|
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.getOwnerAuthority=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.getOwnerAuthority=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.getAllAuthorities=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.getAllAuthorities=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.getAllPermission=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.getAllPermission=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.getPermissions=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.getPermissions=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.getAllSetPermissions=RM.Read.0
|
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.getAllSetPermissions=RM.Read.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.getSettablePermissions=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.getSettablePermissions=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.hasPermission=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.hasPermission=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.deletePermissions=RM.Capability.0
|
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.deletePermissions=RM.Capability.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.deletePermission=RM.Capability.0
|
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.deletePermission=RM.Capability.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.setPermission=RM.Capability.0
|
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.setPermission=RM.Capability.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.setInheritParentPermissions=RM.Capability.0
|
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.setInheritParentPermissions=RM.Capability.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.getInheritParentPermissions=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.getInheritParentPermissions=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.clearPermission=RM.Capability.0
|
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.clearPermission=RM.Capability.0
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.*=RM_DENY
|
rm.methodsecurity.org.alfresco.service.cmr.security.PermissionService.*=RM_DENY
|
||||||
|
|
||||||
## Rule Service
|
## Rule Service
|
||||||
|
|
||||||
@@ -213,6 +216,7 @@ rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.deleteSite=RM_ALLOW
|
|||||||
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.findSites=RM_ALLOW,AFTER_RM.FilterNode
|
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.findSites=RM_ALLOW,AFTER_RM.FilterNode
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.getContainer=RM_ALLOW,AFTER_RM.FilterNode
|
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.getContainer=RM_ALLOW,AFTER_RM.FilterNode
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.getMembersRole=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.getMembersRole=RM_ALLOW
|
||||||
|
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.getMembersRoleInfo=ACL_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.getSite=RM_ALLOW,AFTER_RM.FilterNode
|
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.getSite=RM_ALLOW,AFTER_RM.FilterNode
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.getSiteGroup=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.getSiteGroup=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.getSiteRoleGroup=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.getSiteRoleGroup=RM_ALLOW
|
||||||
@@ -222,6 +226,7 @@ rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.hasContainer=RM_ALLO
|
|||||||
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.hasCreateSitePermissions=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.hasCreateSitePermissions=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.isMember=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.isMember=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.listMembers=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.listMembers=RM_ALLOW
|
||||||
|
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.listMembersInfo=ACL_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.listSites=RM_ALLOW,AFTER_RM.FilterNode
|
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.listSites=RM_ALLOW,AFTER_RM.FilterNode
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.removeMembership=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.removeMembership=RM_ALLOW
|
||||||
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.setMembership=RM_ALLOW
|
rm.methodsecurity.org.alfresco.service.cmr.site.SiteService.setMembership=RM_ALLOW
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -56,9 +56,9 @@ import org.springframework.util.FileCopyUtils;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Split Email Action
|
* Split Email Action
|
||||||
*
|
*
|
||||||
* Splits the attachments for an email message out to independent records.
|
* Splits the attachments for an email message out to independent records.
|
||||||
*
|
*
|
||||||
* @author Mark Rogers
|
* @author Mark Rogers
|
||||||
*/
|
*/
|
||||||
public class SplitEmailAction extends RMActionExecuterAbstractBase
|
public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||||
@@ -67,30 +67,30 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
|||||||
private static final String MSG_NO_READ_MIME_MESSAGE = "rm.action.no-read-mime-message";
|
private static final String MSG_NO_READ_MIME_MESSAGE = "rm.action.no-read-mime-message";
|
||||||
private static final String MSG_EMAIL_DECLARED = "rm.action.email-declared";
|
private static final String MSG_EMAIL_DECLARED = "rm.action.email-declared";
|
||||||
private static final String MSG_EMAIL_NOT_RECORD = "rm.action.email-not-record";
|
private static final String MSG_EMAIL_NOT_RECORD = "rm.action.email-not-record";
|
||||||
|
|
||||||
/** Relationship Labels */
|
/** Relationship Labels */
|
||||||
private static final String REL_FROM = "Message";
|
private static final String REL_FROM = "Message";
|
||||||
private static final String REL_TO = "Attachment";
|
private static final String REL_TO = "Attachment";
|
||||||
|
|
||||||
/** Logger */
|
/** Logger */
|
||||||
private static Log logger = LogFactory.getLog(SplitEmailAction.class);
|
private static Log logger = LogFactory.getLog(SplitEmailAction.class);
|
||||||
|
|
||||||
private QName relationshipQName;
|
private QName relationshipQName;
|
||||||
|
|
||||||
public void bootstrap()
|
public void bootstrap()
|
||||||
{
|
{
|
||||||
String compoundId = recordsManagementAdminService.getCompoundIdFor(REL_FROM, REL_TO);
|
String compoundId = recordsManagementAdminService.getCompoundIdFor(REL_FROM, REL_TO);
|
||||||
|
|
||||||
Map<QName, AssociationDefinition> map = recordsManagementAdminService.getCustomReferenceDefinitions();
|
Map<QName, AssociationDefinition> map = recordsManagementAdminService.getCustomReferenceDefinitions();
|
||||||
for (Map.Entry<QName, AssociationDefinition> entry : map.entrySet())
|
for (Map.Entry<QName, AssociationDefinition> entry : map.entrySet())
|
||||||
{
|
{
|
||||||
if (compoundId.equals(entry.getValue().getTitle()) == true)
|
if (compoundId.equals(entry.getValue().getTitle(dictionaryService)) == true)
|
||||||
{
|
{
|
||||||
relationshipQName = entry.getKey();
|
relationshipQName = entry.getKey();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (relationshipQName == null)
|
if (relationshipQName == null)
|
||||||
{
|
{
|
||||||
relationshipQName = recordsManagementAdminService.addCustomChildAssocDefinition(REL_FROM, REL_TO);
|
relationshipQName = recordsManagementAdminService.addCustomChildAssocDefinition(REL_FROM, REL_TO);
|
||||||
@@ -106,7 +106,7 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
|||||||
{
|
{
|
||||||
// get node type
|
// get node type
|
||||||
nodeService.getType(actionedUponNodeRef);
|
nodeService.getType(actionedUponNodeRef);
|
||||||
|
|
||||||
if (logger.isDebugEnabled() == true)
|
if (logger.isDebugEnabled() == true)
|
||||||
{
|
{
|
||||||
logger.debug("split email:" + actionedUponNodeRef);
|
logger.debug("split email:" + actionedUponNodeRef);
|
||||||
@@ -117,8 +117,8 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
|||||||
if (recordService.isDeclared(actionedUponNodeRef) == false)
|
if (recordService.isDeclared(actionedUponNodeRef) == false)
|
||||||
{
|
{
|
||||||
ChildAssociationRef parent = nodeService.getPrimaryParent(actionedUponNodeRef);
|
ChildAssociationRef parent = nodeService.getPrimaryParent(actionedUponNodeRef);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether the email message has already been split - do nothing if it has already been split
|
* Check whether the email message has already been split - do nothing if it has already been split
|
||||||
*/
|
*/
|
||||||
List<AssociationRef> refs = nodeService.getTargetAssocs(actionedUponNodeRef, ImapModel.ASSOC_IMAP_ATTACHMENT);
|
List<AssociationRef> refs = nodeService.getTargetAssocs(actionedUponNodeRef, ImapModel.ASSOC_IMAP_ATTACHMENT);
|
||||||
@@ -130,7 +130,7 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the content and if its a mime message then create atachments for each part
|
* Get the content and if its a mime message then create atachments for each part
|
||||||
*/
|
*/
|
||||||
@@ -152,12 +152,12 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
|||||||
createAttachment(actionedUponNodeRef, parent.getParentRef(), part);
|
createAttachment(actionedUponNodeRef, parent.getParentRef(), part);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_NO_READ_MIME_MESSAGE, e.toString()), e);
|
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_NO_READ_MIME_MESSAGE, e.toString()), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -169,7 +169,7 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
|||||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_EMAIL_NOT_RECORD, actionedUponNodeRef.toString()));
|
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_EMAIL_NOT_RECORD, actionedUponNodeRef.toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create attachment from Mime Message Part
|
* Create attachment from Mime Message Part
|
||||||
* @param messageNodeRef - the node ref of the mime message
|
* @param messageNodeRef - the node ref of the mime message
|
||||||
@@ -192,7 +192,7 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
|||||||
logger.warn("Cannot decode file name '" + fileName + "'", e);
|
logger.warn("Cannot decode file name '" + fileName + "'", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<QName, Serializable> messageProperties = nodeService.getProperties(messageNodeRef);
|
Map<QName, Serializable> messageProperties = nodeService.getProperties(messageNodeRef);
|
||||||
String messageTitle = (String)messageProperties.get(ContentModel.PROP_NAME);
|
String messageTitle = (String)messageProperties.get(ContentModel.PROP_NAME);
|
||||||
if(messageTitle == null)
|
if(messageTitle == null)
|
||||||
@@ -201,24 +201,24 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
messageTitle = messageTitle + " - " + fileName;
|
messageTitle = messageTitle + " - " + fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
ContentType contentType = new ContentType(part.getContentType());
|
ContentType contentType = new ContentType(part.getContentType());
|
||||||
|
|
||||||
Map<QName, Serializable> docProps = new HashMap<QName, Serializable>(1);
|
Map<QName, Serializable> docProps = new HashMap<QName, Serializable>(1);
|
||||||
docProps.put(ContentModel.PROP_NAME, messageTitle + " - " + fileName);
|
docProps.put(ContentModel.PROP_NAME, messageTitle + " - " + fileName);
|
||||||
docProps.put(ContentModel.PROP_TITLE, fileName);
|
docProps.put(ContentModel.PROP_TITLE, fileName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an attachment node in the same folder as the message
|
* Create an attachment node in the same folder as the message
|
||||||
*/
|
*/
|
||||||
ChildAssociationRef attachmentRef = nodeService.createNode(parentNodeRef,
|
ChildAssociationRef attachmentRef = nodeService.createNode(parentNodeRef,
|
||||||
ContentModel.ASSOC_CONTAINS,
|
ContentModel.ASSOC_CONTAINS,
|
||||||
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, fileName),
|
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, fileName),
|
||||||
ContentModel.TYPE_CONTENT,
|
ContentModel.TYPE_CONTENT,
|
||||||
docProps);
|
docProps);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write the content into the new attachment node
|
* Write the content into the new attachment node
|
||||||
*/
|
*/
|
||||||
@@ -226,18 +226,18 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
|||||||
writer.setMimetype(contentType.getBaseType());
|
writer.setMimetype(contentType.getBaseType());
|
||||||
OutputStream os = writer.getContentOutputStream();
|
OutputStream os = writer.getContentOutputStream();
|
||||||
FileCopyUtils.copy(part.getInputStream(), os);
|
FileCopyUtils.copy(part.getInputStream(), os);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a link from the message to the attachment
|
* Create a link from the message to the attachment
|
||||||
*/
|
*/
|
||||||
createRMReference(messageNodeRef, attachmentRef.getChildRef());
|
createRMReference(messageNodeRef, attachmentRef.getChildRef());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a link from the message to the attachment
|
* Create a link from the message to the attachment
|
||||||
*/
|
*/
|
||||||
private void createRMReference(final NodeRef parentRef, final NodeRef childRef)
|
private void createRMReference(final NodeRef parentRef, final NodeRef childRef)
|
||||||
{
|
{
|
||||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||||
@@ -246,16 +246,16 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
|||||||
public Void doWork() throws Exception
|
public Void doWork() throws Exception
|
||||||
{
|
{
|
||||||
// add the relationship
|
// add the relationship
|
||||||
recordsManagementAdminService.addCustomReference(parentRef, childRef, relationshipQName);
|
recordsManagementAdminService.addCustomReference(parentRef, childRef, relationshipQName);
|
||||||
|
|
||||||
// add the IMAP attachment aspect
|
// add the IMAP attachment aspect
|
||||||
nodeService.createAssociation(
|
nodeService.createAssociation(
|
||||||
parentRef,
|
parentRef,
|
||||||
childRef,
|
childRef,
|
||||||
ImapModel.ASSOC_IMAP_ATTACHMENT);
|
ImapModel.ASSOC_IMAP_ATTACHMENT);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1291,7 +1291,7 @@ public class RecordsManagementAuditServiceImpl
|
|||||||
PropertyDefinition propDef = this.dictionaryService.getProperty(property);
|
PropertyDefinition propDef = this.dictionaryService.getProperty(property);
|
||||||
if (propDef != null)
|
if (propDef != null)
|
||||||
{
|
{
|
||||||
label = propDef.getTitle();
|
label = propDef.getTitle(dictionaryService);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (label == null)
|
if (label == null)
|
||||||
|
@@ -33,17 +33,17 @@ import org.alfresco.service.namespace.QName;
|
|||||||
/**
|
/**
|
||||||
* Extended RFC822 Metadata Extractor that is sensitive to whether we are in a RM
|
* Extended RFC822 Metadata Extractor that is sensitive to whether we are in a RM
|
||||||
* site or not.
|
* site or not.
|
||||||
*
|
*
|
||||||
* @author Roy Wetherall
|
* @author Roy Wetherall
|
||||||
*/
|
*/
|
||||||
public class RFC822MetadataExtracter extends org.alfresco.repo.content.metadata.RFC822MetadataExtracter
|
public class RFC822MetadataExtracter extends org.alfresco.repo.content.metadata.RFC822MetadataExtracter
|
||||||
{
|
{
|
||||||
/** Reference to default properties */
|
/** Reference to default properties */
|
||||||
private static final String PROPERTIES_URL = "org/alfresco/repo/content/metadata/RFC822MetadataExtracter.properties";
|
private static final String PROPERTIES_URL = "alfresco/metadata/RFC822MetadataExtracter.properties";
|
||||||
|
|
||||||
/** Node service */
|
/** Node service */
|
||||||
private NodeService nodeService;
|
private NodeService nodeService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the node service
|
* Sets the node service
|
||||||
* @param nodeService node service
|
* @param nodeService node service
|
||||||
@@ -52,7 +52,7 @@ public class RFC822MetadataExtracter extends org.alfresco.repo.content.metadata.
|
|||||||
{
|
{
|
||||||
this.nodeService = nodeService;
|
this.nodeService = nodeService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter#filterSystemProperties(java.util.Map, java.util.Map)
|
* @see org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter#filterSystemProperties(java.util.Map, java.util.Map)
|
||||||
*/
|
*/
|
||||||
@@ -73,7 +73,7 @@ public class RFC822MetadataExtracter extends org.alfresco.repo.content.metadata.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter#getDefaultMapping()
|
* @see org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter#getDefaultMapping()
|
||||||
*/
|
*/
|
||||||
@@ -82,7 +82,7 @@ public class RFC822MetadataExtracter extends org.alfresco.repo.content.metadata.
|
|||||||
// Attempt to load the properties
|
// Attempt to load the properties
|
||||||
return readMappingProperties(PROPERTIES_URL);
|
return readMappingProperties(PROPERTIES_URL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a set of properties, try and retrieve the node reference
|
* Given a set of properties, try and retrieve the node reference
|
||||||
* @param properties node properties
|
* @param properties node properties
|
||||||
@@ -91,21 +91,21 @@ public class RFC822MetadataExtracter extends org.alfresco.repo.content.metadata.
|
|||||||
private NodeRef getNodeRef(Map<QName, Serializable> properties)
|
private NodeRef getNodeRef(Map<QName, Serializable> properties)
|
||||||
{
|
{
|
||||||
NodeRef result = null;
|
NodeRef result = null;
|
||||||
|
|
||||||
// Get the elements of the node reference
|
// Get the elements of the node reference
|
||||||
String storeProto = (String)properties.get(ContentModel.PROP_STORE_PROTOCOL);
|
String storeProto = (String)properties.get(ContentModel.PROP_STORE_PROTOCOL);
|
||||||
String storeId = (String)properties.get(ContentModel.PROP_STORE_IDENTIFIER);
|
String storeId = (String)properties.get(ContentModel.PROP_STORE_IDENTIFIER);
|
||||||
String nodeId = (String)properties.get(ContentModel.PROP_NODE_UUID);
|
String nodeId = (String)properties.get(ContentModel.PROP_NODE_UUID);
|
||||||
|
|
||||||
if (storeProto != null && storeProto.length() != 0 &&
|
if (storeProto != null && storeProto.length() != 0 &&
|
||||||
storeId != null && storeId.length() != 0 &&
|
storeId != null && storeId.length() != 0 &&
|
||||||
nodeId != null && nodeId.length() != 0)
|
nodeId != null && nodeId.length() != 0)
|
||||||
|
|
||||||
{
|
{
|
||||||
// Create the node reference
|
// Create the node reference
|
||||||
result = new NodeRef(new StoreRef(storeProto, storeId), nodeId);
|
result = new NodeRef(new StoreRef(storeProto, storeId), nodeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,7 @@ import org.alfresco.repo.forms.Form;
|
|||||||
import org.alfresco.repo.forms.FormData;
|
import org.alfresco.repo.forms.FormData;
|
||||||
import org.alfresco.repo.forms.processor.AbstractFilter;
|
import org.alfresco.repo.forms.processor.AbstractFilter;
|
||||||
import org.alfresco.repo.forms.processor.node.FieldUtils;
|
import org.alfresco.repo.forms.processor.node.FieldUtils;
|
||||||
|
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||||
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.alfresco.service.cmr.repository.NodeService;
|
import org.alfresco.service.cmr.repository.NodeService;
|
||||||
@@ -43,7 +44,7 @@ import org.apache.commons.logging.LogFactory;
|
|||||||
/**
|
/**
|
||||||
* Abstract base class for records management related form filter
|
* Abstract base class for records management related form filter
|
||||||
* implementations.
|
* implementations.
|
||||||
*
|
*
|
||||||
* @author Gavin Cornwell
|
* @author Gavin Cornwell
|
||||||
*/
|
*/
|
||||||
public abstract class RecordsManagementFormFilter<ItemType> extends AbstractFilter<ItemType, NodeRef>
|
public abstract class RecordsManagementFormFilter<ItemType> extends AbstractFilter<ItemType, NodeRef>
|
||||||
@@ -60,10 +61,11 @@ public abstract class RecordsManagementFormFilter<ItemType> extends AbstractFilt
|
|||||||
protected RecordsManagementService rmService;
|
protected RecordsManagementService rmService;
|
||||||
protected RecordsManagementAdminService rmAdminService;
|
protected RecordsManagementAdminService rmAdminService;
|
||||||
protected RecordService recordService;
|
protected RecordService recordService;
|
||||||
|
protected DictionaryService dictionaryService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the NamespaceService instance
|
* Sets the NamespaceService instance
|
||||||
*
|
*
|
||||||
* @param namespaceService The NamespaceService instance
|
* @param namespaceService The NamespaceService instance
|
||||||
*/
|
*/
|
||||||
public void setNamespaceService(NamespaceService namespaceService)
|
public void setNamespaceService(NamespaceService namespaceService)
|
||||||
@@ -73,7 +75,7 @@ public abstract class RecordsManagementFormFilter<ItemType> extends AbstractFilt
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the node service
|
* Sets the node service
|
||||||
*
|
*
|
||||||
* @param nodeService The NodeService instance
|
* @param nodeService The NodeService instance
|
||||||
*/
|
*/
|
||||||
public void setNodeService(NodeService nodeService)
|
public void setNodeService(NodeService nodeService)
|
||||||
@@ -83,17 +85,17 @@ public abstract class RecordsManagementFormFilter<ItemType> extends AbstractFilt
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the RecordsManagementServiceRegistry instance
|
* Sets the RecordsManagementServiceRegistry instance
|
||||||
*
|
*
|
||||||
* @param rmServiceRegistry The RecordsManagementServiceRegistry instance
|
* @param rmServiceRegistry The RecordsManagementServiceRegistry instance
|
||||||
*/
|
*/
|
||||||
public void setRecordsManagementServiceRegistry(RecordsManagementServiceRegistry rmServiceRegistry)
|
public void setRecordsManagementServiceRegistry(RecordsManagementServiceRegistry rmServiceRegistry)
|
||||||
{
|
{
|
||||||
this.rmServiceRegistry = rmServiceRegistry;
|
this.rmServiceRegistry = rmServiceRegistry;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the RecordsManagementService instance
|
* Sets the RecordsManagementService instance
|
||||||
*
|
*
|
||||||
* @param rmService The RecordsManagementService instance
|
* @param rmService The RecordsManagementService instance
|
||||||
*/
|
*/
|
||||||
public void setRecordsManagementService(RecordsManagementService rmService)
|
public void setRecordsManagementService(RecordsManagementService rmService)
|
||||||
@@ -103,14 +105,14 @@ public abstract class RecordsManagementFormFilter<ItemType> extends AbstractFilt
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the RecordsManagementAdminService instance
|
* Sets the RecordsManagementAdminService instance
|
||||||
*
|
*
|
||||||
* @param rmAdminService The RecordsManagementAdminService instance
|
* @param rmAdminService The RecordsManagementAdminService instance
|
||||||
*/
|
*/
|
||||||
public void setRecordsManagementAdminService(RecordsManagementAdminService rmAdminService)
|
public void setRecordsManagementAdminService(RecordsManagementAdminService rmAdminService)
|
||||||
{
|
{
|
||||||
this.rmAdminService = rmAdminService;
|
this.rmAdminService = rmAdminService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param recordService record service
|
* @param recordService record service
|
||||||
*/
|
*/
|
||||||
@@ -118,10 +120,18 @@ public abstract class RecordsManagementFormFilter<ItemType> extends AbstractFilt
|
|||||||
{
|
{
|
||||||
this.recordService = recordService;
|
this.recordService = recordService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param dictionaryService dictionary service
|
||||||
|
*/
|
||||||
|
public void setDictionaryService(DictionaryService dictionaryService)
|
||||||
|
{
|
||||||
|
this.dictionaryService = dictionaryService;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add property fields to group
|
* Add property fields to group
|
||||||
*
|
*
|
||||||
* @param form
|
* @param form
|
||||||
* @param props
|
* @param props
|
||||||
* @param setId
|
* @param setId
|
||||||
@@ -133,17 +143,17 @@ public abstract class RecordsManagementFormFilter<ItemType> extends AbstractFilt
|
|||||||
for (Map.Entry<QName, PropertyDefinition> entry : props.entrySet())
|
for (Map.Entry<QName, PropertyDefinition> entry : props.entrySet())
|
||||||
{
|
{
|
||||||
PropertyDefinition prop = entry.getValue();
|
PropertyDefinition prop = entry.getValue();
|
||||||
|
|
||||||
String id = form.getItem().getId();
|
String id = form.getItem().getId();
|
||||||
id = id.replaceFirst("/", "://");
|
id = id.replaceFirst("/", "://");
|
||||||
NodeRef nodeRef = new NodeRef(id);
|
NodeRef nodeRef = new NodeRef(id);
|
||||||
Serializable value = nodeService.getProperty(nodeRef, entry.getKey());
|
Serializable value = nodeService.getProperty(nodeRef, entry.getKey());
|
||||||
|
|
||||||
FieldGroup group = new FieldGroup(setId, null, false, false, null);
|
FieldGroup group = new FieldGroup(setId, null, false, false, null);
|
||||||
Field field = FieldUtils.makePropertyField(prop, value, group, namespaceService);
|
Field field = FieldUtils.makePropertyField(prop, value, group, namespaceService, dictionaryService);
|
||||||
|
|
||||||
form.addField(field);
|
form.addField(field);
|
||||||
|
|
||||||
if (logger.isDebugEnabled() == true)
|
if (logger.isDebugEnabled() == true)
|
||||||
{
|
{
|
||||||
logger.debug("Adding custom property .. " + prop.getName().toString() + " .. with value " + value + ".. to group .. " + setId);
|
logger.debug("Adding custom property .. " + prop.getName().toString() + " .. with value " + value + ".. to group .. " + setId);
|
||||||
|
@@ -54,7 +54,7 @@ import org.apache.commons.logging.LogFactory;
|
|||||||
* management type are provided as part of the Form and also assigned to the
|
* management type are provided as part of the Form and also assigned to the
|
||||||
* same field group.
|
* same field group.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author Gavin Cornwell
|
* @author Gavin Cornwell
|
||||||
*/
|
*/
|
||||||
public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter<NodeRef> implements RecordsManagementModel, DOD5015Model
|
public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter<NodeRef> implements RecordsManagementModel, DOD5015Model
|
||||||
@@ -68,23 +68,23 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
|||||||
|
|
||||||
/** Dictionary service */
|
/** Dictionary service */
|
||||||
protected DictionaryService dictionaryService;
|
protected DictionaryService dictionaryService;
|
||||||
|
|
||||||
/** Disposition service */
|
/** Disposition service */
|
||||||
protected DispositionService dispositionService;
|
protected DispositionService dispositionService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the data dictionary service
|
* Sets the data dictionary service
|
||||||
*
|
*
|
||||||
* @param dictionaryService The DictionaryService instance
|
* @param dictionaryService The DictionaryService instance
|
||||||
*/
|
*/
|
||||||
public void setDictionaryService(DictionaryService dictionaryService)
|
public void setDictionaryService(DictionaryService dictionaryService)
|
||||||
{
|
{
|
||||||
this.dictionaryService = dictionaryService;
|
this.dictionaryService = dictionaryService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the disposition service
|
* Sets the disposition service
|
||||||
*
|
*
|
||||||
* @param dispositionService disposition service
|
* @param dispositionService disposition service
|
||||||
*/
|
*/
|
||||||
public void setDispositionService(DispositionService dispositionService)
|
public void setDispositionService(DispositionService dispositionService)
|
||||||
@@ -97,32 +97,32 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void afterGenerate(
|
public void afterGenerate(
|
||||||
NodeRef nodeRef,
|
NodeRef nodeRef,
|
||||||
List<String> fields,
|
List<String> fields,
|
||||||
List<String> forcedFields,
|
List<String> forcedFields,
|
||||||
Form form,
|
Form form,
|
||||||
Map<String, Object> context)
|
Map<String, Object> context)
|
||||||
{
|
{
|
||||||
if (rmService.isFilePlanComponent(nodeRef) == true)
|
if (rmService.isFilePlanComponent(nodeRef) == true)
|
||||||
{
|
{
|
||||||
// add all the custom properties
|
// add all the custom properties
|
||||||
addCustomPropertyFieldsToGroup(form, nodeRef);
|
addCustomPropertyFieldsToGroup(form, nodeRef);
|
||||||
|
|
||||||
FilePlanComponentKind kind = rmService.getFilePlanComponentKind(nodeRef);
|
FilePlanComponentKind kind = rmService.getFilePlanComponentKind(nodeRef);
|
||||||
if (FilePlanComponentKind.RECORD.equals(kind) == true)
|
if (FilePlanComponentKind.RECORD.equals(kind) == true)
|
||||||
{
|
{
|
||||||
// add all the record meta-data aspect properties
|
// add all the record meta-data aspect properties
|
||||||
addRecordMetadataPropertyFieldsToGroup(form, nodeRef);
|
addRecordMetadataPropertyFieldsToGroup(form, nodeRef);
|
||||||
|
|
||||||
// add required transient properties
|
// add required transient properties
|
||||||
addTransientProperties(form, nodeRef);
|
addTransientProperties(form, nodeRef);
|
||||||
|
|
||||||
// add the supplemental marking list property
|
// add the supplemental marking list property
|
||||||
forceSupplementalMarkingListProperty(form, nodeRef);
|
forceSupplementalMarkingListProperty(form, nodeRef);
|
||||||
|
|
||||||
// protect uneditable properties
|
// protect uneditable properties
|
||||||
protectRecordProperties(form, nodeRef);
|
protectRecordProperties(form, nodeRef);
|
||||||
|
|
||||||
// if the record is the result of an email we need to 'protect' some fields
|
// if the record is the result of an email we need to 'protect' some fields
|
||||||
if (this.nodeService.hasAspect(nodeRef, ImapModel.ASPECT_IMAP_CONTENT))
|
if (this.nodeService.hasAspect(nodeRef, ImapModel.ASPECT_IMAP_CONTENT))
|
||||||
{
|
{
|
||||||
@@ -133,14 +133,14 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
|||||||
{
|
{
|
||||||
// add the supplemental marking list property
|
// add the supplemental marking list property
|
||||||
forceSupplementalMarkingListProperty(form, nodeRef);
|
forceSupplementalMarkingListProperty(form, nodeRef);
|
||||||
|
|
||||||
// add required transient properties
|
// add required transient properties
|
||||||
addTransientProperties(form, nodeRef);
|
addTransientProperties(form, nodeRef);
|
||||||
}
|
}
|
||||||
else if (FilePlanComponentKind.DISPOSITION_SCHEDULE.equals(kind) == true)
|
else if (FilePlanComponentKind.DISPOSITION_SCHEDULE.equals(kind) == true)
|
||||||
{
|
{
|
||||||
// use the same mechanism used to determine whether steps can be removed from the
|
// use the same mechanism used to determine whether steps can be removed from the
|
||||||
// schedule to determine whether the disposition level can be changed i.e. record
|
// schedule to determine whether the disposition level can be changed i.e. record
|
||||||
// level or folder level.
|
// level or folder level.
|
||||||
DispositionSchedule schedule = new DispositionScheduleImpl(this.rmServiceRegistry, this.nodeService, nodeRef);
|
DispositionSchedule schedule = new DispositionScheduleImpl(this.rmServiceRegistry, this.nodeService, nodeRef);
|
||||||
if (dispositionService.hasDisposableItems(schedule) == true)
|
if (dispositionService.hasDisposableItems(schedule) == true)
|
||||||
@@ -148,19 +148,19 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
|||||||
protectRecordLevelDispositionPropertyField(form);
|
protectRecordLevelDispositionPropertyField(form);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param form
|
* @param form
|
||||||
* @param nodeRef
|
* @param nodeRef
|
||||||
*/
|
*/
|
||||||
protected void addCustomPropertyFieldsToGroup(Form form, NodeRef nodeRef)
|
protected void addCustomPropertyFieldsToGroup(Form form, NodeRef nodeRef)
|
||||||
{
|
{
|
||||||
Set<QName> customisables = rmAdminService.getCustomisable(nodeRef);
|
Set<QName> customisables = rmAdminService.getCustomisable(nodeRef);
|
||||||
|
|
||||||
// Compatibility support: don't show category properties if node of type series
|
// Compatibility support: don't show category properties if node of type series
|
||||||
QName type = nodeService.getType(nodeRef);
|
QName type = nodeService.getType(nodeRef);
|
||||||
if (CompatibilityModel.TYPE_RECORD_SERIES.equals(type) == true)
|
if (CompatibilityModel.TYPE_RECORD_SERIES.equals(type) == true)
|
||||||
@@ -168,22 +168,22 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
|||||||
// remove record category from the list of customisable types to apply to the form
|
// remove record category from the list of customisable types to apply to the form
|
||||||
customisables.remove(TYPE_RECORD_CATEGORY);
|
customisables.remove(TYPE_RECORD_CATEGORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (QName customisable : customisables)
|
for (QName customisable : customisables)
|
||||||
{
|
{
|
||||||
addPropertyFieldsToGroup(form, rmAdminService.getCustomPropertyDefinitions(customisable), CUSTOM_RM_FIELD_GROUP_ID);
|
addPropertyFieldsToGroup(form, rmAdminService.getCustomPropertyDefinitions(customisable), CUSTOM_RM_FIELD_GROUP_ID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param form
|
* @param form
|
||||||
* @param nodeRef
|
* @param nodeRef
|
||||||
*/
|
*/
|
||||||
protected void addRecordMetadataPropertyFieldsToGroup(Form form, NodeRef nodeRef)
|
protected void addRecordMetadataPropertyFieldsToGroup(Form form, NodeRef nodeRef)
|
||||||
{
|
{
|
||||||
Set<QName> aspects = recordService.getRecordMetaDataAspects();
|
Set<QName> aspects = recordService.getRecordMetaDataAspects();
|
||||||
|
|
||||||
for (QName aspect : aspects)
|
for (QName aspect : aspects)
|
||||||
{
|
{
|
||||||
if (nodeService.hasAspect(nodeRef, aspect) == true)
|
if (nodeService.hasAspect(nodeRef, aspect) == true)
|
||||||
@@ -199,26 +199,26 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
|||||||
* Forces the "rmc:supplementalMarkingList" property to be present, if it is
|
* Forces the "rmc:supplementalMarkingList" property to be present, if it is
|
||||||
* already on the given node this method does nothing, otherwise a property
|
* already on the given node this method does nothing, otherwise a property
|
||||||
* field definition is generated for the property.
|
* field definition is generated for the property.
|
||||||
*
|
*
|
||||||
* @param form The Form instance to add the property to
|
* @param form The Form instance to add the property to
|
||||||
* @param nodeRef The node the form is being generated for
|
* @param nodeRef The node the form is being generated for
|
||||||
*/
|
*/
|
||||||
protected void forceSupplementalMarkingListProperty(Form form, NodeRef nodeRef)
|
protected void forceSupplementalMarkingListProperty(Form form, NodeRef nodeRef)
|
||||||
{
|
{
|
||||||
if (!this.nodeService.hasAspect(nodeRef,
|
if (!this.nodeService.hasAspect(nodeRef,
|
||||||
RecordsManagementCustomModel.ASPECT_SUPPLEMENTAL_MARKING_LIST))
|
RecordsManagementCustomModel.ASPECT_SUPPLEMENTAL_MARKING_LIST))
|
||||||
{
|
{
|
||||||
PropertyDefinition propDef = this.dictionaryService.getProperty(
|
PropertyDefinition propDef = this.dictionaryService.getProperty(
|
||||||
RecordsManagementCustomModel.PROP_SUPPLEMENTAL_MARKING_LIST);
|
RecordsManagementCustomModel.PROP_SUPPLEMENTAL_MARKING_LIST);
|
||||||
|
|
||||||
if (propDef != null)
|
if (propDef != null)
|
||||||
{
|
{
|
||||||
Field field = FieldUtils.makePropertyField(propDef, null, null, namespaceService);
|
Field field = FieldUtils.makePropertyField(propDef, null, null, namespaceService, dictionaryService);
|
||||||
form.addField(field);
|
form.addField(field);
|
||||||
}
|
}
|
||||||
else if (logger.isWarnEnabled())
|
else if (logger.isWarnEnabled())
|
||||||
{
|
{
|
||||||
logger.warn("Could not add " +
|
logger.warn("Could not add " +
|
||||||
RecordsManagementCustomModel.PROP_SUPPLEMENTAL_MARKING_LIST.getLocalName() +
|
RecordsManagementCustomModel.PROP_SUPPLEMENTAL_MARKING_LIST.getLocalName() +
|
||||||
" property as it's definition could not be found");
|
" property as it's definition could not be found");
|
||||||
}
|
}
|
||||||
@@ -226,7 +226,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param form
|
* @param form
|
||||||
* @param nodeRef
|
* @param nodeRef
|
||||||
*/
|
*/
|
||||||
@@ -236,7 +236,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
|||||||
{
|
{
|
||||||
addTransientPropertyField(form, TRANSIENT_DECLARED, DataTypeDefinition.BOOLEAN, recordService.isDeclared(nodeRef));
|
addTransientPropertyField(form, TRANSIENT_DECLARED, DataTypeDefinition.BOOLEAN, recordService.isDeclared(nodeRef));
|
||||||
}
|
}
|
||||||
|
|
||||||
DispositionSchedule ds = dispositionService.getDispositionSchedule(nodeRef);
|
DispositionSchedule ds = dispositionService.getDispositionSchedule(nodeRef);
|
||||||
if (ds != null)
|
if (ds != null)
|
||||||
{
|
{
|
||||||
@@ -245,7 +245,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
|||||||
{
|
{
|
||||||
addTransientPropertyField(form, TRANSIENT_DISPOSITION_INSTRUCTIONS, DataTypeDefinition.TEXT, instructions);
|
addTransientPropertyField(form, TRANSIENT_DISPOSITION_INSTRUCTIONS, DataTypeDefinition.TEXT, instructions);
|
||||||
}
|
}
|
||||||
|
|
||||||
NodeRef recordCategory = dispositionService.getAssociatedRecordsManagementContainer(ds);
|
NodeRef recordCategory = dispositionService.getAssociatedRecordsManagementContainer(ds);
|
||||||
if (recordCategory != null)
|
if (recordCategory != null)
|
||||||
{
|
{
|
||||||
@@ -255,11 +255,11 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
|||||||
addTransientPropertyField(form, TRANSIENT_CATEGORY_ID, DataTypeDefinition.TEXT, categoryId);
|
addTransientPropertyField(form, TRANSIENT_CATEGORY_ID, DataTypeDefinition.TEXT, categoryId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param form
|
* @param form
|
||||||
* @param name
|
* @param name
|
||||||
* @param type
|
* @param type
|
||||||
@@ -276,9 +276,9 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
|||||||
form.addFieldDefinition(declaredField);
|
form.addFieldDefinition(declaredField);
|
||||||
form.addData(dataKeyName, value);
|
form.addData(dataKeyName, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param form
|
* @param form
|
||||||
* @param nodeRef
|
* @param nodeRef
|
||||||
*/
|
*/
|
||||||
@@ -296,15 +296,15 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
|||||||
prefixName = "cm:content";
|
prefixName = "cm:content";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
prefixName = fieldDef.getName();
|
prefixName = fieldDef.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (logger.isDebugEnabled() == true)
|
if (logger.isDebugEnabled() == true)
|
||||||
{
|
{
|
||||||
logger.debug("Checking property " + prefixName + " is editable by user " + AuthenticationUtil.getFullyAuthenticatedUser());
|
logger.debug("Checking property " + prefixName + " is editable by user " + AuthenticationUtil.getFullyAuthenticatedUser());
|
||||||
}
|
}
|
||||||
|
|
||||||
QName qname = QName.createQName(prefixName, namespaceService);
|
QName qname = QName.createQName(prefixName, namespaceService);
|
||||||
if (recordService.isPropertyEditable(nodeRef, qname) == false)
|
if (recordService.isPropertyEditable(nodeRef, qname) == false)
|
||||||
{
|
{
|
||||||
@@ -315,13 +315,13 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
|||||||
fieldDef.setProtectedField(true);
|
fieldDef.setProtectedField(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marks all the fields that contain data extracted from an email
|
* Marks all the fields that contain data extracted from an email
|
||||||
* as protected fields.
|
* as protected fields.
|
||||||
*
|
*
|
||||||
* @param form The Form instance to add the property to
|
* @param form The Form instance to add the property to
|
||||||
* @param nodeRef The node the form is being generated for
|
* @param nodeRef The node the form is being generated for
|
||||||
*/
|
*/
|
||||||
@@ -332,14 +332,14 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
|||||||
for (FieldDefinition fieldDef : fieldDefs)
|
for (FieldDefinition fieldDef : fieldDefs)
|
||||||
{
|
{
|
||||||
String prefixName = fieldDef.getName();
|
String prefixName = fieldDef.getName();
|
||||||
|
|
||||||
// check the value of the property, if empty then do not mark property
|
// check the value of the property, if empty then do not mark property
|
||||||
// as read only
|
// as read only
|
||||||
QName qname = QName.createQName(prefixName, namespaceService);
|
QName qname = QName.createQName(prefixName, namespaceService);
|
||||||
Serializable value = nodeService.getProperty(nodeRef, qname);
|
Serializable value = nodeService.getProperty(nodeRef, qname);
|
||||||
if (value != null)
|
if (value != null)
|
||||||
{
|
{
|
||||||
if (prefixName.equals("cm:title") ||
|
if (prefixName.equals("cm:title") ||
|
||||||
prefixName.equals("cm:author") ||
|
prefixName.equals("cm:author") ||
|
||||||
prefixName.equals("rma:originator") ||
|
prefixName.equals("rma:originator") ||
|
||||||
prefixName.equals("rma:publicationDate") ||
|
prefixName.equals("rma:publicationDate") ||
|
||||||
@@ -351,16 +351,16 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (logger.isDebugEnabled() == true)
|
if (logger.isDebugEnabled() == true)
|
||||||
{
|
{
|
||||||
logger.debug("Set email related fields to be protected");
|
logger.debug("Set email related fields to be protected");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marks the recordLevelDisposition property as protected to disable editing
|
* Marks the recordLevelDisposition property as protected to disable editing
|
||||||
*
|
*
|
||||||
* @param form The Form instance
|
* @param form The Form instance
|
||||||
*/
|
*/
|
||||||
protected void protectRecordLevelDispositionPropertyField(Form form)
|
protected void protectRecordLevelDispositionPropertyField(Form form)
|
||||||
@@ -375,7 +375,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
logger.debug("Set 'rma:recordLevelDisposition' field to be protected as record folders or records are present");
|
logger.debug("Set 'rma:recordLevelDisposition' field to be protected as record folders or records are present");
|
||||||
}
|
}
|
||||||
|
@@ -49,7 +49,7 @@ import org.springframework.extensions.surf.util.ParameterCheck;
|
|||||||
* The filter also ensures that any custom properties defined for the records
|
* The filter also ensures that any custom properties defined for the records
|
||||||
* management type are provided as part of the Form.
|
* management type are provided as part of the Form.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author Gavin Cornwell
|
* @author Gavin Cornwell
|
||||||
*/
|
*/
|
||||||
public class RecordsManagementTypeFormFilter extends RecordsManagementFormFilter<TypeDefinition> implements RecordsManagementModel
|
public class RecordsManagementTypeFormFilter extends RecordsManagementFormFilter<TypeDefinition> implements RecordsManagementModel
|
||||||
@@ -66,10 +66,10 @@ public class RecordsManagementTypeFormFilter extends RecordsManagementFormFilter
|
|||||||
protected static final FieldGroup TITLE_FIELD_GROUP = new FieldGroup(TITLE_FIELD_GROUP_ID, null, false, false, null);
|
protected static final FieldGroup TITLE_FIELD_GROUP = new FieldGroup(TITLE_FIELD_GROUP_ID, null, false, false, null);
|
||||||
protected static final FieldGroup DESC_FIELD_GROUP = new FieldGroup(DESC_FIELD_GROUP_ID, null, false, false, null);
|
protected static final FieldGroup DESC_FIELD_GROUP = new FieldGroup(DESC_FIELD_GROUP_ID, null, false, false, null);
|
||||||
protected static final FieldGroup OTHER_FIELD_GROUP = new FieldGroup(OTHER_FIELD_GROUP_ID, null, false, false, null);
|
protected static final FieldGroup OTHER_FIELD_GROUP = new FieldGroup(OTHER_FIELD_GROUP_ID, null, false, false, null);
|
||||||
|
|
||||||
/** Identifier service */
|
/** Identifier service */
|
||||||
protected IdentifierService identifierService;
|
protected IdentifierService identifierService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param identifierService identifier service
|
* @param identifierService identifier service
|
||||||
*/
|
*/
|
||||||
@@ -77,7 +77,7 @@ public class RecordsManagementTypeFormFilter extends RecordsManagementFormFilter
|
|||||||
{
|
{
|
||||||
this.identifierService = identifierService;
|
this.identifierService = identifierService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see
|
* @see
|
||||||
* org.alfresco.repo.forms.processor.Filter#afterGenerate(java.lang.Object,
|
* org.alfresco.repo.forms.processor.Filter#afterGenerate(java.lang.Object,
|
||||||
@@ -87,12 +87,12 @@ public class RecordsManagementTypeFormFilter extends RecordsManagementFormFilter
|
|||||||
public void afterGenerate(TypeDefinition type, List<String> fields, List<String> forcedFields, Form form,
|
public void afterGenerate(TypeDefinition type, List<String> fields, List<String> forcedFields, Form form,
|
||||||
Map<String, Object> context)
|
Map<String, Object> context)
|
||||||
{
|
{
|
||||||
QName typeName = type.getName();
|
QName typeName = type.getName();
|
||||||
if (rmAdminService.isCustomisable(typeName) == true)
|
if (rmAdminService.isCustomisable(typeName) == true)
|
||||||
{
|
{
|
||||||
addCustomRMProperties(typeName, form);
|
addCustomRMProperties(typeName, form);
|
||||||
}
|
}
|
||||||
|
|
||||||
// What about any mandatory aspects?
|
// What about any mandatory aspects?
|
||||||
Set<QName> aspects = type.getDefaultAspectNames();
|
Set<QName> aspects = type.getDefaultAspectNames();
|
||||||
for (QName aspect : aspects)
|
for (QName aspect : aspects)
|
||||||
@@ -107,7 +107,7 @@ public class RecordsManagementTypeFormFilter extends RecordsManagementFormFilter
|
|||||||
/**
|
/**
|
||||||
* Adds a property definition for each of the custom properties for the
|
* Adds a property definition for each of the custom properties for the
|
||||||
* given RM type to the given form.
|
* given RM type to the given form.
|
||||||
*
|
*
|
||||||
* @param rmTypeCustomAspect Enum representing the RM type to add custom
|
* @param rmTypeCustomAspect Enum representing the RM type to add custom
|
||||||
* properties for
|
* properties for
|
||||||
* @param form The form to add the properties to
|
* @param form The form to add the properties to
|
||||||
@@ -116,20 +116,20 @@ public class RecordsManagementTypeFormFilter extends RecordsManagementFormFilter
|
|||||||
{
|
{
|
||||||
ParameterCheck.mandatory("customisableType", customisableType);
|
ParameterCheck.mandatory("customisableType", customisableType);
|
||||||
ParameterCheck.mandatory("form", form);
|
ParameterCheck.mandatory("form", form);
|
||||||
|
|
||||||
Map<QName, PropertyDefinition> customProps = rmAdminService.getCustomPropertyDefinitions(customisableType);
|
Map<QName, PropertyDefinition> customProps = rmAdminService.getCustomPropertyDefinitions(customisableType);
|
||||||
|
|
||||||
if (customProps != null)
|
if (customProps != null)
|
||||||
{
|
{
|
||||||
if (logger.isDebugEnabled() == true)
|
if (logger.isDebugEnabled() == true)
|
||||||
{
|
{
|
||||||
logger.debug("Found " + customProps.size() + " custom properties for customisable type " + customisableType);
|
logger.debug("Found " + customProps.size() + " custom properties for customisable type " + customisableType);
|
||||||
}
|
}
|
||||||
|
|
||||||
// setup field definition for each custom property
|
// setup field definition for each custom property
|
||||||
Collection<PropertyDefinition> properties = customProps.values();
|
Collection<PropertyDefinition> properties = customProps.values();
|
||||||
FieldGroup group = new FieldGroup(CUSTOM_RM_FIELD_GROUP_ID, null, false, false, null);
|
FieldGroup group = new FieldGroup(CUSTOM_RM_FIELD_GROUP_ID, null, false, false, null);
|
||||||
List<Field> fields = FieldUtils.makePropertyFields(properties, group, namespaceService);
|
List<Field> fields = FieldUtils.makePropertyFields(properties, group, namespaceService, dictionaryService);
|
||||||
form.addFields(fields);
|
form.addFields(fields);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -140,5 +140,5 @@ public class RecordsManagementTypeFormFilter extends RecordsManagementFormFilter
|
|||||||
public void afterPersist(TypeDefinition item, FormData data, final NodeRef nodeRef)
|
public void afterPersist(TypeDefinition item, FormData data, final NodeRef nodeRef)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -36,7 +36,7 @@ import org.json.simple.JSONObject;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend JSON conversion component to include RM specifics.
|
* Extend JSON conversion component to include RM specifics.
|
||||||
*
|
*
|
||||||
* @author Roy Wetherall
|
* @author Roy Wetherall
|
||||||
*/
|
*/
|
||||||
public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONConversionComponent
|
public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONConversionComponent
|
||||||
@@ -162,7 +162,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
|
|||||||
if (unfiledRecordContainer != null)
|
if (unfiledRecordContainer != null)
|
||||||
{
|
{
|
||||||
rmNodeValues.put("unfiledRecordContainer", unfiledRecordContainer.toString());
|
rmNodeValues.put("unfiledRecordContainer", unfiledRecordContainer.toString());
|
||||||
rmNodeValues.put("properties", propertiesToJSON(unfiledRecordContainer, useShortQName));
|
rmNodeValues.put("properties", propertiesToJSON(unfiledRecordContainer, nodeService.getProperties(unfiledRecordContainer), useShortQName));
|
||||||
QName type = fileFolderService.getFileInfo(unfiledRecordContainer).getType();
|
QName type = fileFolderService.getFileInfo(unfiledRecordContainer).getType();
|
||||||
rmNodeValues.put("type", useShortQName ? type.toPrefixString(namespaceService) : type.toString());
|
rmNodeValues.put("type", useShortQName ? type.toPrefixString(namespaceService) : type.toString());
|
||||||
}
|
}
|
||||||
|
@@ -245,7 +245,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
|
|||||||
notificationContext.setAsyncNotification(false);
|
notificationContext.setAsyncNotification(false);
|
||||||
notificationContext.setIgnoreNotificationFailure(true);
|
notificationContext.setIgnoreNotificationFailure(true);
|
||||||
|
|
||||||
notificationContext.setBodyTemplate(getDueForReviewTemplate());
|
notificationContext.setBodyTemplate(getDueForReviewTemplate().toString());
|
||||||
Map<String, Serializable> args = new HashMap<String, Serializable>(1, 1.0f);
|
Map<String, Serializable> args = new HashMap<String, Serializable>(1, 1.0f);
|
||||||
args.put("records", (Serializable)records);
|
args.put("records", (Serializable)records);
|
||||||
args.put("site", getSiteName(root));
|
args.put("site", getSiteName(root));
|
||||||
@@ -286,7 +286,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
|
|||||||
notificationContext.setAsyncNotification(false);
|
notificationContext.setAsyncNotification(false);
|
||||||
notificationContext.setIgnoreNotificationFailure(true);
|
notificationContext.setIgnoreNotificationFailure(true);
|
||||||
|
|
||||||
notificationContext.setBodyTemplate(supersededTemplate);
|
notificationContext.setBodyTemplate(supersededTemplate.toString());
|
||||||
Map<String, Serializable> args = new HashMap<String, Serializable>(1, 1.0f);
|
Map<String, Serializable> args = new HashMap<String, Serializable>(1, 1.0f);
|
||||||
args.put("record", record);
|
args.put("record", record);
|
||||||
args.put("site", getSiteName(root));
|
args.put("site", getSiteName(root));
|
||||||
@@ -331,13 +331,13 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
|
|||||||
args.put("rejectDate", rejectDate);
|
args.put("rejectDate", rejectDate);
|
||||||
args.put("recordId", recordId);
|
args.put("recordId", recordId);
|
||||||
args.put("recordName", recordName);
|
args.put("recordName", recordName);
|
||||||
|
|
||||||
NotificationContext notificationContext = new NotificationContext();
|
NotificationContext notificationContext = new NotificationContext();
|
||||||
notificationContext.setAsyncNotification(true);
|
notificationContext.setAsyncNotification(true);
|
||||||
notificationContext.setIgnoreNotificationFailure(true);
|
notificationContext.setIgnoreNotificationFailure(true);
|
||||||
notificationContext.addTo(recordCreator);
|
notificationContext.addTo(recordCreator);
|
||||||
notificationContext.setSubject(I18NUtil.getMessage(MSG_SUBJECT_RECORD_REJECTED));
|
notificationContext.setSubject(I18NUtil.getMessage(MSG_SUBJECT_RECORD_REJECTED));
|
||||||
notificationContext.setBodyTemplate(getRejectedTemplate());
|
notificationContext.setBodyTemplate(getRejectedTemplate().toString());
|
||||||
notificationContext.setTemplateArgs(args);
|
notificationContext.setTemplateArgs(args);
|
||||||
|
|
||||||
notificationService.sendNotification(EMailNotificationProvider.NAME, notificationContext);
|
notificationService.sendNotification(EMailNotificationProvider.NAME, notificationContext);
|
||||||
|
@@ -29,6 +29,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementAdminService;
|
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementAdminService;
|
||||||
import org.alfresco.service.cmr.dictionary.AssociationDefinition;
|
import org.alfresco.service.cmr.dictionary.AssociationDefinition;
|
||||||
import org.alfresco.service.cmr.dictionary.ChildAssociationDefinition;
|
import org.alfresco.service.cmr.dictionary.ChildAssociationDefinition;
|
||||||
|
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
@@ -40,7 +41,7 @@ import org.springframework.extensions.webscripts.WebScriptRequest;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This class provides the implementation for the customrefdefinitions.get webscript.
|
* This class provides the implementation for the customrefdefinitions.get webscript.
|
||||||
*
|
*
|
||||||
* @author Neil McErlean
|
* @author Neil McErlean
|
||||||
*/
|
*/
|
||||||
public class CustomReferenceDefinitionsGet extends DeclarativeWebScript
|
public class CustomReferenceDefinitionsGet extends DeclarativeWebScript
|
||||||
@@ -52,23 +53,29 @@ public class CustomReferenceDefinitionsGet extends DeclarativeWebScript
|
|||||||
private static final String TARGET = "target";
|
private static final String TARGET = "target";
|
||||||
private static final String CUSTOM_REFS = "customRefs";
|
private static final String CUSTOM_REFS = "customRefs";
|
||||||
private static Log logger = LogFactory.getLog(CustomReferenceDefinitionsGet.class);
|
private static Log logger = LogFactory.getLog(CustomReferenceDefinitionsGet.class);
|
||||||
|
|
||||||
private RecordsManagementAdminService rmAdminService;
|
private RecordsManagementAdminService rmAdminService;
|
||||||
|
private DictionaryService dictionaryService;
|
||||||
|
|
||||||
public void setRecordsManagementAdminService(RecordsManagementAdminService rmAdminService)
|
public void setRecordsManagementAdminService(RecordsManagementAdminService rmAdminService)
|
||||||
{
|
{
|
||||||
this.rmAdminService = rmAdminService;
|
this.rmAdminService = rmAdminService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setDictionaryService(DictionaryService dictionaryService)
|
||||||
|
{
|
||||||
|
this.dictionaryService = dictionaryService;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
|
public Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
|
||||||
{
|
{
|
||||||
Map<String, Object> model = new HashMap<String, Object>();
|
Map<String, Object> model = new HashMap<String, Object>();
|
||||||
|
|
||||||
Map<String, String> templateVars = req.getServiceMatch().getTemplateVars();
|
Map<String, String> templateVars = req.getServiceMatch().getTemplateVars();
|
||||||
String refId = templateVars.get(REF_ID);
|
String refId = templateVars.get(REF_ID);
|
||||||
|
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
{
|
{
|
||||||
logger.debug("Getting custom reference definitions with refId: " + String.valueOf(refId));
|
logger.debug("Getting custom reference definitions with refId: " + String.valueOf(refId));
|
||||||
@@ -81,7 +88,7 @@ public class CustomReferenceDefinitionsGet extends DeclarativeWebScript
|
|||||||
if (refId != null)
|
if (refId != null)
|
||||||
{
|
{
|
||||||
QName qn = rmAdminService.getQNameForClientId(refId);
|
QName qn = rmAdminService.getQNameForClientId(refId);
|
||||||
|
|
||||||
AssociationDefinition assDef = currentCustomRefs.get(qn);
|
AssociationDefinition assDef = currentCustomRefs.get(qn);
|
||||||
if (assDef == null)
|
if (assDef == null)
|
||||||
{
|
{
|
||||||
@@ -100,20 +107,20 @@ public class CustomReferenceDefinitionsGet extends DeclarativeWebScript
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<Map<String, String>> listOfReferenceData = new ArrayList<Map<String, String>>();
|
List<Map<String, String>> listOfReferenceData = new ArrayList<Map<String, String>>();
|
||||||
|
|
||||||
for (Entry<QName, AssociationDefinition> entry : currentCustomRefs.entrySet())
|
for (Entry<QName, AssociationDefinition> entry : currentCustomRefs.entrySet())
|
||||||
{
|
{
|
||||||
Map<String, String> data = new HashMap<String, String>();
|
Map<String, String> data = new HashMap<String, String>();
|
||||||
|
|
||||||
AssociationDefinition nextValue = entry.getValue();
|
AssociationDefinition nextValue = entry.getValue();
|
||||||
|
|
||||||
CustomReferenceType referenceType = nextValue instanceof ChildAssociationDefinition ?
|
CustomReferenceType referenceType = nextValue instanceof ChildAssociationDefinition ?
|
||||||
CustomReferenceType.PARENT_CHILD : CustomReferenceType.BIDIRECTIONAL;
|
CustomReferenceType.PARENT_CHILD : CustomReferenceType.BIDIRECTIONAL;
|
||||||
|
|
||||||
data.put(REFERENCE_TYPE, referenceType.toString());
|
data.put(REFERENCE_TYPE, referenceType.toString());
|
||||||
|
|
||||||
// It is the title which stores either the label, or the source and target.
|
// It is the title which stores either the label, or the source and target.
|
||||||
String nextTitle = nextValue.getTitle();
|
String nextTitle = nextValue.getTitle(dictionaryService);
|
||||||
if (CustomReferenceType.PARENT_CHILD.equals(referenceType))
|
if (CustomReferenceType.PARENT_CHILD.equals(referenceType))
|
||||||
{
|
{
|
||||||
if (nextTitle != null)
|
if (nextTitle != null)
|
||||||
@@ -136,10 +143,10 @@ public class CustomReferenceDefinitionsGet extends DeclarativeWebScript
|
|||||||
{
|
{
|
||||||
throw new WebScriptException("Unsupported custom reference type: " + referenceType);
|
throw new WebScriptException("Unsupported custom reference type: " + referenceType);
|
||||||
}
|
}
|
||||||
|
|
||||||
listOfReferenceData.add(data);
|
listOfReferenceData.add(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
{
|
{
|
||||||
logger.debug("Retrieved custom reference definitions: " + listOfReferenceData.size());
|
logger.debug("Retrieved custom reference definitions: " + listOfReferenceData.size());
|
||||||
|
@@ -26,6 +26,7 @@ import java.util.Map;
|
|||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementAdminService;
|
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementAdminService;
|
||||||
import org.alfresco.service.cmr.dictionary.AssociationDefinition;
|
import org.alfresco.service.cmr.dictionary.AssociationDefinition;
|
||||||
|
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||||
import org.alfresco.service.cmr.repository.AssociationRef;
|
import org.alfresco.service.cmr.repository.AssociationRef;
|
||||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
@@ -38,7 +39,7 @@ import org.apache.commons.logging.LogFactory;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This class provides the implementation for the customrefs.get webscript.
|
* This class provides the implementation for the customrefs.get webscript.
|
||||||
*
|
*
|
||||||
* @author Neil McErlean
|
* @author Neil McErlean
|
||||||
*/
|
*/
|
||||||
public class CustomRefsGet extends AbstractRmWebScript
|
public class CustomRefsGet extends AbstractRmWebScript
|
||||||
@@ -56,22 +57,28 @@ public class CustomRefsGet extends AbstractRmWebScript
|
|||||||
private static final String CUSTOM_REFS_TO = "customRefsTo";
|
private static final String CUSTOM_REFS_TO = "customRefsTo";
|
||||||
private static final String NODE_NAME = "nodeName";
|
private static final String NODE_NAME = "nodeName";
|
||||||
private static final String NODE_TITLE = "nodeTitle";
|
private static final String NODE_TITLE = "nodeTitle";
|
||||||
|
|
||||||
private static Log logger = LogFactory.getLog(CustomRefsGet.class);
|
private static Log logger = LogFactory.getLog(CustomRefsGet.class);
|
||||||
private RecordsManagementAdminService rmAdminService;
|
private RecordsManagementAdminService rmAdminService;
|
||||||
|
private DictionaryService dictionaryService;
|
||||||
|
|
||||||
public void setRecordsManagementAdminService(RecordsManagementAdminService rmAdminService)
|
public void setRecordsManagementAdminService(RecordsManagementAdminService rmAdminService)
|
||||||
{
|
{
|
||||||
this.rmAdminService = rmAdminService;
|
this.rmAdminService = rmAdminService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setDictionaryService(DictionaryService dictionaryService)
|
||||||
|
{
|
||||||
|
this.dictionaryService = dictionaryService;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
|
public Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
|
||||||
{
|
{
|
||||||
Map<String, Object> ftlModel = new HashMap<String, Object>();
|
Map<String, Object> ftlModel = new HashMap<String, Object>();
|
||||||
|
|
||||||
NodeRef node = parseRequestForNodeRef(req);
|
NodeRef node = parseRequestForNodeRef(req);
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
{
|
{
|
||||||
logger.debug("Getting custom reference instances for " + node);
|
logger.debug("Getting custom reference instances for " + node);
|
||||||
@@ -79,27 +86,27 @@ public class CustomRefsGet extends AbstractRmWebScript
|
|||||||
|
|
||||||
// All the references that come 'out' from this node.
|
// All the references that come 'out' from this node.
|
||||||
List<Map<String, String>> listOfOutwardReferenceData = new ArrayList<Map<String, String>>();
|
List<Map<String, String>> listOfOutwardReferenceData = new ArrayList<Map<String, String>>();
|
||||||
|
|
||||||
List<AssociationRef> assocsFromThisNode = this.rmAdminService.getCustomReferencesFrom(node);
|
List<AssociationRef> assocsFromThisNode = this.rmAdminService.getCustomReferencesFrom(node);
|
||||||
addBidirectionalReferenceData(listOfOutwardReferenceData, assocsFromThisNode);
|
addBidirectionalReferenceData(listOfOutwardReferenceData, assocsFromThisNode);
|
||||||
|
|
||||||
List<ChildAssociationRef> childAssocs = this.rmAdminService.getCustomChildReferences(node);
|
List<ChildAssociationRef> childAssocs = this.rmAdminService.getCustomChildReferences(node);
|
||||||
addParentChildReferenceData(listOfOutwardReferenceData, childAssocs);
|
addParentChildReferenceData(listOfOutwardReferenceData, childAssocs);
|
||||||
|
|
||||||
// All the references that come 'in' to this node.
|
// All the references that come 'in' to this node.
|
||||||
List<Map<String, String>> listOfInwardReferenceData = new ArrayList<Map<String, String>>();
|
List<Map<String, String>> listOfInwardReferenceData = new ArrayList<Map<String, String>>();
|
||||||
|
|
||||||
List<AssociationRef> toAssocs = this.rmAdminService.getCustomReferencesTo(node);
|
List<AssociationRef> toAssocs = this.rmAdminService.getCustomReferencesTo(node);
|
||||||
addBidirectionalReferenceData(listOfInwardReferenceData, toAssocs);
|
addBidirectionalReferenceData(listOfInwardReferenceData, toAssocs);
|
||||||
|
|
||||||
List<ChildAssociationRef> parentAssocs = this.rmAdminService.getCustomParentReferences(node);
|
List<ChildAssociationRef> parentAssocs = this.rmAdminService.getCustomParentReferences(node);
|
||||||
addParentChildReferenceData(listOfInwardReferenceData, parentAssocs);
|
addParentChildReferenceData(listOfInwardReferenceData, parentAssocs);
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
{
|
{
|
||||||
logger.debug("Retrieved custom reference instances: " + assocsFromThisNode);
|
logger.debug("Retrieved custom reference instances: " + assocsFromThisNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
ftlModel.put(NODE_NAME, nodeService.getProperty(node, ContentModel.PROP_NAME));
|
ftlModel.put(NODE_NAME, nodeService.getProperty(node, ContentModel.PROP_NAME));
|
||||||
ftlModel.put(NODE_TITLE, nodeService.getProperty(node, ContentModel.PROP_TITLE));
|
ftlModel.put(NODE_TITLE, nodeService.getProperty(node, ContentModel.PROP_TITLE));
|
||||||
ftlModel.put(CUSTOM_REFS_FROM, listOfOutwardReferenceData);
|
ftlModel.put(CUSTOM_REFS_FROM, listOfOutwardReferenceData);
|
||||||
@@ -112,7 +119,7 @@ public class CustomRefsGet extends AbstractRmWebScript
|
|||||||
* This method goes through the associationRefs specified and constructs a Map<String, String>
|
* This method goes through the associationRefs specified and constructs a Map<String, String>
|
||||||
* for each assRef. FTL-relevant data are added to that map. The associationRefs must all be
|
* for each assRef. FTL-relevant data are added to that map. The associationRefs must all be
|
||||||
* parent/child references.
|
* parent/child references.
|
||||||
*
|
*
|
||||||
* @param listOfReferenceData
|
* @param listOfReferenceData
|
||||||
* @param assocs
|
* @param assocs
|
||||||
*/
|
*/
|
||||||
@@ -124,23 +131,23 @@ public class CustomRefsGet extends AbstractRmWebScript
|
|||||||
Map<String, String> data = new HashMap<String, String>();
|
Map<String, String> data = new HashMap<String, String>();
|
||||||
|
|
||||||
QName typeQName = childAssRef.getTypeQName();
|
QName typeQName = childAssRef.getTypeQName();
|
||||||
|
|
||||||
data.put(CHILD_REF, childAssRef.getChildRef().toString());
|
data.put(CHILD_REF, childAssRef.getChildRef().toString());
|
||||||
data.put(PARENT_REF, childAssRef.getParentRef().toString());
|
data.put(PARENT_REF, childAssRef.getParentRef().toString());
|
||||||
|
|
||||||
AssociationDefinition assDef = rmAdminService.getCustomReferenceDefinitions().get(typeQName);
|
AssociationDefinition assDef = rmAdminService.getCustomReferenceDefinitions().get(typeQName);
|
||||||
|
|
||||||
if (assDef != null)
|
if (assDef != null)
|
||||||
{
|
{
|
||||||
String compoundTitle = assDef.getTitle();
|
String compoundTitle = assDef.getTitle(dictionaryService);
|
||||||
|
|
||||||
data.put(REF_ID, typeQName.getLocalName());
|
data.put(REF_ID, typeQName.getLocalName());
|
||||||
|
|
||||||
String[] sourceAndTarget = rmAdminService.splitSourceTargetId(compoundTitle);
|
String[] sourceAndTarget = rmAdminService.splitSourceTargetId(compoundTitle);
|
||||||
data.put(SOURCE, sourceAndTarget[0]);
|
data.put(SOURCE, sourceAndTarget[0]);
|
||||||
data.put(TARGET, sourceAndTarget[1]);
|
data.put(TARGET, sourceAndTarget[1]);
|
||||||
data.put(REFERENCE_TYPE, CustomReferenceType.PARENT_CHILD.toString());
|
data.put(REFERENCE_TYPE, CustomReferenceType.PARENT_CHILD.toString());
|
||||||
|
|
||||||
listOfReferenceData.add(data);
|
listOfReferenceData.add(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -150,7 +157,7 @@ public class CustomRefsGet extends AbstractRmWebScript
|
|||||||
* This method goes through the associationRefs specified and constructs a Map<String, String>
|
* This method goes through the associationRefs specified and constructs a Map<String, String>
|
||||||
* for each assRef. FTL-relevant data are added to that map. The associationRefs must all be
|
* for each assRef. FTL-relevant data are added to that map. The associationRefs must all be
|
||||||
* bidirectional references.
|
* bidirectional references.
|
||||||
*
|
*
|
||||||
* @param listOfReferenceData
|
* @param listOfReferenceData
|
||||||
* @param assocs
|
* @param assocs
|
||||||
*/
|
*/
|
||||||
@@ -163,15 +170,15 @@ public class CustomRefsGet extends AbstractRmWebScript
|
|||||||
|
|
||||||
QName typeQName = assRef.getTypeQName();
|
QName typeQName = assRef.getTypeQName();
|
||||||
AssociationDefinition assDef = rmAdminService.getCustomReferenceDefinitions().get(typeQName);
|
AssociationDefinition assDef = rmAdminService.getCustomReferenceDefinitions().get(typeQName);
|
||||||
|
|
||||||
if (assDef != null)
|
if (assDef != null)
|
||||||
{
|
{
|
||||||
data.put(LABEL, assDef.getTitle());
|
data.put(LABEL, assDef.getTitle(dictionaryService));
|
||||||
data.put(REF_ID, typeQName.getLocalName());
|
data.put(REF_ID, typeQName.getLocalName());
|
||||||
data.put(REFERENCE_TYPE, CustomReferenceType.BIDIRECTIONAL.toString());
|
data.put(REFERENCE_TYPE, CustomReferenceType.BIDIRECTIONAL.toString());
|
||||||
data.put(SOURCE_REF, assRef.getSourceRef().toString());
|
data.put(SOURCE_REF, assRef.getSourceRef().toString());
|
||||||
data.put(TARGET_REF, assRef.getTargetRef().toString());
|
data.put(TARGET_REF, assRef.getTargetRef().toString());
|
||||||
|
|
||||||
listOfReferenceData.add(data);
|
listOfReferenceData.add(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -26,6 +26,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
|
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.disposition.property.DispositionProperty;
|
import org.alfresco.module.org_alfresco_module_rm.disposition.property.DispositionProperty;
|
||||||
|
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||||
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
||||||
import org.alfresco.service.namespace.NamespaceService;
|
import org.alfresco.service.namespace.NamespaceService;
|
||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
@@ -42,33 +43,44 @@ public class DispositionPropertiesGet extends DeclarativeWebScript
|
|||||||
{
|
{
|
||||||
protected DispositionService dispositionService;
|
protected DispositionService dispositionService;
|
||||||
protected NamespaceService namespaceService;
|
protected NamespaceService namespaceService;
|
||||||
|
protected DictionaryService dictionaryService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the disposition service
|
* Sets the disposition service
|
||||||
*
|
*
|
||||||
* @param dispositionService the disposition service
|
* @param dispositionService the disposition service
|
||||||
*/
|
*/
|
||||||
public void setDispositionService(DispositionService dispositionService)
|
public void setDispositionService(DispositionService dispositionService)
|
||||||
{
|
{
|
||||||
this.dispositionService = dispositionService;
|
this.dispositionService = dispositionService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the NamespaceService instance
|
* Sets the NamespaceService instance
|
||||||
*
|
*
|
||||||
* @param namespaceService The NamespaceService instance
|
* @param namespaceService The NamespaceService instance
|
||||||
*/
|
*/
|
||||||
public void setNamespaceService(NamespaceService namespaceService)
|
public void setNamespaceService(NamespaceService namespaceService)
|
||||||
{
|
{
|
||||||
this.namespaceService = namespaceService;
|
this.namespaceService = namespaceService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the DictionaryService instance
|
||||||
|
*
|
||||||
|
* @param dictionaryService The DictionaryService instance
|
||||||
|
*/
|
||||||
|
public void setDictionaryService(DictionaryService dictionaryService)
|
||||||
|
{
|
||||||
|
this.dictionaryService = dictionaryService;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.alfresco.web.scripts.DeclarativeWebScript#executeImpl(org.alfresco.web.scripts.WebScriptRequest, org.alfresco.web.scripts.Status, org.alfresco.web.scripts.Cache)
|
* @see org.alfresco.web.scripts.DeclarativeWebScript#executeImpl(org.alfresco.web.scripts.WebScriptRequest, org.alfresco.web.scripts.Status, org.alfresco.web.scripts.Cache)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
|
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
|
||||||
{
|
{
|
||||||
boolean recordLevel = false;
|
boolean recordLevel = false;
|
||||||
String recordLevelValue = req.getParameter("recordlevel");
|
String recordLevelValue = req.getParameter("recordlevel");
|
||||||
if (recordLevelValue != null)
|
if (recordLevelValue != null)
|
||||||
@@ -76,18 +88,18 @@ public class DispositionPropertiesGet extends DeclarativeWebScript
|
|||||||
recordLevel = Boolean.valueOf(recordLevelValue);
|
recordLevel = Boolean.valueOf(recordLevelValue);
|
||||||
}
|
}
|
||||||
String dispositionAction = req.getParameter("dispositionaction");
|
String dispositionAction = req.getParameter("dispositionaction");
|
||||||
|
|
||||||
Collection<DispositionProperty> dispositionProperties = dispositionService.getDispositionProperties(recordLevel, dispositionAction);
|
Collection<DispositionProperty> dispositionProperties = dispositionService.getDispositionProperties(recordLevel, dispositionAction);
|
||||||
List<Map<String, String>> items = new ArrayList<Map<String, String>>(dispositionProperties.size());
|
List<Map<String, String>> items = new ArrayList<Map<String, String>>(dispositionProperties.size());
|
||||||
for (DispositionProperty dispositionProperty : dispositionProperties)
|
for (DispositionProperty dispositionProperty : dispositionProperties)
|
||||||
{
|
{
|
||||||
PropertyDefinition propDef = dispositionProperty.getPropertyDefinition();
|
PropertyDefinition propDef = dispositionProperty.getPropertyDefinition();
|
||||||
QName propName = dispositionProperty.getQName();
|
QName propName = dispositionProperty.getQName();
|
||||||
|
|
||||||
if (propDef != null)
|
if (propDef != null)
|
||||||
{
|
{
|
||||||
Map<String, String> item = new HashMap<String, String>(2);
|
Map<String, String> item = new HashMap<String, String>(2);
|
||||||
String propTitle = propDef.getTitle();
|
String propTitle = propDef.getTitle(dictionaryService);
|
||||||
if (propTitle == null || propTitle.length() == 0)
|
if (propTitle == null || propTitle.length() == 0)
|
||||||
{
|
{
|
||||||
propTitle = StringUtils.capitalize(propName.getLocalName());
|
propTitle = StringUtils.capitalize(propName.getLocalName());
|
||||||
@@ -97,7 +109,7 @@ public class DispositionPropertiesGet extends DeclarativeWebScript
|
|||||||
items.add(item);
|
items.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// create model object with the lists model
|
// create model object with the lists model
|
||||||
Map<String, Object> model = new HashMap<String, Object>(1);
|
Map<String, Object> model = new HashMap<String, Object>(1);
|
||||||
model.put("properties", items);
|
model.put("properties", items);
|
||||||
|
@@ -49,7 +49,7 @@ import org.springframework.util.StringUtils;
|
|||||||
/**
|
/**
|
||||||
* Implementation for Java backed webscript to return lists
|
* Implementation for Java backed webscript to return lists
|
||||||
* of values for various records management services.
|
* of values for various records management services.
|
||||||
*
|
*
|
||||||
* @author Gavin Cornwell
|
* @author Gavin Cornwell
|
||||||
*/
|
*/
|
||||||
public class ListOfValuesGet extends DeclarativeWebScript
|
public class ListOfValuesGet extends DeclarativeWebScript
|
||||||
@@ -61,50 +61,50 @@ public class ListOfValuesGet extends DeclarativeWebScript
|
|||||||
protected DispositionService dispositionService;
|
protected DispositionService dispositionService;
|
||||||
protected DictionaryService ddService;
|
protected DictionaryService ddService;
|
||||||
protected NamespaceService namespaceService;
|
protected NamespaceService namespaceService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the RecordsManagementService instance
|
* Sets the RecordsManagementService instance
|
||||||
*
|
*
|
||||||
* @param rmService The RecordsManagementService instance
|
* @param rmService The RecordsManagementService instance
|
||||||
*/
|
*/
|
||||||
public void setRecordsManagementService(RecordsManagementService rmService)
|
public void setRecordsManagementService(RecordsManagementService rmService)
|
||||||
{
|
{
|
||||||
this.rmService = rmService;
|
this.rmService = rmService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the RecordsManagementActionService instance
|
* Sets the RecordsManagementActionService instance
|
||||||
*
|
*
|
||||||
* @param rmActionService The RecordsManagementActionService instance
|
* @param rmActionService The RecordsManagementActionService instance
|
||||||
*/
|
*/
|
||||||
public void setRecordsManagementActionService(RecordsManagementActionService rmActionService)
|
public void setRecordsManagementActionService(RecordsManagementActionService rmActionService)
|
||||||
{
|
{
|
||||||
this.rmActionService = rmActionService;
|
this.rmActionService = rmActionService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the RecordsManagementAuditService instance
|
* Sets the RecordsManagementAuditService instance
|
||||||
*
|
*
|
||||||
* @param rmAuditService The RecordsManagementAuditService instance
|
* @param rmAuditService The RecordsManagementAuditService instance
|
||||||
*/
|
*/
|
||||||
public void setRecordsManagementAuditService(RecordsManagementAuditService rmAuditService)
|
public void setRecordsManagementAuditService(RecordsManagementAuditService rmAuditService)
|
||||||
{
|
{
|
||||||
this.rmAuditService = rmAuditService;
|
this.rmAuditService = rmAuditService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the RecordsManagementEventService instance
|
* Sets the RecordsManagementEventService instance
|
||||||
*
|
*
|
||||||
* @param rmEventService The RecordsManagementEventService instance
|
* @param rmEventService The RecordsManagementEventService instance
|
||||||
*/
|
*/
|
||||||
public void setRecordsManagementEventService(RecordsManagementEventService rmEventService)
|
public void setRecordsManagementEventService(RecordsManagementEventService rmEventService)
|
||||||
{
|
{
|
||||||
this.rmEventService = rmEventService;
|
this.rmEventService = rmEventService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the disposition service
|
* Sets the disposition service
|
||||||
*
|
*
|
||||||
* @param dispositionService the disposition service
|
* @param dispositionService the disposition service
|
||||||
*/
|
*/
|
||||||
public void setDispositionService(DispositionService dispositionService)
|
public void setDispositionService(DispositionService dispositionService)
|
||||||
@@ -114,24 +114,24 @@ public class ListOfValuesGet extends DeclarativeWebScript
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the DictionaryService instance
|
* Sets the DictionaryService instance
|
||||||
*
|
*
|
||||||
* @param ddService The DictionaryService instance
|
* @param ddService The DictionaryService instance
|
||||||
*/
|
*/
|
||||||
public void setDictionaryService(DictionaryService ddService)
|
public void setDictionaryService(DictionaryService ddService)
|
||||||
{
|
{
|
||||||
this.ddService = ddService;
|
this.ddService = ddService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the NamespaceService instance
|
* Sets the NamespaceService instance
|
||||||
*
|
*
|
||||||
* @param namespaceService The NamespaceService instance
|
* @param namespaceService The NamespaceService instance
|
||||||
*/
|
*/
|
||||||
public void setNamespaceService(NamespaceService namespaceService)
|
public void setNamespaceService(NamespaceService namespaceService)
|
||||||
{
|
{
|
||||||
this.namespaceService = namespaceService;
|
this.namespaceService = namespaceService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.alfresco.web.scripts.DeclarativeWebScript#executeImpl(org.alfresco.web.scripts.WebScriptRequest, org.alfresco.web.scripts.Status, org.alfresco.web.scripts.Cache)
|
* @see org.alfresco.web.scripts.DeclarativeWebScript#executeImpl(org.alfresco.web.scripts.WebScriptRequest, org.alfresco.web.scripts.Status, org.alfresco.web.scripts.Cache)
|
||||||
*/
|
*/
|
||||||
@@ -146,16 +146,16 @@ public class ListOfValuesGet extends DeclarativeWebScript
|
|||||||
listsModel.put("periodTypes", createPeriodTypesModel(requestUrl));
|
listsModel.put("periodTypes", createPeriodTypesModel(requestUrl));
|
||||||
listsModel.put("periodProperties", createPeriodPropertiesModel(requestUrl));
|
listsModel.put("periodProperties", createPeriodPropertiesModel(requestUrl));
|
||||||
listsModel.put("auditEvents", createAuditEventsModel(requestUrl));
|
listsModel.put("auditEvents", createAuditEventsModel(requestUrl));
|
||||||
|
|
||||||
// create model object with the lists model
|
// create model object with the lists model
|
||||||
Map<String, Object> model = new HashMap<String, Object>(1);
|
Map<String, Object> model = new HashMap<String, Object>(1);
|
||||||
model.put("lists", listsModel);
|
model.put("lists", listsModel);
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the model for the list of disposition actions.
|
* Creates the model for the list of disposition actions.
|
||||||
*
|
*
|
||||||
* @param baseUrl The base URL of the service
|
* @param baseUrl The base URL of the service
|
||||||
* @return model of disposition actions list
|
* @return model of disposition actions list
|
||||||
*/
|
*/
|
||||||
@@ -171,18 +171,18 @@ public class ListOfValuesGet extends DeclarativeWebScript
|
|||||||
item.put("value", dispositionAction.getName());
|
item.put("value", dispositionAction.getName());
|
||||||
items.add(item);
|
items.add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
// create the model
|
// create the model
|
||||||
Map<String, Object> model = new HashMap<String, Object>(2);
|
Map<String, Object> model = new HashMap<String, Object>(2);
|
||||||
model.put("url", baseUrl + "/dispositionactions");
|
model.put("url", baseUrl + "/dispositionactions");
|
||||||
model.put("items", items);
|
model.put("items", items);
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the model for the list of events.
|
* Creates the model for the list of events.
|
||||||
*
|
*
|
||||||
* @param baseUrl The base URL of the service
|
* @param baseUrl The base URL of the service
|
||||||
* @return model of events list
|
* @return model of events list
|
||||||
*/
|
*/
|
||||||
@@ -196,22 +196,22 @@ public class ListOfValuesGet extends DeclarativeWebScript
|
|||||||
Map<String, Object> item = new HashMap<String, Object>(3);
|
Map<String, Object> item = new HashMap<String, Object>(3);
|
||||||
item.put("label", event.getDisplayLabel());
|
item.put("label", event.getDisplayLabel());
|
||||||
item.put("value", event.getName());
|
item.put("value", event.getName());
|
||||||
item.put("automatic",
|
item.put("automatic",
|
||||||
this.rmEventService.getEventType(event.getType()).isAutomaticEvent());
|
this.rmEventService.getEventType(event.getType()).isAutomaticEvent());
|
||||||
items.add(item);
|
items.add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
// create the model
|
// create the model
|
||||||
Map<String, Object> model = new HashMap<String, Object>(2);
|
Map<String, Object> model = new HashMap<String, Object>(2);
|
||||||
model.put("url", baseUrl + "/events");
|
model.put("url", baseUrl + "/events");
|
||||||
model.put("items", items);
|
model.put("items", items);
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the model for the list of period types.
|
* Creates the model for the list of period types.
|
||||||
*
|
*
|
||||||
* @param baseUrl The base URL of the service
|
* @param baseUrl The base URL of the service
|
||||||
* @return model of period types list
|
* @return model of period types list
|
||||||
*/
|
*/
|
||||||
@@ -231,18 +231,18 @@ public class ListOfValuesGet extends DeclarativeWebScript
|
|||||||
items.add(item);
|
items.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// create the model
|
// create the model
|
||||||
Map<String, Object> model = new HashMap<String, Object>(2);
|
Map<String, Object> model = new HashMap<String, Object>(2);
|
||||||
model.put("url", baseUrl + "/periodtypes");
|
model.put("url", baseUrl + "/periodtypes");
|
||||||
model.put("items", items);
|
model.put("items", items);
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the model for the list of period properties.
|
* Creates the model for the list of period properties.
|
||||||
*
|
*
|
||||||
* @param baseUrl The base URL of the service
|
* @param baseUrl The base URL of the service
|
||||||
* @return model of period properties list
|
* @return model of period properties list
|
||||||
*/
|
*/
|
||||||
@@ -255,11 +255,11 @@ public class ListOfValuesGet extends DeclarativeWebScript
|
|||||||
{
|
{
|
||||||
PropertyDefinition propDef = dispositionProperty.getPropertyDefinition();
|
PropertyDefinition propDef = dispositionProperty.getPropertyDefinition();
|
||||||
QName propName = dispositionProperty.getQName();
|
QName propName = dispositionProperty.getQName();
|
||||||
|
|
||||||
if (propDef != null)
|
if (propDef != null)
|
||||||
{
|
{
|
||||||
Map<String, String> item = new HashMap<String, String>(2);
|
Map<String, String> item = new HashMap<String, String>(2);
|
||||||
String propTitle = propDef.getTitle();
|
String propTitle = propDef.getTitle(ddService);
|
||||||
if (propTitle == null || propTitle.length() == 0)
|
if (propTitle == null || propTitle.length() == 0)
|
||||||
{
|
{
|
||||||
propTitle = StringUtils.capitalize(propName.getLocalName());
|
propTitle = StringUtils.capitalize(propName.getLocalName());
|
||||||
@@ -269,18 +269,18 @@ public class ListOfValuesGet extends DeclarativeWebScript
|
|||||||
items.add(item);
|
items.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// create the model
|
// create the model
|
||||||
Map<String, Object> model = new HashMap<String, Object>(2);
|
Map<String, Object> model = new HashMap<String, Object>(2);
|
||||||
model.put("url", baseUrl + "/periodproperties");
|
model.put("url", baseUrl + "/periodproperties");
|
||||||
model.put("items", items);
|
model.put("items", items);
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the model for the list of audit events.
|
* Creates the model for the list of audit events.
|
||||||
*
|
*
|
||||||
* @param baseUrl The base URL of the service
|
* @param baseUrl The base URL of the service
|
||||||
* @return model of audit events list
|
* @return model of audit events list
|
||||||
*/
|
*/
|
||||||
@@ -296,12 +296,12 @@ public class ListOfValuesGet extends DeclarativeWebScript
|
|||||||
item.put("value", event.getName());
|
item.put("value", event.getName());
|
||||||
items.add(item);
|
items.add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
// create the model
|
// create the model
|
||||||
Map<String, Object> model = new HashMap<String, Object>(2);
|
Map<String, Object> model = new HashMap<String, Object>(2);
|
||||||
model.put("url", baseUrl + "/auditevents");
|
model.put("url", baseUrl + "/auditevents");
|
||||||
model.put("items", items);
|
model.put("items", items);
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -38,17 +38,17 @@ import org.springframework.extensions.webscripts.WebScriptRequest;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* RM serach properties GET web script
|
* RM serach properties GET web script
|
||||||
*
|
*
|
||||||
* @author Roy Wetherall
|
* @author Roy Wetherall
|
||||||
*/
|
*/
|
||||||
public class RMSearchPropertiesGet extends DeclarativeWebScript
|
public class RMSearchPropertiesGet extends DeclarativeWebScript
|
||||||
{
|
{
|
||||||
/** Services */
|
/** Services */
|
||||||
private RecordsManagementAdminService adminService;
|
private RecordsManagementAdminService adminService;
|
||||||
private RecordService recordService;
|
private RecordService recordService;
|
||||||
private DictionaryService dictionaryService;
|
private DictionaryService dictionaryService;
|
||||||
private NamespaceService namespaceService;
|
private NamespaceService namespaceService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param adminService records management admin service
|
* @param adminService records management admin service
|
||||||
*/
|
*/
|
||||||
@@ -56,7 +56,7 @@ public class RMSearchPropertiesGet extends DeclarativeWebScript
|
|||||||
{
|
{
|
||||||
this.adminService = adminService;
|
this.adminService = adminService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param recordService record service
|
* @param recordService record service
|
||||||
*/
|
*/
|
||||||
@@ -64,7 +64,7 @@ public class RMSearchPropertiesGet extends DeclarativeWebScript
|
|||||||
{
|
{
|
||||||
this.recordService = recordService;
|
this.recordService = recordService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param dictionaryService dictionary service
|
* @param dictionaryService dictionary service
|
||||||
*/
|
*/
|
||||||
@@ -72,7 +72,7 @@ public class RMSearchPropertiesGet extends DeclarativeWebScript
|
|||||||
{
|
{
|
||||||
this.dictionaryService = dictionaryService;
|
this.dictionaryService = dictionaryService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param namespaceService namespace service
|
* @param namespaceService namespace service
|
||||||
*/
|
*/
|
||||||
@@ -80,7 +80,7 @@ public class RMSearchPropertiesGet extends DeclarativeWebScript
|
|||||||
{
|
{
|
||||||
this.namespaceService = namespaceService;
|
this.namespaceService = namespaceService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.alfresco.web.scripts.DeclarativeWebScript#executeImpl(org.alfresco.web.scripts.WebScriptRequest, org.alfresco.web.scripts.Status, org.alfresco.web.scripts.Cache)
|
* @see org.alfresco.web.scripts.DeclarativeWebScript#executeImpl(org.alfresco.web.scripts.WebScriptRequest, org.alfresco.web.scripts.Status, org.alfresco.web.scripts.Cache)
|
||||||
*/
|
*/
|
||||||
@@ -88,9 +88,9 @@ public class RMSearchPropertiesGet extends DeclarativeWebScript
|
|||||||
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
|
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
|
||||||
{
|
{
|
||||||
Map<String, Object> model = new HashMap<String, Object>(13);
|
Map<String, Object> model = new HashMap<String, Object>(13);
|
||||||
|
|
||||||
List<Group> groups = new ArrayList<Group>(5);
|
List<Group> groups = new ArrayList<Group>(5);
|
||||||
|
|
||||||
Set<QName> aspects = recordService.getRecordMetaDataAspects();
|
Set<QName> aspects = recordService.getRecordMetaDataAspects();
|
||||||
for (QName aspect : aspects)
|
for (QName aspect : aspects)
|
||||||
{
|
{
|
||||||
@@ -103,9 +103,9 @@ public class RMSearchPropertiesGet extends DeclarativeWebScript
|
|||||||
propObjs[index] = propObj;
|
propObjs[index] = propObj;
|
||||||
index ++;
|
index ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
AspectDefinition aspectDefinition = dictionaryService.getAspect(aspect);
|
AspectDefinition aspectDefinition = dictionaryService.getAspect(aspect);
|
||||||
Group group = new Group(aspect.getLocalName(), aspectDefinition.getTitle(), propObjs);
|
Group group = new Group(aspect.getLocalName(), aspectDefinition.getTitle(), propObjs);
|
||||||
groups.add(group);
|
groups.add(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,74 +118,74 @@ public class RMSearchPropertiesGet extends DeclarativeWebScript
|
|||||||
propObjs[index] = propObj;
|
propObjs[index] = propObj;
|
||||||
index ++;
|
index ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
Group group = new Group("rmcustom", "Custom", propObjs);
|
Group group = new Group("rmcustom", "Custom", propObjs);
|
||||||
groups.add(group);
|
groups.add(group);
|
||||||
|
|
||||||
model.put("groups", groups);
|
model.put("groups", groups);
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Group
|
public class Group
|
||||||
{
|
{
|
||||||
private String id;
|
private String id;
|
||||||
private String label;
|
private String label;
|
||||||
private Property[] properties;
|
private Property[] properties;
|
||||||
|
|
||||||
public Group(String id, String label, Property[] properties)
|
public Group(String id, String label, Property[] properties)
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.label = label;
|
this.label = label;
|
||||||
this.properties = properties;
|
this.properties = properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getId()
|
public String getId()
|
||||||
{
|
{
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLabel()
|
public String getLabel()
|
||||||
{
|
{
|
||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Property[] getProperties()
|
public Property[] getProperties()
|
||||||
{
|
{
|
||||||
return properties;
|
return properties;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Property
|
public class Property
|
||||||
{
|
{
|
||||||
private String prefix;
|
private String prefix;
|
||||||
private String shortName;
|
private String shortName;
|
||||||
private String label;
|
private String label;
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
public Property(PropertyDefinition propertyDefinition)
|
public Property(PropertyDefinition propertyDefinition)
|
||||||
{
|
{
|
||||||
QName qName = propertyDefinition.getName().getPrefixedQName(namespaceService);
|
QName qName = propertyDefinition.getName().getPrefixedQName(namespaceService);
|
||||||
this.prefix = QName.splitPrefixedQName(qName.toPrefixString())[0];
|
this.prefix = QName.splitPrefixedQName(qName.toPrefixString())[0];
|
||||||
this.shortName = qName.getLocalName();
|
this.shortName = qName.getLocalName();
|
||||||
this.label = propertyDefinition.getTitle();
|
this.label = propertyDefinition.getTitle(dictionaryService);
|
||||||
this.type = propertyDefinition.getDataType().getName().getLocalName();
|
this.type = propertyDefinition.getDataType().getName().getLocalName();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPrefix()
|
public String getPrefix()
|
||||||
{
|
{
|
||||||
return prefix;
|
return prefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getShortName()
|
public String getShortName()
|
||||||
{
|
{
|
||||||
return shortName;
|
return shortName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLabel()
|
public String getLabel()
|
||||||
{
|
{
|
||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getType()
|
public String getType()
|
||||||
{
|
{
|
||||||
return type;
|
return type;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -196,7 +196,7 @@ public class RmClassesGet extends DictionaryWebServiceBase implements RecordsMan
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<ClassDefinition> classDefinitions = new ArrayList<ClassDefinition>(classdef.values());
|
List<ClassDefinition> classDefinitions = new ArrayList<ClassDefinition>(classdef.values());
|
||||||
Collections.sort(classDefinitions, new DictionaryComparators.ClassDefinitionComparator());
|
Collections.sort(classDefinitions, new DictionaryComparators.ClassDefinitionComparator(dictionaryservice));
|
||||||
model.put(MODEL_PROP_KEY_CLASS_DEFS, classDefinitions);
|
model.put(MODEL_PROP_KEY_CLASS_DEFS, classDefinitions);
|
||||||
model.put(MODEL_PROP_KEY_PROPERTY_DETAILS, propdef.values());
|
model.put(MODEL_PROP_KEY_PROPERTY_DETAILS, propdef.values());
|
||||||
model.put(MODEL_PROP_KEY_ASSOCIATION_DETAILS, assocdef.values());
|
model.put(MODEL_PROP_KEY_ASSOCIATION_DETAILS, assocdef.values());
|
||||||
|
@@ -147,7 +147,7 @@ public class RmPropertiesGet extends DictionaryWebServiceBase implements Records
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Order property definitions by title
|
// Order property definitions by title
|
||||||
Collections.sort(props, new DictionaryComparators.PropertyDefinitionComparator());
|
Collections.sort(props, new DictionaryComparators.PropertyDefinitionComparator(dictionaryservice));
|
||||||
|
|
||||||
// Pass list of property definitions to template
|
// Pass list of property definitions to template
|
||||||
Map<String, Object> model = new HashMap<String, Object>();
|
Map<String, Object> model = new HashMap<String, Object>();
|
||||||
|
@@ -58,45 +58,45 @@ import org.springframework.util.CollectionUtils;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This test class tests the definition and use of a custom RM elements at the Java services layer.
|
* This test class tests the definition and use of a custom RM elements at the Java services layer.
|
||||||
*
|
*
|
||||||
* @author Neil McErlean, janv, Roy Wetherall
|
* @author Neil McErlean, janv, Roy Wetherall
|
||||||
*/
|
*/
|
||||||
public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
||||||
implements RecordsManagementModel,
|
implements RecordsManagementModel,
|
||||||
BeforeCreateReference,
|
BeforeCreateReference,
|
||||||
OnCreateReference
|
OnCreateReference
|
||||||
{
|
{
|
||||||
|
|
||||||
private final static long testRunID = System.currentTimeMillis();
|
private final static long testRunID = System.currentTimeMillis();
|
||||||
|
|
||||||
private List<QName> createdCustomProperties;
|
private List<QName> createdCustomProperties;
|
||||||
private List<QName> madeCustomisable;
|
private List<QName> madeCustomisable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase#setUp()
|
* @see org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase#setUp()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void setUp() throws Exception
|
protected void setUp() throws Exception
|
||||||
{
|
{
|
||||||
createdCustomProperties = new ArrayList<QName>();
|
createdCustomProperties = new ArrayList<QName>();
|
||||||
madeCustomisable = new ArrayList<QName>();
|
madeCustomisable = new ArrayList<QName>();
|
||||||
super.setUp();
|
super.setUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase#setupTestData()
|
* @see org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase#setupTestData()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void setupTestData()
|
protected void setupTestData()
|
||||||
{
|
{
|
||||||
super.setupTestData();
|
super.setupTestData();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase#tearDown()
|
* @see org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase#tearDown()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void tearDown() throws Exception
|
protected void tearDown() throws Exception
|
||||||
{
|
{
|
||||||
retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<Object>()
|
retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<Object>()
|
||||||
{
|
{
|
||||||
@@ -105,24 +105,24 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
{
|
{
|
||||||
// As system user
|
// As system user
|
||||||
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getSystemUserName());
|
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getSystemUserName());
|
||||||
|
|
||||||
for (QName createdCustomProperty : createdCustomProperties)
|
for (QName createdCustomProperty : createdCustomProperties)
|
||||||
{
|
{
|
||||||
adminService.removeCustomPropertyDefinition(createdCustomProperty);
|
adminService.removeCustomPropertyDefinition(createdCustomProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (QName customisable : madeCustomisable)
|
for (QName customisable : madeCustomisable)
|
||||||
{
|
{
|
||||||
adminService.unmakeCustomisable(customisable);
|
adminService.unmakeCustomisable(customisable);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
super.tearDown();
|
super.tearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see RecordsManagementAdminService#getCustomisable()
|
* @see RecordsManagementAdminService#getCustomisable()
|
||||||
*/
|
*/
|
||||||
@@ -139,17 +139,17 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
assertTrue(list.containsAll(
|
assertTrue(list.containsAll(
|
||||||
CollectionUtils.arrayToList(new QName[]
|
CollectionUtils.arrayToList(new QName[]
|
||||||
{
|
{
|
||||||
ASPECT_RECORD,
|
ASPECT_RECORD,
|
||||||
TYPE_RECORD_FOLDER,
|
TYPE_RECORD_FOLDER,
|
||||||
TYPE_NON_ELECTRONIC_DOCUMENT,
|
TYPE_NON_ELECTRONIC_DOCUMENT,
|
||||||
TYPE_RECORD_CATEGORY
|
TYPE_RECORD_CATEGORY
|
||||||
})));
|
})));
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see RecordsManagementAdminService#isCustomisable(QName)
|
* @see RecordsManagementAdminService#isCustomisable(QName)
|
||||||
*/
|
*/
|
||||||
@@ -164,12 +164,12 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
assertFalse(adminService.isCustomisable(ASPECT_DUBLINCORE));
|
assertFalse(adminService.isCustomisable(ASPECT_DUBLINCORE));
|
||||||
assertTrue(adminService.isCustomisable(TYPE_RECORD_FOLDER));
|
assertTrue(adminService.isCustomisable(TYPE_RECORD_FOLDER));
|
||||||
assertTrue(adminService.isCustomisable(ASPECT_RECORD));
|
assertTrue(adminService.isCustomisable(ASPECT_RECORD));
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see RecordsManagementAdminService#existsCustomProperty(QName)
|
* @see RecordsManagementAdminService#existsCustomProperty(QName)
|
||||||
* @see RecordsManagementAdminService#addCustomPropertyDefinition(QName, QName, String, QName, String, String, String, boolean, boolean, boolean, QName)
|
* @see RecordsManagementAdminService#addCustomPropertyDefinition(QName, QName, String, QName, String, String, String, boolean, boolean, boolean, QName)
|
||||||
@@ -182,66 +182,66 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public QName run() throws Exception
|
public QName run() throws Exception
|
||||||
{
|
{
|
||||||
// Check the property does not exist
|
// Check the property does not exist
|
||||||
assertFalse(adminService.existsCustomProperty(QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myRecordProp1")));
|
assertFalse(adminService.existsCustomProperty(QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myRecordProp1")));
|
||||||
|
|
||||||
return adminService.addCustomPropertyDefinition(
|
return adminService.addCustomPropertyDefinition(
|
||||||
QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myRecordProp1"),
|
QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myRecordProp1"),
|
||||||
ASPECT_RECORD,
|
ASPECT_RECORD,
|
||||||
"Label1",
|
"Label1",
|
||||||
DataTypeDefinition.TEXT,
|
DataTypeDefinition.TEXT,
|
||||||
"Title",
|
"Title",
|
||||||
"Description");
|
"Description");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void test(QName result) throws Exception
|
public void test(QName result) throws Exception
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Check the property QName is correct
|
// Check the property QName is correct
|
||||||
assertNotNull(result);
|
assertNotNull(result);
|
||||||
assertEquals(QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myRecordProp1"), result);
|
assertEquals(QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myRecordProp1"), result);
|
||||||
assertTrue(adminService.existsCustomProperty(result));
|
assertTrue(adminService.existsCustomProperty(result));
|
||||||
|
|
||||||
// Check that property is available as a custom property
|
// Check that property is available as a custom property
|
||||||
Map<QName, PropertyDefinition> propDefs = adminService.getCustomPropertyDefinitions(ASPECT_RECORD);
|
Map<QName, PropertyDefinition> propDefs = adminService.getCustomPropertyDefinitions(ASPECT_RECORD);
|
||||||
assertNotNull(propDefs);
|
assertNotNull(propDefs);
|
||||||
assertTrue(propDefs.containsKey(result));
|
assertTrue(propDefs.containsKey(result));
|
||||||
|
|
||||||
// Check the property definition
|
// Check the property definition
|
||||||
PropertyDefinition propDef = propDefs.get(result);
|
PropertyDefinition propDef = propDefs.get(result);
|
||||||
assertNotNull(propDef);
|
assertNotNull(propDef);
|
||||||
assertEquals(DataTypeDefinition.TEXT, propDef.getDataType().getName());
|
assertEquals(DataTypeDefinition.TEXT, propDef.getDataType().getName());
|
||||||
assertEquals("Description", propDef.getDescription());
|
assertEquals("Description", propDef.getDescription(dictionaryService));
|
||||||
assertEquals("Label1", propDef.getTitle());
|
assertEquals("Label1", propDef.getTitle(dictionaryService));
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
// Store the created property for cleanup later
|
// Store the created property for cleanup later
|
||||||
createdCustomProperties.add(result);
|
createdCustomProperties.add(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add property to record (no id, short version)
|
// Add property to record (no id, short version)
|
||||||
doTestInTransaction(new Test<QName>()
|
doTestInTransaction(new Test<QName>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public QName run() throws Exception
|
public QName run() throws Exception
|
||||||
{
|
{
|
||||||
return adminService.addCustomPropertyDefinition(
|
return adminService.addCustomPropertyDefinition(
|
||||||
null,
|
null,
|
||||||
ASPECT_RECORD,
|
ASPECT_RECORD,
|
||||||
"Label2",
|
"Label2",
|
||||||
DataTypeDefinition.TEXT,
|
DataTypeDefinition.TEXT,
|
||||||
"Title",
|
"Title",
|
||||||
"Description");
|
"Description");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void test(QName result) throws Exception
|
public void test(QName result) throws Exception
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -249,83 +249,83 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
assertNotNull(result);
|
assertNotNull(result);
|
||||||
assertEquals(RecordsManagementCustomModel.RM_CUSTOM_URI, result.getNamespaceURI());
|
assertEquals(RecordsManagementCustomModel.RM_CUSTOM_URI, result.getNamespaceURI());
|
||||||
assertTrue(adminService.existsCustomProperty(result));
|
assertTrue(adminService.existsCustomProperty(result));
|
||||||
|
|
||||||
// Check that property is available as a custom property
|
// Check that property is available as a custom property
|
||||||
Map<QName, PropertyDefinition> propDefs = adminService.getCustomPropertyDefinitions(ASPECT_RECORD);
|
Map<QName, PropertyDefinition> propDefs = adminService.getCustomPropertyDefinitions(ASPECT_RECORD);
|
||||||
assertNotNull(propDefs);
|
assertNotNull(propDefs);
|
||||||
assertTrue(propDefs.containsKey(result));
|
assertTrue(propDefs.containsKey(result));
|
||||||
|
|
||||||
// Check the property definition
|
// Check the property definition
|
||||||
PropertyDefinition propDef = propDefs.get(result);
|
PropertyDefinition propDef = propDefs.get(result);
|
||||||
assertNotNull(propDef);
|
assertNotNull(propDef);
|
||||||
assertEquals(DataTypeDefinition.TEXT, propDef.getDataType().getName());
|
assertEquals(DataTypeDefinition.TEXT, propDef.getDataType().getName());
|
||||||
assertEquals("Description", propDef.getDescription());
|
assertEquals("Description", propDef.getDescription(dictionaryService));
|
||||||
assertEquals("Label2", propDef.getTitle());
|
assertEquals("Label2", propDef.getTitle(dictionaryService));
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
// Store the created property for cleanup later
|
// Store the created property for cleanup later
|
||||||
createdCustomProperties.add(result);
|
createdCustomProperties.add(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add property to record (long version)
|
// Add property to record (long version)
|
||||||
doTestInTransaction(new Test<QName>()
|
doTestInTransaction(new Test<QName>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public QName run() throws Exception
|
public QName run() throws Exception
|
||||||
{
|
{
|
||||||
return adminService.addCustomPropertyDefinition(
|
return adminService.addCustomPropertyDefinition(
|
||||||
null,
|
null,
|
||||||
ASPECT_RECORD,
|
ASPECT_RECORD,
|
||||||
"Label3",
|
"Label3",
|
||||||
DataTypeDefinition.TEXT,
|
DataTypeDefinition.TEXT,
|
||||||
"Title",
|
"Title",
|
||||||
"Description",
|
"Description",
|
||||||
"default",
|
"default",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
null);
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void test(QName result) throws Exception
|
public void test(QName result) throws Exception
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Check the property QName is correct
|
// Check the property QName is correct
|
||||||
assertNotNull(result);
|
assertNotNull(result);
|
||||||
assertEquals(RecordsManagementCustomModel.RM_CUSTOM_URI, result.getNamespaceURI());
|
assertEquals(RecordsManagementCustomModel.RM_CUSTOM_URI, result.getNamespaceURI());
|
||||||
assertTrue(adminService.existsCustomProperty(result));
|
assertTrue(adminService.existsCustomProperty(result));
|
||||||
|
|
||||||
// Check that property is available as a custom property
|
// Check that property is available as a custom property
|
||||||
Map<QName, PropertyDefinition> propDefs = adminService.getCustomPropertyDefinitions(ASPECT_RECORD);
|
Map<QName, PropertyDefinition> propDefs = adminService.getCustomPropertyDefinitions(ASPECT_RECORD);
|
||||||
assertNotNull(propDefs);
|
assertNotNull(propDefs);
|
||||||
//assertEquals(3, propDefs.size());
|
//assertEquals(3, propDefs.size());
|
||||||
assertTrue(propDefs.containsKey(result));
|
assertTrue(propDefs.containsKey(result));
|
||||||
|
|
||||||
// Check the property definition
|
// Check the property definition
|
||||||
PropertyDefinition propDef = propDefs.get(result);
|
PropertyDefinition propDef = propDefs.get(result);
|
||||||
assertNotNull(propDef);
|
assertNotNull(propDef);
|
||||||
assertEquals(DataTypeDefinition.TEXT, propDef.getDataType().getName());
|
assertEquals(DataTypeDefinition.TEXT, propDef.getDataType().getName());
|
||||||
assertEquals("Description", propDef.getDescription());
|
assertEquals("Description", propDef.getDescription(dictionaryService));
|
||||||
assertEquals("Label3", propDef.getTitle());
|
assertEquals("Label3", propDef.getTitle(dictionaryService));
|
||||||
assertEquals("default", propDef.getDefaultValue());
|
assertEquals("default", propDef.getDefaultValue());
|
||||||
assertFalse(propDef.isMandatory());
|
assertFalse(propDef.isMandatory());
|
||||||
assertFalse(propDef.isMultiValued());
|
assertFalse(propDef.isMultiValued());
|
||||||
assertFalse(propDef.isProtected());
|
assertFalse(propDef.isProtected());
|
||||||
|
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
// Store the created property for cleanup later
|
// Store the created property for cleanup later
|
||||||
createdCustomProperties.add(result);
|
createdCustomProperties.add(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Failure: Add a property with the same name twice
|
// Failure: Add a property with the same name twice
|
||||||
doTestInTransaction(new FailureTest
|
doTestInTransaction(new FailureTest
|
||||||
(
|
(
|
||||||
@@ -337,15 +337,15 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
public void run() throws Exception
|
public void run() throws Exception
|
||||||
{
|
{
|
||||||
adminService.addCustomPropertyDefinition(
|
adminService.addCustomPropertyDefinition(
|
||||||
QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myRecordProp1"),
|
QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myRecordProp1"),
|
||||||
ASPECT_RECORD,
|
ASPECT_RECORD,
|
||||||
"Label1",
|
"Label1",
|
||||||
DataTypeDefinition.TEXT,
|
DataTypeDefinition.TEXT,
|
||||||
"Title",
|
"Title",
|
||||||
"Description");
|
"Description");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Failure: Try and add a property to a type that isn't customisable
|
// Failure: Try and add a property to a type that isn't customisable
|
||||||
doTestInTransaction(new FailureTest
|
doTestInTransaction(new FailureTest
|
||||||
(
|
(
|
||||||
@@ -357,16 +357,16 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
public void run() throws Exception
|
public void run() throws Exception
|
||||||
{
|
{
|
||||||
adminService.addCustomPropertyDefinition(
|
adminService.addCustomPropertyDefinition(
|
||||||
QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myContentProp"),
|
QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myContentProp"),
|
||||||
TYPE_CONTENT,
|
TYPE_CONTENT,
|
||||||
"Label1",
|
"Label1",
|
||||||
DataTypeDefinition.TEXT,
|
DataTypeDefinition.TEXT,
|
||||||
"Title",
|
"Title",
|
||||||
"Description");
|
"Description");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see RecordsManagementAdminService#makeCustomisable(QName)
|
* @see RecordsManagementAdminService#makeCustomisable(QName)
|
||||||
*/
|
*/
|
||||||
@@ -382,41 +382,41 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
adminService.makeCustomisable(TYPE_CUSTOM_TYPE);
|
adminService.makeCustomisable(TYPE_CUSTOM_TYPE);
|
||||||
madeCustomisable.add(TYPE_CUSTOM_TYPE);
|
madeCustomisable.add(TYPE_CUSTOM_TYPE);
|
||||||
assertTrue(adminService.isCustomisable(TYPE_CUSTOM_TYPE));
|
assertTrue(adminService.isCustomisable(TYPE_CUSTOM_TYPE));
|
||||||
|
|
||||||
// Add a custom property
|
// Add a custom property
|
||||||
return adminService.addCustomPropertyDefinition(
|
return adminService.addCustomPropertyDefinition(
|
||||||
QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myNewProperty"),
|
QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myNewProperty"),
|
||||||
TYPE_CUSTOM_TYPE,
|
TYPE_CUSTOM_TYPE,
|
||||||
"Label",
|
"Label",
|
||||||
DataTypeDefinition.TEXT,
|
DataTypeDefinition.TEXT,
|
||||||
"Title",
|
"Title",
|
||||||
"Description");
|
"Description");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void test(QName result) throws Exception
|
public void test(QName result) throws Exception
|
||||||
{
|
{
|
||||||
// Check the property QName is correct
|
// Check the property QName is correct
|
||||||
assertNotNull(result);
|
assertNotNull(result);
|
||||||
assertEquals(QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myNewProperty"), result);
|
assertEquals(QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myNewProperty"), result);
|
||||||
assertTrue(adminService.existsCustomProperty(result));
|
assertTrue(adminService.existsCustomProperty(result));
|
||||||
|
|
||||||
// Check that property is available as a custom property
|
// Check that property is available as a custom property
|
||||||
Map<QName, PropertyDefinition> propDefs = adminService.getCustomPropertyDefinitions(TYPE_CUSTOM_TYPE);
|
Map<QName, PropertyDefinition> propDefs = adminService.getCustomPropertyDefinitions(TYPE_CUSTOM_TYPE);
|
||||||
assertNotNull(propDefs);
|
assertNotNull(propDefs);
|
||||||
assertEquals(1, propDefs.size());
|
assertEquals(1, propDefs.size());
|
||||||
assertTrue(propDefs.containsKey(result));
|
assertTrue(propDefs.containsKey(result));
|
||||||
|
|
||||||
// Check the property definition
|
// Check the property definition
|
||||||
PropertyDefinition propDef = propDefs.get(result);
|
PropertyDefinition propDef = propDefs.get(result);
|
||||||
assertNotNull(propDef);
|
assertNotNull(propDef);
|
||||||
assertEquals(DataTypeDefinition.TEXT, propDef.getDataType().getName());
|
assertEquals(DataTypeDefinition.TEXT, propDef.getDataType().getName());
|
||||||
assertEquals("Description", propDef.getDescription());
|
assertEquals("Description", propDef.getDescription(dictionaryService));
|
||||||
assertEquals("Label", propDef.getTitle());
|
assertEquals("Label", propDef.getTitle(dictionaryService));
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
doTestInTransaction(new Test<QName>()
|
doTestInTransaction(new Test<QName>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@@ -427,41 +427,41 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
adminService.makeCustomisable(ASPECT_CUSTOM_ASPECT);
|
adminService.makeCustomisable(ASPECT_CUSTOM_ASPECT);
|
||||||
madeCustomisable.add(ASPECT_CUSTOM_ASPECT);
|
madeCustomisable.add(ASPECT_CUSTOM_ASPECT);
|
||||||
assertTrue(adminService.isCustomisable(ASPECT_CUSTOM_ASPECT));
|
assertTrue(adminService.isCustomisable(ASPECT_CUSTOM_ASPECT));
|
||||||
|
|
||||||
// Add a custom property
|
// Add a custom property
|
||||||
return adminService.addCustomPropertyDefinition(
|
return adminService.addCustomPropertyDefinition(
|
||||||
QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myNewAspectProperty"),
|
QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myNewAspectProperty"),
|
||||||
ASPECT_CUSTOM_ASPECT,
|
ASPECT_CUSTOM_ASPECT,
|
||||||
"Label",
|
"Label",
|
||||||
DataTypeDefinition.TEXT,
|
DataTypeDefinition.TEXT,
|
||||||
"Title",
|
"Title",
|
||||||
"Description");
|
"Description");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void test(QName result) throws Exception
|
public void test(QName result) throws Exception
|
||||||
{
|
{
|
||||||
// Check the property QName is correct
|
// Check the property QName is correct
|
||||||
assertNotNull(result);
|
assertNotNull(result);
|
||||||
assertEquals(QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myNewAspectProperty"), result);
|
assertEquals(QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myNewAspectProperty"), result);
|
||||||
assertTrue(adminService.existsCustomProperty(result));
|
assertTrue(adminService.existsCustomProperty(result));
|
||||||
|
|
||||||
// Check that property is available as a custom property
|
// Check that property is available as a custom property
|
||||||
Map<QName, PropertyDefinition> propDefs = adminService.getCustomPropertyDefinitions(ASPECT_CUSTOM_ASPECT);
|
Map<QName, PropertyDefinition> propDefs = adminService.getCustomPropertyDefinitions(ASPECT_CUSTOM_ASPECT);
|
||||||
assertNotNull(propDefs);
|
assertNotNull(propDefs);
|
||||||
assertEquals(1, propDefs.size());
|
assertEquals(1, propDefs.size());
|
||||||
assertTrue(propDefs.containsKey(result));
|
assertTrue(propDefs.containsKey(result));
|
||||||
|
|
||||||
// Check the property definition
|
// Check the property definition
|
||||||
PropertyDefinition propDef = propDefs.get(result);
|
PropertyDefinition propDef = propDefs.get(result);
|
||||||
assertNotNull(propDef);
|
assertNotNull(propDef);
|
||||||
assertEquals(DataTypeDefinition.TEXT, propDef.getDataType().getName());
|
assertEquals(DataTypeDefinition.TEXT, propDef.getDataType().getName());
|
||||||
assertEquals("Description", propDef.getDescription());
|
assertEquals("Description", propDef.getDescription(dictionaryService));
|
||||||
assertEquals("Label", propDef.getTitle());
|
assertEquals("Label", propDef.getTitle(dictionaryService));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testUseCustomProperty() throws Exception
|
public void testUseCustomProperty() throws Exception
|
||||||
{
|
{
|
||||||
// Create custom property on type and aspect
|
// Create custom property on type and aspect
|
||||||
@@ -470,29 +470,29 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
@Override
|
@Override
|
||||||
public QName run() throws Exception
|
public QName run() throws Exception
|
||||||
{
|
{
|
||||||
adminService.makeCustomisable(TYPE_CUSTOM_TYPE);
|
adminService.makeCustomisable(TYPE_CUSTOM_TYPE);
|
||||||
madeCustomisable.add(TYPE_CUSTOM_TYPE);
|
madeCustomisable.add(TYPE_CUSTOM_TYPE);
|
||||||
adminService.addCustomPropertyDefinition(
|
adminService.addCustomPropertyDefinition(
|
||||||
QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myNewProperty"),
|
QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myNewProperty"),
|
||||||
TYPE_CUSTOM_TYPE,
|
TYPE_CUSTOM_TYPE,
|
||||||
"Label",
|
"Label",
|
||||||
DataTypeDefinition.TEXT,
|
DataTypeDefinition.TEXT,
|
||||||
"Title",
|
"Title",
|
||||||
"Description");
|
"Description");
|
||||||
adminService.makeCustomisable(ASPECT_CUSTOM_ASPECT);
|
adminService.makeCustomisable(ASPECT_CUSTOM_ASPECT);
|
||||||
madeCustomisable.add(ASPECT_CUSTOM_ASPECT);
|
madeCustomisable.add(ASPECT_CUSTOM_ASPECT);
|
||||||
adminService.addCustomPropertyDefinition(
|
adminService.addCustomPropertyDefinition(
|
||||||
QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myNewAspectProperty"),
|
QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "myNewAspectProperty"),
|
||||||
ASPECT_CUSTOM_ASPECT,
|
ASPECT_CUSTOM_ASPECT,
|
||||||
"Label",
|
"Label",
|
||||||
DataTypeDefinition.TEXT,
|
DataTypeDefinition.TEXT,
|
||||||
"Title",
|
"Title",
|
||||||
"Description");
|
"Description");
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Create nodes using custom type and aspect
|
// Create nodes using custom type and aspect
|
||||||
doTestInTransaction(new Test<QName>()
|
doTestInTransaction(new Test<QName>()
|
||||||
{
|
{
|
||||||
@@ -500,36 +500,36 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
public QName run() throws Exception
|
public QName run() throws Exception
|
||||||
{
|
{
|
||||||
NodeRef customInstance1 = nodeService.createNode(
|
NodeRef customInstance1 = nodeService.createNode(
|
||||||
folder,
|
folder,
|
||||||
ASSOC_CONTAINS,
|
ASSOC_CONTAINS,
|
||||||
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "myCustomInstance1"),
|
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "myCustomInstance1"),
|
||||||
TYPE_CUSTOM_TYPE).getChildRef();
|
TYPE_CUSTOM_TYPE).getChildRef();
|
||||||
NodeRef customInstance2 = nodeService.createNode(
|
NodeRef customInstance2 = nodeService.createNode(
|
||||||
folder,
|
folder,
|
||||||
ASSOC_CONTAINS,
|
ASSOC_CONTAINS,
|
||||||
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "myCustomInstance2"),
|
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "myCustomInstance2"),
|
||||||
TYPE_CONTENT).getChildRef();
|
TYPE_CONTENT).getChildRef();
|
||||||
nodeService.addAspect(customInstance2, ASPECT_CUSTOM_ASPECT, null);
|
nodeService.addAspect(customInstance2, ASPECT_CUSTOM_ASPECT, null);
|
||||||
|
|
||||||
// Assert that both instances have the custom aspects applied
|
// Assert that both instances have the custom aspects applied
|
||||||
assertTrue(nodeService.hasAspect(customInstance1, QName.createQName(RM_CUSTOM_URI, "rmtcustomTypeCustomProperties")));
|
assertTrue(nodeService.hasAspect(customInstance1, QName.createQName(RM_CUSTOM_URI, "rmtcustomTypeCustomProperties")));
|
||||||
assertTrue(nodeService.hasAspect(customInstance2, QName.createQName(RM_CUSTOM_URI, "rmtcustomAspectCustomProperties")));
|
assertTrue(nodeService.hasAspect(customInstance2, QName.createQName(RM_CUSTOM_URI, "rmtcustomAspectCustomProperties")));
|
||||||
|
|
||||||
// Remove the custom aspect
|
// Remove the custom aspect
|
||||||
nodeService.removeAspect(customInstance2, ASPECT_CUSTOM_ASPECT);
|
nodeService.removeAspect(customInstance2, ASPECT_CUSTOM_ASPECT);
|
||||||
|
|
||||||
// Assert the custom property aspect is no longer applied applied
|
// Assert the custom property aspect is no longer applied applied
|
||||||
assertTrue(nodeService.hasAspect(customInstance1, QName.createQName(RM_CUSTOM_URI, "rmtcustomTypeCustomProperties")));
|
assertTrue(nodeService.hasAspect(customInstance1, QName.createQName(RM_CUSTOM_URI, "rmtcustomTypeCustomProperties")));
|
||||||
assertFalse(nodeService.hasAspect(customInstance2, QName.createQName(RM_CUSTOM_URI, "rmtcustomAspectCustomProperties")));
|
assertFalse(nodeService.hasAspect(customInstance2, QName.createQName(RM_CUSTOM_URI, "rmtcustomAspectCustomProperties")));
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}, AuthenticationUtil.getSystemUserName());
|
}, AuthenticationUtil.getSystemUserName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void testCreateAndUseCustomChildReference() throws Exception
|
public void testCreateAndUseCustomChildReference() throws Exception
|
||||||
{
|
{
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
createAndUseCustomReference(CustomReferenceType.PARENT_CHILD, null, "superseded" + now, "superseding" + now);
|
createAndUseCustomReference(CustomReferenceType.PARENT_CHILD, null, "superseded" + now, "superseding" + now);
|
||||||
}
|
}
|
||||||
@@ -539,7 +539,7 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
createAndUseCustomReference(CustomReferenceType.BIDIRECTIONAL, "supporting" + now, null, null);
|
createAndUseCustomReference(CustomReferenceType.BIDIRECTIONAL, "supporting" + now, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createAndUseCustomReference(final CustomReferenceType refType, final String label, final String source, final String target) throws Exception
|
private void createAndUseCustomReference(final CustomReferenceType refType, final String label, final String source, final String target) throws Exception
|
||||||
{
|
{
|
||||||
final NodeRef testRecord1 = retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<NodeRef>()
|
final NodeRef testRecord1 = retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<NodeRef>()
|
||||||
@@ -548,16 +548,16 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
{
|
{
|
||||||
NodeRef result = utils.createRecord(rmFolder, "testRecordA" + System.currentTimeMillis());
|
NodeRef result = utils.createRecord(rmFolder, "testRecordA" + System.currentTimeMillis());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
final NodeRef testRecord2 = retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<NodeRef>()
|
final NodeRef testRecord2 = retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<NodeRef>()
|
||||||
{
|
{
|
||||||
public NodeRef execute() throws Throwable
|
public NodeRef execute() throws Throwable
|
||||||
{
|
{
|
||||||
NodeRef result = utils.createRecord(rmFolder, "testRecordB" + System.currentTimeMillis());
|
NodeRef result = utils.createRecord(rmFolder, "testRecordB" + System.currentTimeMillis());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
final QName generatedQName = retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<QName>()
|
final QName generatedQName = retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<QName>()
|
||||||
{
|
{
|
||||||
@@ -586,11 +586,11 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
}
|
}
|
||||||
System.out.println("Creating new " + refType + " reference definition: " + qNameResult);
|
System.out.println("Creating new " + refType + " reference definition: " + qNameResult);
|
||||||
System.out.println(" params- label: '" + label + "' source: '" + source + "' target: '" + target + "'");
|
System.out.println(" params- label: '" + label + "' source: '" + source + "' target: '" + target + "'");
|
||||||
|
|
||||||
return qNameResult;
|
return qNameResult;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
||||||
{
|
{
|
||||||
public Void execute() throws Throwable
|
public Void execute() throws Throwable
|
||||||
@@ -601,11 +601,11 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
assertNotNull("Custom reference definition from adminService was null.", retrievedRefDefn);
|
assertNotNull("Custom reference definition from adminService was null.", retrievedRefDefn);
|
||||||
assertEquals(generatedQName, retrievedRefDefn.getName());
|
assertEquals(generatedQName, retrievedRefDefn.getName());
|
||||||
assertEquals(refType.equals(CustomReferenceType.PARENT_CHILD), retrievedRefDefn.isChild());
|
assertEquals(refType.equals(CustomReferenceType.PARENT_CHILD), retrievedRefDefn.isChild());
|
||||||
|
|
||||||
// Now we need to use the custom reference.
|
// Now we need to use the custom reference.
|
||||||
// So we apply the aspect containing it to our test records.
|
// So we apply the aspect containing it to our test records.
|
||||||
nodeService.addAspect(testRecord1, ASPECT_CUSTOM_ASSOCIATIONS, null);
|
nodeService.addAspect(testRecord1, ASPECT_CUSTOM_ASSOCIATIONS, null);
|
||||||
|
|
||||||
QName assocsAspectQName = QName.createQName("rmc:customAssocs", namespaceService);
|
QName assocsAspectQName = QName.createQName("rmc:customAssocs", namespaceService);
|
||||||
nodeService.addAspect(testRecord1, assocsAspectQName, null);
|
nodeService.addAspect(testRecord1, assocsAspectQName, null);
|
||||||
|
|
||||||
@@ -618,9 +618,9 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
nodeService.createAssociation(testRecord1, testRecord2, generatedQName);
|
nodeService.createAssociation(testRecord1, testRecord2, generatedQName);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
||||||
{
|
{
|
||||||
public Void execute() throws Throwable
|
public Void execute() throws Throwable
|
||||||
@@ -628,7 +628,7 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
// Read back the reference value to make sure it was correctly applied.
|
// Read back the reference value to make sure it was correctly applied.
|
||||||
List<ChildAssociationRef> childAssocs = nodeService.getChildAssocs(testRecord1);
|
List<ChildAssociationRef> childAssocs = nodeService.getChildAssocs(testRecord1);
|
||||||
List<AssociationRef> retrievedAssocs = nodeService.getTargetAssocs(testRecord1, RegexQNamePattern.MATCH_ALL);
|
List<AssociationRef> retrievedAssocs = nodeService.getTargetAssocs(testRecord1, RegexQNamePattern.MATCH_ALL);
|
||||||
|
|
||||||
Object newlyAddedRef = null;
|
Object newlyAddedRef = null;
|
||||||
if (CustomReferenceType.PARENT_CHILD.equals(refType))
|
if (CustomReferenceType.PARENT_CHILD.equals(refType))
|
||||||
{
|
{
|
||||||
@@ -647,7 +647,7 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
assertNotNull("newlyAddedRef was null.", newlyAddedRef);
|
assertNotNull("newlyAddedRef was null.", newlyAddedRef);
|
||||||
|
|
||||||
// Check that the reference has appeared in the data dictionary
|
// Check that the reference has appeared in the data dictionary
|
||||||
AspectDefinition customAssocsAspect = dictionaryService.getAspect(ASPECT_CUSTOM_ASSOCIATIONS);
|
AspectDefinition customAssocsAspect = dictionaryService.getAspect(ASPECT_CUSTOM_ASSOCIATIONS);
|
||||||
assertNotNull(customAssocsAspect);
|
assertNotNull(customAssocsAspect);
|
||||||
@@ -662,10 +662,10 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
customAssocsAspect.getAssociations().get(generatedQName));
|
customAssocsAspect.getAssociations().get(generatedQName));
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetAllProperties()
|
public void testGetAllProperties()
|
||||||
{
|
{
|
||||||
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
||||||
@@ -678,17 +678,17 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
for (QName prop : props.keySet())
|
for (QName prop : props.keySet())
|
||||||
{
|
{
|
||||||
System.out.println(" - " + prop.toString());
|
System.out.println(" - " + prop.toString());
|
||||||
|
|
||||||
String propId = props.get(prop).getTitle();
|
String propId = props.get(prop).getTitle(dictionaryService);
|
||||||
assertNotNull("null client-id for " + prop, propId);
|
assertNotNull("null client-id for " + prop, propId);
|
||||||
|
|
||||||
System.out.println(" " + propId);
|
System.out.println(" " + propId);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetAllReferences()
|
public void testGetAllReferences()
|
||||||
{
|
{
|
||||||
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
||||||
@@ -701,15 +701,15 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
for (QName reference : references.keySet())
|
for (QName reference : references.keySet())
|
||||||
{
|
{
|
||||||
System.out.println(" - " + reference.toString());
|
System.out.println(" - " + reference.toString());
|
||||||
System.out.println(" " + references.get(reference).getTitle());
|
System.out.println(" " + references.get(reference).getTitle(dictionaryService));
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetAllConstraints()
|
public void testGetAllConstraints()
|
||||||
{
|
{
|
||||||
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
||||||
{
|
{
|
||||||
public Void execute() throws Throwable
|
public Void execute() throws Throwable
|
||||||
@@ -720,18 +720,18 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
for (ConstraintDefinition constraint : constraints)
|
for (ConstraintDefinition constraint : constraints)
|
||||||
{
|
{
|
||||||
System.out.println(" - " + constraint.getName());
|
System.out.println(" - " + constraint.getName());
|
||||||
System.out.println(" " + constraint.getTitle());
|
System.out.println(" " + constraint.getTitle(dictionaryService));
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean beforeMarker = false;
|
private boolean beforeMarker = false;
|
||||||
private boolean onMarker = false;
|
private boolean onMarker = false;
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
private boolean inTest = false;
|
private boolean inTest = false;
|
||||||
|
|
||||||
public void testCreateReference() throws Exception
|
public void testCreateReference() throws Exception
|
||||||
{
|
{
|
||||||
inTest = true;
|
inTest = true;
|
||||||
@@ -746,44 +746,44 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
NodeRef rec2 = utils.createRecord(rmFolder, "testRecordB" + System.currentTimeMillis());
|
NodeRef rec2 = utils.createRecord(rmFolder, "testRecordB" + System.currentTimeMillis());
|
||||||
Pair<NodeRef, NodeRef> result = new Pair<NodeRef, NodeRef>(rec1, rec2);
|
Pair<NodeRef, NodeRef> result = new Pair<NodeRef, NodeRef>(rec1, rec2);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
final NodeRef testRecord1 = testRecords.getFirst();
|
final NodeRef testRecord1 = testRecords.getFirst();
|
||||||
final NodeRef testRecord2 = testRecords.getSecond();
|
final NodeRef testRecord2 = testRecords.getSecond();
|
||||||
|
|
||||||
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
||||||
{
|
{
|
||||||
public Void execute() throws Throwable
|
public Void execute() throws Throwable
|
||||||
{
|
{
|
||||||
utils.declareRecord(testRecord1);
|
utils.declareRecord(testRecord1);
|
||||||
utils.declareRecord(testRecord2);
|
utils.declareRecord(testRecord2);
|
||||||
|
|
||||||
policyComponent.bindClassBehaviour(
|
policyComponent.bindClassBehaviour(
|
||||||
RecordsManagementPolicies.BEFORE_CREATE_REFERENCE,
|
RecordsManagementPolicies.BEFORE_CREATE_REFERENCE,
|
||||||
this,
|
this,
|
||||||
new JavaBehaviour(RecordsManagementAdminServiceImplTest.this, "beforeCreateReference", NotificationFrequency.EVERY_EVENT));
|
new JavaBehaviour(RecordsManagementAdminServiceImplTest.this, "beforeCreateReference", NotificationFrequency.EVERY_EVENT));
|
||||||
policyComponent.bindClassBehaviour(
|
policyComponent.bindClassBehaviour(
|
||||||
RecordsManagementPolicies.ON_CREATE_REFERENCE,
|
RecordsManagementPolicies.ON_CREATE_REFERENCE,
|
||||||
this,
|
this,
|
||||||
new JavaBehaviour(RecordsManagementAdminServiceImplTest.this, "onCreateReference", NotificationFrequency.EVERY_EVENT));
|
new JavaBehaviour(RecordsManagementAdminServiceImplTest.this, "onCreateReference", NotificationFrequency.EVERY_EVENT));
|
||||||
|
|
||||||
assertFalse(beforeMarker);
|
assertFalse(beforeMarker);
|
||||||
assertFalse(onMarker);
|
assertFalse(onMarker);
|
||||||
|
|
||||||
adminService.addCustomReference(testRecord1, testRecord2, CUSTOM_REF_VERSIONS);
|
adminService.addCustomReference(testRecord1, testRecord2, CUSTOM_REF_VERSIONS);
|
||||||
|
|
||||||
assertTrue(beforeMarker);
|
assertTrue(beforeMarker);
|
||||||
assertTrue(onMarker);
|
assertTrue(onMarker);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
inTest = false;
|
inTest = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void beforeCreateReference(NodeRef fromNodeRef, NodeRef toNodeRef, QName reference)
|
public void beforeCreateReference(NodeRef fromNodeRef, NodeRef toNodeRef, QName reference)
|
||||||
{
|
{
|
||||||
beforeMarker = true;
|
beforeMarker = true;
|
||||||
@@ -793,7 +793,7 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
{
|
{
|
||||||
onMarker = true;
|
onMarker = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testCreateCustomConstraints() throws Exception
|
public void testCreateCustomConstraints() throws Exception
|
||||||
{
|
{
|
||||||
final int beforeCnt =
|
final int beforeCnt =
|
||||||
@@ -804,65 +804,65 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
List<ConstraintDefinition> result = adminService.getCustomConstraintDefinitions(RecordsManagementCustomModel.RM_CUSTOM_MODEL);
|
List<ConstraintDefinition> result = adminService.getCustomConstraintDefinitions(RecordsManagementCustomModel.RM_CUSTOM_MODEL);
|
||||||
assertNotNull(result);
|
assertNotNull(result);
|
||||||
return result.size();
|
return result.size();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
final String conTitle = "test title - "+testRunID;
|
final String conTitle = "test title - "+testRunID;
|
||||||
final List<String> allowedValues = new ArrayList<String>(3);
|
final List<String> allowedValues = new ArrayList<String>(3);
|
||||||
allowedValues.add("RED");
|
allowedValues.add("RED");
|
||||||
allowedValues.add("AMBER");
|
allowedValues.add("AMBER");
|
||||||
allowedValues.add("GREEN");
|
allowedValues.add("GREEN");
|
||||||
|
|
||||||
final QName testCon = retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<QName>()
|
final QName testCon = retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<QName>()
|
||||||
{
|
{
|
||||||
public QName execute() throws Throwable
|
public QName execute() throws Throwable
|
||||||
{
|
{
|
||||||
String conLocalName = "test-"+testRunID;
|
String conLocalName = "test-"+testRunID;
|
||||||
|
|
||||||
final QName result = QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, conLocalName);
|
final QName result = QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, conLocalName);
|
||||||
|
|
||||||
adminService.addCustomConstraintDefinition(result, conTitle, true, allowedValues, MatchLogic.AND);
|
adminService.addCustomConstraintDefinition(result, conTitle, true, allowedValues, MatchLogic.AND);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// Set the current security context as System - to see allowed values (unless caveat config is also updated for admin)
|
// Set the current security context as System - to see allowed values (unless caveat config is also updated for admin)
|
||||||
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getSystemUserName());
|
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getSystemUserName());
|
||||||
|
|
||||||
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
||||||
{
|
{
|
||||||
public Void execute() throws Throwable
|
public Void execute() throws Throwable
|
||||||
{
|
{
|
||||||
List<ConstraintDefinition> customConstraintDefs = adminService.getCustomConstraintDefinitions(RecordsManagementCustomModel.RM_CUSTOM_MODEL);
|
List<ConstraintDefinition> customConstraintDefs = adminService.getCustomConstraintDefinitions(RecordsManagementCustomModel.RM_CUSTOM_MODEL);
|
||||||
assertEquals(beforeCnt+1, customConstraintDefs.size());
|
assertEquals(beforeCnt+1, customConstraintDefs.size());
|
||||||
|
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
for (ConstraintDefinition conDef : customConstraintDefs)
|
for (ConstraintDefinition conDef : customConstraintDefs)
|
||||||
{
|
{
|
||||||
if (conDef.getName().equals(testCon))
|
if (conDef.getName().equals(testCon))
|
||||||
{
|
{
|
||||||
assertEquals(conTitle, conDef.getTitle());
|
assertEquals(conTitle, conDef.getTitle(dictionaryService));
|
||||||
|
|
||||||
Constraint con = conDef.getConstraint();
|
Constraint con = conDef.getConstraint();
|
||||||
assertTrue(con instanceof RMListOfValuesConstraint);
|
assertTrue(con instanceof RMListOfValuesConstraint);
|
||||||
|
|
||||||
assertEquals("LIST", ((RMListOfValuesConstraint)con).getType());
|
assertEquals("LIST", ((RMListOfValuesConstraint)con).getType());
|
||||||
assertEquals(3, ((RMListOfValuesConstraint)con).getAllowedValues().size());
|
assertEquals(3, ((RMListOfValuesConstraint)con).getAllowedValues().size());
|
||||||
|
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assertTrue(found);
|
assertTrue(found);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Set the current security context as admin
|
// Set the current security context as admin
|
||||||
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
|
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
|
||||||
|
|
||||||
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
||||||
{
|
{
|
||||||
public Void execute() throws Throwable
|
public Void execute() throws Throwable
|
||||||
@@ -870,55 +870,55 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
allowedValues.clear();
|
allowedValues.clear();
|
||||||
allowedValues.add("RED");
|
allowedValues.add("RED");
|
||||||
allowedValues.add("YELLOW");
|
allowedValues.add("YELLOW");
|
||||||
|
|
||||||
adminService.changeCustomConstraintValues(testCon, allowedValues);
|
adminService.changeCustomConstraintValues(testCon, allowedValues);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set the current security context as System - to see allowed values (unless caveat config is also updated for admin)
|
// Set the current security context as System - to see allowed values (unless caveat config is also updated for admin)
|
||||||
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getSystemUserName());
|
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getSystemUserName());
|
||||||
|
|
||||||
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
||||||
{
|
{
|
||||||
public Void execute() throws Throwable
|
public Void execute() throws Throwable
|
||||||
{
|
{
|
||||||
List<ConstraintDefinition> customConstraintDefs = adminService.getCustomConstraintDefinitions(RecordsManagementCustomModel.RM_CUSTOM_MODEL);
|
List<ConstraintDefinition> customConstraintDefs = adminService.getCustomConstraintDefinitions(RecordsManagementCustomModel.RM_CUSTOM_MODEL);
|
||||||
assertEquals(beforeCnt+1, customConstraintDefs.size());
|
assertEquals(beforeCnt+1, customConstraintDefs.size());
|
||||||
|
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
for (ConstraintDefinition conDef : customConstraintDefs)
|
for (ConstraintDefinition conDef : customConstraintDefs)
|
||||||
{
|
{
|
||||||
if (conDef.getName().equals(testCon))
|
if (conDef.getName().equals(testCon))
|
||||||
{
|
{
|
||||||
assertEquals(conTitle, conDef.getTitle());
|
assertEquals(conTitle, conDef.getTitle(dictionaryService));
|
||||||
|
|
||||||
Constraint con = conDef.getConstraint();
|
Constraint con = conDef.getConstraint();
|
||||||
assertTrue(con instanceof RMListOfValuesConstraint);
|
assertTrue(con instanceof RMListOfValuesConstraint);
|
||||||
|
|
||||||
assertEquals("LIST", ((RMListOfValuesConstraint)con).getType());
|
assertEquals("LIST", ((RMListOfValuesConstraint)con).getType());
|
||||||
assertEquals(2, ((RMListOfValuesConstraint)con).getAllowedValues().size());
|
assertEquals(2, ((RMListOfValuesConstraint)con).getAllowedValues().size());
|
||||||
|
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assertTrue(found);
|
assertTrue(found);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Set the current security context as admin
|
// Set the current security context as admin
|
||||||
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
|
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
|
||||||
|
|
||||||
// Add custom property to record with test constraint
|
// Add custom property to record with test constraint
|
||||||
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
||||||
{
|
{
|
||||||
public Void execute() throws Throwable
|
public Void execute() throws Throwable
|
||||||
{
|
{
|
||||||
String propLocalName = "myProp-"+testRunID;
|
String propLocalName = "myProp-"+testRunID;
|
||||||
|
|
||||||
QName dataType = DataTypeDefinition.TEXT;
|
QName dataType = DataTypeDefinition.TEXT;
|
||||||
String propTitle = "My property title";
|
String propTitle = "My property title";
|
||||||
String description = "My property description";
|
String description = "My property description";
|
||||||
@@ -926,11 +926,11 @@ public class RecordsManagementAdminServiceImplTest extends BaseRMTestCase
|
|||||||
boolean multiValued = false;
|
boolean multiValued = false;
|
||||||
boolean mandatory = false;
|
boolean mandatory = false;
|
||||||
boolean isProtected = false;
|
boolean isProtected = false;
|
||||||
|
|
||||||
QName propName = adminService.addCustomPropertyDefinition(null, ASPECT_RECORD, propLocalName, dataType, propTitle, description, defaultValue, multiValued, mandatory, isProtected, testCon);
|
QName propName = adminService.addCustomPropertyDefinition(null, ASPECT_RECORD, propLocalName, dataType, propTitle, description, defaultValue, multiValued, mandatory, isProtected, testCon);
|
||||||
createdCustomProperties.add(propName);
|
createdCustomProperties.add(propName);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user