RM: Added CompositeCapability interface

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@58782 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2013-12-10 02:47:42 +00:00
parent 640c41c676
commit 01200bd1cd
10 changed files with 68 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
* Copyright (C) 2005-2013 Alfresco Software Limited.
*
* This file is part of Alfresco
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
* Copyright (C) 2005-2013 Alfresco Software Limited.
*
* This file is part of Alfresco
*

View File

@@ -0,0 +1,37 @@
/*
* 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;
import java.util.Set;
/**
* Composite capability Interface.
*
* @author Roy Wetherall
* @since 2.2
*/
public interface CompositeCapability extends Capability
{
/**
* Get set of child capabilities.
*
* @return {@link Set}<{@link Capability}> set of child capabilities.
*/
Set<Capability> getCapabilities();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2012 Alfresco Software Limited.
* Copyright (C) 2005-2013 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -18,11 +18,12 @@
*/
package org.alfresco.module.org_alfresco_module_rm.capability.declarative;
import java.util.List;
import java.util.Set;
import net.sf.acegisecurity.vote.AccessDecisionVoter;
import org.alfresco.module.org_alfresco_module_rm.capability.Capability;
import org.alfresco.module.org_alfresco_module_rm.capability.CompositeCapability;
import org.alfresco.service.cmr.repository.NodeRef;
/**
@@ -30,19 +31,29 @@ import org.alfresco.service.cmr.repository.NodeRef;
*
* @author Roy Wetherall
*/
public class CompositeCapability extends DeclarativeCapability
public class DeclarativeCompositeCapability extends DeclarativeCapability
implements CompositeCapability
{
/** List of capabilities */
private List<Capability> capabilities;
/** set of capabilities */
private Set<Capability> capabilities;
/**
* @param capabilites list of capabilities
* @param capabilites set of capabilities
*/
public void setCapabilities(List<Capability> capabilities)
public void setCapabilities(Set<Capability> capabilities)
{
this.capabilities = capabilities;
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.capability.CompositeCapability#getCapabilities()
*/
@Override
public Set<Capability> getCapabilities()
{
return this.capabilities;
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.capability.declarative.DeclarativeCapability#evaluateImpl(org.alfresco.service.cmr.repository.NodeRef)
*/

View File

@@ -21,7 +21,7 @@ package org.alfresco.module.org_alfresco_module_rm.capability.impl;
import java.io.Serializable;
import java.util.Map;
import org.alfresco.module.org_alfresco_module_rm.capability.declarative.CompositeCapability;
import org.alfresco.module.org_alfresco_module_rm.capability.declarative.DeclarativeCompositeCapability;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
@@ -30,7 +30,7 @@ import org.alfresco.service.namespace.QName;
*
* @author andyh
*/
public class UpdateCapability extends CompositeCapability
public class UpdateCapability extends DeclarativeCompositeCapability
{
/**
*

View File

@@ -21,7 +21,7 @@ package org.alfresco.module.org_alfresco_module_rm.capability.impl;
import java.io.Serializable;
import java.util.Map;
import org.alfresco.module.org_alfresco_module_rm.capability.declarative.CompositeCapability;
import org.alfresco.module.org_alfresco_module_rm.capability.declarative.DeclarativeCompositeCapability;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
@@ -30,7 +30,7 @@ import org.alfresco.service.namespace.QName;
*
* @author andyh
*/
public class UpdatePropertiesCapability extends CompositeCapability
public class UpdatePropertiesCapability extends DeclarativeCompositeCapability
{
/**
* Evaluate capability, taking into account the protected properties.