ALF-4106: Removed 'Auditable' annotation's KEY field

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22209 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2010-09-02 21:07:31 +00:00
parent fa1818c5fa
commit 0d052c414e
22 changed files with 429 additions and 430 deletions

View File

@@ -16,7 +16,10 @@
* You should have received a copy of the GNU Lesser General Public License * You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>. * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/ */
package org.alfresco.service; package org.alfresco.repo.audit;
import org.alfresco.service.Auditable;
import org.alfresco.service.PublicService;
/** /**
* An interface to test the use of the auditable annotation. * An interface to test the use of the auditable annotation.
@@ -29,9 +32,9 @@ public interface AnnotationTestInterface
@Auditable() @Auditable()
public void noArgs(); public void noArgs();
@Auditable(key = Auditable.Key.ARG_0, parameters = {"one", "two"}) @Auditable(parameters = {"one", "two"})
public String getString(String one, String two); public String getString(String one, String two);
@Auditable(key = Auditable.Key.ARG_0, parameters = {"one"}) @Auditable(parameters = {"one"})
public String getAnotherString(String one); public String getAnotherString(String one);
} }

View File

@@ -33,6 +33,7 @@ public class AuditTestSuite extends TestSuite
{ {
TestSuite suite = new TestSuite(); TestSuite suite = new TestSuite();
suite.addTestSuite(AuditableAnnotationTest.class);
suite.addTestSuite(AuditableAspectTest.class); suite.addTestSuite(AuditableAspectTest.class);
suite.addTestSuite(AuditBootstrapTest.class); suite.addTestSuite(AuditBootstrapTest.class);
suite.addTestSuite(AuditComponentTest.class); suite.addTestSuite(AuditComponentTest.class);

View File

@@ -16,26 +16,26 @@
* You should have received a copy of the GNU Lesser General Public License * You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>. * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/ */
package org.alfresco.service; package org.alfresco.repo.audit;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import junit.framework.TestCase; import junit.framework.TestCase;
public class AnnotationTest extends TestCase import org.alfresco.service.Auditable;
/**
* @author Andy Hind
*/
public class AuditableAnnotationTest extends TestCase
{ {
public AnnotationTest() public AuditableAnnotationTest()
{ {
super(); super();
} }
public AnnotationTest(String arg0) @SuppressWarnings("unchecked")
{
super(arg0);
}
public void testAnnotations() throws Exception, NoSuchMethodException public void testAnnotations() throws Exception, NoSuchMethodException
{ {
Class clazz = AnnotationTestInterface.class; Class clazz = AnnotationTestInterface.class;
@@ -43,14 +43,12 @@ public class AnnotationTest extends TestCase
Method method = clazz.getMethod("noArgs", new Class[]{}); Method method = clazz.getMethod("noArgs", new Class[]{});
assertTrue(method.isAnnotationPresent(Auditable.class)); assertTrue(method.isAnnotationPresent(Auditable.class));
Auditable auditable = method.getAnnotation(Auditable.class); Auditable auditable = method.getAnnotation(Auditable.class);
assertEquals(auditable.key(), Auditable.Key.NO_KEY);
assertEquals(auditable.parameters().length, 0); assertEquals(auditable.parameters().length, 0);
method = clazz.getMethod("getString", new Class[]{String.class, String.class}); method = clazz.getMethod("getString", new Class[]{String.class, String.class});
assertTrue(method.isAnnotationPresent(Auditable.class)); assertTrue(method.isAnnotationPresent(Auditable.class));
auditable = method.getAnnotation(Auditable.class); auditable = method.getAnnotation(Auditable.class);
assertEquals(auditable.key(), Auditable.Key.ARG_0);
assertEquals(auditable.parameters().length, 2); assertEquals(auditable.parameters().length, 2);
assertEquals(auditable.parameters()[0], "one"); assertEquals(auditable.parameters()[0], "one");
assertEquals(auditable.parameters()[1], "two"); assertEquals(auditable.parameters()[1], "two");
@@ -59,10 +57,7 @@ public class AnnotationTest extends TestCase
method = clazz.getMethod("getAnotherString", new Class[]{String.class}); method = clazz.getMethod("getAnotherString", new Class[]{String.class});
assertTrue(method.isAnnotationPresent(Auditable.class)); assertTrue(method.isAnnotationPresent(Auditable.class));
auditable = method.getAnnotation(Auditable.class); auditable = method.getAnnotation(Auditable.class);
assertEquals(auditable.key(), Auditable.Key.ARG_0);
assertEquals(auditable.parameters().length, 1); assertEquals(auditable.parameters().length, 1);
assertEquals(auditable.parameters()[0], "one"); assertEquals(auditable.parameters()[0], "one");
} }
} }

View File

@@ -58,7 +58,7 @@ public interface ActionService
* @param nodeRef the node reference * @param nodeRef the node reference
* @return a list of applicable action definitions * @return a list of applicable action definitions
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
List<ActionDefinition> getActionDefinitions(NodeRef nodeRef); List<ActionDefinition> getActionDefinitions(NodeRef nodeRef);
/** /**
@@ -156,7 +156,7 @@ public interface ActionService
* @param action the action * @param action the action
* @param actionedUponNodeRef the actioned upon node reference * @param actionedUponNodeRef the actioned upon node reference
*/ */
@Auditable(key = Auditable.Key.ARG_1, parameters = {"action", "actionedUponNodeRef" }) @Auditable(parameters = {"action", "actionedUponNodeRef" })
void executeAction(Action action, NodeRef actionedUponNodeRef); void executeAction(Action action, NodeRef actionedUponNodeRef);
/** /**
@@ -168,7 +168,7 @@ public interface ActionService
* @param actionedUponNodeRef the actioned upon node reference * @param actionedUponNodeRef the actioned upon node reference
* @param checkConditions indicates whether the conditions should be checked * @param checkConditions indicates whether the conditions should be checked
*/ */
@Auditable(key = Auditable.Key.ARG_1, parameters = {"action", "actionedUponNodeRef", "checkConditions" }) @Auditable(parameters = {"action", "actionedUponNodeRef", "checkConditions" })
void executeAction(Action action, NodeRef actionedUponNodeRef, boolean checkConditions); void executeAction(Action action, NodeRef actionedUponNodeRef, boolean checkConditions);
/** /**
@@ -190,7 +190,7 @@ public interface ActionService
* @param executeAsynchronously indicates whether the action should be executed asychronously or not, this value overrides * @param executeAsynchronously indicates whether the action should be executed asychronously or not, this value overrides
* the value set on the action its self * the value set on the action its self
*/ */
@Auditable(key = Auditable.Key.ARG_1, parameters = {"action", "actionedUponNodeRef", "checkConditions", "executeAsynchronously" }) @Auditable(parameters = {"action", "actionedUponNodeRef", "checkConditions", "executeAsynchronously" })
void executeAction(Action action, NodeRef actionedUponNodeRef, boolean checkConditions, boolean executeAsynchronously); void executeAction(Action action, NodeRef actionedUponNodeRef, boolean checkConditions, boolean executeAsynchronously);
/** /**
@@ -205,7 +205,7 @@ public interface ActionService
* @param actionedUponNodeRef the actioned upon node reference * @param actionedUponNodeRef the actioned upon node reference
* @return true if the condition succeeds, false otherwise * @return true if the condition succeeds, false otherwise
*/ */
@Auditable(key = Auditable.Key.ARG_1, parameters = {"action", "actionedUponNodeRef" }) @Auditable(parameters = {"action", "actionedUponNodeRef" })
boolean evaluateAction(Action action, NodeRef actionedUponNodeRef); boolean evaluateAction(Action action, NodeRef actionedUponNodeRef);
/** /**
@@ -215,7 +215,7 @@ public interface ActionService
* @param actionedUponNodeRef the actioned upon node reference * @param actionedUponNodeRef the actioned upon node reference
* @return true if the condition succeeds, false otherwise * @return true if the condition succeeds, false otherwise
*/ */
@Auditable(key = Auditable.Key.ARG_1, parameters = {"condition", "actionedUponNodeRef" }) @Auditable(parameters = {"condition", "actionedUponNodeRef" })
boolean evaluateActionCondition(ActionCondition condition, NodeRef actionedUponNodeRef); boolean evaluateActionCondition(ActionCondition condition, NodeRef actionedUponNodeRef);
/** /**
@@ -228,7 +228,7 @@ public interface ActionService
* @param nodeRef the node reference * @param nodeRef the node reference
* @param action the action * @param action the action
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "action" }) @Auditable(parameters = {"nodeRef", "action" })
void saveAction(NodeRef nodeRef, Action action); void saveAction(NodeRef nodeRef, Action action);
/** /**
@@ -237,7 +237,7 @@ public interface ActionService
* @param nodeRef the node reference * @param nodeRef the node reference
* @return the list of actions * @return the list of actions
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
List<Action> getActions(NodeRef nodeRef); List<Action> getActions(NodeRef nodeRef);
/** /**
@@ -249,7 +249,7 @@ public interface ActionService
* @param actionId the action id * @param actionId the action id
* @return the action * @return the action
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "actionId"}) @Auditable(parameters = {"nodeRef", "actionId"})
Action getAction(NodeRef nodeRef, String actionId); Action getAction(NodeRef nodeRef, String actionId);
/** /**
@@ -258,7 +258,7 @@ public interface ActionService
* @param nodeRef the node reference * @param nodeRef the node reference
* @param action the action * @param action the action
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "action" }) @Auditable(parameters = {"nodeRef", "action" })
void removeAction(NodeRef nodeRef, Action action); void removeAction(NodeRef nodeRef, Action action);
/** /**
@@ -266,7 +266,7 @@ public interface ActionService
* *
* @param nodeRef the node reference * @param nodeRef the node reference
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
void removeAllActions(NodeRef nodeRef); void removeAllActions(NodeRef nodeRef);
} }

View File

@@ -58,7 +58,7 @@ public interface CheckOutCheckInService
* the working copy * the working copy
* @return node reference to the created working copy * @return node reference to the created working copy
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "destinationParentNodeRef", "destinationAssocTypeQName", "destinationAssocQName"}) @Auditable(parameters = {"nodeRef", "destinationParentNodeRef", "destinationAssocTypeQName", "destinationAssocQName"})
public NodeRef checkout( public NodeRef checkout(
NodeRef nodeRef, NodeRef nodeRef,
NodeRef destinationParentNodeRef, NodeRef destinationParentNodeRef,
@@ -74,7 +74,7 @@ public interface CheckOutCheckInService
* @param nodeRef a reference to the node to checkout * @param nodeRef a reference to the node to checkout
* @return a node reference to the created working copy * @return a node reference to the created working copy
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public NodeRef checkout(NodeRef nodeRef); public NodeRef checkout(NodeRef nodeRef);
/** /**
@@ -107,7 +107,7 @@ public interface CheckOutCheckInService
* @return the node reference to the original node, updated with the checked in * @return the node reference to the original node, updated with the checked in
* state * state
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"workingCopyNodeRef", "versionProperties", "contentUrl", "keepCheckedOut"}) @Auditable(parameters = {"workingCopyNodeRef", "versionProperties", "contentUrl", "keepCheckedOut"})
public NodeRef checkin( public NodeRef checkin(
NodeRef workingCopyNodeRef, NodeRef workingCopyNodeRef,
Map<String,Serializable> versionProperties, Map<String,Serializable> versionProperties,
@@ -128,7 +128,7 @@ public interface CheckOutCheckInService
* @return the node reference to the original node, updated with the checked in * @return the node reference to the original node, updated with the checked in
* state * state
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"workingCopyNodeRef", "versionProperties", "contentUrl"}) @Auditable(parameters = {"workingCopyNodeRef", "versionProperties", "contentUrl"})
public NodeRef checkin( public NodeRef checkin(
NodeRef workingCopyNodeRef, NodeRef workingCopyNodeRef,
Map<String, Serializable> versionProperties, Map<String, Serializable> versionProperties,
@@ -146,7 +146,7 @@ public interface CheckOutCheckInService
* @return the node reference to the original node, updated with the checked in * @return the node reference to the original node, updated with the checked in
* state * state
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"workingCopyNodeRef", "versionProperties"}) @Auditable(parameters = {"workingCopyNodeRef", "versionProperties"})
public NodeRef checkin( public NodeRef checkin(
NodeRef workingCopyNodeRef, NodeRef workingCopyNodeRef,
Map<String, Serializable> versionProperties); Map<String, Serializable> versionProperties);
@@ -164,7 +164,7 @@ public interface CheckOutCheckInService
* @param workingCopyNodeRef the working copy node reference * @param workingCopyNodeRef the working copy node reference
* @return the original node reference * @return the original node reference
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"workingCopyNodeRef"}) @Auditable(parameters = {"workingCopyNodeRef"})
public NodeRef cancelCheckout(NodeRef workingCopyNodeRef); public NodeRef cancelCheckout(NodeRef workingCopyNodeRef);
/** /**
@@ -175,6 +175,6 @@ public interface CheckOutCheckInService
* @param nodeRef a node reference * @param nodeRef a node reference
* @return the working copy node reference or null if none. * @return the working copy node reference or null if none.
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public NodeRef getWorkingCopy(NodeRef nodeRef); public NodeRef getWorkingCopy(NodeRef nodeRef);
} }

View File

@@ -55,6 +55,6 @@ public interface EmailService
* @param message the email message * @param message the email message
* @throws EmailMessageRejectException if the message is rejected for <b>any</b> reason * @throws EmailMessageRejectException if the message is rejected for <b>any</b> reason
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = { "nodeRef", "message" }) @Auditable(parameters = { "nodeRef", "message" })
void importMessage(NodeRef nodeRef, EmailMessage message); void importMessage(NodeRef nodeRef, EmailMessage message);
} }

View File

@@ -51,7 +51,7 @@ public interface LockService
* @throws UnableToAquireLockException * @throws UnableToAquireLockException
* thrown if the lock could not be obtained * thrown if the lock could not be obtained
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "lockType"}) @Auditable(parameters = {"nodeRef", "lockType"})
public void lock(NodeRef nodeRef, LockType lockType) public void lock(NodeRef nodeRef, LockType lockType)
throws UnableToAquireLockException; throws UnableToAquireLockException;
@@ -76,7 +76,7 @@ public interface LockService
* @throws UnableToAquireLockException * @throws UnableToAquireLockException
* thrown if the lock could not be obtained * thrown if the lock could not be obtained
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "lockType", "timeToExpire"}) @Auditable(parameters = {"nodeRef", "lockType", "timeToExpire"})
public void lock(NodeRef nodeRef, LockType lockType, int timeToExpire) public void lock(NodeRef nodeRef, LockType lockType, int timeToExpire)
throws UnableToAquireLockException; throws UnableToAquireLockException;
@@ -108,7 +108,7 @@ public interface LockService
* @throws UnableToAquireLockException * @throws UnableToAquireLockException
* thrown if the lock could not be obtained * thrown if the lock could not be obtained
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "lockType", "timeToExpire", "lockChildren"}) @Auditable(parameters = {"nodeRef", "lockType", "timeToExpire", "lockChildren"})
public void lock(NodeRef nodeRef, LockType lockType, int timeToExpire, boolean lockChildren) public void lock(NodeRef nodeRef, LockType lockType, int timeToExpire, boolean lockChildren)
throws UnableToAquireLockException; throws UnableToAquireLockException;
@@ -147,7 +147,7 @@ public interface LockService
* @throws UnableToReleaseLockException * @throws UnableToReleaseLockException
* thrown if the lock could not be released * thrown if the lock could not be released
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public void unlock(NodeRef nodeRef) public void unlock(NodeRef nodeRef)
throws UnableToReleaseLockException; throws UnableToReleaseLockException;
@@ -170,7 +170,7 @@ public interface LockService
* @throws UnableToReleaseLockException * @throws UnableToReleaseLockException
* thrown if the lock could not be released * thrown if the lock could not be released
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "lockChildren"}) @Auditable(parameters = {"nodeRef", "lockChildren"})
public void unlock(NodeRef nodeRef, boolean lockChildren) public void unlock(NodeRef nodeRef, boolean lockChildren)
throws UnableToReleaseLockException; throws UnableToReleaseLockException;
@@ -204,7 +204,7 @@ public interface LockService
* @param nodeRef the node reference * @param nodeRef the node reference
* @return the lock status * @return the lock status
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public LockStatus getLockStatus(NodeRef nodeRef); public LockStatus getLockStatus(NodeRef nodeRef);
@@ -216,7 +216,7 @@ public interface LockService
* @param nodeRef the node reference * @param nodeRef the node reference
* @return the lock status * @return the lock status
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "userName"}) @Auditable(parameters = {"nodeRef", "userName"})
public LockStatus getLockStatus(NodeRef nodeRef, String userName); public LockStatus getLockStatus(NodeRef nodeRef, String userName);
/** /**
@@ -230,7 +230,7 @@ public interface LockService
* @return the lock type, null is returned if the object in question has no * @return the lock type, null is returned if the object in question has no
* lock * lock
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public LockType getLockType(NodeRef nodeRef); public LockType getLockType(NodeRef nodeRef);
/** /**
@@ -243,7 +243,7 @@ public interface LockService
* thrown if the node is locked. This is based on the lock status of the lock, * thrown if the node is locked. This is based on the lock status of the lock,
* the user ref and the lock type. * the user ref and the lock type.
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public void checkForLock(NodeRef nodeRef); public void checkForLock(NodeRef nodeRef);
/** /**
@@ -252,7 +252,7 @@ public interface LockService
* @param storeRef the store reference * @param storeRef the store reference
* @return a list of nodes that the current user has locked. * @return a list of nodes that the current user has locked.
*/ */
@Auditable(key = Auditable.Key.ARG_0,parameters = {"storeRef"}) @Auditable(parameters = {"storeRef"})
public List<NodeRef> getLocks(StoreRef storeRef); public List<NodeRef> getLocks(StoreRef storeRef);
/** /**
@@ -263,6 +263,6 @@ public interface LockService
* *
* @return a list of nodes that the current user has locked filtered by the lock type provided * @return a list of nodes that the current user has locked filtered by the lock type provided
*/ */
@Auditable(key = Auditable.Key.ARG_0,parameters = {"storeRef", "lockType"}) @Auditable(parameters = {"storeRef", "lockType"})
public List<NodeRef> getLocks(StoreRef storeRef, LockType lockType); public List<NodeRef> getLocks(StoreRef storeRef, LockType lockType);
} }

View File

@@ -48,7 +48,7 @@ public interface EditionService
* @param translationNodeRef The specific <b>cm:mlDocument</b> to use as the starting point * @param translationNodeRef The specific <b>cm:mlDocument</b> to use as the starting point
* of the new edition. All other translations will be removed. * of the new edition. All other translations will be removed.
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"translationNodeRef", "versionProperties"}) @Auditable(parameters = {"translationNodeRef", "versionProperties"})
NodeRef createEdition(NodeRef translationNodeRef, Map<String, Serializable> versionProperties); NodeRef createEdition(NodeRef translationNodeRef, Map<String, Serializable> versionProperties);
/** /**
@@ -57,7 +57,7 @@ public interface EditionService
* @param mlContainer An existing <b>cm:mlContainer</b> * @param mlContainer An existing <b>cm:mlContainer</b>
* @return The Version History of the mlContainer * @return The Version History of the mlContainer
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"mlContainer"}) @Auditable(parameters = {"mlContainer"})
VersionHistory getEditions(NodeRef mlContainer); VersionHistory getEditions(NodeRef mlContainer);
/** /**
@@ -66,7 +66,7 @@ public interface EditionService
* @param mlContainerEdition An existing version of a mlContainer * @param mlContainerEdition An existing version of a mlContainer
* @return The list of <b>cm:mlDocument</b> transalation versions of the edition * @return The list of <b>cm:mlDocument</b> transalation versions of the edition
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"mlContainerEdition"}) @Auditable(parameters = {"mlContainerEdition"})
List<VersionHistory> getVersionedTranslations(Version mlContainerEdition); List<VersionHistory> getVersionedTranslations(Version mlContainerEdition);
/** /**
@@ -83,7 +83,7 @@ public interface EditionService
* an existing version of a <b>cm:mlContainer</b> version. * an existing version of a <b>cm:mlContainer</b> version.
* @return The versioned metadata * @return The versioned metadata
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"version"}) @Auditable(parameters = {"version"})
Map<QName, Serializable> getVersionedMetadatas(Version version); Map<QName, Serializable> getVersionedMetadatas(Version version);
} }

View File

@@ -44,7 +44,7 @@ public interface MultilingualContentService
* @param contentNodeRef An existing <b>cm:content</b> * @param contentNodeRef An existing <b>cm:content</b>
* @return Returns <tt>true</tt> if the document has a <b>cm:mlContainer</b> parent * @return Returns <tt>true</tt> if the document has a <b>cm:mlContainer</b> parent
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"contentNodeRef"}) @Auditable(parameters = {"contentNodeRef"})
boolean isTranslation(NodeRef contentNodeRef); boolean isTranslation(NodeRef contentNodeRef);
/** /**
@@ -55,7 +55,7 @@ public interface MultilingualContentService
* *
* @see org.alfresco.model.ContentModel#ASPECT_MULTILINGUAL_DOCUMENT * @see org.alfresco.model.ContentModel#ASPECT_MULTILINGUAL_DOCUMENT
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"contentNodeRef", "locale"}) @Auditable(parameters = {"contentNodeRef", "locale"})
void makeTranslation(NodeRef contentNodeRef, Locale locale); void makeTranslation(NodeRef contentNodeRef, Locale locale);
/** /**
@@ -64,7 +64,7 @@ public interface MultilingualContentService
* *
* @param translationNodeRef an existing <b>cm:mlDocument</b> * @param translationNodeRef an existing <b>cm:mlDocument</b>
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"translationNodeRef"}) @Auditable(parameters = {"translationNodeRef"})
void unmakeTranslation(NodeRef translationNodeRef); void unmakeTranslation(NodeRef translationNodeRef);
/** /**
@@ -74,7 +74,7 @@ public interface MultilingualContentService
* @param newTranslationNodeRef An existing <b>cm:content</b> * @param newTranslationNodeRef An existing <b>cm:content</b>
* @param translationOfNodeRef An existing <b>cm:mlDocument</b> * @param translationOfNodeRef An existing <b>cm:mlDocument</b>
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"newTranslationNodeRef", "translationOfNodeRef", "locale"}) @Auditable(parameters = {"newTranslationNodeRef", "translationOfNodeRef", "locale"})
void addTranslation(NodeRef newTranslationNodeRef, NodeRef translationOfNodeRef, Locale locale); void addTranslation(NodeRef newTranslationNodeRef, NodeRef translationOfNodeRef, Locale locale);
/** /**
@@ -83,7 +83,7 @@ public interface MultilingualContentService
* @param translationNodeRef An existing <b>cm:mlDocument</b> * @param translationNodeRef An existing <b>cm:mlDocument</b>
* @return Returns the <b>cm:mlContainer</b> translation parent * @return Returns the <b>cm:mlContainer</b> translation parent
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"translationNodeRef"}) @Auditable(parameters = {"translationNodeRef"})
NodeRef getTranslationContainer(NodeRef translationNodeRef); NodeRef getTranslationContainer(NodeRef translationNodeRef);
/** /**
@@ -93,7 +93,7 @@ public interface MultilingualContentService
* @param translationOfNodeRef An existing <b>cm:mlDocument</b> or <b>cm:mlContainer</b> * @param translationOfNodeRef An existing <b>cm:mlDocument</b> or <b>cm:mlContainer</b>
* @return Returns a map of translation nodes keyed by locale * @return Returns a map of translation nodes keyed by locale
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"translationOfNodeRef"}) @Auditable(parameters = {"translationOfNodeRef"})
Map<Locale, NodeRef> getTranslations(NodeRef translationOfNodeRef); Map<Locale, NodeRef> getTranslations(NodeRef translationOfNodeRef);
/** /**
@@ -110,7 +110,7 @@ public interface MultilingualContentService
* @see #getTranslations(NodeRef) * @see #getTranslations(NodeRef)
* @see org.springframework.extensions.surf.util.I18NUtil#getNearestLocale(Locale, Set) * @see org.springframework.extensions.surf.util.I18NUtil#getNearestLocale(Locale, Set)
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"translationNodeRef", "locale"}) @Auditable(parameters = {"translationNodeRef", "locale"})
NodeRef getTranslationForLocale(NodeRef translationNodeRef, Locale locale); NodeRef getTranslationForLocale(NodeRef translationNodeRef, Locale locale);
@@ -122,7 +122,7 @@ public interface MultilingualContentService
* @param addThisNodeLocale if true, add the locale of the given <b>cm:mlDocument</b> in the list. * @param addThisNodeLocale if true, add the locale of the given <b>cm:mlDocument</b> in the list.
* @return Returns a list of missng locales * @return Returns a list of missng locales
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"localizedNodeRef", "addThisNodeLocale"}) @Auditable(parameters = {"localizedNodeRef", "addThisNodeLocale"})
List<Locale> getMissingTranslations(NodeRef localizedNodeRef, boolean addThisNodeLocale); List<Locale> getMissingTranslations(NodeRef localizedNodeRef, boolean addThisNodeLocale);
/** /**
@@ -137,7 +137,7 @@ public interface MultilingualContentService
* of the <b>cm:mlContainer</b>. <tt>null</tt> is returned if there is no * of the <b>cm:mlContainer</b>. <tt>null</tt> is returned if there is no
* pivot translation. * pivot translation.
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
NodeRef getPivotTranslation(NodeRef nodeRef); NodeRef getPivotTranslation(NodeRef nodeRef);
/** /**
@@ -156,7 +156,7 @@ public interface MultilingualContentService
* the default naming convention. * the default naming convention.
* @return Returns the new created <b>cm:mlEmptyTranslation</b> * @return Returns the new created <b>cm:mlEmptyTranslation</b>
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"translationOfNodeRef", "name", "locale"}) @Auditable(parameters = {"translationOfNodeRef", "name", "locale"})
NodeRef addEmptyTranslation(NodeRef translationOfNodeRef, String name, Locale locale); NodeRef addEmptyTranslation(NodeRef translationOfNodeRef, String name, Locale locale);
/** /**
@@ -173,7 +173,7 @@ public interface MultilingualContentService
* @throws FileExistsException * @throws FileExistsException
* @throws Exception * @throws Exception
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"mlContainerNodeRef", "newParentRef"}) @Auditable(parameters = {"mlContainerNodeRef", "newParentRef"})
NodeRef copyTranslationContainer(NodeRef mlContainerNodeRef, NodeRef newParentRef, String prefixName) throws FileExistsException, FileNotFoundException, Exception; NodeRef copyTranslationContainer(NodeRef mlContainerNodeRef, NodeRef newParentRef, String prefixName) throws FileExistsException, FileNotFoundException, Exception;
/** /**
@@ -187,7 +187,7 @@ public interface MultilingualContentService
* @throws FileExistsException * @throws FileExistsException
* @throws FileNotFoundException * @throws FileNotFoundException
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"mlContainerNodeRef", "newParentRef"}) @Auditable(parameters = {"mlContainerNodeRef", "newParentRef"})
void moveTranslationContainer(NodeRef mlContainerNodeRef, NodeRef newParentRef) throws FileExistsException, FileNotFoundException; void moveTranslationContainer(NodeRef mlContainerNodeRef, NodeRef newParentRef) throws FileExistsException, FileNotFoundException;
/** /**
@@ -196,6 +196,6 @@ public interface MultilingualContentService
* *
* @param mlContainerNodeRef The <b>cm:mlContainer</b> to remove * @param mlContainerNodeRef The <b>cm:mlContainer</b> to remove
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"mlContainerNodeRef"}) @Auditable(parameters = {"mlContainerNodeRef"})
void deleteTranslationContainer(NodeRef mlContainerNodeRef); void deleteTranslationContainer(NodeRef mlContainerNodeRef);
} }

View File

@@ -46,7 +46,7 @@ public interface FileFolderService
* @param contextNodeRef the node to start searching in * @param contextNodeRef the node to start searching in
* @return Returns a list of matching files and folders * @return Returns a list of matching files and folders
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"contextNodeRef"}) @Auditable(parameters = {"contextNodeRef"})
public List<FileInfo> list(NodeRef contextNodeRef); public List<FileInfo> list(NodeRef contextNodeRef);
/** /**
@@ -55,7 +55,7 @@ public interface FileFolderService
* @param folderNodeRef the folder to start searching in * @param folderNodeRef the folder to start searching in
* @return Returns a list of matching files * @return Returns a list of matching files
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"folderNodeRef"}) @Auditable(parameters = {"folderNodeRef"})
public List<FileInfo> listFiles(NodeRef folderNodeRef); public List<FileInfo> listFiles(NodeRef folderNodeRef);
/** /**
@@ -64,7 +64,7 @@ public interface FileFolderService
* @param contextNodeRef the node to start searching in * @param contextNodeRef the node to start searching in
* @return Returns a list of matching folders * @return Returns a list of matching folders
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"contextNodeRef"}) @Auditable(parameters = {"contextNodeRef"})
public List<FileInfo> listFolders(NodeRef contextNodeRef); public List<FileInfo> listFolders(NodeRef contextNodeRef);
/** /**
@@ -75,7 +75,7 @@ public interface FileFolderService
* @param contextNodeRef the node to start searching in * @param contextNodeRef the node to start searching in
* @param filter - may be null in which case all sub-folders will be searched * @param filter - may be null in which case all sub-folders will be searched
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"contextNodeRef"}) @Auditable(parameters = {"contextNodeRef"})
public List<FileInfo> listDeepFolders(NodeRef contextNodeRef, SubFolderFilter filter); public List<FileInfo> listDeepFolders(NodeRef contextNodeRef, SubFolderFilter filter);
/** /**
@@ -85,7 +85,7 @@ public interface FileFolderService
* @param name the name of the node to search for * @param name the name of the node to search for
* @return Returns the node that has the given name - or null if not found * @return Returns the node that has the given name - or null if not found
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"contextNodeRef", "name"}) @Auditable(parameters = {"contextNodeRef", "name"})
public NodeRef searchSimple(NodeRef contextNodeRef, String name); public NodeRef searchSimple(NodeRef contextNodeRef, String name);
@@ -109,7 +109,7 @@ public interface FileFolderService
* For deep listing use listDeepFolders. * For deep listing use listDeepFolders.
* Avoid calling this method with any name pattern except for "*". * Avoid calling this method with any name pattern except for "*".
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"contextNodeRef", "namePattern", "includeSubFolders"}) @Auditable(parameters = {"contextNodeRef", "namePattern", "includeSubFolders"})
public List<FileInfo> search( public List<FileInfo> search(
NodeRef contextNodeRef, NodeRef contextNodeRef,
String namePattern, String namePattern,
@@ -135,7 +135,7 @@ public interface FileFolderService
* For deep listing use listDeepFolders. * For deep listing use listDeepFolders.
* Avoid calling this method with any name pattern except for "*". * Avoid calling this method with any name pattern except for "*".
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"contextNodeRef", "namePattern", "fileSearch", "folderSearch", "includeSubFolders"}) @Auditable(parameters = {"contextNodeRef", "namePattern", "fileSearch", "folderSearch", "includeSubFolders"})
public List<FileInfo> search( public List<FileInfo> search(
NodeRef contextNodeRef, NodeRef contextNodeRef,
String namePattern, String namePattern,
@@ -152,7 +152,7 @@ public interface FileFolderService
* @throws FileExistsException if a file or folder with the new name already exists * @throws FileExistsException if a file or folder with the new name already exists
* @throws FileNotFoundException the file or folder reference doesn't exist * @throws FileNotFoundException the file or folder reference doesn't exist
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"fileFolderRef", "newName"}) @Auditable(parameters = {"fileFolderRef", "newName"})
public FileInfo rename(NodeRef fileFolderRef, String newName) throws FileExistsException, FileNotFoundException; public FileInfo rename(NodeRef fileFolderRef, String newName) throws FileExistsException, FileNotFoundException;
/** /**
@@ -167,7 +167,7 @@ public interface FileFolderService
* @throws FileExistsException * @throws FileExistsException
* @throws FileNotFoundException * @throws FileNotFoundException
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"sourceNodeRef", "targetParentRef", "newName"}) @Auditable(parameters = {"sourceNodeRef", "targetParentRef", "newName"})
public FileInfo move(NodeRef sourceNodeRef, NodeRef targetParentRef, String newName) public FileInfo move(NodeRef sourceNodeRef, NodeRef targetParentRef, String newName)
throws FileExistsException, FileNotFoundException; throws FileExistsException, FileNotFoundException;
@@ -184,7 +184,7 @@ public interface FileFolderService
* @throws FileExistsException * @throws FileExistsException
* @throws FileNotFoundException * @throws FileNotFoundException
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"sourceNodeRef", "targetParentRef", "newName"}) @Auditable(parameters = {"sourceNodeRef", "targetParentRef", "newName"})
public FileInfo copy(NodeRef sourceNodeRef, NodeRef targetParentRef, String newName) public FileInfo copy(NodeRef sourceNodeRef, NodeRef targetParentRef, String newName)
throws FileExistsException, FileNotFoundException; throws FileExistsException, FileNotFoundException;
@@ -203,7 +203,7 @@ public interface FileFolderService
* *
* @see {@link #create(NodeRef, String, QName, QName)} * @see {@link #create(NodeRef, String, QName, QName)}
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"parentNodeRef", "name", "typeQName"}) @Auditable(parameters = {"parentNodeRef", "name", "typeQName"})
public FileInfo create(NodeRef parentNodeRef, String name, QName typeQName) throws FileExistsException; public FileInfo create(NodeRef parentNodeRef, String name, QName typeQName) throws FileExistsException;
/** /**
@@ -217,7 +217,7 @@ public interface FileFolderService
* @return Returns the new node's file information * @return Returns the new node's file information
* @throws FileExistsException * @throws FileExistsException
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"parentNodeRef", "name", "typeQName"}) @Auditable(parameters = {"parentNodeRef", "name", "typeQName"})
public FileInfo create(NodeRef parentNodeRef, String name, QName typeQName, QName assocQName) throws FileExistsException; public FileInfo create(NodeRef parentNodeRef, String name, QName typeQName, QName assocQName) throws FileExistsException;
/** /**
@@ -225,7 +225,7 @@ public interface FileFolderService
* *
* @param nodeRef the node to delete * @param nodeRef the node to delete
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public void delete(NodeRef nodeRef); public void delete(NodeRef nodeRef);
/** /**
@@ -244,7 +244,7 @@ public interface FileFolderService
* including the destination file or folder * including the destination file or folder
* @throws FileNotFoundException if the node could not be found * @throws FileNotFoundException if the node could not be found
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"rootNodeRef", "nodeRef"}) @Auditable(parameters = {"rootNodeRef", "nodeRef"})
public List<FileInfo> getNamePath(NodeRef rootNodeRef, NodeRef nodeRef) throws FileNotFoundException; public List<FileInfo> getNamePath(NodeRef rootNodeRef, NodeRef nodeRef) throws FileNotFoundException;
/** /**
@@ -255,7 +255,7 @@ public interface FileFolderService
* @return Returns the info of the file or folder * @return Returns the info of the file or folder
* @throws FileNotFoundException if no file or folder exists along the path * @throws FileNotFoundException if no file or folder exists along the path
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"rootNodeRef", "pathElements"}) @Auditable(parameters = {"rootNodeRef", "pathElements"})
public FileInfo resolveNamePath(NodeRef rootNodeRef, List<String> pathElements) throws FileNotFoundException; public FileInfo resolveNamePath(NodeRef rootNodeRef, List<String> pathElements) throws FileNotFoundException;
/** /**
@@ -264,7 +264,7 @@ public interface FileFolderService
* @param nodeRef the node to get info for * @param nodeRef the node to get info for
* @return Returns the file info or null if the node does not represent a file or folder * @return Returns the file info or null if the node does not represent a file or folder
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public FileInfo getFileInfo(NodeRef nodeRef); public FileInfo getFileInfo(NodeRef nodeRef);
/** /**
@@ -274,7 +274,7 @@ public interface FileFolderService
* @param nodeRef the content node * @param nodeRef the content node
* @return Returns a handle to the content associated with the node * @return Returns a handle to the content associated with the node
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public ContentReader getReader(NodeRef nodeRef); public ContentReader getReader(NodeRef nodeRef);
/** /**
@@ -284,7 +284,7 @@ public interface FileFolderService
* @param nodeRef the content node * @param nodeRef the content node
* @return Returns a handle to the content associated with the node * @return Returns a handle to the content associated with the node
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public ContentWriter getWriter(NodeRef nodeRef); public ContentWriter getWriter(NodeRef nodeRef);
@@ -293,7 +293,7 @@ public interface FileFolderService
* *
* @return returns <tt>true</tt> if the NodeRef is valid * @return returns <tt>true</tt> if the NodeRef is valid
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public boolean exists(NodeRef nodeRef); public boolean exists(NodeRef nodeRef);
/** /**

View File

@@ -34,7 +34,7 @@ public interface PreferenceService
* @param userName the user name * @param userName the user name
* @return Map<String, Serializable> a map containing the preference values, empty if none * @return Map<String, Serializable> a map containing the preference values, empty if none
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"userName"}) @Auditable(parameters = {"userName"})
Map<String, Serializable> getPreferences(String userName); Map<String, Serializable> getPreferences(String userName);
/** /**
@@ -49,7 +49,7 @@ public interface PreferenceService
* @param preferenceFilter the preference filter * @param preferenceFilter the preference filter
* @return Map<String, Serializable> a map containing the preference values, empty if none * @return Map<String, Serializable> a map containing the preference values, empty if none
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"userName", "preferenceFilter"}) @Auditable(parameters = {"userName", "preferenceFilter"})
Map<String, Serializable> getPreferences(String userName, String preferenceFilter); Map<String, Serializable> getPreferences(String userName, String preferenceFilter);
/** /**
@@ -63,7 +63,7 @@ public interface PreferenceService
* @param userName the user name * @param userName the user name
* @param preferences the preference values * @param preferences the preference values
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"userName", "preferences"}) @Auditable(parameters = {"userName", "preferences"})
void setPreferences(String userName, Map<String, Serializable> preferences); void setPreferences(String userName, Map<String, Serializable> preferences);
/** /**
@@ -71,7 +71,7 @@ public interface PreferenceService
* *
* @param userName the user name * @param userName the user name
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"userName"}) @Auditable(parameters = {"userName"})
void clearPreferences(String userName); void clearPreferences(String userName);
/** /**
@@ -82,7 +82,7 @@ public interface PreferenceService
* @param userName the user name * @param userName the user name
* @param preferenceFilter the preference filter * @param preferenceFilter the preference filter
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"userName", "preferenceFilter"}) @Auditable(parameters = {"userName", "preferenceFilter"})
void clearPreferences(String userName, String preferenceFilter); void clearPreferences(String userName, String preferenceFilter);
} }

View File

@@ -84,7 +84,7 @@ public interface ContentService
* @param contentUrl a content store URL * @param contentUrl a content store URL
* @return Returns a reader for the URL that needs to be checked. * @return Returns a reader for the URL that needs to be checked.
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"contentUrl"}) @Auditable(parameters = {"contentUrl"})
public ContentReader getRawReader(String contentUrl); public ContentReader getRawReader(String contentUrl);
/** /**
@@ -103,7 +103,7 @@ public interface ContentService
* *
* @see org.alfresco.repo.content.filestore.FileContentReader#getSafeContentReader(ContentReader, String, Object[]) * @see org.alfresco.repo.content.filestore.FileContentReader#getSafeContentReader(ContentReader, String, Object[])
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "propertyQName"}) @Auditable(parameters = {"nodeRef", "propertyQName"})
public ContentReader getReader(NodeRef nodeRef, QName propertyQName) public ContentReader getReader(NodeRef nodeRef, QName propertyQName)
throws InvalidNodeRefException, InvalidTypeException; throws InvalidNodeRefException, InvalidTypeException;
@@ -136,7 +136,7 @@ public interface ContentService
* @throws InvalidNodeRefException if the node doesn't exist * @throws InvalidNodeRefException if the node doesn't exist
* @throws InvalidTypeException if the node property is not of type <b>content</b> * @throws InvalidTypeException if the node property is not of type <b>content</b>
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "propertyQName", "update"}) @Auditable(parameters = {"nodeRef", "propertyQName", "update"})
public ContentWriter getWriter(NodeRef nodeRef, QName propertyQName, boolean update) public ContentWriter getWriter(NodeRef nodeRef, QName propertyQName, boolean update)
throws InvalidNodeRefException, InvalidTypeException; throws InvalidNodeRefException, InvalidTypeException;

View File

@@ -80,7 +80,7 @@ public interface CopyService
* *
* @return the new node reference * @return the new node reference
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"sourceNodeRef", "targetParentNodeRef", "assocTypeQName", "assocQName", "copyChildren"}) @Auditable(parameters = {"sourceNodeRef", "targetParentNodeRef", "assocTypeQName", "assocQName", "copyChildren"})
public NodeRef copy( public NodeRef copy(
NodeRef sourceNodeRef, NodeRef sourceNodeRef,
NodeRef targetParentNodeRef, NodeRef targetParentNodeRef,
@@ -102,7 +102,7 @@ public interface CopyService
* *
* @return the new node reference * @return the new node reference
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"sourceNodeRef", "targetParentNodeRef", "assocTypeQName", "assocQName", "copyChildren"}) @Auditable(parameters = {"sourceNodeRef", "targetParentNodeRef", "assocTypeQName", "assocQName", "copyChildren"})
public NodeRef copyAndRename( public NodeRef copyAndRename(
NodeRef sourceNodeRef, NodeRef sourceNodeRef,
NodeRef targetParentNodeRef, NodeRef targetParentNodeRef,
@@ -122,7 +122,7 @@ public interface CopyService
* parent to the new node * parent to the new node
* @return the new node reference * @return the new node reference
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"sourceNodeRef", "targetParentNodeRef", "assocTypeQName", "assocQName"}) @Auditable(parameters = {"sourceNodeRef", "targetParentNodeRef", "assocTypeQName", "assocQName"})
public NodeRef copy( public NodeRef copy(
NodeRef sourceNodeRef, NodeRef sourceNodeRef,
NodeRef targetParentNodeRef, NodeRef targetParentNodeRef,
@@ -156,7 +156,7 @@ public interface CopyService
* @param sourceNodeRef the source node reference * @param sourceNodeRef the source node reference
* @param destinationNodeRef the destination node reference * @param destinationNodeRef the destination node reference
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"sourceNodeRef", "destinationNodeRef"}) @Auditable(parameters = {"sourceNodeRef", "destinationNodeRef"})
public void copy(NodeRef sourceNodeRef, NodeRef destinationNodeRef); public void copy(NodeRef sourceNodeRef, NodeRef destinationNodeRef);
/** /**
@@ -165,7 +165,7 @@ public interface CopyService
* @param nodeRef the original node reference * @param nodeRef the original node reference
* @return a list of copies, empty is none * @return a list of copies, empty is none
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public List<NodeRef> getCopies(NodeRef nodeRef); public List<NodeRef> getCopies(NodeRef nodeRef);
} }

View File

@@ -89,7 +89,7 @@ public interface ScriptService
* *
* @throws ScriptException * @throws ScriptException
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"scriptRef", "contentProp", "model"}) @Auditable(parameters = {"scriptRef", "contentProp", "model"})
public Object executeScript(NodeRef scriptRef, QName contentProp, Map<String, Object> model) public Object executeScript(NodeRef scriptRef, QName contentProp, Map<String, Object> model)
throws ScriptException; throws ScriptException;
@@ -106,7 +106,7 @@ public interface ScriptService
* *
* @throws ScriptException * @throws ScriptException
*/ */
@Auditable(key = Auditable.Key.ARG_1, parameters = {"engine", "scriptRef", "contentProp", "model"}) @Auditable(parameters = {"engine", "scriptRef", "contentProp", "model"})
public Object executeScript(String engine, NodeRef scriptRef, QName contentProp, Map<String, Object> model) public Object executeScript(String engine, NodeRef scriptRef, QName contentProp, Map<String, Object> model)
throws ScriptException; throws ScriptException;

View File

@@ -141,7 +141,7 @@ public interface TemplateService
* *
* @return TemplateProcessor * @return TemplateProcessor
*/ */
@Auditable(warn = true, parameters = {"engine"}) @Auditable(parameters = {"engine"})
public TemplateProcessor getTemplateProcessor(String engine); public TemplateProcessor getTemplateProcessor(String engine);
/** /**

View File

@@ -85,7 +85,7 @@ public interface RuleService
* @param nodeRef the node reference * @param nodeRef the node reference
* @return true if the rules are enabled, false otherwise * @return true if the rules are enabled, false otherwise
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public boolean rulesEnabled(NodeRef nodeRef); public boolean rulesEnabled(NodeRef nodeRef);
/** /**
@@ -94,7 +94,7 @@ public interface RuleService
* *
* @param nodeRef the node reference * @param nodeRef the node reference
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public void disableRules(NodeRef nodeRef); public void disableRules(NodeRef nodeRef);
/** /**
@@ -103,7 +103,7 @@ public interface RuleService
* *
* @param nodeRef the node reference * @param nodeRef the node reference
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public void enableRules(NodeRef nodeRef); public void enableRules(NodeRef nodeRef);
/** /**
@@ -132,7 +132,7 @@ public interface RuleService
* @param nodeRef the node reference * @param nodeRef the node reference
* @return true if the node has rules associated, false otherwise * @return true if the node has rules associated, false otherwise
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public boolean hasRules(NodeRef nodeRef); public boolean hasRules(NodeRef nodeRef);
/** /**
@@ -145,7 +145,7 @@ public interface RuleService
* @param nodeRef the node reference * @param nodeRef the node reference
* @return a list of the rules associated with the node * @return a list of the rules associated with the node
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public List<Rule> getRules(NodeRef nodeRef); public List<Rule> getRules(NodeRef nodeRef);
/** /**
@@ -161,7 +161,7 @@ public interface RuleService
* the result list or not * the result list or not
* @return a list of the rules associated with the node * @return a list of the rules associated with the node
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "includeInhertied"}) @Auditable(parameters = {"nodeRef", "includeInhertied"})
public List<Rule> getRules(NodeRef nodeRef, boolean includeInhertied); public List<Rule> getRules(NodeRef nodeRef, boolean includeInhertied);
/** /**
@@ -174,7 +174,7 @@ public interface RuleService
* are returned * are returned
* @return a list of the rules associated with the node * @return a list of the rules associated with the node
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "includeInhertiedRuleType", "ruleTypeName"}) @Auditable(parameters = {"nodeRef", "includeInhertiedRuleType", "ruleTypeName"})
public List<Rule> getRules(NodeRef nodeRef, boolean includeInhertiedRuleType, String ruleTypeName); public List<Rule> getRules(NodeRef nodeRef, boolean includeInhertiedRuleType, String ruleTypeName);
/** /**
@@ -183,7 +183,7 @@ public interface RuleService
* @param nodeRef the node reference * @param nodeRef the node reference
* @return a list of the rules associated with the node * @return a list of the rules associated with the node
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public int countRules(NodeRef nodeRef); public int countRules(NodeRef nodeRef);
/** /**
@@ -192,7 +192,7 @@ public interface RuleService
* @param nodeRef the node reference * @param nodeRef the node reference
* @return the rule corresponding to the node reference * @return the rule corresponding to the node reference
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public Rule getRule(NodeRef nodeRef); public Rule getRule(NodeRef nodeRef);
/** /**
@@ -204,7 +204,7 @@ public interface RuleService
* @param nodeRef * @param nodeRef
* @param rule * @param rule
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "rule"}) @Auditable(parameters = {"nodeRef", "rule"})
public void saveRule(NodeRef nodeRef, Rule rule); public void saveRule(NodeRef nodeRef, Rule rule);
/** /**
@@ -213,7 +213,7 @@ public interface RuleService
* @param rule * @param rule
* @param index * @param index
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "rule", "index"}) @Auditable(parameters = {"nodeRef", "rule", "index"})
public void saveRule(NodeRef nodeRef, Rule rule, int index); public void saveRule(NodeRef nodeRef, Rule rule, int index);
/** /**
@@ -222,7 +222,7 @@ public interface RuleService
* @param ruleNodeRef * @param ruleNodeRef
* @param index * @param index
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "ruleNodeRef", "index"}) @Auditable(parameters = {"nodeRef", "ruleNodeRef", "index"})
public void setRulePosition(NodeRef nodeRef, NodeRef ruleNodeRef, int index); public void setRulePosition(NodeRef nodeRef, NodeRef ruleNodeRef, int index);
/** /**
@@ -231,7 +231,7 @@ public interface RuleService
* @param rule * @param rule
* @param index * @param index
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "rule", "index"}) @Auditable(parameters = {"nodeRef", "rule", "index"})
public void setRulePosition(NodeRef nodeRef, Rule rule, int index); public void setRulePosition(NodeRef nodeRef, Rule rule, int index);
/** /**
@@ -239,7 +239,7 @@ public interface RuleService
* *
* @param nodeRef the actionable node reference * @param nodeRef the actionable node reference
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "rule"}) @Auditable(parameters = {"nodeRef", "rule"})
public void removeRule(NodeRef nodeRef, Rule rule); public void removeRule(NodeRef nodeRef, Rule rule);
/** /**
@@ -247,7 +247,7 @@ public interface RuleService
* *
* @param nodeRef the actionable node reference * @param nodeRef the actionable node reference
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public void removeAllRules(NodeRef nodeRef); public void removeAllRules(NodeRef nodeRef);
/** /**
@@ -256,7 +256,7 @@ public interface RuleService
* @param rule the rule * @param rule the rule
* @return the owning node reference * @return the owning node reference
*/ */
@Auditable(key = Auditable.Key.RETURN, parameters = {"rule"}) @Auditable(parameters = {"rule"})
public NodeRef getOwningNodeRef(Rule rule); public NodeRef getOwningNodeRef(Rule rule);
/** /**
@@ -268,7 +268,7 @@ public interface RuleService
* @param action the action * @param action the action
* @return the owning node reference * @return the owning node reference
*/ */
@Auditable(key = Auditable.Key.RETURN, parameters = {"action"}) @Auditable(parameters = {"action"})
public NodeRef getOwningNodeRef(Action action); public NodeRef getOwningNodeRef(Action action);
/** /**
@@ -278,7 +278,7 @@ public interface RuleService
* @param nodeRef rule node reference * @param nodeRef rule node reference
* @return boolean true if linked, false otherwise * @return boolean true if linked, false otherwise
*/ */
@Auditable(key = Auditable.Key.RETURN, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public boolean isLinkedToRuleNode(NodeRef nodeRef); public boolean isLinkedToRuleNode(NodeRef nodeRef);
/** /**
@@ -288,7 +288,7 @@ public interface RuleService
* @param nodeRef node reference of a rule node * @param nodeRef node reference of a rule node
* @return NodeRef reference to the * @return NodeRef reference to the
*/ */
@Auditable(key = Auditable.Key.RETURN, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public NodeRef getLinkedToRuleNode(NodeRef nodeRef); public NodeRef getLinkedToRuleNode(NodeRef nodeRef);
/** /**
@@ -298,6 +298,6 @@ public interface RuleService
* @param nodeRef node reference of a rule node * @param nodeRef node reference of a rule node
* @return List<NodeRef> list of rule nodes that link to this passed rule node, empty if none * @return List<NodeRef> list of rule nodes that link to this passed rule node, empty if none
*/ */
@Auditable(key = Auditable.Key.RETURN, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public List<NodeRef> getLinkedFromRuleNodes(NodeRef nodeRef); public List<NodeRef> getLinkedFromRuleNodes(NodeRef nodeRef);
} }

View File

@@ -70,7 +70,7 @@ public interface CategoryService
* @param depth - the enumeration depth for what level to recover * @param depth - the enumeration depth for what level to recover
* @return a collection of all the nodes found identified by their ChildAssocRef's * @return a collection of all the nodes found identified by their ChildAssocRef's
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"categoryRef", "mode", "depth"}) @Auditable(parameters = {"categoryRef", "mode", "depth"})
public Collection<ChildAssociationRef> getChildren(NodeRef categoryRef, Mode mode, Depth depth ); public Collection<ChildAssociationRef> getChildren(NodeRef categoryRef, Mode mode, Depth depth );
/** /**
@@ -81,7 +81,7 @@ public interface CategoryService
* @param depth - the enumeration depth for what level to recover * @param depth - the enumeration depth for what level to recover
* @return a collection of all the nodes found identified by their ChildAssocRef's * @return a collection of all the nodes found identified by their ChildAssocRef's
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"storeRef", "aspectQName", "depth"}) @Auditable(parameters = {"storeRef", "aspectQName", "depth"})
public Collection<ChildAssociationRef> getCategories(StoreRef storeRef, QName aspectQName, Depth depth ); public Collection<ChildAssociationRef> getCategories(StoreRef storeRef, QName aspectQName, Depth depth );
/** /**
@@ -89,7 +89,7 @@ public interface CategoryService
* *
* @return * @return
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"storeRef"}) @Auditable(parameters = {"storeRef"})
public Collection<ChildAssociationRef> getClassifications(StoreRef storeRef); public Collection<ChildAssociationRef> getClassifications(StoreRef storeRef);
/** /**
@@ -99,7 +99,7 @@ public interface CategoryService
* @param aspectName * @param aspectName
* @return * @return
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"storeRef", "aspectName"}) @Auditable(parameters = {"storeRef", "aspectName"})
public Collection<ChildAssociationRef> getRootCategories(StoreRef storeRef, QName aspectName); public Collection<ChildAssociationRef> getRootCategories(StoreRef storeRef, QName aspectName);
/** /**
@@ -119,7 +119,7 @@ public interface CategoryService
* @param aspectName * @param aspectName
* @param attributeName * @param attributeName
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"storeRef", "aspectName", "attributeName"}) @Auditable(parameters = {"storeRef", "aspectName", "attributeName"})
public NodeRef createClassification(StoreRef storeRef, QName aspectName, String attributeName); public NodeRef createClassification(StoreRef storeRef, QName aspectName, String attributeName);
/** /**
@@ -130,7 +130,7 @@ public interface CategoryService
* @param name * @param name
* @return * @return
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"storeRef", "aspectName", "name"}) @Auditable(parameters = {"storeRef", "aspectName", "name"})
public NodeRef createRootCategory(StoreRef storeRef, QName aspectName, String name); public NodeRef createRootCategory(StoreRef storeRef, QName aspectName, String name);
/** /**
@@ -140,7 +140,7 @@ public interface CategoryService
* @param name * @param name
* @return * @return
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"parent", "name"}) @Auditable(parameters = {"parent", "name"})
public NodeRef createCategory(NodeRef parent, String name); public NodeRef createCategory(NodeRef parent, String name);
/** /**
@@ -149,7 +149,7 @@ public interface CategoryService
* @param storeRef * @param storeRef
* @param aspectName * @param aspectName
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"storeRef", "aspectName"}) @Auditable(parameters = {"storeRef", "aspectName"})
public void deleteClassification(StoreRef storeRef, QName aspectName); public void deleteClassification(StoreRef storeRef, QName aspectName);
/** /**
@@ -157,7 +157,7 @@ public interface CategoryService
* *
* @param nodeRef * @param nodeRef
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public void deleteCategory(NodeRef nodeRef); public void deleteCategory(NodeRef nodeRef);
/** /**

View File

@@ -38,7 +38,7 @@ public interface OwnableService
* @param nodeRef * @param nodeRef
* @return the username or null if the object has no owner * @return the username or null if the object has no owner
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public String getOwner(NodeRef nodeRef); public String getOwner(NodeRef nodeRef);
/** /**
@@ -47,7 +47,7 @@ public interface OwnableService
* @param nodeRef * @param nodeRef
* @param userName * @param userName
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "userName"}) @Auditable(parameters = {"nodeRef", "userName"})
public void setOwner(NodeRef nodeRef, String userName); public void setOwner(NodeRef nodeRef, String userName);
/** /**
@@ -55,7 +55,7 @@ public interface OwnableService
* *
* @param nodeRef * @param nodeRef
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public void takeOwnership(NodeRef nodeRef); public void takeOwnership(NodeRef nodeRef);
/** /**
@@ -64,6 +64,6 @@ public interface OwnableService
* @param nodeRef * @param nodeRef
* @return * @return
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public boolean hasOwner(NodeRef nodeRef); public boolean hasOwner(NodeRef nodeRef);
} }

View File

@@ -66,7 +66,7 @@ public interface ThumbnailService
* @param name the name of the thumbnail (optional, pass null for unnamed thumbnail) * @param name the name of the thumbnail (optional, pass null for unnamed thumbnail)
* @return NodeRef node reference to the newly created thumbnail * @return NodeRef node reference to the newly created thumbnail
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"node", "contentProperty", "mimetype", "transformationOptions", "name"}) @Auditable(parameters = {"node", "contentProperty", "mimetype", "transformationOptions", "name"})
NodeRef createThumbnail(NodeRef node, QName contentProperty, String mimetype, TransformationOptions transformationOptions, String name); NodeRef createThumbnail(NodeRef node, QName contentProperty, String mimetype, TransformationOptions transformationOptions, String name);
/** /**
@@ -83,7 +83,7 @@ public interface ThumbnailService
* @param assocDetails the thumbnail parent association details * @param assocDetails the thumbnail parent association details
* @return NodeRef node reference to the newly created thumbnail * @return NodeRef node reference to the newly created thumbnail
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"node", "contentProperty", "mimetype", "transformationOptions", "name", "assocDetails"}) @Auditable(parameters = {"node", "contentProperty", "mimetype", "transformationOptions", "name", "assocDetails"})
NodeRef createThumbnail(NodeRef node, QName contentProperty, String mimetype, TransformationOptions transformationOptions, String name, ThumbnailParentAssociationDetails assocDetails); NodeRef createThumbnail(NodeRef node, QName contentProperty, String mimetype, TransformationOptions transformationOptions, String name, ThumbnailParentAssociationDetails assocDetails);
/** /**
@@ -99,7 +99,7 @@ public interface ThumbnailService
* @param thumbnail the thumbnail node * @param thumbnail the thumbnail node
* @param transformationOptions the transformation options used when updating the thumbnail * @param transformationOptions the transformation options used when updating the thumbnail
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"thumbnail", "transformationOptions"}) @Auditable(parameters = {"thumbnail", "transformationOptions"})
void updateThumbnail(NodeRef thumbnail, TransformationOptions transformationOptions); void updateThumbnail(NodeRef thumbnail, TransformationOptions transformationOptions);
/** /**
@@ -112,7 +112,7 @@ public interface ThumbnailService
* @param thumbnailName thumbnail name * @param thumbnailName thumbnail name
* @return NodeRef the thumbnail node reference, null if not found * @return NodeRef the thumbnail node reference, null if not found
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"node", "contentProperty", "thumbnailName"}) @Auditable(parameters = {"node", "contentProperty", "thumbnailName"})
NodeRef getThumbnailByName(NodeRef node, QName contentProperty, String thumbnailName); NodeRef getThumbnailByName(NodeRef node, QName contentProperty, String thumbnailName);
/** /**
@@ -131,7 +131,7 @@ public interface ThumbnailService
* @param options transformation options * @param options transformation options
* @return List<NodeRef> list of matching thumbnail node references, empty if no matches found * @return List<NodeRef> list of matching thumbnail node references, empty if no matches found
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"node", "contentProperty", "mimetype", "options"}) @Auditable(parameters = {"node", "contentProperty", "mimetype", "options"})
List<NodeRef> getThumbnails(NodeRef node, QName contentProperty, String mimetype, TransformationOptions options); List<NodeRef> getThumbnails(NodeRef node, QName contentProperty, String mimetype, TransformationOptions options);
} }

View File

@@ -1,4 +1,4 @@
/* /*
* Copyright (C) 2005-2010 Alfresco Software Limited. * Copyright (C) 2005-2010 Alfresco Software Limited.
* *
* This file is part of Alfresco * This file is part of Alfresco
@@ -14,290 +14,290 @@
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public License * You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>. * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/ */
package org.alfresco.service.cmr.version; package org.alfresco.service.cmr.version;
import java.io.Serializable; import java.io.Serializable;
import java.util.Collection; import java.util.Collection;
import java.util.Map; import java.util.Map;
import org.alfresco.repo.version.VersionServicePolicies.CalculateVersionLabelPolicy; import org.alfresco.repo.version.VersionServicePolicies.CalculateVersionLabelPolicy;
import org.alfresco.service.Auditable; import org.alfresco.service.Auditable;
import org.alfresco.service.PublicService; import org.alfresco.service.PublicService;
import org.alfresco.service.cmr.repository.AspectMissingException; import org.alfresco.service.cmr.repository.AspectMissingException;
import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.StoreRef; import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.namespace.QName; import org.alfresco.service.namespace.QName;
/** /**
* Interface for public and internal version operations. * Interface for public and internal version operations.
* *
* @author Roy Wetherall, janv * @author Roy Wetherall, janv
*/ */
@PublicService @PublicService
public interface VersionService public interface VersionService
{ {
/** /**
* The version store protocol label, used in store references * The version store protocol label, used in store references
*/ */
public static final String VERSION_STORE_PROTOCOL = "versionStore"; public static final String VERSION_STORE_PROTOCOL = "versionStore";
/** /**
* Gets the reference to the version store * Gets the reference to the version store
* *
* @return reference to the version store * @return reference to the version store
*/ */
@Auditable @Auditable
public StoreRef getVersionStoreReference(); public StoreRef getVersionStoreReference();
/** /**
* Creates a new version based on the referenced node. * Creates a new version based on the referenced node.
* <p> * <p>
* If the node has not previously been versioned then a version history and * If the node has not previously been versioned then a version history and
* initial version will be created. * initial version will be created.
* <p> * <p>
* If the node referenced does not or can not have the version aspect * If the node referenced does not or can not have the version aspect
* applied to it then an exception will be raised. * applied to it then an exception will be raised.
* <p> * <p>
* The version properties are stored as version meta-data against the newly * The version properties are stored as version meta-data against the newly
* created version. * created version.
* *
* @param nodeRef a node reference * @param nodeRef a node reference
* @param versionProperties the version properties that are stored with the newly created * @param versionProperties the version properties that are stored with the newly created
* version, or <tt>null</tt> if there are no relevant properties * version, or <tt>null</tt> if there are no relevant properties
* @return the created version object * @return the created version object
* @throws ReservedVersionNameException * @throws ReservedVersionNameException
* thrown if a reserved property name is used int he version properties * thrown if a reserved property name is used int he version properties
* provided * provided
* @throws AspectMissingException * @throws AspectMissingException
* thrown if the version aspect is missing * thrown if the version aspect is missing
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "versionProperties"}) @Auditable(parameters = {"nodeRef", "versionProperties"})
public Version createVersion( public Version createVersion(
NodeRef nodeRef, NodeRef nodeRef,
Map<String, Serializable> versionProperties) Map<String, Serializable> versionProperties)
throws ReservedVersionNameException, AspectMissingException; throws ReservedVersionNameException, AspectMissingException;
/** /**
* Creates a new version based on the referenced node. * Creates a new version based on the referenced node.
* <p> * <p>
* If the node has not previously been versioned then a version history and * If the node has not previously been versioned then a version history and
* initial version will be created. * initial version will be created.
* <p> * <p>
* If the node referenced does not or can not have the version aspect * If the node referenced does not or can not have the version aspect
* applied to it then an exception will be raised. * applied to it then an exception will be raised.
* <p> * <p>
* The version properties are stored as version meta-data against the newly * The version properties are stored as version meta-data against the newly
* created version. * created version.
* *
* @param nodeRef a node reference * @param nodeRef a node reference
* @param versionProperties the version properties that are stored with the newly created * @param versionProperties the version properties that are stored with the newly created
* version * version
* @param versionChildren if true then the children of the referenced node are also * @param versionChildren if true then the children of the referenced node are also
* versioned, false otherwise * versioned, false otherwise
* @return the created version object(s) * @return the created version object(s)
* @throws ReservedVersionNameException * @throws ReservedVersionNameException
* thrown if a reserved property name is used int he version properties * thrown if a reserved property name is used int he version properties
* provided * provided
* @throws AspectMissingException * @throws AspectMissingException
* thrown if the version aspect is missing * thrown if the version aspect is missing
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "versionProperties", "versionChildren"}) @Auditable(parameters = {"nodeRef", "versionProperties", "versionChildren"})
public Collection<Version> createVersion( public Collection<Version> createVersion(
NodeRef nodeRef, NodeRef nodeRef,
Map<String, Serializable> versionProperties, Map<String, Serializable> versionProperties,
boolean versionChildren) boolean versionChildren)
throws ReservedVersionNameException, AspectMissingException; throws ReservedVersionNameException, AspectMissingException;
/** /**
* Creates new versions based on the list of node references provided. * Creates new versions based on the list of node references provided.
* *
* @param nodeRefs a list of node references * @param nodeRefs a list of node references
* @param versionProperties version property values * @param versionProperties version property values
* @return a collection of newly created versions * @return a collection of newly created versions
* @throws ReservedVersionNameException * @throws ReservedVersionNameException
* thrown if a reserved property name is used int he version properties * thrown if a reserved property name is used int he version properties
* provided * provided
* @throws AspectMissingException * @throws AspectMissingException
* thrown if the version aspect is missing * thrown if the version aspect is missing
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "versionProperties"}) @Auditable(parameters = {"nodeRef", "versionProperties"})
public Collection<Version> createVersion( public Collection<Version> createVersion(
Collection<NodeRef> nodeRefs, Collection<NodeRef> nodeRefs,
Map<String, Serializable> versionProperties) Map<String, Serializable> versionProperties)
throws ReservedVersionNameException, AspectMissingException; throws ReservedVersionNameException, AspectMissingException;
/** /**
* Gets the version history information for a node. * Gets the version history information for a node.
* <p> * <p>
* If the node has not been versioned then null is returned. * If the node has not been versioned then null is returned.
* <p> * <p>
* If the node referenced does not or can not have the version aspect * If the node referenced does not or can not have the version aspect
* applied to it then an exception will be raised. * applied to it then an exception will be raised.
* *
* @param nodeRef a node reference * @param nodeRef a node reference
* @return the version history information * @return the version history information
* @throws AspectMissingException * @throws AspectMissingException
* thrown if the version aspect is missing * thrown if the version aspect is missing
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public VersionHistory getVersionHistory(NodeRef nodeRef) public VersionHistory getVersionHistory(NodeRef nodeRef)
throws AspectMissingException; throws AspectMissingException;
/** /**
* Gets the version object for the current version of the node reference * Gets the version object for the current version of the node reference
* passed. * passed.
* <p> * <p>
* Returns null if the node is not versionable or has not been versioned. * Returns null if the node is not versionable or has not been versioned.
* @param nodeRef the node reference * @param nodeRef the node reference
* @return the version object for the current version * @return the version object for the current version
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public Version getCurrentVersion(NodeRef nodeRef); public Version getCurrentVersion(NodeRef nodeRef);
/** /**
* The node reference will be reverted to the current version. * The node reference will be reverted to the current version.
* <p> * <p>
* A deep revert will be performed. * A deep revert will be performed.
* *
* @see VersionService#revert(NodeRef, Version, boolean) * @see VersionService#revert(NodeRef, Version, boolean)
* *
* @param nodeRef the node reference * @param nodeRef the node reference
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public void revert(NodeRef nodeRef); public void revert(NodeRef nodeRef);
/** /**
* The node reference will be reverted to the current version. * The node reference will be reverted to the current version.
* *
* @see VersionService#revert(NodeRef, Version, boolean) * @see VersionService#revert(NodeRef, Version, boolean)
* *
* @param nodeRef the node reference * @param nodeRef the node reference
* @param deep true if a deep revert is to be performed, flase otherwise * @param deep true if a deep revert is to be performed, flase otherwise
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "deep"}) @Auditable(parameters = {"nodeRef", "deep"})
public void revert(NodeRef nodeRef, boolean deep); public void revert(NodeRef nodeRef, boolean deep);
/** /**
* A deep revert will take place by default. * A deep revert will take place by default.
* *
* @see VersionService#revert(NodeRef, Version, boolean) * @see VersionService#revert(NodeRef, Version, boolean)
* *
* @param nodeRef the node reference * @param nodeRef the node reference
* @param version the version to revert to * @param version the version to revert to
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "version"}) @Auditable(parameters = {"nodeRef", "version"})
public void revert(NodeRef nodeRef, Version version); public void revert(NodeRef nodeRef, Version version);
/** /**
* Revert the state of the node to the specified version. * Revert the state of the node to the specified version.
* <p> * <p>
* Any changes made to the node will be lost and the state of the node will reflect * Any changes made to the node will be lost and the state of the node will reflect
* that of the version specified. * that of the version specified.
* <p> * <p>
* The version label property on the node reference will remain unchanged. * The version label property on the node reference will remain unchanged.
* <p> * <p>
* If the node is further versioned then the new version will be created at the head of * If the node is further versioned then the new version will be created at the head of
* the version history graph. A branch will not be created. * the version history graph. A branch will not be created.
* <p> * <p>
* If a deep revert is to be performed then any child nodes that are no longer present will * If a deep revert is to be performed then any child nodes that are no longer present will
* be deep restored (if appropriate) otherwise child associations to deleted, versioned nodes * be deep restored (if appropriate) otherwise child associations to deleted, versioned nodes
* will not be restored. * will not be restored.
* *
* @param nodeRef the node reference * @param nodeRef the node reference
* @param version the version to revert to * @param version the version to revert to
* @param deep true is a deep revert is to be performed, false otherwise. * @param deep true is a deep revert is to be performed, false otherwise.
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "version", "deep"}) @Auditable(parameters = {"nodeRef", "version", "deep"})
public void revert(NodeRef nodeRef, Version version, boolean deep); public void revert(NodeRef nodeRef, Version version, boolean deep);
/** /**
* By default a deep restore is performed. * By default a deep restore is performed.
* *
* @see org.alfresco.service.cmr.version.VersionService#restore(NodeRef, NodeRef, QName, QName, boolean) * @see org.alfresco.service.cmr.version.VersionService#restore(NodeRef, NodeRef, QName, QName, boolean)
* *
* @param nodeRef the node reference to a node that no longer exists in the store * @param nodeRef the node reference to a node that no longer exists in the store
* @param parentNodeRef the new parent of the restored node * @param parentNodeRef the new parent of the restored node
* @param assocTypeQName the assoc type qname * @param assocTypeQName the assoc type qname
* @param assocQName the assoc qname * @param assocQName the assoc qname
* @return the newly restored node reference * @return the newly restored node reference
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "parentNodeRef", "assocTypeQName", "assocQName"}) @Auditable(parameters = {"nodeRef", "parentNodeRef", "assocTypeQName", "assocQName"})
public NodeRef restore( public NodeRef restore(
NodeRef nodeRef, NodeRef nodeRef,
NodeRef parentNodeRef, NodeRef parentNodeRef,
QName assocTypeQName, QName assocTypeQName,
QName assocQName); QName assocQName);
/** /**
* Restores a node not currently present in the store, but that has a version * Restores a node not currently present in the store, but that has a version
* history. * history.
* <p> * <p>
* The restored node will be at the head (most resent version). * The restored node will be at the head (most resent version).
* <p> * <p>
* Restoration will fail if there is no version history for the specified node id in * Restoration will fail if there is no version history for the specified node id in
* the specified store. * the specified store.
* <p> * <p>
* If the node already exists in the store then an exception will be raised. * If the node already exists in the store then an exception will be raised.
* <p> * <p>
* Once the node is restored it is reverted to the head version in the appropriate * Once the node is restored it is reverted to the head version in the appropriate
* version history tree. If deep is set to true then this will be a deep revert, false * version history tree. If deep is set to true then this will be a deep revert, false
* otherwise. * otherwise.
* *
* @param nodeRef the node reference to a node that no longer exists in * @param nodeRef the node reference to a node that no longer exists in
* the store * the store
* @param parentNodeRef the new parent of the restored node * @param parentNodeRef the new parent of the restored node
* @param assocTypeQName the assoc type qname * @param assocTypeQName the assoc type qname
* @param assocQName the assoc qname * @param assocQName the assoc qname
* @param deep true is a deep revert should be performed once the node has been * @param deep true is a deep revert should be performed once the node has been
* restored, false otherwise * restored, false otherwise
* @return the newly restored node reference * @return the newly restored node reference
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "parentNodeRef", "assocTypeQName", "assocQName", "deep"}) @Auditable(parameters = {"nodeRef", "parentNodeRef", "assocTypeQName", "assocQName", "deep"})
public NodeRef restore( public NodeRef restore(
NodeRef nodeRef, NodeRef nodeRef,
NodeRef parentNodeRef, NodeRef parentNodeRef,
QName assocTypeQName, QName assocTypeQName,
QName assocQName, QName assocQName,
boolean deep); boolean deep);
/** /**
* Delete the version history associated with a node reference. * Delete the version history associated with a node reference.
* <p> * <p>
* This operation is permanent, all versions in the version history are * This operation is permanent, all versions in the version history are
* deleted and cannot be retrieved. * deleted and cannot be retrieved.
* <p> * <p>
* The current version label for the node reference is reset and any subsequent versions * The current version label for the node reference is reset and any subsequent versions
* of the node will result in a new version history being created. * of the node will result in a new version history being created.
* *
* @param nodeRef the node reference * @param nodeRef the node reference
* @throws AspectMissingException thrown if the version aspect is missing * @throws AspectMissingException thrown if the version aspect is missing
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef"}) @Auditable(parameters = {"nodeRef"})
public void deleteVersionHistory(NodeRef nodeRef) public void deleteVersionHistory(NodeRef nodeRef)
throws AspectMissingException; throws AspectMissingException;
/** /**
* Delete a specific version associated with a node reference. * Delete a specific version associated with a node reference.
* <p> * <p>
* This operation is permanent, the specific version in the version history is * This operation is permanent, the specific version in the version history is
* deleted and cannot be retrieved. * deleted and cannot be retrieved.
* <p> * <p>
* If this is the last version, then the current version label for the node reference is * If this is the last version, then the current version label for the node reference is
* reset and any subsequent versions of the node will result in a new version history being created. * reset and any subsequent versions of the node will result in a new version history being created.
* *
* @param nodeRef the node reference * @param nodeRef the node reference
* @param version the version to delete * @param version the version to delete
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"nodeRef", "version"}) @Auditable(parameters = {"nodeRef", "version"})
public void deleteVersion(NodeRef nodeRef, Version version); public void deleteVersion(NodeRef nodeRef, Version version);
/** /**
* Register a version label policy * Register a version label policy
* *
* @param typeQName the QName of the type to register * @param typeQName the QName of the type to register
* @param policy the policy to register for the specified type * @param policy the policy to register for the specified type
*/ */
public void registerVersionLabelPolicy(QName typeQName, CalculateVersionLabelPolicy policy); public void registerVersionLabelPolicy(QName typeQName, CalculateVersionLabelPolicy policy);
} }

View File

@@ -55,7 +55,7 @@ public interface RepositoryExporterService
* @param packageName package name prefix for export .acp files * @param packageName package name prefix for export .acp files
* @return list of repository held export files * @return list of repository held export files
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"repositoryDestination", "packageName"}) @Auditable(parameters = {"repositoryDestination", "packageName"})
public RepositoryExportHandle[] export(NodeRef repositoryDestination, String packageName); public RepositoryExportHandle[] export(NodeRef repositoryDestination, String packageName);
/** /**

View File

@@ -65,7 +65,7 @@ public interface WorkflowService
* @param workflowDefinition the content object containing the definition * @param workflowDefinition the content object containing the definition
* @return workflow deployment descriptor * @return workflow deployment descriptor
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"workflowDefinition"}) @Auditable(parameters = {"workflowDefinition"})
public WorkflowDeployment deployDefinition(NodeRef workflowDefinition); public WorkflowDeployment deployDefinition(NodeRef workflowDefinition);
/** /**
@@ -432,7 +432,7 @@ public interface WorkflowService
* @param container (optional) a pre-created container (e.g. folder, versioned folder or layered folder) * @param container (optional) a pre-created container (e.g. folder, versioned folder or layered folder)
* @return the workflow package * @return the workflow package
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"container"}) @Auditable(parameters = {"container"})
public NodeRef createPackage(NodeRef container); public NodeRef createPackage(NodeRef container);
/** /**
@@ -442,7 +442,7 @@ public interface WorkflowService
* @param active true => active workflows only, false => completed workflows only * @param active true => active workflows only, false => completed workflows only
* @return list of workflows which act upon the specified content * @return list of workflows which act upon the specified content
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"packageItem", "active"}) @Auditable(parameters = {"packageItem", "active"})
public List<WorkflowInstance> getWorkflowsForContent(NodeRef packageItem, boolean active); public List<WorkflowInstance> getWorkflowsForContent(NodeRef packageItem, boolean active);
/** /**
@@ -450,6 +450,6 @@ public interface WorkflowService
* @param taskId - the task id * @param taskId - the task id
* @return - A list of NodeRefs * @return - A list of NodeRefs
*/ */
@Auditable(key = Auditable.Key.ARG_0, parameters = {"packageItem", "active"}) @Auditable(parameters = {"packageItem", "active"})
public List<NodeRef> getPackageContents(String taskId); public List<NodeRef> getPackageContents(String taskId);
} }