mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-1071: Impossible to create folder after upgrade: Access Denied
* consolidate loggers for RM module patches to aid debug * use log4j.logger.org.alfresco.module.org_alfresco_module_rm.patch=debug git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@56718 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -91,15 +91,18 @@ public abstract class ModulePatchComponent extends AbstractModuleComponent
|
||||
|
||||
}, false, true);
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isInfoEnabled() == true)
|
||||
{
|
||||
logger.debug(" ... completed module patch '" + getName() + "'");
|
||||
logger.info(" ... completed module patch '" + getName() + "'");
|
||||
}
|
||||
}
|
||||
catch (Throwable exception)
|
||||
{
|
||||
// record the exception otherwise it gets swallowed
|
||||
exception.printStackTrace();
|
||||
if (logger.isInfoEnabled() == true)
|
||||
{
|
||||
logger.info(" ... error encountered. " + exception.getMessage(), exception);
|
||||
}
|
||||
throw exception;
|
||||
}
|
||||
}
|
||||
|
@@ -36,8 +36,6 @@ import org.alfresco.service.cmr.version.VersionService;
|
||||
import org.alfresco.service.cmr.version.VersionType;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
|
||||
/**
|
||||
@@ -52,9 +50,6 @@ public class NotificationTemplatePatch extends ModulePatchComponent
|
||||
private static final String PATH_DUE_FOR_REVIEW = "alfresco/module/org_alfresco_module_rm/bootstrap/content/notify-records-due-for-review-email.ftl";
|
||||
private static final String PATH_SUPERSEDED = "alfresco/module/org_alfresco_module_rm/bootstrap/content/record-superseded-email.ftl";
|
||||
|
||||
/** Logger */
|
||||
private static Log logger = LogFactory.getLog(NotificationTemplatePatch.class);
|
||||
|
||||
/** Records management notification helper */
|
||||
private RecordsManagementNotificationHelper notificationHelper;
|
||||
|
||||
@@ -152,8 +147,6 @@ public class NotificationTemplatePatch extends ModulePatchComponent
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.println(nodeService.getProperty(template, ContentModel.PROP_DESCRIPTION));
|
||||
|
||||
// Check to see if this template has already been updated
|
||||
String lastPatchUpdate = (String)nodeService.getProperty(template, PROP_LAST_PATCH_UPDATE);
|
||||
if (lastPatchUpdate == null || name.equals(lastPatchUpdate) == false)
|
||||
|
@@ -34,8 +34,6 @@ import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
|
||||
/**
|
||||
@@ -47,10 +45,7 @@ import org.springframework.beans.factory.BeanNameAware;
|
||||
* @since 2.1
|
||||
*/
|
||||
public class RMv21BehaviorScriptsPatch extends ModulePatchComponent implements BeanNameAware
|
||||
{
|
||||
/** logger */
|
||||
private static Log logger = LogFactory.getLog(RMv21BehaviorScriptsPatch.class);
|
||||
|
||||
{
|
||||
/** rm config folder root lookup */
|
||||
protected static final NodeRef RM_CONFIG = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, "rm_config_folder");
|
||||
|
||||
@@ -59,6 +54,9 @@ public class RMv21BehaviorScriptsPatch extends ModulePatchComponent implements B
|
||||
|
||||
/** new behavior scripts folder root lookup */
|
||||
protected static NodeRef newBehaviorScriptsFolder = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, "rm_behavior_scripts");
|
||||
|
||||
/** name of example script */
|
||||
protected static final String IS_CLOSED_JS = "rma_isClosed.js";
|
||||
|
||||
/** Node Service */
|
||||
private NodeService nodeService;
|
||||
@@ -66,17 +64,25 @@ public class RMv21BehaviorScriptsPatch extends ModulePatchComponent implements B
|
||||
/** File Folder Service */
|
||||
private FileFolderService fileFolderService;
|
||||
|
||||
/**
|
||||
* @param nodeService node service
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
this.nodeService = nodeService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fileFolderService file folder service
|
||||
*/
|
||||
public void setFileFolderService(FileFolderService fileFolderService)
|
||||
{
|
||||
this.fileFolderService = fileFolderService;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.patch.ModulePatchComponent#executePatch()
|
||||
*/
|
||||
@Override
|
||||
protected void executePatch() throws Throwable
|
||||
{
|
||||
@@ -113,7 +119,6 @@ public class RMv21BehaviorScriptsPatch extends ModulePatchComponent implements B
|
||||
// move to the new behavior scripts folder if the old behavior scripts folder exists and contains files
|
||||
if (nodeService.exists(OLD_BEHAVIOR_SCRIPTS_FOLDER) == true)
|
||||
{
|
||||
|
||||
// run the following code as System
|
||||
AuthenticationUtil.runAs(new RunAsWork<Object>()
|
||||
{
|
||||
@@ -138,6 +143,7 @@ public class RMv21BehaviorScriptsPatch extends ModulePatchComponent implements B
|
||||
|
||||
for (FileInfo script : oldBehaviorScripts)
|
||||
{
|
||||
// move the old script to the new location
|
||||
fileFolderService.moveFrom(script.getNodeRef(), OLD_BEHAVIOR_SCRIPTS_FOLDER, RMv21BehaviorScriptsPatch.newBehaviorScriptsFolder, script.getName());
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
@@ -145,6 +151,7 @@ public class RMv21BehaviorScriptsPatch extends ModulePatchComponent implements B
|
||||
logger.debug(" ...... moved " + script.getName());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@@ -29,8 +29,6 @@ import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.role.FilePlanRoleService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.role.Role;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
|
||||
/**
|
||||
@@ -41,10 +39,7 @@ import org.springframework.beans.factory.BeanNameAware;
|
||||
*/
|
||||
public class RMv21CapabilityPatch extends ModulePatchComponent
|
||||
implements BeanNameAware, RecordsManagementModel, DOD5015Model
|
||||
{
|
||||
/** Logger */
|
||||
private static Log logger = LogFactory.getLog(RMv21CapabilityPatch.class);
|
||||
|
||||
{
|
||||
/** file plan service */
|
||||
private FilePlanService filePlanService;
|
||||
|
||||
|
@@ -39,8 +39,6 @@ import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.rule.RuleService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.service.namespace.RegexQNamePattern;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
|
||||
/**
|
||||
@@ -67,9 +65,6 @@ public class RMv21InPlacePatch extends ModulePatchComponent
|
||||
"EditNonRecordMetadata"
|
||||
};
|
||||
|
||||
/** Logger */
|
||||
private static Log logger = LogFactory.getLog(RMv21InPlacePatch.class);
|
||||
|
||||
/** file plan role service */
|
||||
private FilePlanRoleService filePlanRoleService;
|
||||
|
||||
|
@@ -31,8 +31,6 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
|
||||
/**
|
||||
@@ -43,11 +41,7 @@ import org.springframework.beans.factory.BeanNameAware;
|
||||
*/
|
||||
public class RMv21RecordInheritancePatch extends ModulePatchComponent
|
||||
implements BeanNameAware, RecordsManagementModel, DOD5015Model
|
||||
{
|
||||
|
||||
/** logger */
|
||||
private static Log logger = LogFactory.getLog(RMv21RecordInheritancePatch.class);
|
||||
|
||||
{
|
||||
/** file plan permission service */
|
||||
private FilePlanPermissionServiceImpl filePlanPermissionServiceImpl;
|
||||
|
||||
|
@@ -32,8 +32,6 @@ import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
|
||||
/**
|
||||
@@ -50,12 +48,10 @@ public class RMv21ReportServicePatch extends ModulePatchComponent
|
||||
|
||||
private static final String PATH_DESTRUCTION_TEMPLATE = "alfresco/module/org_alfresco_module_rm/bootstrap/report/report_rmr_destructionReport.html.ftl";
|
||||
|
||||
/** logger */
|
||||
private static Log logger = LogFactory.getLog(RMv21ReportServicePatch.class);
|
||||
|
||||
/** node service */
|
||||
private NodeService nodeService;
|
||||
|
||||
/** content service */
|
||||
private ContentService contentService;
|
||||
|
||||
/**
|
||||
|
@@ -28,8 +28,6 @@ import org.alfresco.module.org_alfresco_module_rm.role.Role;
|
||||
import org.alfresco.repo.security.authority.RMAuthority;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.security.AuthorityService;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
|
||||
/**
|
||||
@@ -40,11 +38,13 @@ import org.springframework.beans.factory.BeanNameAware;
|
||||
*/
|
||||
public class RMv21RolesPatch extends ModulePatchComponent implements BeanNameAware
|
||||
{
|
||||
/** logger */
|
||||
private static Log logger = LogFactory.getLog(RMv21RolesPatch.class);
|
||||
|
||||
/** file plan service */
|
||||
private FilePlanService filePlanService;
|
||||
|
||||
/** file plan role service */
|
||||
private FilePlanRoleService filePlanRoleService;
|
||||
|
||||
/** authority service */
|
||||
private AuthorityService authorityService;
|
||||
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
@@ -62,6 +62,9 @@ public class RMv21RolesPatch extends ModulePatchComponent implements BeanNameAwa
|
||||
this.authorityService = authorityService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.patch.ModulePatchComponent#executePatch()
|
||||
*/
|
||||
@Override
|
||||
protected void executePatch() throws Throwable
|
||||
{
|
||||
|
@@ -37,8 +37,6 @@ import org.alfresco.service.cmr.repository.Period;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
|
||||
/**
|
||||
@@ -48,10 +46,7 @@ import org.springframework.beans.factory.BeanNameAware;
|
||||
*/
|
||||
public class RMv2FilePlanNodeRefPatch extends ModulePatchComponent
|
||||
implements BeanNameAware, RecordsManagementModel, DOD5015Model
|
||||
{
|
||||
/** Logger */
|
||||
private static Log logger = LogFactory.getLog(RMv2FilePlanNodeRefPatch.class);
|
||||
|
||||
{
|
||||
private NodeService nodeService;
|
||||
private PatchDAO patchDAO;
|
||||
private NodeDAO nodeDAO;
|
||||
|
@@ -28,8 +28,6 @@ import org.alfresco.repo.domain.qname.QNameDAO;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
|
||||
/**
|
||||
@@ -41,9 +39,6 @@ import org.springframework.beans.factory.BeanNameAware;
|
||||
public class RMv2ModelPatch extends ModulePatchComponent
|
||||
implements BeanNameAware, RecordsManagementModel, DOD5015Model
|
||||
{
|
||||
/** Logger */
|
||||
private static Log logger = LogFactory.getLog(RMv2ModelPatch.class);
|
||||
|
||||
private static long BATCH_SIZE = 100000L;
|
||||
|
||||
private PatchDAO patchDAO;
|
||||
|
@@ -32,8 +32,6 @@ import org.alfresco.service.cmr.security.MutableAuthenticationService;
|
||||
import org.alfresco.service.cmr.security.PersonService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.GUID;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
@@ -47,9 +45,6 @@ public class RMv2RMAdminUserPatch extends ModulePatchComponent implements BeanNa
|
||||
/** I18N */
|
||||
private static final String MSG_FIRST_NAME = "bootstrap.rmadmin.firstName";
|
||||
private static final String MSG_LAST_NAME = "bootstrap.rmadmin.lastName";
|
||||
|
||||
/** Logger */
|
||||
private static Log logger = LogFactory.getLog(RMv2RMAdminUserPatch.class);
|
||||
|
||||
/** generate rm admin password */
|
||||
private String password = GUID.generate();
|
||||
|
@@ -25,8 +25,6 @@ import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.search.RecordsManagementSearchService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.search.SavedSearchDetails;
|
||||
import org.alfresco.service.cmr.site.SiteService;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
|
||||
/**
|
||||
@@ -37,10 +35,7 @@ import org.springframework.beans.factory.BeanNameAware;
|
||||
*/
|
||||
public class RMv2SavedSearchPatch extends ModulePatchComponent
|
||||
implements BeanNameAware, RecordsManagementModel, DOD5015Model
|
||||
{
|
||||
/** Logger */
|
||||
private static Log logger = LogFactory.getLog(RMv2SavedSearchPatch.class);
|
||||
|
||||
{
|
||||
/** RM site id */
|
||||
private static final String RM_SITE_ID = "rm";
|
||||
|
||||
|
Reference in New Issue
Block a user