RM-616 (File to (Link to) and Copy to actions missing for categories and folders)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@47592 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2013-03-05 15:00:44 +00:00
parent 5bbb3757e1
commit f2d02f3f31
6 changed files with 260 additions and 55 deletions

View File

@@ -142,4 +142,19 @@
<property name="dispositionActionName" value="cutoff"/>
</bean>
<bean id="capabilityCondition.isRecord"
parent="capabilityCondition.base"
class="org.alfresco.module.org_alfresco_module_rm.capability.declarative.condition.IsRecordCondition">
</bean>
<bean id="capabilityCondition.isRecordFolder"
parent="capabilityCondition.base"
class="org.alfresco.module.org_alfresco_module_rm.capability.declarative.condition.IsRecordFolderCondition">
</bean>
<bean id="capabilityCondition.isRecordCategory"
parent="capabilityCondition.base"
class="org.alfresco.module.org_alfresco_module_rm.capability.declarative.condition.IsRecordCategoryCondition">
</bean>
</beans>

View File

@@ -107,16 +107,54 @@
</bean>
<bean id="rmCopy"
parent="declarativeCapability">
parent="compositeCapability">
<property name="name" value="Copy"/>
<property name="private" value="true"/>
<property name="capabilities">
<list>
<ref bean="rmCopyRecordCapability"/>
<ref bean="rmCopyRecordFolderCapability"/>
<ref bean="rmCopyRecordCategoryCapability"/>
</list>
</property>
<property name="targetCapability" ref="rmCreate" />
</bean>
<bean id="rmCopyRecordCapability"
parent="declarativeCapability">
<property name="name" value="CopyRecord"/>
<property name="private" value="true"/>
<property name="conditions">
<map>
<entry key="capabilityCondition.frozen" value="false"/>
<entry key="capabilityCondition.isRecord" value="true"/>
<entry key="capabilityCondition.recordFiled" value="true"/>
</map>
</property>
<property name="targetCapability" ref="rmCreate" />
</bean>
<bean id="rmCopyRecordFolderCapability"
parent="declarativeCapability">
<property name="name" value="CopyRecordFolder"/>
<property name="private" value="true"/>
<property name="conditions">
<map>
<entry key="capabilityCondition.frozen" value="false"/>
<entry key="capabilityCondition.isRecordFolder" value="true"/>
</map>
</property>
</bean>
<bean id="rmCopyRecordCategoryCapability"
parent="declarativeCapability">
<property name="name" value="CopyRecordCategory"/>
<property name="private" value="true"/>
<property name="conditions">
<map>
<entry key="capabilityCondition.frozen" value="false"/>
<entry key="capabilityCondition.isRecordCategory" value="true"/>
</map>
</property>
</bean>
<bean id="rmImport"

View File

@@ -221,17 +221,37 @@
<property name="capability" value ="UpdateProperties"/>
</bean>
<bean id="jsonConversionComponent.CopyAction"
<bean id="jsonConversionComponent.copyRecordAction"
parent="jsonConversionComponent.baseAction">
<property name="name" value="copy"/>
<property name="name" value="copyRecord"/>
<property name="kinds">
<set>
<value>RECORD_CATEGORY</value>
<value>RECORD_FOLDER</value>
<value>RECORD</value>
</set>
</property>
<property name="capability" value="Copy"/>
<property name="capability" value="CopyRecords"/>
</bean>
<bean id="jsonConversionComponent.copyRecordFolderAction"
parent="jsonConversionComponent.baseAction">
<property name="name" value="copyRecordFolder"/>
<property name="kinds">
<set>
<value>RECORD_FOLDER</value>
</set>
</property>
<property name="capability" value="CopyRecordFolder"/>
</bean>
<bean id="jsonConversionComponent.copyRecordCategoryAction"
parent="jsonConversionComponent.baseAction">
<property name="name" value="copyRecordCategory"/>
<property name="kinds">
<set>
<value>RECORD_CATEGORY</value>
</set>
</property>
<property name="capability" value="CopyRecordCategory"/>
</bean>
<bean id="jsonConversionComponent.moveRecordAction"

View File

@@ -0,0 +1,44 @@
/*
* Copyright (C) 2005-2013 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.module.org_alfresco_module_rm.capability.declarative.condition;
import org.alfresco.module.org_alfresco_module_rm.capability.declarative.AbstractCapabilityCondition;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.util.ParameterCheck;
/**
* Indicates whether the given node is a record category or not.
*
* @author Tuna Aksoy
* @since 2.1
*/
public class IsRecordCategoryCondition extends AbstractCapabilityCondition
{
/**
* @see org.alfresco.module.org_alfresco_module_rm.capability.declarative.CapabilityCondition#evaluate(org.alfresco.service.cmr.repository.NodeRef)
*/
@Override
public boolean evaluate(NodeRef nodeRef)
{
ParameterCheck.mandatory("nodeRef", nodeRef);
return rmService.isRecordCategory(nodeRef);
}
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright (C) 2005-2013 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.module.org_alfresco_module_rm.capability.declarative.condition;
import org.alfresco.module.org_alfresco_module_rm.capability.declarative.AbstractCapabilityCondition;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.util.ParameterCheck;
/**
* Indicates whether the given node is a record or not.
*
* @author Tuna Aksoy
* @since 2.1
*/
public class IsRecordCondition extends AbstractCapabilityCondition
{
/**
* @see org.alfresco.module.org_alfresco_module_rm.capability.declarative.CapabilityCondition#evaluate(org.alfresco.service.cmr.repository.NodeRef)
*/
@Override
public boolean evaluate(NodeRef nodeRef)
{
ParameterCheck.mandatory("nodeRef", nodeRef);
return recordService.isRecord(nodeRef);
}
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright (C) 2005-2013 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.module.org_alfresco_module_rm.capability.declarative.condition;
import org.alfresco.module.org_alfresco_module_rm.capability.declarative.AbstractCapabilityCondition;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.util.ParameterCheck;
/**
* Indicates whether the given node is a record folder or not.
*
* @author Tuna Aksoy
* @since 2.1
*/
public class IsRecordFolderCondition extends AbstractCapabilityCondition
{
/**
* @see org.alfresco.module.org_alfresco_module_rm.capability.declarative.CapabilityCondition#evaluate(org.alfresco.service.cmr.repository.NodeRef)
*/
@Override
public boolean evaluate(NodeRef nodeRef)
{
ParameterCheck.mandatory("nodeRef", nodeRef);
return rmService.isRecordFolder(nodeRef);
}
}