mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-1124 (RM user can create a folder within the unfiled records area)
RM-1125 (RM user can delete a folder within the unfiled records area) RM-1126 (RM user can edit the meta-data of a folder within the unfiled records area) RM-1127 (RM user can view the details of a folder in the unfiled records area) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@60639 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
<value>RECORD_CATEGORY</value>
|
||||
<value>RECORD_FOLDER</value>
|
||||
<value>UNFILED_RECORD_CONTAINER</value>
|
||||
<value>UNFILED_RECORD_CONTAINER_CHILD</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="conditions">
|
||||
|
@@ -95,7 +95,12 @@
|
||||
<title>Unfiled Record Container</title>
|
||||
<parent>rma:recordsManagementContainer</parent>
|
||||
</type>
|
||||
|
||||
|
||||
<type name="rma:unfiledRecordContainerChild">
|
||||
<title>Unfiled Record Container Child</title>
|
||||
<parent>rma:recordsManagementContainer</parent>
|
||||
</type>
|
||||
|
||||
<type name="rma:holdContainer">
|
||||
<title>Hold Container</title>
|
||||
<parent>rma:recordsManagementContainer</parent>
|
||||
|
@@ -217,6 +217,7 @@
|
||||
<value>RECORD_CATEGORY</value>
|
||||
<value>RECORD_FOLDER</value>
|
||||
<value>RECORD</value>
|
||||
<value>UNFILED_RECORD_CONTAINER_CHILD</value>
|
||||
</set>
|
||||
</property>
|
||||
<property name="capability" value ="UpdateProperties"/>
|
||||
@@ -331,6 +332,7 @@
|
||||
<value>RECORD_CATEGORY</value>
|
||||
<value>RECORD_FOLDER</value>
|
||||
<value>RECORD</value>
|
||||
<value>UNFILED_RECORD_CONTAINER_CHILD</value>
|
||||
</set>
|
||||
</property>
|
||||
<property name="capability" value="Delete"/>
|
||||
@@ -345,6 +347,7 @@
|
||||
<value>RECORD_CATEGORY</value>
|
||||
<value>RECORD_FOLDER</value>
|
||||
<value>UNFILED_RECORD_CONTAINER</value>
|
||||
<value>UNFILED_RECORD_CONTAINER_CHILD</value>
|
||||
</set>
|
||||
</property>
|
||||
<property name="capability" value ="ManageAccessRights"/>
|
||||
|
@@ -36,5 +36,6 @@ public enum FilePlanComponentKind
|
||||
TRANSFER,
|
||||
HOLD,
|
||||
DISPOSITION_SCHEDULE,
|
||||
UNFILED_RECORD_CONTAINER;
|
||||
UNFILED_RECORD_CONTAINER,
|
||||
UNFILED_RECORD_CONTAINER_CHILD;
|
||||
}
|
||||
|
@@ -230,6 +230,10 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
|
||||
{
|
||||
result = FilePlanComponentKind.UNFILED_RECORD_CONTAINER;
|
||||
}
|
||||
else if (instanceOf(nodeRef, TYPE_UNFILED_RECORD_CONTAINER_CHILD) == true)
|
||||
{
|
||||
result = FilePlanComponentKind.UNFILED_RECORD_CONTAINER_CHILD;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@@ -27,7 +27,6 @@ import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanComponentKind
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.record.RecordService;
|
||||
import org.alfresco.service.cmr.model.FileInfo;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.security.AccessStatus;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
@@ -156,9 +155,6 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
|
||||
rmNodeValues.put("type", useShortQName ? type.toPrefixString(namespaceService) : type.toString());
|
||||
}
|
||||
|
||||
// Find out if it is an unfiled record container child
|
||||
rmNodeValues.put("isUnfileRecordContainerChild", isUnfileRecordContainerChild(nodeRef));
|
||||
|
||||
// Set the indicators array
|
||||
setIndicators(rmNodeValues, nodeRef);
|
||||
|
||||
@@ -168,25 +164,6 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
|
||||
return rmNodeValues;
|
||||
}
|
||||
|
||||
private boolean isUnfileRecordContainerChild(NodeRef nodeRef)
|
||||
{
|
||||
boolean isUnfileRecordContainerChild = false;
|
||||
|
||||
List<ChildAssociationRef> parentAssocs = nodeService.getParentAssocs(nodeRef);
|
||||
if (parentAssocs.size() == 1)
|
||||
{
|
||||
NodeRef parentNodeRef = parentAssocs.iterator().next().getParentRef();
|
||||
FilePlanComponentKind filePlanComponentKind = filePlanService.getFilePlanComponentKind(parentNodeRef);
|
||||
|
||||
if (filePlanComponentKind != null && filePlanComponentKind.equals(FilePlanComponentKind.RECORD_CATEGORY) == false)
|
||||
{
|
||||
isUnfileRecordContainerChild = true;
|
||||
}
|
||||
}
|
||||
|
||||
return isUnfileRecordContainerChild;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void setIndicators(JSONObject rmNodeValues, NodeRef nodeRef)
|
||||
{
|
||||
@@ -288,6 +265,11 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
|
||||
result = "transfer-container";
|
||||
break;
|
||||
}
|
||||
case UNFILED_RECORD_CONTAINER_CHILD:
|
||||
{
|
||||
result = "unfiled-record-container-child";
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
|
@@ -59,7 +59,10 @@ public interface RecordsManagementModel extends RecordsManagementCustomModel
|
||||
|
||||
// Unfiled record container
|
||||
public static final QName TYPE_UNFILED_RECORD_CONTAINER = QName.createQName(RM_URI, "unfiledRecordContainer");
|
||||
|
||||
|
||||
// Unfiled record container child
|
||||
public static final QName TYPE_UNFILED_RECORD_CONTAINER_CHILD = QName.createQName(RM_URI, "unfiledRecordContainerChild");
|
||||
|
||||
// Hold container
|
||||
public static final QName TYPE_HOLD_CONTAINER = QName.createQName(RM_URI, "holdContainer");
|
||||
|
||||
|
@@ -119,8 +119,8 @@ public class RecordsManagementContainerType extends BaseBehaviourBean
|
||||
NodeRef parentRef = childAssocRef.getParentRef();
|
||||
QName parentType = nodeService.getType(parentRef);
|
||||
boolean isContentSubType = dictionaryService.isSubClass(childType, ContentModel.TYPE_CONTENT);
|
||||
boolean isUnfiledRecordContainerSubType = dictionaryService.isSubClass(parentType, RecordsManagementModel.TYPE_UNFILED_RECORD_CONTAINER);
|
||||
if (isContentSubType == true && isUnfiledRecordContainerSubType == true)
|
||||
boolean isUnfiledRecordContainerChild = parentType.equals(RecordsManagementModel.TYPE_UNFILED_RECORD_CONTAINER_CHILD);
|
||||
if (isContentSubType == true && isUnfiledRecordContainerChild == true)
|
||||
{
|
||||
if (nodeService.hasAspect(child, ASPECT_FILE_PLAN_COMPONENT) == false)
|
||||
{
|
||||
|
Reference in New Issue
Block a user