diff --git a/source/java/org/alfresco/service/cmr/activities/ActivityService.java b/source/java/org/alfresco/service/cmr/activities/ActivityService.java index 453c3f99ce..10e42ea828 100644 --- a/source/java/org/alfresco/service/cmr/activities/ActivityService.java +++ b/source/java/org/alfresco/service/cmr/activities/ActivityService.java @@ -21,6 +21,8 @@ package org.alfresco.service.cmr.activities; import java.util.List; import org.alfresco.service.PublicService; +import org.alfresco.service.Auditable; +import org.alfresco.service.NotAuditable; /** @@ -43,6 +45,7 @@ public interface ActivityService extends ActivityPostService * @param siteId - optional, if set then will filter by given siteId else return all sites * @return list of JSON feed entries */ + @NotAuditable public List getUserFeedEntries(String userId, String format, String siteId); /** @@ -63,6 +66,7 @@ public interface ActivityService extends ActivityPostService * @param excludeOthersUsers - if TRUE then will exclude activities for other users (hence returning this user only) * @return list of JSON feed entries */ + @NotAuditable public List getUserFeedEntries(String userId, String format, String siteId, boolean excludeThisUser, boolean excludeOtherUsers); /** @@ -72,6 +76,7 @@ public interface ActivityService extends ActivityPostService * @param format - required * @return list of JSON feed entries */ + @NotAuditable public List getSiteFeedEntries(String siteId, String format); @@ -84,6 +89,7 @@ public interface ActivityService extends ActivityPostService * * @param feedControl - required */ + @NotAuditable public void setFeedControl(FeedControl feedControl); /** @@ -92,6 +98,7 @@ public interface ActivityService extends ActivityPostService * @param userId - required (must match * @return list of user feed controls */ + @NotAuditable public List getFeedControls(String userId); /** @@ -99,6 +106,7 @@ public interface ActivityService extends ActivityPostService * * @return list of user feed controls */ + @NotAuditable public List getFeedControls(); /** @@ -106,6 +114,7 @@ public interface ActivityService extends ActivityPostService * * @param feedControl - required */ + @NotAuditable public void unsetFeedControl(FeedControl feedControl); /** @@ -114,5 +123,6 @@ public interface ActivityService extends ActivityPostService * @param feedControl - required * @return true, if user feed control exists */ + @NotAuditable public boolean existsFeedControl(FeedControl feedControl); } diff --git a/source/java/org/alfresco/service/cmr/attributes/AttributeService.java b/source/java/org/alfresco/service/cmr/attributes/AttributeService.java index 66c3594c0c..39a15fee00 100644 --- a/source/java/org/alfresco/service/cmr/attributes/AttributeService.java +++ b/source/java/org/alfresco/service/cmr/attributes/AttributeService.java @@ -25,6 +25,8 @@ import java.util.Map; import org.alfresco.repo.attributes.Attribute; import org.alfresco.service.PublicService; import org.alfresco.util.Pair; +import org.alfresco.service.Auditable; +import org.alfresco.service.NotAuditable; /** * This provides services for reading, writing, and querying global attributes. @@ -70,6 +72,7 @@ public interface AttributeService * @param path The path of the Attribute * @return The value of the attribute or null. */ + @NotAuditable public Attribute getAttribute(String path); /** @@ -78,6 +81,7 @@ public interface AttributeService * @param keys List of attribute path keys (path components). * @return The value of the attribute or null. */ + @NotAuditable public Attribute getAttribute(List keys); /** @@ -86,6 +90,7 @@ public interface AttributeService * @param name The name of the Attribute. * @param value The value to set. */ + @NotAuditable public void setAttribute(String path, String name, Attribute value); /** @@ -95,6 +100,7 @@ public interface AttributeService * @param name The name of the attribute to set. * @param value The Attribute to set. */ + @NotAuditable public void setAttribute(List keys, String name, Attribute value); /** @@ -102,6 +108,7 @@ public interface AttributeService * @param path The path to the map. * @param entries The entries to set. */ + @NotAuditable public void setAttributes(String path, Map entries); /** @@ -109,6 +116,7 @@ public interface AttributeService * @param keys The List of path keys to the map. * @param entries The entries to set. */ + @NotAuditable public void setAttributes(List keys, Map entries); /** @@ -118,6 +126,7 @@ public interface AttributeService * @param index The list index. * @param value The Attribute to set. */ + @NotAuditable public void setAttribute(String path, int index, Attribute value); /** @@ -126,6 +135,7 @@ public interface AttributeService * @param index The list index. * @param value The Attribute to set within the {@link org.alfresco.repo.attributes.ListAttribute ListAttribute} */ + @NotAuditable public void setAttribute(List keys, int index, Attribute value); /** @@ -134,6 +144,7 @@ public interface AttributeService * @param path The path to the list. * @param value The Attribute to add to the {@link org.alfresco.repo.attributes.ListAttribute ListAttribute} */ + @NotAuditable public void addAttribute(String path, Attribute value); /** @@ -142,6 +153,7 @@ public interface AttributeService * @param keys List of attribute path keys (path components). * @param value The Attribute to add to the {@link org.alfresco.repo.attributes.ListAttribute ListAttribute} */ + @NotAuditable public void addAttribute(List keys, Attribute value); /** @@ -149,6 +161,7 @@ public interface AttributeService * @param path The path to the list. * @param values The values to add. */ + @NotAuditable public void addAttributes(String path, List values); /** @@ -156,12 +169,14 @@ public interface AttributeService * @param keys The List of path keys to the list. * @param values The values to add. */ + @NotAuditable public void addAttributes(List keys, List values); /** * Remove an Attribute. * @param name The name of the Attribute. */ + @NotAuditable public void removeAttribute(String path, String name); /** @@ -169,6 +184,7 @@ public interface AttributeService * @param keys List of attribute path keys (path components). * @param name The name of the attribute to remove. */ + @NotAuditable public void removeAttribute(List keys, String name); /** @@ -177,6 +193,7 @@ public interface AttributeService * @param index The index to remove from the * {@link org.alfresco.repo.attributes.ListAttribute ListAttribute} */ + @NotAuditable public void removeAttribute(String path, int index); /** @@ -185,6 +202,7 @@ public interface AttributeService * @param index The index to remove from the * {@link org.alfresco.repo.attributes.ListAttribute ListAttribute} */ + @NotAuditable public void removeAttribute(List keys, int index); /** @@ -192,6 +210,7 @@ public interface AttributeService * @param keys The list of attribute path entries. * @param query The attribute query. */ + @NotAuditable public void removeEntries(List keys, AttrQuery query); /** @@ -199,6 +218,7 @@ public interface AttributeService * @param path The path to the map. * @param query The attribute query. */ + @NotAuditable public void removeEntries(String path, AttrQuery query); /** @@ -226,6 +246,7 @@ public interface AttributeService * @param query * @return A List of matching attributes. */ + @NotAuditable public List> query(String path, AttrQuery query); /** @@ -235,6 +256,7 @@ public interface AttributeService * @param query * @return A list of matching attributes. */ + @NotAuditable public List> query(List keys, AttrQuery query); /** @@ -267,6 +289,7 @@ public interface AttributeService * @param path The attribute path. * @return A list of all keys. */ + @NotAuditable public List getKeys(String path); /** @@ -274,6 +297,7 @@ public interface AttributeService * @param keys List of attribute path keys (path components). * @return A list of all keys at the specified Attribute location */ + @NotAuditable public List getKeys(List keys); /** @@ -281,6 +305,7 @@ public interface AttributeService * @param keys List of attribute path keys. * @return The size of of the list or map. */ + @NotAuditable public int getCount(List keys); /** @@ -288,6 +313,7 @@ public interface AttributeService * @param path The path to the map or list. * @return The size of the list or map. */ + @NotAuditable public int getCount(String path); /** @@ -295,6 +321,7 @@ public interface AttributeService * @param keys List of attribute path keys. * @return Whether the attribute exists. */ + @NotAuditable public boolean exists(List keys); /** @@ -302,5 +329,6 @@ public interface AttributeService * @param path The path to the attribute. * @return Whether the attribute exists. */ + @NotAuditable public boolean exists(String path); } diff --git a/source/java/org/alfresco/service/cmr/avm/deploy/DeploymentService.java b/source/java/org/alfresco/service/cmr/avm/deploy/DeploymentService.java index 15d2873e0c..5063fc3405 100644 --- a/source/java/org/alfresco/service/cmr/avm/deploy/DeploymentService.java +++ b/source/java/org/alfresco/service/cmr/avm/deploy/DeploymentService.java @@ -24,6 +24,8 @@ import java.util.List; import org.alfresco.service.PublicService; import org.alfresco.service.cmr.action.ActionService; import org.alfresco.util.NameMatcher; +import org.alfresco.service.Auditable; +import org.alfresco.service.NotAuditable; /** * A service to handle WCM AVM repository to remote AVM repository deployment. @@ -47,6 +49,7 @@ public interface DeploymentService * @param dontDo If this is set then this is a dry run. * @param callback A possibly null callback. */ + @Auditable public void deployDifference(int version, String srcPath, String hostName, int port, @@ -67,6 +70,7 @@ public interface DeploymentService * @param password * @return */ + @NotAuditable public ActionService getRemoteActionService(String hostName, int port, String userName, String password); @@ -86,6 +90,7 @@ public interface DeploymentService * @param dontDo If this is set, this is a dry run. * @param callback A possibly null callback. */ + @Auditable public void deployDifferenceFS(int version, String srcPath, String adapterName, @@ -105,6 +110,7 @@ public interface DeploymentService * * @return the adapters */ + @NotAuditable public Set getAdapterNames(); } diff --git a/source/java/org/alfresco/service/cmr/rendition/RenditionService.java b/source/java/org/alfresco/service/cmr/rendition/RenditionService.java index 537a040113..e7a5f4db4e 100644 --- a/source/java/org/alfresco/service/cmr/rendition/RenditionService.java +++ b/source/java/org/alfresco/service/cmr/rendition/RenditionService.java @@ -26,6 +26,8 @@ import org.alfresco.service.PublicService; import org.alfresco.service.cmr.repository.ChildAssociationRef; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; +import org.alfresco.service.Auditable; +import org.alfresco.service.NotAuditable; /** * The Rendition service. @@ -78,12 +80,14 @@ public interface RenditionService extends RenditionDefinitionPersister * @param name The rendering engine name. * @return The {@link RenderingEngineDefinition} or null. */ + @NotAuditable RenderingEngineDefinition getRenderingEngineDefinition(String name); /** * @return A {@link List} of all available {@link RenderingEngineDefinition} * s. */ + @NotAuditable List getRenderingEngineDefinitions(); /** @@ -96,6 +100,7 @@ public interface RenditionService extends RenditionDefinitionPersister * with this {@link RenditionDefinition}. * @return the created {@link RenditionDefinition}. */ + @NotAuditable RenditionDefinition createRenditionDefinition(QName renditionName, String renderingEngineName); /** @@ -106,6 +111,7 @@ public interface RenditionService extends RenditionDefinitionPersister * {@link RenditionDefinition}. * @return the created {@link CompositeRenditionDefinition}. */ + @NotAuditable CompositeRenditionDefinition createCompositeRenditionDefinition(QName renditionName); /** @@ -114,6 +120,7 @@ public interface RenditionService extends RenditionDefinitionPersister * @return a list of ChildAssociationRefs which link the source node to the * renditions. */ + @NotAuditable List getRenditions(NodeRef node); /** @@ -127,6 +134,7 @@ public interface RenditionService extends RenditionDefinitionPersister * @return a list of ChildAssociationRefs which link the source node to the * filtered renditions. */ + @NotAuditable List getRenditions(NodeRef node, String mimeTypePrefix); /** @@ -138,6 +146,7 @@ public interface RenditionService extends RenditionDefinitionPersister * @return the ChildAssociationRef which links the source node to the * rendition or null if there is no such rendition. */ + @NotAuditable ChildAssociationRef getRenditionByName(NodeRef node, QName renditionName); /** @@ -148,6 +157,7 @@ public interface RenditionService extends RenditionDefinitionPersister * @param node * @return true if a rendition, else false */ + @NotAuditable boolean isRendition(NodeRef node); /** @@ -160,6 +170,7 @@ public interface RenditionService extends RenditionDefinitionPersister * * @see RenditionService#isRendition(NodeRef) */ + @NotAuditable ChildAssociationRef getSourceNode(NodeRef renditionNode); /** @@ -175,6 +186,7 @@ public interface RenditionService extends RenditionDefinitionPersister * @throws RenditionServiceException if there is a problem in rendering the * given sourceNode */ + @NotAuditable ChildAssociationRef render(NodeRef sourceNode, RenditionDefinition renditionDefinition); /** @@ -187,6 +199,7 @@ public interface RenditionService extends RenditionDefinitionPersister * be performed. * @param callback a callback object to handle the ultimate result of the rendition. */ + @NotAuditable void render(NodeRef sourceNode, RenditionDefinition renditionDefinition, RenderCallback callback); } diff --git a/source/java/org/alfresco/service/cmr/site/SiteService.java b/source/java/org/alfresco/service/cmr/site/SiteService.java index 6ada2af125..0317764c76 100644 --- a/source/java/org/alfresco/service/cmr/site/SiteService.java +++ b/source/java/org/alfresco/service/cmr/site/SiteService.java @@ -25,6 +25,8 @@ import java.util.Map; import org.alfresco.service.PublicService; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; +import org.alfresco.service.Auditable; +import org.alfresco.service.NotAuditable; /** * Site service fundamental API. @@ -47,6 +49,7 @@ public interface SiteService * @return SiteInfo information about the created site * @deprecated since version 3.2, replaced by {@link #createSite(String, String, String, String, SiteVisibility)} */ + @Auditable(parameters = {"sitePreset", "shortName"}) SiteInfo createSite(String sitePreset, String shortName, String title, String description, boolean isPublic); /** @@ -59,6 +62,7 @@ public interface SiteService * @param visibility site visibility (public|moderated|private) * @return SiteInfo information about the created site */ + @Auditable(parameters = {"sitePreset", "shortName"}) SiteInfo createSite(String sitePreset, String shortName, String title, String description, SiteVisibility visibility); /** @@ -69,6 +73,7 @@ public interface SiteService * @param size list maximum size or zero for all * @return List list of site information */ + @NotAuditable List listSites(String nameFilter, String sitePresetFilter, int size); /** @@ -78,6 +83,7 @@ public interface SiteService * @param sitePresetFilter site preset filter * @return List list of site information */ + @NotAuditable List listSites(String nameFilter, String sitePresetFilter); /** @@ -86,6 +92,7 @@ public interface SiteService * @param userName user name * @return List list of site information */ + @NotAuditable List listSites(String userName); /** @@ -96,6 +103,7 @@ public interface SiteService * @param shortName the site short name * @return SiteInfo the site information */ + @NotAuditable SiteInfo getSite(String shortName); /** @@ -103,6 +111,7 @@ public interface SiteService * @param nodeRef * @return */ + @NotAuditable SiteInfo getSite(NodeRef nodeRef); /** @@ -112,6 +121,7 @@ public interface SiteService * * @param siteInfo site information */ + @Auditable void updateSite(SiteInfo siteInfo); /** @@ -119,6 +129,7 @@ public interface SiteService * * @param shortName site short name */ + @Auditable(parameters = {"shortName"}) void deleteSite(String shortName); /** @@ -132,6 +143,7 @@ public interface SiteService * @param size max results size crop if >0 * @return Map the authority name and their role */ + @NotAuditable Map listMembers(String shortName, String nameFilter, String roleFilter, int size); /** @@ -145,6 +157,7 @@ public interface SiteService * @param collapseGroups true if collapse member groups into user list, false otherwise * @return Map the authority name and their role */ + @NotAuditable Map listMembers(String shortName, String nameFilter, String roleFilter, int size, boolean collapseGroups); /** @@ -154,6 +167,7 @@ public interface SiteService * @param authorityName full authority name (so if it's a group then its prefixed with 'GROUP_') * @return String site role, null if none */ + @NotAuditable String getMembersRole(String shortName, String authorityName); /** @@ -163,6 +177,7 @@ public interface SiteService * @param authorityName authority name (so if it's a group then its prefixed with 'GROUP_') * @return boolean true if the authority is a member of the site, false otherwise */ + @NotAuditable boolean isMember(String shortName, String authorityName); /** @@ -172,6 +187,7 @@ public interface SiteService * @param authorityName authority name (so if it's a group then its prefixed with 'GROUP_') * @param role site role */ + @Auditable(parameters = {"shortName", "authorityName", "role"}) void setMembership(String shortName, String authorityName, String role); /** @@ -180,6 +196,7 @@ public interface SiteService * @param shortName site short name * @param authorityName authority name (so if it's a group then its prefixed with 'GROUP_') */ + @Auditable(parameters = {"shortName", "authorityName"}) void removeMembership(String shortName, String authorityName); /** @@ -196,6 +213,7 @@ public interface SiteService * @param containerProperties container property values (can be null) * @return noderef of container or null if a container can't be created. */ + @NotAuditable NodeRef createContainer(String shortName, String componentId, QName containerType, Map containerProperties); /** @@ -207,6 +225,7 @@ public interface SiteService * @param folderType type of folder to create (if null, creates standard folder) * @return noderef of container */ + @NotAuditable NodeRef getContainer(String shortName, String componentId); /** @@ -216,6 +235,7 @@ public interface SiteService * @param componentId component id * @return true => "container" folder exists for component */ + @NotAuditable boolean hasContainer(String shortName, String componentId); /** @@ -223,6 +243,7 @@ public interface SiteService * * @return List list of available roles */ + @NotAuditable List getSiteRoles(); /** @@ -231,6 +252,7 @@ public interface SiteService * @param shortName site short name * @return String group name */ + @NotAuditable String getSiteGroup(String shortName); /** @@ -241,6 +263,7 @@ public interface SiteService * @param role membership role * @return String group name */ + @NotAuditable String getSiteRoleGroup(String shortName, String role); } diff --git a/source/java/org/alfresco/service/cmr/transfer/TransferService.java b/source/java/org/alfresco/service/cmr/transfer/TransferService.java index 50bfffa202..d5f9f43aca 100644 --- a/source/java/org/alfresco/service/cmr/transfer/TransferService.java +++ b/source/java/org/alfresco/service/cmr/transfer/TransferService.java @@ -24,6 +24,8 @@ import java.util.Set; import org.alfresco.service.PublicService; import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.Auditable; +import org.alfresco.service.NotAuditable; /** * The transfer service is responsible for transfering nodes between one instance of Alfresco and another remote instance. @@ -45,7 +47,8 @@ public interface TransferService * @param definition, the definition of the transfer. Specifies which nodes to transfer. * @throws TransferException * @return the node reference of the transfer report - */ + */ + @Auditable(parameters={"targetName"}) public NodeRef transfer(String targetName, TransferDefinition definition) throws TransferException; /** @@ -59,7 +62,8 @@ public interface TransferService * @param callback - a set of callback handlers that will be called as transfer proceeds. May be null. * @throws TransferException * @return the node reference of the transfer report - */ + */ + @Auditable(parameters={"targetName"}) public NodeRef transfer(String targetName, TransferDefinition definition, Collection callback) throws TransferException; /** @@ -73,7 +77,8 @@ public interface TransferService * @param callbacks - a list of callback handlers that will be called as transfer proceeds. May be null. * @throws TransferException * @return the node reference of the transfer report - */ + */ + @Auditable(parameters={"targetName"}) public NodeRef transfer(String targetName, TransferDefinition definition, TransferCallback... callbacks) throws TransferException; /** @@ -90,7 +95,8 @@ public interface TransferService * @param callback - a collection of callback handlers that will be called as transfer proceeds. May be null. * * @throws TransferException - */ + */ + @Auditable(parameters={"targetName"}) public void transferAsync(String targetName, TransferDefinition definition, Collection callback) throws TransferException; /** @@ -107,13 +113,15 @@ public interface TransferService * @param callbacks - a collection of callback handlers that will be called as transfer proceeds. May be null. * * @throws TransferException - */ + */ + @Auditable(parameters={"targetName"}) public void transferAsync(String targetName, TransferDefinition definition, TransferCallback... callbacks) throws TransferException; /** * Verify a target is available and that the configured credentials are valid. * @throws TransferException */ + @NotAuditable public void verify(TransferTarget target) throws TransferException; /** @@ -130,6 +138,7 @@ public interface TransferService * @param password, * @return the newly created transfer target. */ + @Auditable public TransferTarget createAndSaveTransferTarget(String name, String title, String description, String endpointProtocol, String endpointHost, int endpointPort, String endpointPath, String username, char[] password) throws TransferException; @@ -148,23 +157,27 @@ public interface TransferService * * @return an in memory transfer target */ + @Auditable(parameters={"name"}) public TransferTarget createTransferTarget(String name); /** * Get all the transfer targets */ + @NotAuditable public SetgetTransferTargets() throws TransferException; /** * Get All the transfer targets for a particular transfer target group. * @param groupName, the name of the transfer group */ + @NotAuditable public SetgetTransferTargets(String groupName) throws TransferException; /** * Get a transfer target by its name * @throws TransferException - target does not exist */ + @NotAuditable public TransferTarget getTransferTarget(String name) throws TransferException; /** @@ -172,6 +185,7 @@ public interface TransferService * @param name * @return true if the specified target exists, and false otherwise */ + @NotAuditable public boolean targetExists(String name); /** @@ -179,6 +193,7 @@ public interface TransferService * @throws TransferException - target does not exist * @param name, the name of this transfer target, */ + @Auditable(parameters={"name"}) public void deleteTransferTarget(String name) throws TransferException; /** @@ -200,6 +215,7 @@ public interface TransferService * * @param update */ + @Auditable public TransferTarget saveTransferTarget(TransferTarget update) throws TransferException; /** @@ -207,6 +223,7 @@ public interface TransferService * @param name the name of the transfer target * @param enable (or false=disable) */ + @Auditable(parameters={"name", "enable"}) public void enableTransferTarget(String name, boolean enable) throws TransferException; /** @@ -227,6 +244,7 @@ public interface TransferService * * @see TransferEventBegin; */ + @Auditable(parameters={"transferId"}) public void cancelAsync(String transferId); } diff --git a/source/java/org/alfresco/wcm/asset/AssetService.java b/source/java/org/alfresco/wcm/asset/AssetService.java index e8df02dd9b..3ca40bd1ad 100644 --- a/source/java/org/alfresco/wcm/asset/AssetService.java +++ b/source/java/org/alfresco/wcm/asset/AssetService.java @@ -28,6 +28,8 @@ import org.alfresco.service.PublicService; import org.alfresco.service.cmr.repository.ContentReader; import org.alfresco.service.cmr.repository.ContentWriter; import org.alfresco.service.namespace.QName; +import org.alfresco.service.Auditable; +import org.alfresco.service.NotAuditable; @@ -49,6 +51,7 @@ public interface AssetService * @param parentFolderPathRelativeToWebApp * @param name */ + @NotAuditable public void createFolderWebApp(String sbStoreId, String webApp, String parentFolderPathRelativeToWebApp, String name); /** @@ -59,6 +62,7 @@ public interface AssetService * @param name * @param properties */ + @NotAuditable public void createFolder(String sbStoreId, String parentFolderPath, String name, Map properties); /** @@ -70,6 +74,7 @@ public interface AssetService * @param name * @return */ + @NotAuditable public ContentWriter createFileWebApp(String sbStoreId, String webApp, String parentFolderPath, String name); /** @@ -81,6 +86,7 @@ public interface AssetService * @param properties * @return */ + @NotAuditable public ContentWriter createFile(String sbStoreId, String parentFolderPath, String name, Map properties); /** @@ -93,6 +99,7 @@ public interface AssetService * @param pathRelativeToWebApp * @return */ + @NotAuditable public AssetInfo getAssetWebApp(String sbStoreId, String webApp, String pathRelativeToWebApp); /** @@ -106,6 +113,7 @@ public interface AssetService * @param includeDeleted * @return AssetInfo asset info */ + @NotAuditable public AssetInfo getAssetWebApp(String sbStoreId, String webApp, String pathRelativeToWebApp, boolean includeDeleted); /** @@ -117,6 +125,7 @@ public interface AssetService * @param path asset path (eg. /www/avm_webapps/ROOT/myFile) * @return AssetInfo asset info */ + @NotAuditable public AssetInfo getAsset(String sbStoreId, String path); /** @@ -130,6 +139,7 @@ public interface AssetService * @param includeDeleted * @return AssetInfo asset info */ + @NotAuditable public AssetInfo getAsset(String sbStoreId, int version, String path, boolean includeDeleted); /** @@ -138,6 +148,7 @@ public interface AssetService * @param asset * @return */ + @NotAuditable public ContentWriter getContentWriter(AssetInfo fileAsset); /** @@ -146,6 +157,7 @@ public interface AssetService * @param asset * @return */ + @NotAuditable public ContentReader getContentReader(AssetInfo fileAsset); /** @@ -154,6 +166,7 @@ public interface AssetService * @param asset * @return */ + @NotAuditable public Map getAssetProperties(AssetInfo asset); /** @@ -162,6 +175,7 @@ public interface AssetService * @param asset * @param properties */ + @NotAuditable public void setAssetProperties(AssetInfo asset, Map properties); /** @@ -170,6 +184,7 @@ public interface AssetService * @param asset * @param properties */ + @NotAuditable public void updateAssetProperties(AssetInfo asset, Map properties); /** @@ -179,6 +194,7 @@ public interface AssetService * @param aspectName * @param properties */ + @NotAuditable public void addAspect(AssetInfo asset, QName aspectName, Map properties); /** @@ -187,6 +203,7 @@ public interface AssetService * @param asset * @param aspectName */ + @NotAuditable public void removeAspect(AssetInfo asset, QName aspectName); /** @@ -195,6 +212,7 @@ public interface AssetService * @param asset * @return list of aspects */ + @NotAuditable public Set getAspects(AssetInfo asset); /** @@ -204,6 +222,7 @@ public interface AssetService * @param aspectName * @return */ + @NotAuditable public boolean hasAspect(AssetInfo asset, QName aspectName); /** @@ -215,6 +234,7 @@ public interface AssetService * @param includeDeleted * @return list of assets */ + @NotAuditable public List listAssetsWebApp(String sbStoreId, String webApp, String parentFolderPathRelativeToWebApp, boolean includeDeleted); /** @@ -225,6 +245,7 @@ public interface AssetService * @param includeDeleted * @return list of assets */ + @NotAuditable public List listAssets(String sbStoreId, String parentFolderPath, boolean includeDeleted); /** @@ -236,6 +257,7 @@ public interface AssetService * @param includeDeleted * @return list of assets */ + @NotAuditable public List listAssets(String sbStoreId, int version, String parentFolderPath, boolean includeDeleted); /** @@ -243,6 +265,7 @@ public interface AssetService * * @param asset */ + @NotAuditable public void deleteAsset(AssetInfo asset); /** @@ -252,6 +275,7 @@ public interface AssetService * @param newName * @return AssetInfo asset info */ + @NotAuditable public AssetInfo renameAsset(AssetInfo asset, String newName); /** @@ -264,6 +288,7 @@ public interface AssetService * @param parentFolderPath * @return AssetInfo asset info */ + @NotAuditable public AssetInfo copyAsset(AssetInfo asset, String parentFolderPath); // TODO - copy asset to different sandbox ? @@ -275,6 +300,7 @@ public interface AssetService * @param parentFolderPath * @return AssetInfo asset info */ + @NotAuditable public AssetInfo moveAsset(AssetInfo asset, String parentFolderPath); /** @@ -284,6 +310,7 @@ public interface AssetService * @param parentFolderPath * @param zipFile */ + @NotAuditable public void bulkImport(String sbStoreId, String parentFolderPath, File zipFile, boolean isHighByteZip); /** @@ -292,6 +319,7 @@ public interface AssetService * @param asset * @return String lock owner (null if path not locked) */ + @NotAuditable public String getLockOwner(AssetInfo fileAsset); /** @@ -300,5 +328,6 @@ public interface AssetService * @param asset * @return boolean true if current user has write access */ + @NotAuditable public boolean hasLockAccess(AssetInfo fileAsset); } diff --git a/source/java/org/alfresco/wcm/sandbox/SandboxService.java b/source/java/org/alfresco/wcm/sandbox/SandboxService.java index 121f32db1f..f373f904d1 100644 --- a/source/java/org/alfresco/wcm/sandbox/SandboxService.java +++ b/source/java/org/alfresco/wcm/sandbox/SandboxService.java @@ -26,6 +26,8 @@ import java.util.Map; import org.alfresco.service.PublicService; import org.alfresco.service.namespace.QName; import org.alfresco.wcm.asset.AssetInfo; +import org.alfresco.service.Auditable; +import org.alfresco.service.NotAuditable; /** @@ -46,6 +48,7 @@ public interface SandboxService * @param wpStoreId web project store id * @return SandboxInfo the created user sandbox info */ + @Auditable(parameters={"wpStoreId"}) public SandboxInfo createAuthorSandbox(String wpStoreId); /** @@ -59,6 +62,7 @@ public interface SandboxService * @param userName user name * @return SandboxInfo the created user sandbox info */ + @Auditable(parameters={"wpStoreId", "userName"}) public SandboxInfo createAuthorSandbox(String wpStoreId, String userName); /** @@ -67,6 +71,7 @@ public interface SandboxService * @param wpStoreId web project store id * @return List list of sandbox info */ + @NotAuditable public List listSandboxes(String wpStoreId); /** @@ -78,6 +83,7 @@ public interface SandboxService * @param userName user name * @return List list of sandbox info */ + @NotAuditable public List listSandboxes(String wpStoreId, String userName); /** @@ -89,6 +95,7 @@ public interface SandboxService * @param sandboxType sandbox type (see SandboxConstants) * @return boolean true, if sandbox exists with given type */ + @NotAuditable public boolean isSandboxType(String sbStoreId, QName sandboxType); /** @@ -97,6 +104,7 @@ public interface SandboxService * @param sbStoreId sandbox store id * @return SandboxInfo null if sandbox does not exist or is not visible to the current user */ + @NotAuditable public SandboxInfo getSandbox(String sbStoreId); /** @@ -107,6 +115,7 @@ public interface SandboxService * @param wpStoreId web project store id * @return SandboxInfo author sandbox info */ + @NotAuditable public SandboxInfo getAuthorSandbox(String wpStoreId); /** @@ -120,6 +129,7 @@ public interface SandboxService * @param userName userName * @return SandboxInfo author sandbox info */ + @NotAuditable public SandboxInfo getAuthorSandbox(String wpStoreId, String userName); /** @@ -130,6 +140,7 @@ public interface SandboxService * @param wpStoreId web project store id * @return SandboxInfo staging sandbox info */ + @NotAuditable public SandboxInfo getStagingSandbox(String wpStoreId); /** @@ -141,6 +152,7 @@ public interface SandboxService * * @param sbStoreId sandbox store id */ + @Auditable(parameters={"sbStoreId"}) public void deleteSandbox(String sbStoreId); /** @@ -152,6 +164,7 @@ public interface SandboxService * @param includeDeleted if true, include deleted assets as well as new/modified assets * @return List list of all changed assets */ + @NotAuditable public List listChangedAll(String sbStoreId, boolean includeDeleted); /** @@ -164,6 +177,7 @@ public interface SandboxService * @param includeDeleted if true, include deleted assets as well as new/modified assets * @return List list of changed assets */ + @NotAuditable public List listChangedWebApp(String sbStoreId, String webApp, boolean includeDeleted); /** @@ -176,6 +190,7 @@ public interface SandboxService * @param includeDeleted if true, include deleted assets as well as new/modified assets * @return List list of changed assets */ + @NotAuditable public List listChanged(String sbStoreId, String relativePath, boolean includeDeleted); /** @@ -188,6 +203,7 @@ public interface SandboxService * @param includeDeleted if true, include deleted assets as well as new/modified assets * @return List list of changed assets */ + @NotAuditable public List listChanged(String srcSandboxStoreId, String srcRelativePath, String dstSandboxStoreId, String dstRelativePath, boolean includeDeleted); /** @@ -199,6 +215,7 @@ public interface SandboxService * @param submitLabel label for submitted snapshot * @param submitDescription description for submitted snapshot */ + @Auditable(parameters={"sbStoreId", "submitLabel", "submitDescription"}) public void submitAll(String sbStoreId, String submitLabel, String submitDescription); /** @@ -211,6 +228,7 @@ public interface SandboxService * @param submitLabel label for submitted snapshot * @param submitDescription description for submitted snapshot */ + @Auditable(parameters={"sbStoreId", "webApp", "submitLabel", "submitDescription"}) public void submitWebApp(String sbStoreId, String webApp, String submitLabel, String submitDescription); /** @@ -223,6 +241,7 @@ public interface SandboxService * @param submitLabel label for submitted snapshot * @param submitDescription description for submitted snapshot */ + @Auditable(parameters={"sbStoreId", "relativePath", "submitLabel", "submitDescription"}) public void submit(String sbStoreId, String relativePath, String submitLabel, String submitDescription); /** @@ -233,6 +252,7 @@ public interface SandboxService * @param submitLabel label for submitted snapshot * @param submitDescription description for submitted snapshot */ + @Auditable(parameters={"sbStoreId", "relativePath", "submitLabel", "submitDescription"}) public void submitList(String sbStoreId, List relativePaths, String submitLabel, String submitDescription); /** @@ -243,6 +263,7 @@ public interface SandboxService * @param submitLabel label for submitted snapshot * @param submitDescription description for submitted snapshot */ + @Auditable(parameters={"sbStoreId", "assets", "submitLabel", "submitDescription"}) public void submitListAssets(String sbStoreId, List assets, String submitLabel, String submitDescription); /** @@ -263,6 +284,7 @@ public interface SandboxService * * @deprecated subject to change */ + @NotAuditable public void submitListAssets(String sbStoreId, List relativePaths, String workflowName, Map workflowParams, String submitLabel, String submitDescription, @@ -275,6 +297,7 @@ public interface SandboxService * * @param sbStoreId sandbox store id */ + @Auditable(parameters={"sbStoreId"}) public void revertAll(String sbStoreId); /** @@ -285,6 +308,7 @@ public interface SandboxService * @param sbStoreId sandbox store id * @param webApp web app to filter by */ + @Auditable(parameters={"sbStoreId", "webApp"}) public void revertWebApp(String sbStoreId, String webApp); /** @@ -295,6 +319,7 @@ public interface SandboxService * @param sbStoreId sandbox store id * @param relativePath relative path to filter by (eg. /www/avm_webapps/ROOT/MyFolderToRevert) */ + @NotAuditable public void revert(String sbStoreId, String relativePath); /** @@ -303,6 +328,7 @@ public interface SandboxService * @param sbStoreId sandbox store id * @param assetPaths list of assets, as relative paths (eg. /www/avm_webapps/ROOT/MyFolderToRevert) */ + @NotAuditable public void revertList(String sbStoreId, List relativePaths); /** @@ -310,6 +336,7 @@ public interface SandboxService * * @param assets list of assets */ + @NotAuditable public void revertListAssets(String sbStoreId, List assets); /** @@ -320,6 +347,7 @@ public interface SandboxService * @param sbStoreId staging sandbox store id * @param version version */ + @NotAuditable public void revertSnapshot(String sbStoreId, int version); /** @@ -331,6 +359,7 @@ public interface SandboxService * @param includeSystemGenerated if false will ignore system generated snapshots else true to get all snapshots * @return List list of sandbox versions */ + @NotAuditable public List listSnapshots(String sbStoreId, boolean includeSystemGenerated); /** @@ -344,5 +373,6 @@ public interface SandboxService * @param includeSystemGenerated if false will ignore system generated snapshots else true to get all snapshots * @return List list of sandbox versions */ + @NotAuditable public List listSnapshots(String sbStoreId, Date from, Date to, boolean includeSystemGenerated); } diff --git a/source/java/org/alfresco/wcm/webproject/WebProjectService.java b/source/java/org/alfresco/wcm/webproject/WebProjectService.java index cdff4f6254..c3a3888e5b 100644 --- a/source/java/org/alfresco/wcm/webproject/WebProjectService.java +++ b/source/java/org/alfresco/wcm/webproject/WebProjectService.java @@ -23,6 +23,8 @@ import java.util.Map; import org.alfresco.service.PublicService; import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.Auditable; +import org.alfresco.service.NotAuditable; /** @@ -50,6 +52,7 @@ public interface WebProjectService * @param description description * @return WebProjectInfo the created web project info */ + @NotAuditable public WebProjectInfo createWebProject(String dnsName, String name, String title, String description); /** @@ -66,6 +69,7 @@ public interface WebProjectService * * @deprecated see createWebProject(String dnsName, WebProjectInfo wpInfo) */ + @NotAuditable public WebProjectInfo createWebProject(String dnsName, String name, String title, String description, NodeRef sourceNodeRef); /** @@ -82,6 +86,7 @@ public interface WebProjectService * @param sourceNodeRef web project node ref to branch from (can be null) * @return WebProjectInfo the created web project info */ + @NotAuditable public WebProjectInfo createWebProject(String dnsName, String name, String title, String description, String defaultWebApp, boolean useAsTemplate, NodeRef sourceNodeRef); /** @@ -104,6 +109,7 @@ public interface WebProjectService * * @return WebProjectInfo the created web project info */ + @NotAuditable public WebProjectInfo createWebProject(WebProjectInfo wpInfo); /** @@ -111,6 +117,7 @@ public interface WebProjectService * * @return NodeRef the node ref of the "Web Projects" container node */ + @NotAuditable public NodeRef getWebProjectsRoot(); /** @@ -119,6 +126,7 @@ public interface WebProjectService * @param absoluteAVMPath the AVM path from which to determine the Web Project * @return NodeRef the web project node ref for the path or null if it could not be determined */ + @NotAuditable public NodeRef getWebProjectNodeFromPath(String absoluteAVMPath); /** @@ -127,6 +135,7 @@ public interface WebProjectService * @param storeName the AVM store name (sandbox store id) from which to determine the Web Project * @return NodeRef the web project node ref for the path or null if it could not be determined */ + @NotAuditable public NodeRef getWebProjectNodeFromStore(String storeName); /** @@ -134,6 +143,7 @@ public interface WebProjectService * * @return List list of web project info */ + @NotAuditable public List listWebProjects(); /** @@ -142,6 +152,7 @@ public interface WebProjectService * @param userName user name * @return List list of web project info */ + @NotAuditable public List listWebProjects(String userName); /** @@ -150,6 +161,7 @@ public interface WebProjectService * @param wpNodeRef web project store id * @return boolean true, if web project */ + @NotAuditable public boolean isWebProject(String wpStoreId); /** @@ -158,6 +170,7 @@ public interface WebProjectService * @param wpNodeRef web project node ref * @return boolean true, if web project */ + @NotAuditable public boolean isWebProject(NodeRef wpNodeRef); /** @@ -168,6 +181,7 @@ public interface WebProjectService * @param wpStoreId web project store id * @return WebProjectInfo web project info */ + @NotAuditable public WebProjectInfo getWebProject(String wpStoreId); /** @@ -178,6 +192,7 @@ public interface WebProjectService * @param wpNodeRef web project node ref * @return WebProjectInfo web project info */ + @NotAuditable public WebProjectInfo getWebProject(NodeRef wpNodeRef); /** @@ -185,6 +200,7 @@ public interface WebProjectService * @param wpStoreId web project store id * @return previewProviderName preview URI service provide name */ + @NotAuditable public String getPreviewProvider(String wpStoreId); /** @@ -194,6 +210,7 @@ public interface WebProjectService * * @param wpInfo web project info */ + @NotAuditable public void updateWebProject(WebProjectInfo wpInfo); /** @@ -205,6 +222,7 @@ public interface WebProjectService * * @param name web project store id */ + @NotAuditable public void deleteWebProject(String wpStoreId); /** @@ -218,6 +236,7 @@ public interface WebProjectService * * @param name web project node ref */ + @NotAuditable public void deleteWebProject(NodeRef wpNodeRef); // @@ -233,6 +252,7 @@ public interface WebProjectService * @param name webapp name (must be unique within a web project) * @param description webapp description */ + @NotAuditable public void createWebApp(String wpStoreId, String name, String description); /** @@ -244,6 +264,7 @@ public interface WebProjectService * @param name webapp name (must be unique within a web project) * @param description webapp description */ + @NotAuditable public void createWebApp(NodeRef wpNodeRef, String name, String description); /** @@ -252,6 +273,7 @@ public interface WebProjectService * @param wpStoreId web project store id * @return List list of webapp names */ + @NotAuditable public List listWebApps(String wpStoreId); /** @@ -260,6 +282,7 @@ public interface WebProjectService * @param wpNodeRef web project node ref * @return List list of webapp names */ + @NotAuditable public List listWebApps(NodeRef wpNodeRef); /** @@ -272,6 +295,7 @@ public interface WebProjectService * @param wpStoreId web project store id * @param name webapp name */ + @NotAuditable public void deleteWebApp(String wpStoreId, String name); /** @@ -284,6 +308,7 @@ public interface WebProjectService * @param wpNodeRef web project node ref * @param name webapp name */ + @NotAuditable public void deleteWebApp(NodeRef wpNodeRef, String name); // @@ -298,6 +323,7 @@ public interface WebProjectService * @param wpStoreId web project store id * @return boolean true if the user is a manager (role = WCMUtil.ROLE_CONTENT_MANAGER), false otherwise */ + @NotAuditable public boolean isContentManager(String wpStoreId); /** @@ -306,6 +332,7 @@ public interface WebProjectService * @param wpNodeRef web project node ref * @return boolean true if the user is a manager (role = WCMUtil.ROLE_CONTENT_MANAGER), false otherwise */ + @NotAuditable public boolean isContentManager(NodeRef wpNodeRef); /** @@ -317,6 +344,7 @@ public interface WebProjectService * @param username user name * @return boolean true if the user is a manager, false otherwise */ + @NotAuditable public boolean isContentManager(String wpStoreId, String username); /** @@ -328,6 +356,7 @@ public interface WebProjectService * @param userName user name * @return boolean true if the user is a manager (role = WCMUtil.ROLE_CONTENT_MANAGER), false otherwise */ + @NotAuditable public boolean isContentManager(NodeRef wpNodeRef, String userName); /** @@ -338,6 +367,7 @@ public interface WebProjectService * @param wpStoreId web project store id * @return Map map of pairs */ + @NotAuditable public Map listWebUsers(String wpStoreId); /** @@ -348,6 +378,7 @@ public interface WebProjectService * @param wpNodeRef web project node ref * @return Map map of pairs */ + @NotAuditable public Map listWebUsers(NodeRef wpNodeRef); /** @@ -356,6 +387,7 @@ public interface WebProjectService * @param wpNodeRef web project node ref * @return int number of invited web users */ + @NotAuditable public int getWebUserCount(NodeRef wpNodeRef); /** @@ -365,6 +397,7 @@ public interface WebProjectService * @param userName user name * @return String web project role for this user, null if no assigned role */ + @NotAuditable public String getWebUserRole(String wpStoreId, String userName); /** @@ -374,6 +407,7 @@ public interface WebProjectService * @param userName user name * @return String web project role for this user, null if no assigned role */ + @NotAuditable public String getWebUserRole(NodeRef wpNodeRef, String userName); /** @@ -382,6 +416,7 @@ public interface WebProjectService * @param store id web project store id * @return boolean true if the current user is a web user of the web project, false otherwise */ + @NotAuditable public boolean isWebUser(String wpStoreId); /** @@ -390,6 +425,7 @@ public interface WebProjectService * @param wpNodeRef web project node ref * @return boolean true if the current user is a web user of the web project, false otherwise */ + @NotAuditable public boolean isWebUser(NodeRef wpNodeRef); /** @@ -399,6 +435,7 @@ public interface WebProjectService * @param userName user name * @return boolean true if the user is a web user of the web project, false otherwise */ + @NotAuditable public boolean isWebUser(String wpStoreId, String userName); /** @@ -408,6 +445,7 @@ public interface WebProjectService * @param userName user name * @return boolean true if the user is a web user of the web project, false otherwise */ + @NotAuditable public boolean isWebUser(NodeRef wpNodeRef, String userName); /** @@ -420,6 +458,7 @@ public interface WebProjectService * @param wpStoreId web project store id * @param userGroupRoles map of pairs */ + @NotAuditable public void inviteWebUsersGroups(String wpStoreId, Map userGroupRoles); /** @@ -431,6 +470,7 @@ public interface WebProjectService * @param userGroupRoles map of pairs * @param autoCreateAuthorSandbox if true then auto create an author sandbox for each invited user */ + @NotAuditable public void inviteWebUsersGroups(String wpStoreId, Map userGroupRoles, boolean autoCreateAuthorSandbox); /** @@ -442,6 +482,7 @@ public interface WebProjectService * @param userGroupRoles map of pairs * @param autoCreateAuthorSandbox if true then auto create the author sandbox for each invited user */ + @NotAuditable public void inviteWebUsersGroups(NodeRef wpNodeRef, Map userGroupRoles, boolean autoCreateAuthorSandbox); /** @@ -453,6 +494,7 @@ public interface WebProjectService * @param userName user name (not a group) * @param userRole web project role */ + @NotAuditable public void inviteWebUser(String wpStoreId, String userName, String userRole); /** @@ -463,6 +505,7 @@ public interface WebProjectService * @param userRole web project role * @param autoCreateAuthorSandbox if true then auto create the author sandbox for each invited user */ + @NotAuditable public void inviteWebUser(String wpStoreId, String userName, String userRole, boolean autoCreateAuthorSandbox); /** @@ -473,6 +516,7 @@ public interface WebProjectService * @param userRole web project role * @param autoCreateAuthorSandbox if true then auto create the author sandbox for each invited user */ + @NotAuditable public void inviteWebUser(NodeRef wpNodeRef, String userName, String userRole, boolean autoCreateAuthorSandbox); /** @@ -483,6 +527,7 @@ public interface WebProjectService * @param wpStoreId web project store id * @param userName user name */ + @NotAuditable public void uninviteWebUser(String wpStoreId, String userName); /** @@ -494,6 +539,7 @@ public interface WebProjectService * @param userName user name * @param autoDeleteAuthorSandbox if true then auto delete the author sandbox */ + @NotAuditable public void uninviteWebUser(String wpStoreId, String userName, boolean autoDeleteAuthorSandbox); /** @@ -505,5 +551,6 @@ public interface WebProjectService * @param userName user name * @param autoDeleteAuthorSandbox if true then auto delete the author sandbox */ + @NotAuditable public void uninviteWebUser(NodeRef wpNodeRef, String userName, boolean autoDeleteAuthorSandbox); }