RM-2320 Java API for getExemptionCategories.

Also RM-2321 automation testing for the initial loading of exemption
categories.

+review RM

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@106565 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tom Page
2015-06-19 14:28:20 +00:00
parent 19762c52c8
commit 3bcad6ee1e
6 changed files with 108 additions and 0 deletions

View File

@@ -71,4 +71,11 @@ public interface ClassificationSchemeService
* @throws ReasonIdNotFound If the given classification reason id is not found
*/
ClassificationReason getClassificationReasonById(String classificationReasonId) throws ReasonIdNotFound;
/**
* Returns an immutable list of the defined exemption categories.
*
* @return The exemption categories in the order that they are defined.
*/
List<ExemptionCategory> getExemptionCategories();
}

View File

@@ -40,6 +40,8 @@ public class ClassificationSchemeServiceImpl extends ServiceBaseImpl implements
private ClassificationLevelManager levelManager;
/** The classification reasons currently configured in this server. */
private ClassificationReasonManager reasonManager;
/** The exemption categories currently configured in this server. */
private ExemptionCategoryManager exemptionCategoryManager;
private SecurityClearanceService securityClearanceService;
private ClassificationServiceBootstrap classificationServiceBootstrap;
@@ -52,6 +54,7 @@ public class ClassificationSchemeServiceImpl extends ServiceBaseImpl implements
{
levelManager = classificationServiceBootstrap.getClassificationLevelManager();
reasonManager = classificationServiceBootstrap.getClassificationReasonManager();
exemptionCategoryManager = classificationServiceBootstrap.getExemptionCategoryManager();
}
/**
@@ -112,4 +115,11 @@ public class ClassificationSchemeServiceImpl extends ServiceBaseImpl implements
checkNotBlank("classificationReasonId", classificationReasonId);
return reasonManager.findReasonById(classificationReasonId);
}
@Override
public List<ExemptionCategory> getExemptionCategories()
{
return (exemptionCategoryManager == null ? Collections.<ExemptionCategory>emptyList() :
Collections.unmodifiableList(exemptionCategoryManager.getExemptionCategories()));
}
}

View File

@@ -27,6 +27,7 @@ import org.alfresco.module.org_alfresco_module_rm.classification.ClassificationE
* Container for the configured {@link ExemptionCategory} objects.
*
* @author tpage
* @since 3.0
*/
public class ExemptionCategoryManager
{