mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fixed minor issues ("Trailing Comment") reported in Sonar
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@71947 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1239,7 +1239,8 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin
|
||||
throw new IllegalArgumentException(I18NUtil.getMessage(MSG_REF_LABEL_IN_USE, label));
|
||||
}
|
||||
|
||||
NodeRef modelRef = getCustomModelRef(""); // defaults to RM_CUSTOM_URI
|
||||
// defaults to RM_CUSTOM_URI
|
||||
NodeRef modelRef = getCustomModelRef("");
|
||||
M2Model deserializedModel = readCustomContentModel(modelRef);
|
||||
|
||||
String aspectName = RecordsManagementAdminServiceImpl.RMC_CUSTOM_ASSOCS;
|
||||
@@ -1309,7 +1310,8 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin
|
||||
//throw new IllegalArgumentException(I18NUtil.getMessage(MSG_REF_LABEL_IN_USE, compoundID));
|
||||
}
|
||||
|
||||
NodeRef modelRef = getCustomModelRef(""); // defaults to RM_CUSTOM_URI
|
||||
// defaults to RM_CUSTOM_URI
|
||||
NodeRef modelRef = getCustomModelRef("");
|
||||
M2Model deserializedModel = readCustomContentModel(modelRef);
|
||||
|
||||
String aspectName = RecordsManagementAdminServiceImpl.RMC_CUSTOM_ASSOCS;
|
||||
@@ -1390,7 +1392,8 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_CONNOT_FIND_ASSOC_DEF, refQName));
|
||||
}
|
||||
|
||||
NodeRef modelRef = getCustomModelRef(""); // defaults to RM_CUSTOM_URI
|
||||
// defaults to RM_CUSTOM_URI
|
||||
NodeRef modelRef = getCustomModelRef("");
|
||||
M2Model deserializedModel = readCustomContentModel(modelRef);
|
||||
|
||||
M2Aspect customAssocsAspect = deserializedModel.getAspect(RMC_CUSTOM_ASSOCS);
|
||||
|
@@ -870,7 +870,8 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
if (values.containsKey(RM_AUDIT_DATA_LOGIN_ERROR))
|
||||
{
|
||||
eventName = RM_AUDIT_EVENT_LOGIN_FAILURE;
|
||||
fullName = user; // The user didn't log in
|
||||
// The user didn't log in
|
||||
fullName = user;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -884,7 +885,8 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
if (values.containsKey(DOD5015_AUDIT_DATA_LOGIN_ERROR))
|
||||
{
|
||||
eventName = RM_AUDIT_EVENT_LOGIN_FAILURE;
|
||||
fullName = user; // The user didn't log in
|
||||
// The user didn't log in
|
||||
fullName = user;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -908,7 +910,8 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
timestamp,
|
||||
user,
|
||||
fullName,
|
||||
userRoles, // A concatenated string of roles
|
||||
// A concatenated string of roles
|
||||
userRoles,
|
||||
nodeRef,
|
||||
nodeName,
|
||||
nodeType,
|
||||
@@ -979,7 +982,8 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
Long toTime = getToDateTime(params.getDateTo());
|
||||
NodeRef nodeRef = params.getNodeRef();
|
||||
int maxEntries = params.getMaxEntries();
|
||||
boolean forward = maxEntries > 0 ? false : true; // Reverse order if the results are limited
|
||||
// Reverse order if the results are limited
|
||||
boolean forward = maxEntries > 0 ? false : true;
|
||||
|
||||
// start the audit trail report
|
||||
writeAuditTrailHeader(writer, params, reportFormat);
|
||||
|
@@ -739,9 +739,11 @@ public class RMAfterInvocationProvider extends RMSecurityCommon
|
||||
logger.debug("\t" + cad.typeString + " test on " + testNodeRef + " from " + nextObject.getClass().getName());
|
||||
}
|
||||
|
||||
if (isUnfiltered(testNodeRef)) // Null allows
|
||||
// Null allows
|
||||
if (isUnfiltered(testNodeRef))
|
||||
{
|
||||
continue; // Continue to next ConfigAttributeDefintion
|
||||
// Continue to next ConfigAttributeDefintion
|
||||
continue;
|
||||
}
|
||||
|
||||
if (allowed &&
|
||||
@@ -749,7 +751,8 @@ public class RMAfterInvocationProvider extends RMSecurityCommon
|
||||
checkRead(testNodeRef) != AccessDecisionVoter.ACCESS_GRANTED)
|
||||
{
|
||||
allowed = false;
|
||||
break; // No point evaluating more ConfigAttributeDefintions
|
||||
// No point evaluating more ConfigAttributeDefintions
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -57,7 +57,8 @@ public class RMSecurityCommon implements ApplicationContextAware
|
||||
private static Log logger = LogFactory.getLog(RMSecurityCommon.class);
|
||||
|
||||
/** Services */
|
||||
protected NodeService nodeService; //This is the internal NodeService -- no permission checks
|
||||
//This is the internal NodeService -- no permission checks
|
||||
protected NodeService nodeService;
|
||||
protected PermissionService permissionService;
|
||||
protected RMCaveatConfigComponent caveatConfigComponent;
|
||||
private FilePlanService filePlanService;
|
||||
|
@@ -50,12 +50,15 @@ public class RMListOfValuesConstraint extends ListOfValuesConstraint
|
||||
private static final String LOV_CONSTRAINT_VALUE = "listconstraint";
|
||||
private List<String> allowedValues;
|
||||
private List<String> allowedValuesUpper;
|
||||
private MatchLogic matchLogic = MatchLogic.AND; // defined match logic used by caveat matching (default = "AND")
|
||||
// defined match logic used by caveat matching (default = "AND")
|
||||
private MatchLogic matchLogic = MatchLogic.AND;
|
||||
|
||||
public enum MatchLogic
|
||||
{
|
||||
AND, // closed marking - all values must match
|
||||
OR; // open marking - at least one value must match
|
||||
// closed marking - all values must match
|
||||
AND,
|
||||
// open marking - at least one value must match
|
||||
OR;
|
||||
}
|
||||
|
||||
// note: alternative to static init could be to use 'registered' constraint
|
||||
@@ -140,7 +143,8 @@ public class RMListOfValuesConstraint extends ListOfValuesConstraint
|
||||
String runAsUser = AuthenticationUtil.getRunAsUser();
|
||||
if ((runAsUser != null) && (! runAsUser.equals(AuthenticationUtil.getSystemUserName())) && (caveatConfigService != null))
|
||||
{
|
||||
List<String> allowedForUser = caveatConfigService.getRMAllowedValues(getType()); // get allowed values for current user
|
||||
// get allowed values for current user
|
||||
List<String> allowedForUser = caveatConfigService.getRMAllowedValues(getType());
|
||||
|
||||
List<String> filteredList = new ArrayList<String>(allowedForUser.size());
|
||||
for (String allowed : allowedForUser)
|
||||
|
@@ -132,7 +132,8 @@ public class NotifyOfRecordsDueForReviewJobExecuter extends RecordsManagementJob
|
||||
/**
|
||||
* Now do the work, one action in each transaction
|
||||
*/
|
||||
retryingTransactionHelper.setMaxRetries(0); // don't retry the send email
|
||||
// don't retry the send email
|
||||
retryingTransactionHelper.setMaxRetries(0);
|
||||
retryingTransactionHelper.doInTransaction(txCallbackSendEmail);
|
||||
retryingTransactionHelper.setMaxRetries(10);
|
||||
retryingTransactionHelper.doInTransaction(txUpdateNodesCallback);
|
||||
|
@@ -173,9 +173,11 @@ public interface RecordsManagementModel extends RecordsManagementCustomModel
|
||||
|
||||
// Records management root aspect
|
||||
QName ASPECT_RECORDS_MANAGEMENT_ROOT = QName.createQName(RM_URI, "recordsManagementRoot");
|
||||
@Deprecated // since 2.1
|
||||
// since 2.1
|
||||
@Deprecated
|
||||
QName ASSOC_HOLDS = QName.createQName(RM_URI, "holds");
|
||||
@Deprecated // since 2.1
|
||||
// since 2.1
|
||||
@Deprecated
|
||||
QName ASSOC_TRANSFERS = QName.createQName(RM_URI, "transfers");
|
||||
|
||||
// Hold type
|
||||
|
@@ -36,7 +36,8 @@ import org.springframework.extensions.surf.util.I18NUtil;
|
||||
*/
|
||||
@BehaviourBean
|
||||
(
|
||||
defaultType = "rma:ghosted" // optional
|
||||
// optional
|
||||
defaultType = "rma:ghosted"
|
||||
)
|
||||
public class GhostedAspect extends BaseBehaviourBean
|
||||
implements ContentServicePolicies.OnContentUpdatePolicy
|
||||
@@ -52,10 +53,14 @@ public class GhostedAspect extends BaseBehaviourBean
|
||||
@Override
|
||||
@Behaviour
|
||||
(
|
||||
kind = BehaviourKind.CLASS, // required, use ASSOC for association behaviors
|
||||
notificationFrequency = NotificationFrequency.EVERY_EVENT, // (defaults to EVERY_EVENT)
|
||||
policy = "alf:onContentUpdate", // (defaults to alf:<methodname>)
|
||||
type = "rma:ghosted" // required, unless defaultType set
|
||||
// required, use ASSOC for association behaviors
|
||||
kind = BehaviourKind.CLASS,
|
||||
// (defaults to EVERY_EVENT)
|
||||
notificationFrequency = NotificationFrequency.EVERY_EVENT,
|
||||
// (defaults to alf:<methodname>)
|
||||
policy = "alf:onContentUpdate",
|
||||
// required, unless defaultType set
|
||||
type = "rma:ghosted"
|
||||
|
||||
// isService (default false)
|
||||
// name (only needs to specified if associated behvaiour object needs to be accessed)
|
||||
|
@@ -203,7 +203,8 @@ public class ImportPost extends DeclarativeWebScript
|
||||
|
||||
// copy contents of uploaded file to temp ACP file
|
||||
FileOutputStream fos = new FileOutputStream(acpFile);
|
||||
FileCopyUtils.copy(acpContent.getInputStream(), fos); // NOTE: this method closes both streams
|
||||
// NOTE: this method closes both streams
|
||||
FileCopyUtils.copy(acpContent.getInputStream(), fos);
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
|
Reference in New Issue
Block a user