getPermissionPostProcessors()
+ {
+ return permissionPostProcessors;
+ }
+}
diff --git a/rm-server/source/java/org/alfresco/repo/security/permissions/processor/impl/PermissionPostProcessorBaseImpl.java b/rm-server/source/java/org/alfresco/repo/security/permissions/processor/impl/PermissionPostProcessorBaseImpl.java
new file mode 100644
index 0000000000..3a1944cbdf
--- /dev/null
+++ b/rm-server/source/java/org/alfresco/repo/security/permissions/processor/impl/PermissionPostProcessorBaseImpl.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2005-2015 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 .
+ */
+package org.alfresco.repo.security.permissions.processor.impl;
+
+import org.alfresco.repo.security.permissions.processor.PermissionPostProcessor;
+
+/**
+ * Permission post processor base implementation.
+ *
+ * Helper class that can be extended when providing a custom permission
+ * post processor implementation.
+ *
+ * @author Roy Wetherall
+ * @since 3.0.a
+ */
+public abstract class PermissionPostProcessorBaseImpl extends PermissionProcessorBaseImpl
+ implements PermissionPostProcessor
+{
+ /**
+ * Init method to add this permission extensions to the registry
+ */
+ public void init()
+ {
+ getPermissionProcessorRegistry().addPermissionPostProcessor(this);
+ }
+}
diff --git a/rm-server/source/java/org/alfresco/repo/security/permissions/veto/PermissionVetoBaseImpl.java b/rm-server/source/java/org/alfresco/repo/security/permissions/processor/impl/PermissionPreProcessorBaseImpl.java
similarity index 57%
rename from rm-server/source/java/org/alfresco/repo/security/permissions/veto/PermissionVetoBaseImpl.java
rename to rm-server/source/java/org/alfresco/repo/security/permissions/processor/impl/PermissionPreProcessorBaseImpl.java
index 5ec384e6d7..8bf62d6a62 100644
--- a/rm-server/source/java/org/alfresco/repo/security/permissions/veto/PermissionVetoBaseImpl.java
+++ b/rm-server/source/java/org/alfresco/repo/security/permissions/processor/impl/PermissionPreProcessorBaseImpl.java
@@ -16,30 +16,27 @@
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see .
*/
-package org.alfresco.repo.security.permissions.veto;
+package org.alfresco.repo.security.permissions.processor.impl;
+
+import org.alfresco.repo.security.permissions.processor.PermissionPreProcessor;
/**
+ * Permission pre-processor base implementation.
+ *
+ * Helper class that can be extended when providing a custom permission
+ * pre-processor implementation.
+ *
* @author Roy Wetherall
* @since 3.0.a
*/
-public abstract class PermissionVetoBaseImpl implements PermissionVeto
+public abstract class PermissionPreProcessorBaseImpl extends PermissionProcessorBaseImpl
+ implements PermissionPreProcessor
{
- /** permission veto refistry */
- private PermissionVetoRegistry permissionVetoRegistry;
-
/**
- * @param permissionVetoRegistry permission veto registry
- */
- public void setPermissionVetoRegistry(PermissionVetoRegistry permissionVetoRegistry)
- {
- this.permissionVetoRegistry = permissionVetoRegistry;
- }
-
- /**
- * Init method to add this permission veto to the registry
+ * Init method to add this permission extensions to the registry
*/
public void init()
{
- permissionVetoRegistry.addPermissionVeto(this);
+ getPermissionProcessorRegistry().addPermissionPreProcessor(this);
}
}
diff --git a/rm-server/source/java/org/alfresco/repo/security/permissions/processor/impl/PermissionProcessorBaseImpl.java b/rm-server/source/java/org/alfresco/repo/security/permissions/processor/impl/PermissionProcessorBaseImpl.java
new file mode 100644
index 0000000000..8f0abbb52a
--- /dev/null
+++ b/rm-server/source/java/org/alfresco/repo/security/permissions/processor/impl/PermissionProcessorBaseImpl.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2005-2015 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 .
+ */
+package org.alfresco.repo.security.permissions.processor.impl;
+
+import org.alfresco.repo.security.permissions.processor.PermissionProcessorRegistry;
+
+/**
+ * Commonality found in both pre and post permission processor implementations.
+ *
+ * @author Roy Wetherall
+ * @since 3.0.a
+ */
+/*package*/ abstract class PermissionProcessorBaseImpl
+{
+ /** permission processor registry */
+ private PermissionProcessorRegistry permissionProcessorRegistry;
+
+ /**
+ * @param PermissionProcessorRegistry permission processor registry
+ */
+ public void setPermissionProcessorRegistry(PermissionProcessorRegistry permissionProcessorRegistry)
+ {
+ this.permissionProcessorRegistry = permissionProcessorRegistry;
+ }
+
+ /**
+ * @return {@link PermissionProcessorRegistry} permission processor registry
+ */
+ protected PermissionProcessorRegistry getPermissionProcessorRegistry()
+ {
+ return permissionProcessorRegistry;
+ }
+}