mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merge of all UI clustering changes originally applied to 2.2
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8292 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -37,6 +37,7 @@ import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.web.bean.dialog.BaseDialogBean;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
@@ -47,9 +48,11 @@ import org.apache.commons.logging.LogFactory;
|
||||
*/
|
||||
public class CreateFolderDialog extends BaseDialogBean
|
||||
{
|
||||
private static final long serialVersionUID = 5501238017264037644L;
|
||||
|
||||
private static final Log logger = LogFactory.getLog(CreateFolderDialog.class);
|
||||
|
||||
protected AVMService avmService;
|
||||
transient private AVMService avmService;
|
||||
protected AVMBrowseBean avmBrowseBean;
|
||||
|
||||
protected String name;
|
||||
@@ -83,6 +86,15 @@ public class CreateFolderDialog extends BaseDialogBean
|
||||
this.avmService = avmService;
|
||||
}
|
||||
|
||||
protected AVMService getAvmService()
|
||||
{
|
||||
if (avmService == null)
|
||||
{
|
||||
avmService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getAVMService();
|
||||
}
|
||||
return avmService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the description.
|
||||
*/
|
||||
@@ -126,14 +138,14 @@ public class CreateFolderDialog extends BaseDialogBean
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
String parent = this.avmBrowseBean.getCurrentPath();
|
||||
this.avmService.createDirectory(parent, this.name);
|
||||
this.getAvmService().createDirectory(parent, this.name);
|
||||
|
||||
String path = parent + '/' + this.name;
|
||||
NodeRef nodeRef = AVMNodeConverter.ToNodeRef(-1, path);
|
||||
this.nodeService.addAspect(nodeRef, ApplicationModel.ASPECT_UIFACETS, null);
|
||||
this.getNodeService().addAspect(nodeRef, ApplicationModel.ASPECT_UIFACETS, null);
|
||||
if (this.description != null && this.description.length() != 0)
|
||||
{
|
||||
this.avmService.setNodeProperty(path, ContentModel.PROP_DESCRIPTION, new PropertyValue(DataTypeDefinition.TEXT, this.description));
|
||||
this.getAvmService().setNodeProperty(path, ContentModel.PROP_DESCRIPTION, new PropertyValue(DataTypeDefinition.TEXT, this.description));
|
||||
// this.nodeService.setProperty(nodeRef, ContentModel.PROP_DESCRIPTION, this.description);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user