mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-01 14:41:46 +00:00
Fixed major issues ("Signature Declare Throws Exception") reported in Sonar
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@71957 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -37,7 +37,7 @@ import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* Record type parameter constraint
|
||||
*
|
||||
*
|
||||
* @author Craig Tan
|
||||
* @since 2.1
|
||||
*/
|
||||
@@ -45,16 +45,16 @@ public class RecordTypeParameterConstraint extends BaseParameterConstraint
|
||||
{
|
||||
/** Name constant */
|
||||
public static final String NAME = "rm-ac-record-types";
|
||||
|
||||
|
||||
/** record service */
|
||||
private RecordService recordService;
|
||||
|
||||
/** dictionary service */
|
||||
private DictionaryService dictionaryService;
|
||||
|
||||
|
||||
/** file plan service */
|
||||
private FilePlanService filePlanService;
|
||||
|
||||
|
||||
/**
|
||||
* @param recordService record service
|
||||
*/
|
||||
@@ -78,28 +78,28 @@ public class RecordTypeParameterConstraint extends BaseParameterConstraint
|
||||
{
|
||||
this.filePlanService = filePlanService;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.ParameterConstraint#getAllowableValues()
|
||||
*/
|
||||
protected Map<String, String> getAllowableValuesImpl()
|
||||
{
|
||||
{
|
||||
return AuthenticationUtil.runAsSystem(new RunAsWork<Map<String, String>>()
|
||||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
public Map<String, String> doWork() throws Exception
|
||||
public Map<String, String> doWork()
|
||||
{
|
||||
Map<String, String> result = Collections.EMPTY_MAP;
|
||||
|
||||
|
||||
// get the file plan
|
||||
// TODO we will likely have to re-implement as a custom control so that context of the file
|
||||
// plan can be correctly determined when setting the rule up
|
||||
NodeRef filePlan = filePlanService.getFilePlanBySiteId(FilePlanService.DEFAULT_RM_SITE_ID);
|
||||
|
||||
|
||||
if (filePlan != null)
|
||||
{
|
||||
Set<QName> recordTypes = recordService.getRecordMetadataAspects(filePlan);
|
||||
|
||||
|
||||
result = new HashMap<String, String>(recordTypes.size());
|
||||
for (QName recordType : recordTypes)
|
||||
{
|
||||
@@ -110,9 +110,9 @@ public class RecordTypeParameterConstraint extends BaseParameterConstraint
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -184,7 +184,7 @@ public class CreateRecordAction extends AuditableActionExecuterAbstractBase
|
||||
filePlan = filePlanAuthenticationService.runAsRmAdmin(new RunAsWork<NodeRef>()
|
||||
{
|
||||
@Override
|
||||
public NodeRef doWork() throws Exception
|
||||
public NodeRef doWork()
|
||||
{
|
||||
return filePlanService.getFilePlanBySiteId(FilePlanService.DEFAULT_RM_SITE_ID);
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ public class CloseRecordFolderAction extends RMActionExecuterAbstractBase
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
recordFolderService.closeRecordFolder(actionedUponNodeRef);
|
||||
|
||||
|
@@ -116,7 +116,7 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -341,7 +341,8 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
{
|
||||
return AuthenticationUtil.runAsSystem(new RunAsWork<NodeRef>()
|
||||
{
|
||||
public NodeRef doWork() throws Exception
|
||||
@Override
|
||||
public NodeRef doWork()
|
||||
{
|
||||
NodeRef child = null;
|
||||
if(targetisUnfiledRecords)
|
||||
|
@@ -83,7 +83,7 @@ public class DeclareRecordAction extends RMActionExecuterAbstractBase
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
// remove all owner related rights
|
||||
ownableService.setOwner(actionedUponNodeRef, OwnableService.NO_OWNER);
|
||||
|
@@ -93,7 +93,7 @@ public class FileReportAction extends RMActionExecuterAbstractBase implements Re
|
||||
NodeRef filedReport = AuthenticationUtil.runAsSystem(new RunAsWork<NodeRef>()
|
||||
{
|
||||
@Override
|
||||
public NodeRef doWork() throws Exception
|
||||
public NodeRef doWork()
|
||||
{
|
||||
return reportService.fileReport(destination, report);
|
||||
}
|
||||
|
@@ -243,7 +243,7 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
// add the relationship
|
||||
recordsManagementAdminService.addCustomReference(parentRef, childRef, relationshipQName);
|
||||
|
@@ -304,7 +304,7 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
if (nodeService.exists(nodeRef) &&
|
||||
dictionaryService.getAllModels().contains(RM_CUSTOM_MODEL) &&
|
||||
@@ -334,7 +334,7 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
if (nodeService.exists(nodeRef) &&
|
||||
isCustomisable(aspectTypeQName))
|
||||
@@ -365,7 +365,7 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
if (dictionaryService.getAllModels().contains(RecordsManagementCustomModel.RM_CUSTOM_MODEL))
|
||||
{
|
||||
@@ -1173,7 +1173,7 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
List<ChildAssociationRef> children = nodeService.getChildAssocs(fromNode);
|
||||
for (ChildAssociationRef chRef : children)
|
||||
|
@@ -27,7 +27,7 @@ import org.springframework.aop.framework.ProxyFactoryBean;
|
||||
|
||||
/**
|
||||
* RM action proxy factory bean.
|
||||
*
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
*/
|
||||
public class RMActionProxyFactoryBean extends ProxyFactoryBean
|
||||
@@ -45,7 +45,7 @@ public class RMActionProxyFactoryBean extends ProxyFactoryBean
|
||||
|
||||
/**
|
||||
* Set action service
|
||||
*
|
||||
*
|
||||
* @param actionService
|
||||
*/
|
||||
public void setRuntimeActionService(RuntimeActionService runtimeActionService)
|
||||
@@ -55,7 +55,7 @@ public class RMActionProxyFactoryBean extends ProxyFactoryBean
|
||||
|
||||
/**
|
||||
* Set records management service
|
||||
*
|
||||
*
|
||||
* @param recordsManagementActionService
|
||||
*/
|
||||
public void setRecordsManagementActionService(RecordsManagementActionService recordsManagementActionService)
|
||||
@@ -65,7 +65,7 @@ public class RMActionProxyFactoryBean extends ProxyFactoryBean
|
||||
|
||||
/**
|
||||
* Set records management service
|
||||
*
|
||||
*
|
||||
* @param recordsManagementAuditService
|
||||
*/
|
||||
public void setRecordsManagementAuditService(RecordsManagementAuditService recordsManagementAuditService)
|
||||
@@ -80,14 +80,14 @@ public class RMActionProxyFactoryBean extends ProxyFactoryBean
|
||||
{
|
||||
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Void>()
|
||||
{
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
RecordsManagementAction action = (RecordsManagementAction)getObject();
|
||||
RecordsManagementAction action = (RecordsManagementAction)getObject();
|
||||
recordsManagementActionService.register(action);
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
}, AuthenticationUtil.getSystemUserName());
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -94,7 +94,7 @@ public class RMAfterInvocationProvider extends RMSecurityCommon
|
||||
return (MethodInvocation.class.isAssignableFrom(clazz));
|
||||
}
|
||||
|
||||
public void afterPropertiesSet() throws Exception
|
||||
public void afterPropertiesSet()
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -317,7 +317,7 @@ public class RMEntryVoter extends RMSecurityCommon
|
||||
/**
|
||||
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
|
||||
*/
|
||||
public void afterPropertiesSet() throws Exception
|
||||
public void afterPropertiesSet()
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -349,7 +349,7 @@ public class DataSetServiceImpl implements DataSetService, RecordsManagementMode
|
||||
{
|
||||
AuthenticationUtil.RunAsWork<Object> runAsWork = new AuthenticationUtil.RunAsWork<Object>()
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
public Object doWork()
|
||||
{
|
||||
Set<NodeRef> rmRoots = filePlanService.getFilePlans();
|
||||
logger.info("Bootstraping " + rmRoots.size() + " rm roots ...");
|
||||
|
@@ -42,7 +42,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Disposition action implementation.
|
||||
*
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @since 1.0
|
||||
*/
|
||||
@@ -51,13 +51,13 @@ public class DispositionActionImpl implements DispositionAction,
|
||||
{
|
||||
/** logger */
|
||||
private static Log logger = LogFactory.getLog(DispositionActionImpl.class);
|
||||
|
||||
|
||||
/** records management service registry */
|
||||
private RecordsManagementServiceRegistry services;
|
||||
|
||||
|
||||
/** disposition node reference */
|
||||
private NodeRef dispositionNodeRef;
|
||||
|
||||
|
||||
/** disposition action definition */
|
||||
private DispositionActionDefinition dispositionActionDefinition;
|
||||
|
||||
@@ -208,11 +208,11 @@ public class DispositionActionImpl implements DispositionAction,
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Helper method to create object representation of event completed details from
|
||||
* node reference.
|
||||
*
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @return {@link EventCompletionDetails} event completion details
|
||||
*/
|
||||
@@ -220,20 +220,20 @@ public class DispositionActionImpl implements DispositionAction,
|
||||
{
|
||||
// get the properties
|
||||
Map<QName, Serializable> props = this.services.getNodeService().getProperties(nodeRef);
|
||||
|
||||
|
||||
// get the event name
|
||||
String eventName = (String)props.get(PROP_EVENT_EXECUTION_NAME);
|
||||
|
||||
// create event completion details
|
||||
|
||||
// create event completion details
|
||||
EventCompletionDetails ecd = new EventCompletionDetails(
|
||||
nodeRef,
|
||||
nodeRef,
|
||||
eventName,
|
||||
services.getRecordsManagementEventService().getEvent(eventName).getDisplayLabel(),
|
||||
getBooleanValue(props.get(PROP_EVENT_EXECUTION_AUTOMATIC), false),
|
||||
getBooleanValue(props.get(PROP_EVENT_EXECUTION_COMPLETE), false),
|
||||
(Date)props.get(PROP_EVENT_EXECUTION_COMPLETED_AT),
|
||||
(String)props.get(PROP_EVENT_EXECUTION_COMPLETED_BY));
|
||||
|
||||
|
||||
return ecd;
|
||||
}
|
||||
|
||||
@@ -258,10 +258,10 @@ public class DispositionActionImpl implements DispositionAction,
|
||||
* Gets the event completion details for the named event.
|
||||
* <p>
|
||||
* Returns null if event can not be found.
|
||||
*
|
||||
*
|
||||
* @param eventName name of the event
|
||||
* @return {@link EventCompletionDetails} event completion details for named event, null otherwise
|
||||
*
|
||||
*
|
||||
* @since 2.2
|
||||
*/
|
||||
@Override
|
||||
@@ -269,17 +269,17 @@ public class DispositionActionImpl implements DispositionAction,
|
||||
{
|
||||
EventCompletionDetails result = null;
|
||||
List<ChildAssociationRef> assocs = services.getNodeService().getChildAssocsByPropertyValue(dispositionNodeRef, PROP_EVENT_EXECUTION_NAME, eventName);
|
||||
|
||||
|
||||
if (!assocs.isEmpty())
|
||||
{
|
||||
if (assocs.size() != 1)
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Unable to get event completion details, because more than one child was found for event " + eventName);
|
||||
}
|
||||
|
||||
|
||||
result = getEventCompletionDetailsFromNodeRef(assocs.get(0).getChildRef());
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ public class DispositionActionImpl implements DispositionAction,
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
// use "now" if no completed date set
|
||||
Date completedAtValue = completedAt;
|
||||
@@ -310,7 +310,7 @@ public class DispositionActionImpl implements DispositionAction,
|
||||
{
|
||||
completedByValue = AuthenticationUtil.getFullyAuthenticatedUser();
|
||||
}
|
||||
|
||||
|
||||
// Update the event so that it is complete
|
||||
NodeRef eventNodeRef = event.getNodeRef();
|
||||
Map<QName, Serializable> props = services.getNodeService().getProperties(eventNodeRef);
|
||||
@@ -321,7 +321,7 @@ public class DispositionActionImpl implements DispositionAction,
|
||||
|
||||
// Check to see if the events eligible property needs to be updated
|
||||
updateEventEligible();
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
});
|
||||
@@ -340,7 +340,7 @@ public class DispositionActionImpl implements DispositionAction,
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
// Update the event so that it is undone
|
||||
NodeRef eventNodeRef = event.getNodeRef();
|
||||
@@ -349,16 +349,16 @@ public class DispositionActionImpl implements DispositionAction,
|
||||
props.put(PROP_EVENT_EXECUTION_COMPLETED_AT, null);
|
||||
props.put(PROP_EVENT_EXECUTION_COMPLETED_BY, null);
|
||||
services.getNodeService().setProperties(eventNodeRef, props);
|
||||
|
||||
|
||||
// Check to see if the events eligible property needs to be updated
|
||||
updateEventEligible();
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction#refreshEvents()
|
||||
*/
|
||||
@@ -369,26 +369,26 @@ public class DispositionActionImpl implements DispositionAction,
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
// go through the current events on the next action and remove any that are not present any more
|
||||
List<String> stepEvents = (List<String>) services.getNodeService().getProperty(getDispositionActionDefinition().getNodeRef(), PROP_DISPOSITION_EVENT);
|
||||
|
||||
|
||||
List<EventCompletionDetails> eventsList = getEventCompletionDetails();
|
||||
List<String> nextActionEvents = new ArrayList<String>(eventsList.size());
|
||||
|
||||
|
||||
for (EventCompletionDetails event : eventsList)
|
||||
{
|
||||
// take note of the event names present on the next action
|
||||
String eventName = event.getEventName();
|
||||
nextActionEvents.add(eventName);
|
||||
|
||||
|
||||
// if the event has been removed delete from next action
|
||||
if (stepEvents != null && !stepEvents.contains(event.getEventName()))
|
||||
{
|
||||
// remove the child association representing the event
|
||||
services.getNodeService().removeChild(getNodeRef(), event.getNodeRef());
|
||||
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Removed '" + eventName + "' from next action '" + getName() +
|
||||
@@ -396,7 +396,7 @@ public class DispositionActionImpl implements DispositionAction,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// go through the disposition action definition step events and add any new ones
|
||||
if (stepEvents != null)
|
||||
{
|
||||
@@ -406,7 +406,7 @@ public class DispositionActionImpl implements DispositionAction,
|
||||
{
|
||||
// add the details of the new event
|
||||
addEventCompletionDetails(services.getRecordsManagementEventService().getEvent(eventName));
|
||||
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Added '" + eventName + "' to next action '" + getName() +
|
||||
@@ -415,24 +415,24 @@ public class DispositionActionImpl implements DispositionAction,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// NOTE: eventsList contains all the events that have been updated!
|
||||
// TODO: manually update the search properties for the parent node!
|
||||
|
||||
|
||||
// finally since events may have changed re-calculate the events eligible flag
|
||||
boolean eligible = updateEventEligible();
|
||||
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Set events eligible flag to '" + eligible + "' for next action '" + getName() +
|
||||
"' (" + getNodeRef() + ")");
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction#addEventCompletionDetails(org.alfresco.module.org_alfresco_module_rm.event.RecordsManagementEvent)
|
||||
*/
|
||||
@@ -446,13 +446,13 @@ public class DispositionActionImpl implements DispositionAction,
|
||||
eventProps.put(PROP_EVENT_EXECUTION_COMPLETE, false);
|
||||
|
||||
// Create the event execution object
|
||||
services.getNodeService().createNode(getNodeRef(),
|
||||
services.getNodeService().createNode(getNodeRef(),
|
||||
ASSOC_EVENT_EXECUTIONS,
|
||||
ASSOC_EVENT_EXECUTIONS,
|
||||
TYPE_EVENT_EXECUTION,
|
||||
ASSOC_EVENT_EXECUTIONS,
|
||||
TYPE_EVENT_EXECUTION,
|
||||
eventProps);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Calculates and updates the <code>rma:dispositionEventsEligible</code>
|
||||
@@ -460,13 +460,13 @@ public class DispositionActionImpl implements DispositionAction,
|
||||
*
|
||||
* @param nextAction The next disposition action
|
||||
* @return The result of calculation
|
||||
*
|
||||
*
|
||||
* @since 2.2
|
||||
*/
|
||||
private boolean updateEventEligible()
|
||||
{
|
||||
boolean eligible = false;
|
||||
|
||||
|
||||
// get the events for the next disposition action
|
||||
List<EventCompletionDetails> events = getEventCompletionDetails();
|
||||
|
||||
|
@@ -132,7 +132,7 @@ public class DispositionSelectionStrategy implements RecordsManagementModel
|
||||
// Run as admin user
|
||||
return filePlanAuthenticationService.runAsRmAdmin(new RunAsWork<Integer>()
|
||||
{
|
||||
public Integer doWork() throws Exception
|
||||
public Integer doWork()
|
||||
{
|
||||
return compareImpl(f1, f2);
|
||||
}
|
||||
@@ -147,11 +147,11 @@ public class DispositionSelectionStrategy implements RecordsManagementModel
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// get the disposition schedules for the folders
|
||||
DispositionSchedule ds1 = dispositionService.getDispositionSchedule(f1);
|
||||
DispositionSchedule ds2 = dispositionService.getDispositionSchedule(f2);
|
||||
|
||||
|
||||
// make sure each folder has a disposition schedule
|
||||
if (ds1 == null && ds2 != null)
|
||||
{
|
||||
|
@@ -817,7 +817,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
||||
* @see org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork#doWork()
|
||||
*/
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
// Get this disposition instructions for the node
|
||||
DispositionSchedule di = getDispositionSchedule(nodeRef);
|
||||
@@ -991,7 +991,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
||||
{
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
// Apply the cut off aspect and set cut off date
|
||||
Map<QName, Serializable> cutOffProps = new HashMap<QName, Serializable>(1);
|
||||
|
@@ -194,7 +194,7 @@ public class DispositionProperty extends BaseBehaviourBean
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
Date updatedDateValue = (Date)after.get(propertyName);
|
||||
if (updatedDateValue != null)
|
||||
|
@@ -106,7 +106,7 @@ public class OnReferenceCreateEventType extends SimpleRecordsManagementEventType
|
||||
{
|
||||
AuthenticationUtil.RunAsWork<Object> work = new AuthenticationUtil.RunAsWork<Object>()
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
public Object doWork()
|
||||
{
|
||||
// Check whether it is the reference type we care about
|
||||
if (reference.equals(OnReferenceCreateEventType.this.reference))
|
||||
|
@@ -168,7 +168,7 @@ public class OnReferencedRecordActionedUpon extends SimpleRecordsManagementEvent
|
||||
{
|
||||
AuthenticationUtil.RunAsWork<Object> work = new AuthenticationUtil.RunAsWork<Object>()
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
public Object doWork()
|
||||
{
|
||||
if (nodeService.exists(nodeRef) && name.equals(actionName))
|
||||
{
|
||||
|
@@ -477,7 +477,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
||||
runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
// Link the record to the hold
|
||||
nodeService.addChild(hold, nodeRef, ASSOC_FROZEN_RECORDS, ASSOC_FROZEN_RECORDS);
|
||||
|
@@ -78,7 +78,7 @@ public class NotifyOfRecordsDueForReviewJobExecuter extends RecordsManagementJob
|
||||
|
||||
AuthenticationUtil.runAs(new RunAsWork<Object>()
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
public Object doWork()
|
||||
{
|
||||
// Query is for all records that are due for review and for which
|
||||
// notification has not been sent.
|
||||
|
@@ -116,7 +116,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
||||
|
||||
AuthenticationUtil.runAs(new RunAsWork<Object>()
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
public Object doWork()
|
||||
{
|
||||
if (rmLoaded())
|
||||
{
|
||||
|
@@ -95,7 +95,7 @@ public class RecordsManagementJob implements Job
|
||||
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
// try and get the lock
|
||||
String lockToken = getLock();
|
||||
|
@@ -56,7 +56,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
|
||||
|
||||
/** Capability service */
|
||||
private CapabilityService capabilityService;
|
||||
|
||||
|
||||
/** dictionary service */
|
||||
private DictionaryService dictionaryService;
|
||||
|
||||
@@ -89,7 +89,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
|
||||
{
|
||||
this.capabilityService = capabilityService;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param dictionaryService dictionary service
|
||||
*/
|
||||
@@ -126,21 +126,21 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
|
||||
{
|
||||
// Set the base root values
|
||||
super.setRootValues(nodeInfo, rootJSONObject, useShortQNames);
|
||||
|
||||
|
||||
// Get the node reference for convenience
|
||||
NodeRef nodeRef = nodeInfo.getNodeRef();
|
||||
|
||||
|
||||
if (AccessStatus.ALLOWED.equals(capabilityService.getCapabilityAccessState(nodeRef,
|
||||
RMPermissionModel.VIEW_RECORDS)))
|
||||
{
|
||||
// Indicate whether the node is a RM object or not
|
||||
boolean isFilePlanComponent = filePlanService.isFilePlanComponent(nodeInfo.getNodeRef());
|
||||
rootJSONObject.put("isRmNode", isFilePlanComponent);
|
||||
|
||||
|
||||
if (isFilePlanComponent)
|
||||
{
|
||||
rootJSONObject.put("rmNode", setRmNodeValues(nodeRef, useShortQNames));
|
||||
|
||||
|
||||
// FIXME: Is this the right place to add the information?
|
||||
addInfo(nodeInfo, rootJSONObject);
|
||||
}
|
||||
@@ -150,7 +150,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
|
||||
|
||||
/**
|
||||
* Helper method to add information about node
|
||||
*
|
||||
*
|
||||
* @param nodeInfo node information
|
||||
* @param rootJSONObject root JSON object
|
||||
*/
|
||||
@@ -159,13 +159,13 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
|
||||
{
|
||||
String itemType = (String) rootJSONObject.get("type");
|
||||
final QName itemTypeQName = QName.createQName(itemType, namespaceService);
|
||||
|
||||
|
||||
NodeRef originatingLocation = AuthenticationUtil.runAsSystem(new RunAsWork<NodeRef>()
|
||||
{
|
||||
public NodeRef doWork() throws Exception
|
||||
{
|
||||
public NodeRef doWork()
|
||||
{
|
||||
NodeRef originatingLocation = null;
|
||||
|
||||
|
||||
if (dictionaryService.isSubClass(itemTypeQName, ContentModel.TYPE_CONTENT))
|
||||
{
|
||||
NodeRef nodeRef = nodeInfo.getNodeRef();
|
||||
@@ -177,7 +177,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
|
||||
if (!parent.isPrimary())
|
||||
{
|
||||
originatingLocation = parent.getParentRef();
|
||||
|
||||
|
||||
// only consider the non-RM parent otherwise we can
|
||||
// run into issues with frozen or transferring records
|
||||
if (!nodeService.hasAspect(originatingLocation, RecordsManagementModel.ASPECT_FILE_PLAN_COMPONENT))
|
||||
@@ -189,11 +189,11 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return originatingLocation;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
if (originatingLocation != null)
|
||||
{
|
||||
String pathSeparator = "/";
|
||||
|
@@ -41,7 +41,7 @@ public class MultiParentEvaluator extends BaseEvaluator
|
||||
return AuthenticationUtil.runAsSystem(new RunAsWork<Boolean>()
|
||||
{
|
||||
@Override
|
||||
public Boolean doWork() throws Exception
|
||||
public Boolean doWork()
|
||||
{
|
||||
List<ChildAssociationRef> parents = nodeService.getParentAssocs(nodeRef, ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
|
||||
int count = 0;
|
||||
|
@@ -296,7 +296,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
ChildAssociationRef assoc = nodeService.getPrimaryParent(nodeRef);
|
||||
if (assoc.getTypeQName().equals(ASSOC_NEXT_DISPOSITION_ACTION))
|
||||
@@ -354,7 +354,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
AuthenticationUtil.runAsSystem(new AuthenticationUtil.RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
if (nodeService.exists(nodeRef) && nodeService.hasAspect(nodeRef, ASPECT_RECORD))
|
||||
{
|
||||
@@ -594,7 +594,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
AuthenticationUtil.runAsSystem(new AuthenticationUtil.RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
@@ -618,7 +618,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
AuthenticationUtil.runAsSystem(new AuthenticationUtil.RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
// Only care about record folders
|
||||
if (nodeService.exists(nodeRef) && recordFolderService.isRecordFolder(nodeRef))
|
||||
@@ -643,7 +643,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
AuthenticationUtil.runAsSystem(new AuthenticationUtil.RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
// Only care about record folders
|
||||
if (nodeService.exists(nodeRef) && recordFolderService.isRecordFolder(nodeRef))
|
||||
@@ -743,7 +743,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
AuthenticationUtil.RunAsWork<Void> work = new AuthenticationUtil.RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
|
@@ -86,7 +86,7 @@ public class DispositionLifecycleAspect extends BaseBehaviourBean
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
dispositionService.refreshDispositionAction(nodeRef);
|
||||
return null;
|
||||
|
@@ -38,7 +38,7 @@ import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* rma:extendedSecurity behaviour bean
|
||||
*
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @since 2.2
|
||||
*/
|
||||
@@ -51,7 +51,7 @@ public class ExtendedSecurityAspect extends BaseBehaviourBean
|
||||
{
|
||||
/** extended security service */
|
||||
protected ExtendedSecurityService extendedSecurityService;
|
||||
|
||||
|
||||
/**
|
||||
* @param extendedSecurityService extended security service
|
||||
*/
|
||||
@@ -59,10 +59,10 @@ public class ExtendedSecurityAspect extends BaseBehaviourBean
|
||||
{
|
||||
this.extendedSecurityService = extendedSecurityService;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Copy callback.
|
||||
*
|
||||
*
|
||||
* Aspect should not be copied.
|
||||
*/
|
||||
@Behaviour
|
||||
@@ -77,7 +77,7 @@ public class ExtendedSecurityAspect extends BaseBehaviourBean
|
||||
|
||||
/**
|
||||
* Update extended security when moving a node.
|
||||
*
|
||||
*
|
||||
* @see org.alfresco.repo.node.NodeServicePolicies.OnMoveNodePolicy#onMoveNode(org.alfresco.service.cmr.repository.ChildAssociationRef, org.alfresco.service.cmr.repository.ChildAssociationRef)
|
||||
*/
|
||||
@Override
|
||||
@@ -91,7 +91,7 @@ public class ExtendedSecurityAspect extends BaseBehaviourBean
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
NodeRef record = newAssoc.getChildRef();
|
||||
NodeRef newParent = newAssoc.getParentRef();
|
||||
@@ -107,7 +107,7 @@ public class ExtendedSecurityAspect extends BaseBehaviourBean
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@@ -111,7 +111,7 @@ public class FilePlanComponentAspect extends BaseBehaviourBean
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
@@ -201,7 +201,7 @@ public class FilePlanComponentAspect extends BaseBehaviourBean
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
@@ -232,7 +232,7 @@ public class FilePlanComponentAspect extends BaseBehaviourBean
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
if (nodeService.exists(newChildAssocRef.getParentRef()) &&
|
||||
nodeService.exists(newChildAssocRef.getChildRef()))
|
||||
|
@@ -85,7 +85,7 @@ public class FrozenAspect extends BaseBehaviourBean
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
if (nodeService.exists(nodeRef) &&
|
||||
filePlanService.isFilePlanComponent(nodeRef))
|
||||
|
@@ -103,7 +103,7 @@ public class RecordAspect extends BaseBehaviourBean
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
NodeRef thumbnail = childAssocRef.getChildRef();
|
||||
|
||||
@@ -222,7 +222,7 @@ public class RecordAspect extends BaseBehaviourBean
|
||||
final NodeRef newNodeRef = newChildAssocRef.getChildRef();
|
||||
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>()
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
public Object doWork()
|
||||
{
|
||||
if (nodeService.exists(newNodeRef))
|
||||
{
|
||||
|
@@ -83,7 +83,7 @@ public class VitalRecordDefinitionAspect extends BaseBehaviourBean
|
||||
{
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
if (nodeService.exists(nodeRef) &&
|
||||
nodeService.hasAspect(nodeRef, ASPECT_FILE_PLAN_COMPONENT))
|
||||
@@ -98,7 +98,7 @@ public class VitalRecordDefinitionAspect extends BaseBehaviourBean
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -136,7 +136,7 @@ public class FilePlanType extends BaseBehaviourBean
|
||||
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Object>()
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
public Object doWork()
|
||||
{
|
||||
if (nodeService.hasAspect(filePlan, ASPECT_FILE_PLAN_COMPONENT) &&
|
||||
nodeService.getProperty(filePlan, PROP_IDENTIFIER) == null)
|
||||
|
@@ -130,7 +130,7 @@ public class RecordCategoryType extends BaseBehaviourBean
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
// setup vital record definition
|
||||
vitalRecordService.setupVitalRecordDefinition(recordCategory);
|
||||
@@ -165,7 +165,7 @@ public class RecordCategoryType extends BaseBehaviourBean
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
// setup record category permissions
|
||||
filePlanPermissionService.setupRecordCategoryPermissions(childAssocRef.getChildRef());
|
||||
|
@@ -132,7 +132,7 @@ public class RecordFolderType extends BaseBehaviourBean
|
||||
|
||||
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>()
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
public Object doWork()
|
||||
{
|
||||
behaviourFilter.disableBehaviour();
|
||||
try
|
||||
@@ -269,7 +269,7 @@ public class RecordFolderType extends BaseBehaviourBean
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
// setup vital record definition
|
||||
vitalRecordService.setupVitalRecordDefinition(recordFolder);
|
||||
|
@@ -94,7 +94,7 @@ public class RecordsManagementContainerType extends BaseBehaviourBean
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
// Get the elements of the created association
|
||||
final NodeRef child = childAssocRef.getChildRef();
|
||||
@@ -172,7 +172,7 @@ public class RecordsManagementContainerType extends BaseBehaviourBean
|
||||
{
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Object>()
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
public Object doWork()
|
||||
{
|
||||
if (nodeService.hasAspect(nodeRef, ASPECT_FILE_PLAN_COMPONENT) &&
|
||||
nodeService.getProperty(nodeRef, PROP_IDENTIFIER) == null)
|
||||
|
@@ -253,7 +253,7 @@ public class RmSiteType extends BaseBehaviourBean
|
||||
NodeRef filePlan = AuthenticationUtil.runAsSystem(new RunAsWork<NodeRef>()
|
||||
{
|
||||
@Override
|
||||
public NodeRef doWork() throws Exception
|
||||
public NodeRef doWork()
|
||||
{
|
||||
return siteService.getContainer(siteInfo.getShortName(), COMPONENT_DOCUMENT_LIBRARY);
|
||||
}
|
||||
@@ -268,18 +268,18 @@ public class RmSiteType extends BaseBehaviourBean
|
||||
{
|
||||
throw new AlfrescoRuntimeException("The records management site can not be deleted, because the user doesn't have sufficient privillages to delete the file plan.");
|
||||
}
|
||||
|
||||
|
||||
// work around for MNT-11038 .. we want to ensure that the RM site can be created once it's been deleted since we only
|
||||
// allow one short name for the RM site
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
// delete the authority
|
||||
String siteGroup = siteService.getSiteGroup(siteInfo.getShortName());
|
||||
authorityService.deleteAuthority(siteGroup, true);
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
@@ -218,7 +218,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
|
||||
String tenantDomain = tenantAdminService.getCurrentUserDomain();
|
||||
return TenantUtil.runAsSystemTenant(new TenantRunAsWork<NodeRef>()
|
||||
{
|
||||
public NodeRef doWork() throws Exception
|
||||
public NodeRef doWork()
|
||||
{
|
||||
return nodeService.getRootNode(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
|
||||
}
|
||||
@@ -396,7 +396,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
|
||||
return AuthenticationUtil.runAs(new RunAsWork<NodeRef>()
|
||||
{
|
||||
@Override
|
||||
public NodeRef doWork() throws Exception
|
||||
public NodeRef doWork()
|
||||
{
|
||||
return filePlanService.getFilePlan(context);
|
||||
|
||||
@@ -416,7 +416,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
|
||||
return AuthenticationUtil.runAs(new RunAsWork<String>()
|
||||
{
|
||||
@Override
|
||||
public String doWork() throws Exception
|
||||
public String doWork()
|
||||
{
|
||||
// Find the authority for the given role
|
||||
Role role = filePlanRoleService.getRole(root, notificationRole);
|
||||
@@ -449,7 +449,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
|
||||
return AuthenticationUtil.runAs(new RunAsWork<String>()
|
||||
{
|
||||
@Override
|
||||
public String doWork() throws Exception
|
||||
public String doWork()
|
||||
{
|
||||
String result = DEFAULT_SITE;
|
||||
|
||||
|
@@ -439,7 +439,7 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
onCreateChildAssociation.disable();
|
||||
try
|
||||
@@ -740,7 +740,7 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
if (!nodeService.hasAspect(nodeRef, ASPECT_RECORD))
|
||||
{
|
||||
@@ -1006,7 +1006,7 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
// remove the child association
|
||||
NodeRef originatingLocation = (NodeRef) nodeService.getProperty(nodeRef, PROP_RECORD_ORIGINATING_LOCATION);
|
||||
|
@@ -479,7 +479,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
|
||||
{
|
||||
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Set<Role>>()
|
||||
{
|
||||
public Set<Role> doWork() throws Exception
|
||||
public Set<Role> doWork()
|
||||
{
|
||||
Set<Role> result = new HashSet<Role>(13);
|
||||
|
||||
@@ -524,7 +524,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
|
||||
{
|
||||
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Set<Role>>()
|
||||
{
|
||||
public Set<Role> doWork() throws Exception
|
||||
public Set<Role> doWork()
|
||||
{
|
||||
Set<Role> result = new HashSet<Role>(13);
|
||||
|
||||
@@ -595,7 +595,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
|
||||
{
|
||||
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Role>()
|
||||
{
|
||||
public Role doWork() throws Exception
|
||||
public Role doWork()
|
||||
{
|
||||
Role result = null;
|
||||
|
||||
@@ -647,7 +647,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
|
||||
{
|
||||
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Boolean>()
|
||||
{
|
||||
public Boolean doWork() throws Exception
|
||||
public Boolean doWork()
|
||||
{
|
||||
String fullRoleName = authorityService.getName(AuthorityType.GROUP, getFullRoleName(role, rmRootNode));
|
||||
|
||||
@@ -690,7 +690,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
|
||||
{
|
||||
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Role>()
|
||||
{
|
||||
public Role doWork() throws Exception
|
||||
public Role doWork()
|
||||
{
|
||||
String fullRoleName = getFullRoleName(role, rmRootNode);
|
||||
|
||||
@@ -744,7 +744,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
|
||||
{
|
||||
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Role>()
|
||||
{
|
||||
public Role doWork() throws Exception
|
||||
public Role doWork()
|
||||
{
|
||||
if (!existsRole(rmRootNode, role))
|
||||
{
|
||||
@@ -792,7 +792,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
|
||||
|
||||
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>()
|
||||
{
|
||||
public Boolean doWork() throws Exception
|
||||
public Boolean doWork()
|
||||
{
|
||||
String roleAuthority = authorityService.getName(AuthorityType.GROUP, getFullRoleName(role, rmRootNode));
|
||||
authorityService.deleteAuthority(roleAuthority);
|
||||
@@ -826,7 +826,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
|
||||
{
|
||||
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Set<String>>()
|
||||
{
|
||||
public Set<String> doWork() throws Exception
|
||||
public Set<String> doWork()
|
||||
{
|
||||
Role role = getRole(filePlan, roleName);
|
||||
if (role == null)
|
||||
@@ -873,7 +873,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
|
||||
{
|
||||
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Void>()
|
||||
{
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
if (!getAllAssignedToRole(filePlan, role).contains(authorityName))
|
||||
{
|
||||
@@ -894,7 +894,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
|
||||
{
|
||||
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Void>()
|
||||
{
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
String roleAuthority = authorityService.getName(AuthorityType.GROUP, getFullRoleName(role, filePlan));
|
||||
authorityService.removeAuthority(roleAuthority, authorityName);
|
||||
|
@@ -237,7 +237,7 @@ public class BootstrapTestDataGet extends DeclarativeWebScript
|
||||
{
|
||||
AuthenticationUtil.RunAsWork<Object> runAsWork = new AuthenticationUtil.RunAsWork<Object>()
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
public Object doWork()
|
||||
{
|
||||
java.util.List<NodeRef> rmRoots = recordsManagementService.getFilePlans();
|
||||
logger.info("Bootstraping " + rmRoots.size() + " rm roots ...");
|
||||
|
@@ -217,7 +217,7 @@ public class ImportPost extends DeclarativeWebScript
|
||||
// import the ACP file as the system user
|
||||
AuthenticationUtil.runAs(new RunAsWork<NodeRef>()
|
||||
{
|
||||
public NodeRef doWork() throws Exception
|
||||
public NodeRef doWork()
|
||||
{
|
||||
importerService.importView(importHandler, new Location(destination), null, null);
|
||||
return null;
|
||||
|
@@ -470,7 +470,7 @@ public class RecordsManagementSearchServiceImpl implements RecordsManagementSear
|
||||
container = AuthenticationUtil.runAs(new RunAsWork<NodeRef>()
|
||||
{
|
||||
@Override
|
||||
public NodeRef doWork() throws Exception
|
||||
public NodeRef doWork()
|
||||
{
|
||||
return siteService.createContainer(siteId, SEARCH_CONTAINER, null, null);
|
||||
}
|
||||
@@ -488,7 +488,7 @@ public class RecordsManagementSearchServiceImpl implements RecordsManagementSear
|
||||
userContainer = AuthenticationUtil.runAs(new RunAsWork<NodeRef>()
|
||||
{
|
||||
@Override
|
||||
public NodeRef doWork() throws Exception
|
||||
public NodeRef doWork()
|
||||
{
|
||||
return fileFolderService.create(parentContainer, userName, ContentModel.TYPE_FOLDER).getNodeRef();
|
||||
}
|
||||
@@ -505,7 +505,7 @@ public class RecordsManagementSearchServiceImpl implements RecordsManagementSear
|
||||
searchNode = AuthenticationUtil.runAs(new RunAsWork<NodeRef>()
|
||||
{
|
||||
@Override
|
||||
public NodeRef doWork() throws Exception
|
||||
public NodeRef doWork()
|
||||
{
|
||||
return fileFolderService.create(searchContainer, savedSearchDetails.getName(), ContentModel.TYPE_CONTENT).getNodeRef();
|
||||
}
|
||||
@@ -517,7 +517,7 @@ public class RecordsManagementSearchServiceImpl implements RecordsManagementSear
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
ContentWriter writer = fileFolderService.getWriter(writableSearchNode);
|
||||
writer.setEncoding("UTF-8");
|
||||
|
@@ -396,7 +396,7 @@ public class FilePlanPermissionServiceImpl extends ServiceBaseImpl
|
||||
|
||||
runAsSystem(new AuthenticationUtil.RunAsWork<Object>()
|
||||
{
|
||||
public Boolean doWork() throws Exception
|
||||
public Boolean doWork()
|
||||
{
|
||||
if (isFilePlan(nodeRef))
|
||||
{
|
||||
@@ -519,7 +519,7 @@ public class FilePlanPermissionServiceImpl extends ServiceBaseImpl
|
||||
{
|
||||
runAsSystem(new AuthenticationUtil.RunAsWork<Object>()
|
||||
{
|
||||
public Boolean doWork() throws Exception
|
||||
public Boolean doWork()
|
||||
{
|
||||
// can't delete permissions if inherited (eg hold and transfer containers)
|
||||
if (!permissionService.getInheritParentPermissions(nodeRef))
|
||||
|
@@ -52,7 +52,7 @@ public final class PoliciesUtil
|
||||
{
|
||||
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Set<QName>>()
|
||||
{
|
||||
public Set<QName> doWork() throws Exception
|
||||
public Set<QName> doWork()
|
||||
{
|
||||
Set<QName> qnames = null;
|
||||
try
|
||||
|
@@ -50,7 +50,7 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
|
||||
|
||||
/** Dictionary service */
|
||||
protected DictionaryService dictionaryService;
|
||||
|
||||
|
||||
/** Application context */
|
||||
protected ApplicationContext applicationContext;
|
||||
|
||||
@@ -78,10 +78,10 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
|
||||
{
|
||||
this.dictionaryService = dictionaryService;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the file plan component kind from the given node reference
|
||||
*
|
||||
*
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#getFilePlanComponentKind(org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
public FilePlanComponentKind getFilePlanComponentKind(NodeRef nodeRef)
|
||||
@@ -139,7 +139,7 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
|
||||
|
||||
/**
|
||||
* Gets the file plan component kind from the given type.
|
||||
*
|
||||
*
|
||||
* @see FilePlanService#getFilePlanComponentKindFromType(QName)
|
||||
*/
|
||||
public FilePlanComponentKind getFilePlanComponentKindFromType(QName type)
|
||||
@@ -181,22 +181,22 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether the given node is a file plan component or not.
|
||||
* <p>
|
||||
* Exposed in the FilePlan service.
|
||||
*
|
||||
*
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#isFilePlanComponent(org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
public boolean isFilePlanComponent(NodeRef nodeRef)
|
||||
{
|
||||
boolean result = false;
|
||||
|
||||
|
||||
// use the internal node service to prevent redirection of security checking.
|
||||
NodeService myNodeService = (NodeService)applicationContext.getBean("nodeService");
|
||||
|
||||
|
||||
if (myNodeService.exists(nodeRef) &&
|
||||
myNodeService.hasAspect(nodeRef, ASPECT_FILE_PLAN_COMPONENT))
|
||||
{
|
||||
@@ -204,22 +204,22 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Indicates whether the given node is a file plan or not.
|
||||
* <p>
|
||||
* Exposed in the FilePlan service.
|
||||
*
|
||||
*
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#isFilePlan(org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
public boolean isFilePlan(NodeRef nodeRef)
|
||||
{
|
||||
return instanceOf(nodeRef, TYPE_FILE_PLAN);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Indicates whether the given node is a file plan container or not.
|
||||
*
|
||||
*
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#isFilePlanContainer(org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
public boolean isFilePlanContainer(NodeRef nodeRef)
|
||||
@@ -229,7 +229,7 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
|
||||
|
||||
/**
|
||||
* Indicates whether the given node is a record category or not.
|
||||
*
|
||||
*
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService#isRecordCategory(org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
public boolean isRecordCategory(NodeRef nodeRef)
|
||||
@@ -283,16 +283,16 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
|
||||
}
|
||||
return isHold;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Indicates whether the given node reference is a transfer or not.
|
||||
*
|
||||
*
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.transfer.TransferService#isTransfer(NodeRef)
|
||||
*/
|
||||
public boolean isTransfer(NodeRef nodeRef)
|
||||
{
|
||||
ParameterCheck.mandatory("nodeRef", nodeRef);
|
||||
|
||||
|
||||
return instanceOf(nodeRef, TYPE_TRANSFER);
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
|
||||
RunAsWork<NodeRef> runAsWork = new RunAsWork<NodeRef>()
|
||||
{
|
||||
@Override
|
||||
public NodeRef doWork() throws Exception
|
||||
public NodeRef doWork()
|
||||
{
|
||||
NodeRef result = (NodeRef)nodeService.getProperty(nodeRef, PROP_ROOT_NODEREF);
|
||||
if (result == null)
|
||||
@@ -359,10 +359,10 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Utility method to quickly determine whether one class is equal to or sub of another.
|
||||
*
|
||||
*
|
||||
* @param className class name
|
||||
* @param ofClassName class name to check against
|
||||
* @return boolean true if equal to or sub, false otherwise
|
||||
|
@@ -63,7 +63,7 @@ public class BroadcastVitalRecordDefinitionAction extends RMActionExecuterAbstra
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
propagateChangeToChildrenOf(actionedUponNodeRef);
|
||||
return null;
|
||||
|
@@ -125,7 +125,7 @@ public class ExtendedRuleServiceImpl extends RuleServiceImpl
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
ExtendedRuleServiceImpl.super.saveRule(nodeRef, rule);
|
||||
return null;
|
||||
@@ -150,7 +150,7 @@ public class ExtendedRuleServiceImpl extends RuleServiceImpl
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
ExtendedRuleServiceImpl.super.removeRule(nodeRef, rule);
|
||||
return null;
|
||||
@@ -187,7 +187,7 @@ public class ExtendedRuleServiceImpl extends RuleServiceImpl
|
||||
filePlanAuthenticationService.runAsRmAdmin(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
public Void doWork()
|
||||
{
|
||||
ExtendedRuleServiceImpl.super.executeRule(rule, nodeRef, executedRules);
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user