08-29-2007 06:59 AM
org.alfresco.repo.security.permissions.AccessDeniedException: Access Denied. You do not have the appropriate permissions to perform this operation.
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:256)
at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:191)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
at $Proxy15.addAspect(Unknown Source)
at com.dm.alfresco.AlfrescoContentCreatorImpl.saveToAlfresco(AlfrescoContentCreatorImpl.java:79)String path = AVMUtil.buildSandboxRootPath(sandbox) + "/ROOT/WEB-INF/resources/content/" + contentPath ;
createFile(path, name, edit);
String filePath = path + '/' + name;
NodeRef fileNodeRef = AVMNodeConverter.ToNodeRef(-1, filePath);
// apply the titled aspect - title and description
Map<QName, Serializable> titledProps = new HashMap<QName, Serializable>(2, 1.0f);
titledProps.put(ContentModel.PROP_TITLE, name);
titledProps.put(ContentModel.PROP_DESCRIPTION, "Imported from News Feed");
this.nodeService.addAspect(fileNodeRef, ContentModel.ASPECT_TITLED, titledProps);
// attach the form is supplied
if (StringUtils.isNotEmpty(this.formName)){
Map<QName, Serializable> formProps = new HashMap<QName, Serializable>(2, 1.0f);
formProps.put(WCMAppModel.PROP_PARENT_FORM_NAME, this.formName);
formProps.put(WCMAppModel.PROP_ORIGINAL_PARENT_PATH, path);
this.nodeService.addAspect(fileNodeRef, WCMAppModel.ASPECT_FORM_INSTANCE_DATA, titledProps);
}
// get a writer for the content and put the file
ContentWriter writer = this.contentService.getWriter(fileNodeRef, ContentModel.PROP_CONTENT, true);
writer.setMimetype("text/xml");
writer.setEncoding("UTF-8");
writer.putContent(content);
private void createFile(String path, String name, boolean edit) {
try {
this.avmService.createFile(path, name);
}
catch (AVMExistsException e){
if (!edit){
createFile(path, randomise(name), edit);
}
}
}this.authenticationService.authenticate(username, password.toCharArray());this.nodeService.addAspect(fileNodeRef, ContentModel.ASPECT_TITLED, titledProps);08-29-2007 09:38 AM
08-29-2007 11:43 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.