RM-2812 Mark public API methods with @AlfrescoPublicAPI.

This commit is contained in:
Tom Page
2016-04-19 16:24:46 +01:00
parent 715d4f81a9
commit 0659402f13
70 changed files with 442 additions and 289 deletions

View File

@@ -30,6 +30,7 @@ package org.alfresco.module.org_alfresco_module_rm.action;
import java.io.Serializable;
import java.util.Map;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
/**
@@ -37,6 +38,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
*
* @author Roy Wetherall
*/
@AlfrescoPublicApi
public interface RecordsManagementAction
{
/**

View File

@@ -27,12 +27,15 @@
package org.alfresco.module.org_alfresco_module_rm.action;
import org.alfresco.api.AlfrescoPublicApi;
/**
* Record Management Action Condition
*
* @author Roy Wetherall
* @since 2.1
*/
@AlfrescoPublicApi
public interface RecordsManagementActionCondition
{
/**

View File

@@ -27,16 +27,18 @@
package org.alfresco.module.org_alfresco_module_rm.action;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.action.ActionConditionDefinition;
/**
* Records management condition definition.
*
*
* Primarily used as a marker interface.
*
*
* @author Roy Wetherall
* @since 2.1
*/
@AlfrescoPublicApi
public interface RecordsManagementActionConditionDefinition extends ActionConditionDefinition
{
}

View File

@@ -29,15 +29,17 @@ package org.alfresco.module.org_alfresco_module_rm.action;
import java.util.Set;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanComponentKind;
import org.alfresco.service.cmr.action.ActionDefinition;
/**
* Extended action definition interface.
*
*
* @author Roy Wetherall
* @since 2.1
*/
@AlfrescoPublicApi
public interface RecordsManagementActionDefinition extends ActionDefinition
{
/**

View File

@@ -27,26 +27,29 @@
package org.alfresco.module.org_alfresco_module_rm.action;
import org.alfresco.api.AlfrescoPublicApi;
/**
* Records management action result.
*
*
* @author Roy Wetherall
*/
@AlfrescoPublicApi
public class RecordsManagementActionResult
{
/** Result value */
private Object value;
/**
* Constructor.
*
*
* @param value result value
*/
public RecordsManagementActionResult(Object value)
{
this.value = value;
}
/**
* @return result value
*/

View File

@@ -31,6 +31,7 @@ import java.io.Serializable;
import java.util.List;
import java.util.Map;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -39,6 +40,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
*
* @author Roy Wetherall
*/
@AlfrescoPublicApi
public interface RecordsManagementActionService
{
/**

View File

@@ -27,17 +27,20 @@
package org.alfresco.module.org_alfresco_module_rm.admin;
import org.alfresco.api.AlfrescoPublicApi;
/**
* Custom metadata exception.
*
*
* @author Roy Wethearll
* @since 2.1
* @see org.alfresco.module.org_alfresco_module_rm.CustomMetadataException
*/
@AlfrescoPublicApi
public abstract class CustomMetadataException extends Exception
{
private static final long serialVersionUID = -6676112294794381360L;
public CustomMetadataException(String msg)
{
super(msg);

View File

@@ -27,21 +27,23 @@
package org.alfresco.module.org_alfresco_module_rm.admin;
import org.alfresco.api.AlfrescoPublicApi;
import org.springframework.extensions.surf.util.I18NUtil;
/**
* Custom metadata exception.
*
*
* @author Roy Wethearll
* @since 2.1
* @see org.alfresco.module.org_alfresco_module_rm.PropertyAlreadyExistsMetadataException
*/
@AlfrescoPublicApi
public class PropertyAlreadyExistsMetadataException extends CustomMetadataException
{
private static final long serialVersionUID = -6194867814140009959L;
public static final String MSG_PROPERTY_ALREADY_EXISTS = "rm.admin.property-already-exists";
public PropertyAlreadyExistsMetadataException(String propIdAsString)
{
super(I18NUtil.getMessage(MSG_PROPERTY_ALREADY_EXISTS, propIdAsString));

View File

@@ -31,6 +31,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.module.org_alfresco_module_rm.caveat.RMListOfValuesConstraint.MatchLogic;
import org.alfresco.module.org_alfresco_module_rm.relationship.RelationshipService;
@@ -52,6 +53,7 @@ import org.alfresco.service.namespace.RegexQNamePattern;
* @since 2.1
* @see org.alfresco.module.org_alfresco_module_rm.RecordsManagementAdminService
*/
@AlfrescoPublicApi
public interface RecordsManagementAdminService
{
/**

View File

@@ -39,18 +39,20 @@ import org.alfresco.service.namespace.QName;
/**
* Records management audit service.
*
*
* @author Gavin Cornwell
*/
// Not @AlfrescoPublicApi as extends the deprecated class RecordsManagementAuditServiceDeprecated.
@SuppressWarnings("deprecation")
public interface RecordsManagementAuditService extends RecordsManagementAuditServiceDeprecated
{
public enum ReportFormat { HTML, JSON }
/**
* Retrieves a list of audit events.
*
*
* @return List of audit events
*/
List<AuditEvent> getAuditEvents();
@@ -60,32 +62,32 @@ public interface RecordsManagementAuditService extends RecordsManagementAuditSer
* <p>
* Creates an instance of a simple audit event and registers it with
* the service.
*
*
* @param name name of audit event
* @param label display label of audit event
*/
void registerAuditEvent(String name, String label);
/**
* Register audit event.
*
*
* @param auditEvent audit event
*/
void registerAuditEvent(AuditEvent auditEvent);
/**
* Audits an event, assumes no properties where modified and that the event should not be audited
* immediately.
*
* immediately.
*
* @param nodeRef node reference
* @param eventName event name
*/
void auditEvent(NodeRef nodeRef,
void auditEvent(NodeRef nodeRef,
String eventName);
/**
* Audits an event, assumes that the event should not be audited immediately and not be removed if no property is changed.
*
*
* @param nodeRef node reference
* @param eventName event name
* @param before property values before event
@@ -95,10 +97,10 @@ public interface RecordsManagementAuditService extends RecordsManagementAuditSer
String eventName,
Map<QName, Serializable> before,
Map<QName, Serializable> after);
/**
* Audit event, assumes not to be removed if no property is changed.
*
*
* @param nodeRef node reference
* @param eventName event name
* @param before property values before event
@@ -110,10 +112,10 @@ public interface RecordsManagementAuditService extends RecordsManagementAuditSer
Map<QName, Serializable> before,
Map<QName, Serializable> after,
boolean immediate);
/**
* Audit event.
*
*
* @param nodeRef node reference
* @param eventName event name
* @param before property values before event
@@ -127,52 +129,52 @@ public interface RecordsManagementAuditService extends RecordsManagementAuditSer
Map<QName, Serializable> after,
boolean immediate,
boolean removeIfNoPropertyChanged);
/**
* Determines whether the RM audit log is currently enabled.
*
*
* @param filePlan file plan
* @return true if RM auditing is active false otherwise
*/
boolean isAuditLogEnabled(NodeRef filePlan);
boolean isAuditLogEnabled(NodeRef filePlan);
/**
* Start RM auditing.
*
*
* @param filePlan file plan
*/
void startAuditLog(NodeRef filePlan);
/**
* Stop RM auditing.
*
*
* @param filePlan file plan
*/
*/
void stopAuditLog(NodeRef filePlan);
/**
* Clears the RM audit.
*
*
* @param filePlan file plan
*/
void clearAuditLog(NodeRef filePlan);
/**
* Returns the date the RM audit was last started.
*
* @param filePlan file plan
*
* @param filePlan file plan
* @return Date the audit was last started
*/
Date getDateAuditLogLastStarted(NodeRef filePlan);
/**
* Returns the date the RM audit was last stopped.
*
*
* @return Date the audit was last stopped
*/
Date getDateAuditLogLastStopped(NodeRef filePlan);
/**
* Retrieves a list of audit log entries using the provided parameters
* represented by the RecordsManagementAuditQueryParameters instance.
@@ -181,13 +183,13 @@ public interface RecordsManagementAuditService extends RecordsManagementAuditSer
* object will result in ALL audit log entries for the RM system being
* returned. Setting the various parameters effectively filters the full
* audit trail.
*
*
* @param params Parameters to use to retrieve audit trail (never <tt>null</tt>)
* @param format The format the report should be produced in
* @return File containing JSON representation of audit trail
*/
File getAuditTrailFile(RecordsManagementAuditQueryParameters params, ReportFormat format);
/**
* Retrieves a list of audit log entries using the provided parameters
* represented by the RecordsManagementAuditQueryParameters instance.
@@ -196,23 +198,23 @@ public interface RecordsManagementAuditService extends RecordsManagementAuditSer
* object will result in ALL audit log entries for the RM system being
* returned. Setting the various parameters effectively filters the full
* audit trail.
*
*
* @param params Parameters to use to retrieve audit trail (never <tt>null</tt>)
* @return All entries for the audit trail
*/
List<RecordsManagementAuditEntry> getAuditTrail(RecordsManagementAuditQueryParameters params);
/**
* Retrieves a list of audit log entries using the provided parameters
* represented by the RecordsManagementAuditQueryParameters instance and
* then files the resulting log as an undeclared record in the record folder
* then files the resulting log as an undeclared record in the record folder
* represented by the given NodeRef.
* <p>
* The parameters are all optional so an empty RecordsManagementAuditQueryParameters
* object will result in ALL audit log entries for the RM system being
* returned. Setting the various parameters effectively filters the full
* audit trail.
*
*
* @param params Parameters to use to retrieve audit trail (never <tt>null</tt>)
* @param destination NodeRef representing a record folder in which to file the audit log
* @param format The format the report should be produced in

View File

@@ -27,6 +27,7 @@
package org.alfresco.module.org_alfresco_module_rm.capability;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.security.AccessStatus;
@@ -36,6 +37,7 @@ import org.alfresco.service.cmr.security.AccessStatus;
* @author andyh
* @author Roy Wetherall
*/
@AlfrescoPublicApi
public interface Capability
{
/**

View File

@@ -31,6 +31,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.security.AccessStatus;
@@ -40,6 +41,7 @@ import org.alfresco.service.cmr.security.AccessStatus;
* @author Roy Wetherall
* @since 2.0
*/
@AlfrescoPublicApi
public interface CapabilityService
{
/**
@@ -108,7 +110,7 @@ public interface CapabilityService
/**
* Gets the list of all the capability groups (in index order)
*
* @return {@link List}<{@link Group}> List of all the capability groups (in index order)
* @return {@link List}<{@link Group}> List of all the capability groups (in index order)
*/
List<Group> getGroups();

View File

@@ -27,12 +27,15 @@
package org.alfresco.module.org_alfresco_module_rm.capability;
import org.alfresco.api.AlfrescoPublicApi;
/**
* Group interface
*
* @author Tuna Aksoy
* @since 2.1
*/
@AlfrescoPublicApi
public interface Group
{
/**

View File

@@ -27,26 +27,29 @@
package org.alfresco.module.org_alfresco_module_rm.dataset;
import org.alfresco.api.AlfrescoPublicApi;
@AlfrescoPublicApi
public interface DataSet
{
/**
* Gets the label of the data set
*
*
* @return String the label of the data set
*/
String getLabel();
/**
* Gets the id of the data set
*
*
* @return String the id of the data set
*/
String getId();
/**
* Gets the path of the data set
*
*
* @return String the path of the data set
*/
String getPath();

View File

@@ -29,21 +29,23 @@ package org.alfresco.module.org_alfresco_module_rm.dataset;
import java.util.Map;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
@AlfrescoPublicApi
public interface DataSetService
{
/**
* Register a data set implementation with the service
*
*
* @param dataSet the data set
*/
void register(DataSet dataSet);
/**
* Gets the details of all available data sets.
*
*
* @return Map<String, DataSet> details of all available data sets
*/
Map<String, DataSet> getDataSets();
@@ -51,7 +53,7 @@ public interface DataSetService
/**
* Gets the details of all available data sets for a file plan depending on
* the parameter "excludeLoaded".
*
*
* @param filePlan the file plan for which the details should be retrieved
* @param excludeLoaded if true only data sets will be retrieved which has
* not been loaded
@@ -63,7 +65,7 @@ public interface DataSetService
/**
* Gets the details of all loaded data sets for a specified file plan
*
*
* @param filePlan the file plan for which the loaded data sets should be
* retrieved
* @return Map<String, DataSet> details of all loaded data sets or an empty
@@ -74,7 +76,7 @@ public interface DataSetService
/**
* Loads the data set with the specified id into the specified file plan
*
*
* @param filePlan the file plan which the data set will load into
* @param dataSetId the id of the data set which will be imported
*/
@@ -82,7 +84,7 @@ public interface DataSetService
/**
* Checks if a data set exists with the given data set id
*
*
* @param dataSetId the id of the data set which will be checked
* @return true if the data set exists, false otherwise
*/
@@ -91,7 +93,7 @@ public interface DataSetService
/**
* Checks if a data set with the id "dataSetId" has been loaded into the
* specified file plan
*
*
* @param filePlan the file plan for which the check should be done
* @param dataSetId the id of the data set which should be checked if it has
* been loaded to the file plan

View File

@@ -29,6 +29,7 @@ package org.alfresco.module.org_alfresco_module_rm.disposition;
import java.util.List;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.module.org_alfresco_module_rm.event.RecordsManagementEvent;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.Period;
@@ -36,70 +37,71 @@ import org.alfresco.service.namespace.QName;
/**
* Disposition action interface
*
*
* @author Roy Wetherall
*/
// Not @AlfrescoPublicApi because it depends on Period which is not part of the public API.
public interface DispositionActionDefinition
{
/**
* Get the NodeRef that represents the disposition action definition
*
*
* @return NodeRef of disposition action definition
*/
NodeRef getNodeRef();
/**
* Get disposition action id
*
*
* @return String id
*/
String getId();
/**
* Get the index of the action within the disposition instructions
*
*
* @return int disposition action index
*/
int getIndex();
/**
* Get the name of disposition action
*
*
* @return String name
*/
String getName();
/**
* Get the display label of the disposition action
*
*
* @return String name's display label
*/
String getLabel();
/**
* Get the description of the disposition action
*
*
* @return String description
*/
String getDescription();
/**
* Get the period for the disposition action
*
*
* @return Period disposition period
*/
Period getPeriod();
/**
* Property to which the period is relative to
*
*
* @return QName property name
*/
QName getPeriodProperty();
/**
* List of events for the disposition
*
*
* @return List<RecordsManagementEvent> list of events
*/
List<RecordsManagementEvent> getEvents();
@@ -108,7 +110,7 @@ public interface DispositionActionDefinition
* Indicates whether the disposition action is eligible when the earliest
* event is complete, otherwise all events must be complete before
* eligibility.
*
*
* @return boolean true if eligible on first action complete, false
* otherwise
*/
@@ -116,14 +118,14 @@ public interface DispositionActionDefinition
/**
* Get the location of the disposition (can be null)
*
*
* @return String disposition location
*/
String getLocation();
/**
* Get the ghost on destroy from the disposition
*
*
* @return boolean the gost on destroy flag (on applicable to destroy
* actions)
*/

View File

@@ -33,57 +33,58 @@ import org.alfresco.service.cmr.repository.NodeRef;
/**
* Disposition schedule interface
*
*
* @author Roy Wetherall
*/
// Not @AlfrescoPublicApi because it depends on DispositionActionDefinition which is not part of the public API.
public interface DispositionSchedule
{
/**
* Get the NodeRef that represents the disposition schedule
*
*
* @return {@link NodeRef} of disposition schedule
*/
NodeRef getNodeRef();
/**
* Get the disposition authority
*
*
* @return {@link String} disposition authority
*/
String getDispositionAuthority();
/**
* Get the disposition instructions
*
*
* @return {@link String} disposition instructions
*/
String getDispositionInstructions();
/**
* Indicates whether the disposal occurs at record level or not
*
*
* @return boolean true if at record level, false otherwise
*/
boolean isRecordLevelDisposition();
/**
* Gets all the disposition action definitions for the schedule
*
*
* @return List<{@link DispositionActionDefinition}> disposition action definitions
*/
List<DispositionActionDefinition> getDispositionActionDefinitions();
/**
* Get the disposition action definition
*
*
* @param id the action definition id
* @return {@link DispositionActionDefinition} disposition action definition
*/
DispositionActionDefinition getDispositionActionDefinition(String id);
/**
* Get the disposition action definition by the name of the disposition action
*
*
* @param name disposition action name
* @return {@link DispositionActionDefinition} disposition action definition, null if none
*/

View File

@@ -42,6 +42,7 @@ import org.alfresco.service.namespace.QName;
* @author Roy Wetherall
* @since 2.0
*/
// Not @AlfrescoPublicApi because it depends on DispositionSchedule which is not part of the public API.
public interface DispositionService
{
/** ========= Disposition Property Methods ========= */

View File

@@ -32,6 +32,7 @@ import java.util.Date;
import java.util.Map;
import java.util.Set;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction;
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionActionDefinition;
@@ -55,6 +56,7 @@ import org.alfresco.service.namespace.QName;
*
* @author Roy Wetherall
*/
@AlfrescoPublicApi
@BehaviourBean
public class DispositionProperty extends BaseBehaviourBean
implements NodeServicePolicies.OnUpdatePropertiesPolicy

View File

@@ -30,9 +30,12 @@ package org.alfresco.module.org_alfresco_module_rm.email;
import java.util.List;
import java.util.Set;
import org.alfresco.api.AlfrescoPublicApi;
/**
* Custom EMail Mapping Service
*/
@AlfrescoPublicApi
public interface CustomEmailMappingService
{
/**

View File

@@ -27,9 +27,12 @@
package org.alfresco.module.org_alfresco_module_rm.email;
import org.alfresco.api.AlfrescoPublicApi;
/**
* Custom EMail Mapping
*/
@AlfrescoPublicApi
public class CustomMapping
{
private String from;

View File

@@ -27,28 +27,30 @@
package org.alfresco.module.org_alfresco_module_rm.event;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.util.ParameterCheck;
/**
* Records management event
*
* Records management event
*
* @author Roy Wetherall
* @since 1.0
*/
@AlfrescoPublicApi
public class RecordsManagementEvent
{
{
/** Records management event type */
private RecordsManagementEventType type;
/** Records management event name */
private String name;
/** Records management display label */
private String displayLabel;
/**
* Constructor
*
*
* @param type event type
* @param name event name
* @param displayLabel event display label
@@ -58,50 +60,50 @@ public class RecordsManagementEvent
ParameterCheck.mandatory("type", type);
ParameterCheck.mandatory("name", name);
ParameterCheck.mandatory("displayLabel", displayLabel);
this.type = type;
this.name = name;
this.displayLabel = displayLabel;
}
/**
* Get records management type name
*
*
* @return String records management event type name
*/
public String getType()
{
return type.getName();
}
/**
* Get the records management event type.
*
* @return {@link RecordsManagementEventType} records management event type
*
*
* @return {@link RecordsManagementEventType} records management event type
*
* @since 2.2
*/
public RecordsManagementEventType getRecordsManagementEventType()
{
return type;
}
/**
* Event name
*
*
* @return String event name
*/
public String getName()
{
return this.name;
}
/**
*
*
* @return
*/
public String getDisplayLabel()
{
return displayLabel;
}
}
}

View File

@@ -29,11 +29,14 @@ package org.alfresco.module.org_alfresco_module_rm.event;
import java.util.List;
import org.alfresco.api.AlfrescoPublicApi;
/**
* Records management event service interface
*
* @author Roy Wetherall
*/
@AlfrescoPublicApi
public interface RecordsManagementEventService
{
/**

View File

@@ -27,30 +27,33 @@
package org.alfresco.module.org_alfresco_module_rm.event;
import org.alfresco.api.AlfrescoPublicApi;
/**
* Records management event type interface
*
*
* @author Roy Wetherall
*/
@AlfrescoPublicApi
public interface RecordsManagementEventType
{
/**
* Get the name of the records management event type
*
*
* @return String event type name
*/
String getName();
/**
* Gets the display label of the event type
*
*
* @return String display label
*/
String getDisplayLabel();
/**
* Indicates whether the event is automatic or not
*
*
* @return boolean true if automatic, false otherwise
*/
boolean isAutomaticEvent();

View File

@@ -27,6 +27,8 @@
package org.alfresco.module.org_alfresco_module_rm.fileplan;
import org.alfresco.api.AlfrescoPublicApi;
/**
* File plan component kind enumeration class.
* <br>
@@ -35,6 +37,7 @@ package org.alfresco.module.org_alfresco_module_rm.fileplan;
*
* @author Roy Wetherall
*/
@AlfrescoPublicApi
public enum FilePlanComponentKind
{
FILE_PLAN_COMPONENT,

View File

@@ -32,6 +32,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.namespace.QName;
@@ -42,6 +43,7 @@ import org.alfresco.service.namespace.QName;
* @author Roy Wetherall
* @since 2.1
*/
@AlfrescoPublicApi
public interface FilePlanService
{
/**

View File

@@ -30,17 +30,19 @@ package org.alfresco.module.org_alfresco_module_rm.freeze;
import java.util.Date;
import java.util.Set;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.module.org_alfresco_module_rm.hold.HoldService;
import org.alfresco.service.cmr.repository.NodeRef;
/**
* Freeze Service Interface
*
*
* TODO should be deprecated and methods moved to the HoldService with "hold, held, etc" style names
*
* @author Roy Wetherall
* @since 2.0
*/
@AlfrescoPublicApi
public interface FreezeService
{
/**
@@ -74,12 +76,12 @@ public interface FreezeService
* @return String The initiator of the freeze or null
*/
String getFreezeInitiator(NodeRef nodeRef);
/**
* @deprecated as of 2.2, use {@link HoldService#isHold(NodeRef)} instead.
*/
@Deprecated
boolean isHold(NodeRef nodeRef);
boolean isHold(NodeRef nodeRef);
/**
* @deprecated as of 2.2, use {@link HoldService#getHeld(NodeRef)} instead.

View File

@@ -29,6 +29,7 @@ package org.alfresco.module.org_alfresco_module_rm.hold;
import java.util.List;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
/**
@@ -37,6 +38,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
* @author Tuna Aksoy
* @since 2.2
*/
@AlfrescoPublicApi
public interface HoldService
{
/**
@@ -58,7 +60,7 @@ public interface HoldService
/**
* Gets the node reference for the hold with the given name in the given file plan
*
*
* @param name {@link String} The name of the hold
* @return {@link NodeRef} of the hold with the given name
*/
@@ -75,8 +77,8 @@ public interface HoldService
List<NodeRef> heldBy(NodeRef nodeRef, boolean includedInHold);
/**
* Gets the list of item node references which are in the given hold
*
* Gets the list of item node references which are in the given hold
*
* @param hold {@link NodeRef} of the hold
* @return Lost of item {@link NodeRef}s which are in the given hold
*/
@@ -84,7 +86,7 @@ public interface HoldService
/**
* Creates a hold with the given name, reason and description for the given file plan
*
*
* @param filePlan The {@link NodeRef} of the file plan
* @param name {@link String} The name of the hold
* @param reason {@link String} The reason of the hold
@@ -95,7 +97,7 @@ public interface HoldService
/**
* Gets the hold reason for the given hold node reference
*
*
* @param hold The {@link NodeRef} of the hold
* @return {@link String} The reason of the hold
*/
@@ -103,7 +105,7 @@ public interface HoldService
/**
* Sets the hold reason
*
*
* @param hold The {@link NodeRef} of the hold
* @param reason {@link String} The reason for the hold
*/
@@ -111,7 +113,7 @@ public interface HoldService
/**
* Deletes the hold
*
*
* @param hold The {@link NodeRef} of the hold
*/
void deleteHold(NodeRef hold);
@@ -126,7 +128,7 @@ public interface HoldService
/**
* Adds the items to the the given hold
*
*
* @param hold The {@link NodeRef} of the hold to which the items will be added
* @param nodeRefs The item {@link NodeRef}s which will be added to the hold
*/
@@ -158,7 +160,7 @@ public interface HoldService
/**
* Removes the given items from the given hold
*
*
* @param hold The hold {@link NodeRef} from which the given items will be removed
* @param nodeRefs The list of items which will be removed from the given holds
*/

View File

@@ -30,13 +30,15 @@ package org.alfresco.module.org_alfresco_module_rm.identifier;
import java.io.Serializable;
import java.util.Map;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.namespace.QName;
/**
* Generates an identifier for a content type from a given context.
*
*
* @author Roy Wetherall
*/
@AlfrescoPublicApi
public interface IdentifierGenerator
{
/**
@@ -44,7 +46,7 @@ public interface IdentifierGenerator
* @return QName the type
*/
QName getType();
/**
* Generates the next id based on the provided context.
* @param context map of context values

View File

@@ -27,6 +27,7 @@
package org.alfresco.module.org_alfresco_module_rm.identifier;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
@@ -35,6 +36,7 @@ import org.alfresco.service.namespace.QName;
*
* @author Roy Wetherall
*/
@AlfrescoPublicApi
public interface IdentifierService
{
/** Context value names */

View File

@@ -30,6 +30,7 @@ package org.alfresco.module.org_alfresco_module_rm.model;
import java.util.HashMap;
import java.util.Map;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.module.org_alfresco_module_rm.util.ServiceBaseImpl;
import org.alfresco.repo.policy.BehaviourFilter;
@@ -43,6 +44,7 @@ import org.apache.commons.logging.LogFactory;
* @author Roy Wetherall
* @since 2.2
*/
@AlfrescoPublicApi
public abstract class BaseBehaviourBean extends ServiceBaseImpl
implements RecordsManagementModel,
BehaviourRegistry

View File

@@ -27,6 +27,7 @@
package org.alfresco.module.org_alfresco_module_rm.model;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.namespace.QName;
/**
@@ -34,6 +35,7 @@ import org.alfresco.service.namespace.QName;
*
* @author Gavin Cornwell
*/
@AlfrescoPublicApi
public interface RecordsManagementCustomModel
{
// Namespace details

View File

@@ -27,6 +27,7 @@
package org.alfresco.module.org_alfresco_module_rm.model;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.namespace.QName;
/**
@@ -34,6 +35,7 @@ import org.alfresco.service.namespace.QName;
*
* @author Roy Wetherall
*/
@AlfrescoPublicApi
public interface RecordsManagementModel extends RecordsManagementCustomModel
{
// Namespace details

View File

@@ -29,115 +29,117 @@ package org.alfresco.module.org_alfresco_module_rm.model.security;
import java.util.Set;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
/**
* Model security service interface.
*
*
* @author Roy Wetherall
* @since 2.1
*/
@AlfrescoPublicApi
public interface ModelSecurityService
{
/**
* Sets whether model security is enabled globally or not.
*
*
* @param enabled
*/
void setEnabled(boolean enabled);
/**
* Indicates whether model security is enabled or not.
*
*
* @return
*/
boolean isEnabled();
/**
* Disable model security checks for the current thread.
*/
void disable();
/**
* Enable model security checks for the current thread.
*/
void enable();
/**
* Registers a protected model artifact with the service.
*
*
* @param atrifact protected model artifact
*/
void register(ProtectedModelArtifact atrifact);
void register(ProtectedModelArtifact atrifact);
/**
* Indicates whether a property is protected or not.
*
*
* @param name name of property
* @return boolean true if property is protected, false otherwise
*/
boolean isProtectedProperty(QName property);
/**
* Get the protected properties
*
*
* @return {@link Set}<{@link QName}> all the protected properties
*/
Set<QName> getProtectedProperties();
/**
* Get the details of the protected property, returns null if property
* is not protected.
*
*
* @param name name of the protected property
* @return {@link ProtectedProperty} protected property details, null otherwise
*/
ProtectedProperty getProtectedProperty(QName name);
/**
* Indicates whether the current user can edit a protected property in the context of
* a given node.
* <p>
* <p>
* If the property is not protected then returns true.
*
*
* @param nodeRef node reference
* @param property name of the property
* @return boolean true if the current user can edit the protected property or the property
* is not protected, false otherwise
*/
boolean canEditProtectedProperty(NodeRef nodeRef, QName property);
/**
* Indicates whether an aspect is protected or not.
*
*
* @param aspect aspect name
* @return boolean true if aspect is protected, false otherwise
*/
boolean isProtectedAspect(QName aspect);
/**
* Get the protected aspects.
*
*
* @return {@link Set}<{@link QName}> all the protected aspects
*/
Set<QName> getProtectedAspects();
Set<QName> getProtectedAspects();
/**
* Get the details of the protected aspect, returns null if aspect is
* not protected.
*
*
* @param name name of the aspect
* @return {@link ProtectedAspect} protected aspect details, null otherwise
*/
ProtectedAspect getProtectedAspect(QName name);
/**
* Indicates whether the current user can edit (ie add or remove) a protected
* Indicates whether the current user can edit (ie add or remove) a protected
* aspect in the context of a given node.
* <p>
* If the aspect is not protected then returns true.
*
*
* @param nodeRef node reference
* @param aspect name of the of aspect
* @return boolean true if the current user can edit the protected aspect or the the

View File

@@ -27,10 +27,13 @@
package org.alfresco.module.org_alfresco_module_rm.model.security;
import org.alfresco.api.AlfrescoPublicApi;
/**
* @author Roy Wetherall
* @since 2.1
*/
@AlfrescoPublicApi
public class ProtectedAspect extends ProtectedModelArtifact
{

View File

@@ -30,33 +30,35 @@ package org.alfresco.module.org_alfresco_module_rm.model.security;
import java.util.HashSet;
import java.util.Set;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.module.org_alfresco_module_rm.capability.Capability;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
/**
* Protected model artifact class.
*
*
* @author Roy Wetherall
* @since 2.1
*/
@AlfrescoPublicApi
public abstract class ProtectedModelArtifact
{
/** Model security service */
private ModelSecurityService modelSecurityService;
private ModelSecurityService modelSecurityService;
/** Namespace service */
private NamespaceService namespaceService;
/** Qualified name of the model artifact */
private QName name;
/** Set of capabilities */
private Set<Capability> capabilities;
/** Capability names */
private Set<String> capabilityNames;
/**
* @param namespaceService namespace service
*/
@@ -64,7 +66,7 @@ public abstract class ProtectedModelArtifact
{
this.namespaceService = namespaceService;
}
/**
* @param modelSecurityService model security service
*/
@@ -72,7 +74,7 @@ public abstract class ProtectedModelArtifact
{
this.modelSecurityService = modelSecurityService;
}
/**
* Init method
*/
@@ -80,7 +82,7 @@ public abstract class ProtectedModelArtifact
{
modelSecurityService.register(this);
}
/**
* @param name artifact name (in cm:content form)
*/
@@ -89,7 +91,7 @@ public abstract class ProtectedModelArtifact
QName qname = QName.createQName(name, namespaceService);
this.name = qname;
}
/**
* @return artifact QName
*/
@@ -97,7 +99,7 @@ public abstract class ProtectedModelArtifact
{
return name;
}
/**
* @param capabilities capabilities
*/
@@ -105,7 +107,7 @@ public abstract class ProtectedModelArtifact
{
this.capabilities = capabilities;
}
/**
* @return capabilities
*/
@@ -113,7 +115,7 @@ public abstract class ProtectedModelArtifact
{
return capabilities;
}
/**
* @return capability names
*/
@@ -125,9 +127,9 @@ public abstract class ProtectedModelArtifact
for (Capability capability : capabilities)
{
capabilityNames.add(capability.getName());
}
}
}
return capabilityNames;
}
}

View File

@@ -27,17 +27,20 @@
package org.alfresco.module.org_alfresco_module_rm.model.security;
import org.alfresco.api.AlfrescoPublicApi;
/**
* Protected property implementation
*
*
* @author Roy Wetherall
* @since 2.1
*/
@AlfrescoPublicApi
public class ProtectedProperty extends ProtectedModelArtifact
{
/** always allow new indicator */
private boolean allwaysAllowNew = false;
/**
* @param allwaysAllowNew true if always allow new, false otherwise
*/
@@ -45,7 +48,7 @@ public class ProtectedProperty extends ProtectedModelArtifact
{
this.allwaysAllowNew = allwaysAllowNew;
}
/**
* @return true if always allow new, false otherwise
*/

View File

@@ -27,6 +27,7 @@
package org.alfresco.module.org_alfresco_module_rm.record;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
/**
@@ -35,6 +36,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
* @author Tuna Aksoy
* @since 2.3
*/
@AlfrescoPublicApi
public interface InplaceRecordService
{
/**

View File

@@ -32,6 +32,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
@@ -42,6 +43,7 @@ import org.alfresco.service.namespace.QName;
* @author Roy Wetherall
* @since 2.1
*/
@AlfrescoPublicApi
public interface RecordService
{
/**
@@ -62,7 +64,7 @@ public interface RecordService
/**
* Disables the property editable check.
*
*
* @since 2.2
*/
void disablePropertyEditableCheck();
@@ -71,7 +73,7 @@ public interface RecordService
* Disables the property editable check for a given node in this transaction only.
*
* @param nodeRef node reference
*
*
* @since 2.2
*/
void disablePropertyEditableCheck(NodeRef nodeRef);
@@ -90,26 +92,26 @@ public interface RecordService
*/
@Deprecated
Set<QName> getRecordMetaDataAspects();
/**
* Indicates whether the provided aspect is a registered record meta-data
* aspect.
*
*
* @param aspect aspect {@link QName}
* @return boolean true if the aspect is a registered record meta-data aspect, false otherwise
*
* @return boolean true if the aspect is a registered record meta-data aspect, false otherwise
*
* @since 2.3
*/
boolean isRecordMetadataAspect(QName aspect);
/**
* Indicates whther the provided property is declared on a registered record
* Indicates whther the provided property is declared on a registered record
* meta-data aspect.
*
*
* @param property property {@link QName}
* @return boolean true if the property is declared on a registered record meta-data aspect,
* @return boolean true if the property is declared on a registered record meta-data aspect,
* false otherwise
*
*
* @since 2.3
*/
boolean isRecordMetadataProperty(QName property);
@@ -175,10 +177,10 @@ public interface RecordService
* @see #createRecord(NodeRef, NodeRef, boolean)
*/
void createRecord(NodeRef filePlan, NodeRef nodeRef);
/**
* Creates a record from a copy of the node reference provided.
*
*
* @param filePlan file plan
* @param nodeRef node reference
*/
@@ -266,13 +268,13 @@ public interface RecordService
* @param recordFolder the record folder to link it to
*/
void link(NodeRef record, NodeRef recordFolder);
/**
* Unlinks a record from a specified record folder.
*
*
* @param record the record to unlink
* @param recordFolder the record folder to unlink it from
*
*
* @since 2.3
*/
void unlink(NodeRef record, NodeRef recordFolder);

View File

@@ -29,6 +29,7 @@ package org.alfresco.module.org_alfresco_module_rm.recordableversion;
import java.util.List;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.module.org_alfresco_module_rm.script.slingshot.Version;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -38,6 +39,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
* @author Tuna Aksoy
* @since 2.3
*/
@AlfrescoPublicApi
public interface RecordableVersionConfigService
{
/**

View File

@@ -31,6 +31,7 @@ import java.io.Serializable;
import java.util.List;
import java.util.Map;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
@@ -40,6 +41,7 @@ import org.alfresco.service.namespace.QName;
* @author Roy Wetherall
* @since 2.1
*/
@AlfrescoPublicApi
public interface RecordFolderService
{
/**

View File

@@ -27,6 +27,7 @@
package org.alfresco.module.org_alfresco_module_rm.relationship;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
/**
@@ -35,6 +36,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
* @author Tuna Aksoy
* @since 2.3
*/
@AlfrescoPublicApi
public interface Relationship
{
/**

View File

@@ -27,12 +27,15 @@
package org.alfresco.module.org_alfresco_module_rm.relationship;
import org.alfresco.api.AlfrescoPublicApi;
/**
* Interface representing the relationship definition
*
* @author Tuna Aksoy
* @since 2.3
*/
@AlfrescoPublicApi
public interface RelationshipDefinition
{
/**

View File

@@ -29,12 +29,15 @@ package org.alfresco.module.org_alfresco_module_rm.relationship;
import static org.alfresco.util.ParameterCheck.mandatoryString;
import org.alfresco.api.AlfrescoPublicApi;
/**
* POJO representing the relationship display name
*
* @author Tuna Aksoy
* @since 2.3
*/
@AlfrescoPublicApi
public class RelationshipDisplayName
{
/** The source text of the relationship */

View File

@@ -29,6 +29,7 @@ package org.alfresco.module.org_alfresco_module_rm.relationship;
import java.util.Set;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
/**
@@ -37,11 +38,12 @@ import org.alfresco.service.cmr.repository.NodeRef;
* @author Tuna Aksoy
* @since 2.3
*/
@AlfrescoPublicApi
public interface RelationshipService
{
/** System relationship names */
static final String RELATIONSHIP_VERSIONS = "versions";
/**
* Gets all the existing relationship definitions
*
@@ -97,7 +99,7 @@ public interface RelationshipService
* @return All relationships that come out from the given node reference
*/
Set<Relationship> getRelationshipsFrom(NodeRef nodeRef);
/**
* Gets all the relationships that come out from the given node reference
* that match the a given name filter.
@@ -107,7 +109,7 @@ public interface RelationshipService
* @param nodeRef The node reference
* @param nameFilter Name filter for results
* @return All relationships that come out from the given node reference
*
*
* @since 2.3.1
*/
Set<Relationship> getRelationshipsFrom(NodeRef nodeRef, String nameFilter);
@@ -119,7 +121,7 @@ public interface RelationshipService
* @return All relationships that go into the given node reference
*/
Set<Relationship> getRelationshipsTo(NodeRef nodeRef);
/**
* Gets all the relationships that go into the given node reference
* that match the a given name filter.
@@ -129,7 +131,7 @@ public interface RelationshipService
* @param nodeRef The node reference
* @param nameFilter Name filter for results
* @return All relationships that go into the given node reference
*
*
* @since 2.3.1
*/
Set<Relationship> getRelationshipsTo(NodeRef nodeRef, String nameFilter);

View File

@@ -27,12 +27,15 @@
package org.alfresco.module.org_alfresco_module_rm.relationship;
import org.alfresco.api.AlfrescoPublicApi;
/**
* Enum representing the relationship types
*
* @author Tuna Aksoy
* @since 2.3
*/
@AlfrescoPublicApi
public enum RelationshipType
{
BIDIRECTIONAL,

View File

@@ -30,32 +30,34 @@ package org.alfresco.module.org_alfresco_module_rm.report;
import java.io.Serializable;
import java.util.Map;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.namespace.QName;
/**
* Report interface.
*
*
* @author Roy Wetherall
* @since 2.1
*/
@AlfrescoPublicApi
public interface Report
{
/**
* @return {@link QName} report type
*/
QName getReportType();
/**
* @return {@link String} report name
*/
String getReportName();
/**
* @return {@link Map}<{@link QName},{@link Serializable}> report properties
*/
Map<QName, Serializable> getReportProperties();
/**
* @return {@link ContentReader} content reader to report content
*/

View File

@@ -27,15 +27,17 @@
package org.alfresco.module.org_alfresco_module_rm.report;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
/**
* Report generator interface.
*
*
* @author Roy Wetherall
* @since 2.1
*/
@AlfrescoPublicApi
public interface ReportGenerator
{
/**
@@ -45,7 +47,7 @@ public interface ReportGenerator
/**
* Generate report.
*
*
* @param reportedUponNodeRef
* @param mimetype
* @return

View File

@@ -29,6 +29,7 @@ package org.alfresco.module.org_alfresco_module_rm.report;
import java.util.Set;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
@@ -38,6 +39,7 @@ import org.alfresco.service.namespace.QName;
* @author Roy Wetherall
* @since 2.1
*/
@AlfrescoPublicApi
public interface ReportService
{
/**
@@ -65,7 +67,7 @@ public interface ReportService
/**
* Generate a report for a specified mimetype.
*
*
* @see #generateReport(QName, NodeRef)
*
* @param reportType report type

View File

@@ -31,6 +31,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.Set;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.module.org_alfresco_module_rm.capability.Capability;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -40,12 +41,13 @@ import org.alfresco.service.cmr.repository.NodeRef;
* @author Roy Wetherall
* @since 2.1
*/
@AlfrescoPublicApi
public interface FilePlanRoleService
{
/** Default role names */
String ROLE_USER = "User";
String ROLE_POWER_USER = "PowerUser";
String ROLE_SECURITY_OFFICER = "SecurityOfficer";
String ROLE_SECURITY_OFFICER = "SecurityOfficer";
String ROLE_RECORDS_MANAGER = "RecordsManager";
String ROLE_ADMIN = "Administrator";
String ROLE_EXTENDED_READERS = "ExtendedReaders";

View File

@@ -29,6 +29,7 @@ package org.alfresco.module.org_alfresco_module_rm.role;
import java.util.Set;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.module.org_alfresco_module_rm.capability.Capability;
/**
@@ -36,6 +37,7 @@ import org.alfresco.module.org_alfresco_module_rm.capability.Capability;
*
* @author Roy Wetherall
*/
@AlfrescoPublicApi
public class Role
{
/** Role name */

View File

@@ -33,6 +33,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
@@ -48,6 +49,7 @@ import org.json.JSONObject;
/**
* @author Roy Wetherall
*/
@AlfrescoPublicApi
@SuppressWarnings("serial")
public class RecordsManagementSearchParameters
{

View File

@@ -29,71 +29,73 @@ package org.alfresco.module.org_alfresco_module_rm.search;
import java.util.List;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.util.Pair;
/**
* Records management search service.
*
*
* @author Roy Wetherall
*/
public interface RecordsManagementSearchService
{
@AlfrescoPublicApi
public interface RecordsManagementSearchService
{
/**
* Execute a records management search
* @param siteId the id of the rm site to query
* @param query search query string
* @param searchParameters search parameters
* @return {@link List}<{@link Pair}<{@link NodeRef}, {@link NodeRef}> search results as pairs for parent and child nodes
* @param searchParameters search parameters
* @return {@link List}<{@link Pair}<{@link NodeRef}, {@link NodeRef}> search results as pairs for parent and child nodes
*/
List<Pair<NodeRef, NodeRef>> search(String siteId, String query, RecordsManagementSearchParameters searchParameters);
List<Pair<NodeRef, NodeRef>> search(String siteId, String query, RecordsManagementSearchParameters searchParameters);
/**
* Get all the searches saved on the given records management site.
* @param siteId site id
* @return {@link List<{@link SavedSearchDetails}>} list of saved search details
* @return {@link List<{@link SavedSearchDetails}>} list of saved search details
*/
List<SavedSearchDetails> getSavedSearches(String siteId);
/**
* Get a named saved search for a given records management site.
* Get a named saved search for a given records management site.
* @param siteId site id
* @param name name of search
* @return {@link SavedSearchDetails} saved search details
*/
SavedSearchDetails getSavedSearch(String siteId, String name);
/**
* Save records management search.
* @param siteId site id
* @param name name
* @param description description
* @param search search string
* @param name name
* @param description description
* @param search search string
* @param isPublic indicates whether the saved search is public or not
* @return {@link SavedSearchDetails} details of the saved search
*/
SavedSearchDetails saveSearch(String siteId, String name, String description, String search, RecordsManagementSearchParameters searchParameters, boolean isPublic);
/**
* Save records management search.
* @param savedSearchDetails details of search to save
* @return {@link SavedSearchDetails} details of the saved search
*/
SavedSearchDetails saveSearch(SavedSearchDetails savedSearchDetails);
/**
* Delete saved search
* @param siteId site id
* @param name name of saved search
*/
void deleteSavedSearch(String siteId, String name);
/**
* Delete saved search
* @param savedSearchDetails saved search details
*/
void deleteSavedSearch(SavedSearchDetails savedSearchDetails);
/**
* Adds the reports as saved searches to a given site.
* @param siteId site id

View File

@@ -31,6 +31,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ContentModel;
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
@@ -63,6 +64,7 @@ import org.springframework.extensions.surf.util.I18NUtil;
*
* @author Roy Wetherall
*/
@AlfrescoPublicApi
public class RecordsManagementSearchServiceImpl implements RecordsManagementSearchService
{
private static final String SITES_SPACE_QNAME_PATH = "/app:company_home/st:sites/";
@@ -214,12 +216,12 @@ public class RecordsManagementSearchServiceImpl implements RecordsManagementSear
// execute query
ResultSet resultSet = searchService.query(searchParameters);
// process results
List<Pair<NodeRef, NodeRef>> result = new ArrayList<Pair<NodeRef, NodeRef>>(resultSet.length());
for (ChildAssociationRef childAssoc : resultSet.getChildAssocRefs())
{
result.add(new Pair<NodeRef, NodeRef>(childAssoc.getParentRef(), childAssoc.getChildRef()));
result.add(new Pair<NodeRef, NodeRef>(childAssoc.getParentRef(), childAssoc.getChildRef()));
}
// return results

View File

@@ -27,6 +27,7 @@
package org.alfresco.module.org_alfresco_module_rm.search;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.NamespaceService;
@@ -83,6 +84,7 @@ import org.springframework.extensions.surf.util.I18NUtil;
*
* @author Roy Wetherall
*/
@AlfrescoPublicApi
public class SavedSearchDetails extends ReportDetails
{
// JSON label values

View File

@@ -32,6 +32,7 @@ import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.List;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
@@ -42,6 +43,7 @@ import org.alfresco.service.namespace.QName;
* Used to bridge between the old style of saved search passed and required by the UI and the new actual saved search details.
* Eventually will be factored out as web scripts are brought up to date.
*/
@AlfrescoPublicApi
public class SavedSearchDetailsCompatibility implements RecordsManagementModel
{
/** Saved search details */

View File

@@ -29,35 +29,37 @@ package org.alfresco.module.org_alfresco_module_rm.security;
import java.util.Set;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
/**
* Extended security service.
*
*
* @author Roy Wetherall
* @since 2.1
*/
@AlfrescoPublicApi
public interface ExtendedSecurityService
{
/**
* Indicates whether a node has extended security.
*
*
* @param nodeRef node reference
* @return boolean true if the node has extedned security, false otherwise
*/
boolean hasExtendedSecurity(NodeRef nodeRef);
/**
* Gets the set of authorities that are extended readers for the given node.
*
*
* @param nodeRef node reference
* @return {@link Set}<{@link String}> set of extended readers
*/
Set<String> getExtendedReaders(NodeRef nodeRef);
/**
* Get the set of authorities that are extended writers for the given node.
*
*
* @param nodeRef node reference
* @return {@link Set}<{@link String}> set of extended writers
*/
@@ -65,42 +67,42 @@ public interface ExtendedSecurityService
/**
* Add extended security for the specified authorities to a node.
*
*
* @param nodeRef node reference
* @param readers set of authorities to add extended read permissions
* @param writers set of authorities to add extended write permissions
*/
void addExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers);
/**
* Add extended security for the specified authorities to a node.
* <p>
* If specified, the read and write extended permissions are applied to all parents up to the file plan as
* If specified, the read and write extended permissions are applied to all parents up to the file plan as
* extended read. This ensures parental read, but not parental write.
*
*
* @param nodeRef node reference
* @param readers set of authorities to add extended read permissions
* @param writers set of authorities to add extended write permissions
* @param applyToParents true if extended security applied to parents (read only) false otherwise.
*/
void addExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers, boolean applyToParents);
/**
* Remove the extended security for the specified authorities from a node.
*
*
* @param nodeRef node reference
* @param readers set of authorities to remove as extended readers
* @param writers set of authorities to remove as extended writers
*/
void removeExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers);
/**
* Remove the extended security for the specified authorities from a node.
* <p>
* If specified, extended security will also be removed from the parent hierarchy.(read only). Note that
* If specified, extended security will also be removed from the parent hierarchy.(read only). Note that
* extended security is records as a reference count, so security will only be utterly removed from the parent
* hierarchy if all references to the authority are removed.
*
*
* @param nodeRef node reference
* @param readers set of authorities to remove as extended readers
* @param writers set of authorities to remove as extedned writers
@@ -108,17 +110,17 @@ public interface ExtendedSecurityService
* otherwise
*/
void removeExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers, boolean applyToParents);
/**
* Remove all extended readers and writers from the given node reference.
*
*
* @param nodeRef node reference
*/
void removeAllExtendedSecurity(NodeRef nodeRef);
/**
* Remove all extended readers and writers from the given node reference.
*
*
* @param nodeRef node reference
* @param applyToParents if true then apply removal to parent hierarchy (read only) false otherwise.
*/

View File

@@ -35,6 +35,7 @@ import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
*
* @author Roy Wetherall
* @since 2.1
* @deprecated as of 2.2, use {@link AuthenticationUtil}.
*/
public interface FilePlanAuthenticationService
{

View File

@@ -27,46 +27,48 @@
package org.alfresco.module.org_alfresco_module_rm.security;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
/**
* File plan permission service.
*
*
* @author Roy Wetherall
* @since 2.1
*/
@AlfrescoPublicApi
public interface FilePlanPermissionService
{
/**
* Setup permissions for a record category
*
*
* @param nodeRef record category node reference
*/
void setupRecordCategoryPermissions(NodeRef recordCategory);
/**
* Setup permissions for an object within a given parent.
*
*
* @param parent parent node to inherit permissions from
* @param nodeRef node ref to setup permissions on
* @param nodeRef node ref to setup permissions on
*/
void setupPermissions(NodeRef parent, NodeRef nodeRef);
/**
* Sets a permission on a file plan object. Assumes allow is true. Cascades permission down to record folder.
* Sets a permission on a file plan object. Assumes allow is true. Cascades permission down to record folder.
* Cascades ReadRecord up to file plan.
*
*
* @param nodeRef node reference
* @param authority authority
* @param authority authority
* @param permission permission
*/
void setPermission(NodeRef nodeRef, String authority, String permission);
/**
* Deletes a permission from a file plan object. Cascades removal down to record folder.
*
*
* @param nodeRef node reference
* @param authority authority
* @param authority authority
* @param permission permission
*/
void deletePermission(NodeRef nodeRef, String authority, String permission);

View File

@@ -27,6 +27,7 @@
package org.alfresco.module.org_alfresco_module_rm.transfer;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
/**
@@ -35,6 +36,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
* @author Tuna Aksoy
* @since 2.2
*/
@AlfrescoPublicApi
public interface TransferService
{
/**
@@ -62,7 +64,7 @@ public interface TransferService
* Completes the transfer for the given node.
*
* @param nodeRef node reference to complete the transfer
*
*
* @since 2.2
*/
void completeTransfer(NodeRef nodeRef);

View File

@@ -27,6 +27,7 @@
package org.alfresco.module.org_alfresco_module_rm.util;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.repo.security.authentication.AuthenticationException;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
@@ -38,6 +39,7 @@ import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
* @author Roy Wetherall
* @since 2.3
*/
@AlfrescoPublicApi
public class AuthenticationUtil
{
/**

View File

@@ -31,6 +31,7 @@ import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanComponentKind;
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
import org.alfresco.module.org_alfresco_module_rm.hold.HoldService;
@@ -52,6 +53,7 @@ import org.springframework.context.ApplicationContextAware;
* @author Roy Wetherall
* @since 2.1
*/
@AlfrescoPublicApi
public class ServiceBaseImpl implements RecordsManagementModel, ApplicationContextAware
{
/** Node service */
@@ -71,9 +73,9 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
/** authentication helper */
protected AuthenticationUtil authenticationUtil;
/** transactional resource helper */
protected TransactionalResourceHelper transactionalResourceHelper;
protected TransactionalResourceHelper transactionalResourceHelper;
/**
* @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
@@ -115,7 +117,7 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
{
this.authenticationUtil = authenticationUtil;
}
/**
* @param transactionalResourceHelper transactional resource helper
*/

View File

@@ -32,13 +32,16 @@ import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import org.alfresco.api.AlfrescoPublicApi;
/**
* Delegate spring bean for TransactionResourceHelper
*
*
* @author Roy Wetherall
* @since 2.3
* @see org.alfresco.repo.transaction.TransactionalResourceHelper
*/
@AlfrescoPublicApi
public class TransactionalResourceHelper
{
/**
@@ -48,7 +51,7 @@ public class TransactionalResourceHelper
{
return org.alfresco.repo.transaction.TransactionalResourceHelper.getCount(resourceKey);
}
/**
* @see org.alfresco.repo.transaction.TransactionalResourceHelper#getCount(Object)
*/
@@ -56,7 +59,7 @@ public class TransactionalResourceHelper
{
org.alfresco.repo.transaction.TransactionalResourceHelper.resetCount(resourceKey);
}
/**
* @see org.alfresco.repo.transaction.TransactionalResourceHelper#incrementCount(Object)
*/
@@ -64,7 +67,7 @@ public class TransactionalResourceHelper
{
return org.alfresco.repo.transaction.TransactionalResourceHelper.incrementCount(resourceKey);
}
/**
* @see org.alfresco.repo.transaction.TransactionalResourceHelper#decrementCount(Object, boolean)
*/
@@ -72,7 +75,7 @@ public class TransactionalResourceHelper
{
return org.alfresco.repo.transaction.TransactionalResourceHelper.decrementCount(resourceKey, allowNegative);
}
/**
* @see org.alfresco.repo.transaction.TransactionalResourceHelper#getCount(Object)
*/
@@ -80,7 +83,7 @@ public class TransactionalResourceHelper
{
return org.alfresco.repo.transaction.TransactionalResourceHelper.isResourcePresent(resourceKey);
}
/**
* @see org.alfresco.repo.transaction.TransactionalResourceHelper#getMap(Object)
*/

View File

@@ -27,77 +27,79 @@
package org.alfresco.module.org_alfresco_module_rm.version;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.version.Version;
/**
* Recordable version service interface.
*
*
* @author Roy Wetherall
* @since 2.3
*/
public interface RecordableVersionService
@AlfrescoPublicApi
public interface RecordableVersionService
{
/**
* Indicates whether the current version of a node is recorded or not.
* <p>
* Returns false if not versionable or no version.
*
*
* @param nodeRef node reference
* @return boolean true if latest version recorded, false otherwise
*/
boolean isCurrentVersionRecorded(NodeRef nodeRef);
/**
* Indicates whether a version is recorded or not.
*
*
* @param version version
* @return boolean true if recorded version, false otherwise
*/
boolean isRecordedVersion(Version version);
/**
* If the version is a recorded version, gets the related version
* If the version is a recorded version, gets the related version
* record.
*
*
* @param version version
* @return NodeRef node reference of version record
*/
NodeRef getVersionRecord(Version version);
/**
* Gets the version that relates to the version record
*
*
* @param versionRecord version record node reference
* @return Version version or null if not found
*/
Version getRecordedVersion(NodeRef record);
/**
* Creates a record from the latest version, marking it as recorded.
* <p>
* Does not create a record if the node is not versionable or the latest
* version is already recorded.
*
*
* @param nodeRef node reference
* @return NodeRef node reference to the created record.
*/
NodeRef createRecordFromLatestVersion(NodeRef filePlan, NodeRef nodeRef);
/**
* Indicates whether a record version is destroyed or not.
*
*
* @param version version
* @return boolean true if destroyed, false otherwise
*/
boolean isRecordedVersionDestroyed(Version version);
/**
* Marks a recorded version as destroyed.
* <p>
* Note this method does not destroy the associated record, instead it marks the
* Note this method does not destroy the associated record, instead it marks the
* version as destroyed.
*
*
* @param version version
*/
void destroyRecordedVersion(Version version);

View File

@@ -36,6 +36,7 @@ import org.alfresco.service.cmr.repository.Period;
* @author Roy Wetherall
* @since 2.0
*/
// Not @AlfrescoPublicApi due to e.g. Period.
public interface VitalRecordService
{
/** Period 'none' */

View File

@@ -1,5 +1,7 @@
package org.alfresco.util;
import org.alfresco.api.AlfrescoPublicApi;
/*
* #%L
* Alfresco Records Management Module
@@ -35,6 +37,7 @@ import org.alfresco.error.AlfrescoRuntimeException;
* @author Tuna Aksoy
* @since 2.5
*/
@AlfrescoPublicApi
public enum SortDirection
{
ASC ("asc"),