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:
Gavin Cornwell
2008-02-15 14:59:11 +00:00
parent d20d8a7007
commit a450598ecb
281 changed files with 17771 additions and 15322 deletions

View File

@@ -56,14 +56,14 @@ public class ApplyDocTemplateDialog extends BaseDialogBean
// apply the templatable aspect if required
if (getNode().hasAspect(ContentModel.ASPECT_TEMPLATABLE) == false)
{
this.nodeService.addAspect(getNode().getNodeRef(), ContentModel.ASPECT_TEMPLATABLE, null);
this.getNodeService().addAspect(getNode().getNodeRef(), ContentModel.ASPECT_TEMPLATABLE, null);
}
// get the selected template from the Template Picker
NodeRef templateRef = new NodeRef(Repository.getStoreRef(), this.template);
// set the template NodeRef into the templatable aspect property
this.nodeService.setProperty(getNode().getNodeRef(), ContentModel.PROP_TEMPLATE, templateRef);
this.getNodeService().setProperty(getNode().getNodeRef(), ContentModel.PROP_TEMPLATE, templateRef);
// reset node details for next refresh of details page
getNode().reset();

View File

@@ -87,14 +87,14 @@ public class ApplyRssTemplateDialog extends BaseDialogBean
// apply the feedsource aspect if required
if (getNode().hasAspect(ApplicationModel.ASPECT_FEEDSOURCE) == false)
{
this.nodeService.addAspect(getNode().getNodeRef(), ApplicationModel.ASPECT_FEEDSOURCE, null);
this.getNodeService().addAspect(getNode().getNodeRef(), ApplicationModel.ASPECT_FEEDSOURCE, null);
}
// get the selected template Id from the Template Picker
NodeRef templateRef = new NodeRef(Repository.getStoreRef(), this.rssTemplate);
// set the template NodeRef into the templatable aspect property
this.nodeService.setProperty(getNode().getNodeRef(), ApplicationModel.PROP_FEEDTEMPLATE, templateRef);
this.getNodeService().setProperty(getNode().getNodeRef(), ApplicationModel.PROP_FEEDTEMPLATE, templateRef);
// reset node details for next refresh of details page
getNode().reset();

View File

@@ -73,14 +73,14 @@ public class ApplySpaceTemplateDialog extends BaseDialogBean
// apply the templatable aspect if required
if (getNode().hasAspect(ContentModel.ASPECT_TEMPLATABLE) == false)
{
this.nodeService.addAspect(getNode().getNodeRef(), ContentModel.ASPECT_TEMPLATABLE, null);
this.getNodeService().addAspect(getNode().getNodeRef(), ContentModel.ASPECT_TEMPLATABLE, null);
}
// get the selected template from the Template Picker
NodeRef templateRef = new NodeRef(Repository.getStoreRef(), this.template);
// set the template NodeRef into the templatable aspect property
this.nodeService.setProperty(getNode().getNodeRef(), ContentModel.PROP_TEMPLATE, templateRef);
this.getNodeService().setProperty(getNode().getNodeRef(), ContentModel.PROP_TEMPLATE, templateRef);
// reset node details for next refresh of details page
getNode().reset();

View File

@@ -38,9 +38,12 @@ import org.alfresco.web.app.Application;
*/
public class CreateSpaceDialog extends CreateSpaceWizard
{
private static final long serialVersionUID = 4659583264588102372L;
// ------------------------------------------------------------------------------
// Wizard implementation
@Override
public String getFinishButtonLabel()
{

File diff suppressed because it is too large Load Diff

View File

@@ -54,6 +54,8 @@ import org.apache.commons.logging.LogFactory;
*/
public class DeleteSpaceDialog extends BaseDialogBean
{
private static final long serialVersionUID = 5960844637376808571L;
private static final Log logger = LogFactory.getLog(DeleteContentDialog.class);
private static final String DELETE_ALL = "all";
@@ -84,22 +86,22 @@ public class DeleteSpaceDialog extends BaseDialogBean
if (DELETE_ALL.equals(this.deleteMode))
{
NodeRef nodeRef = node.getNodeRef();
if (this.nodeService.exists(nodeRef))
if (this.getNodeService().exists(nodeRef))
{
// The node still exists
this.nodeService.deleteNode(node.getNodeRef());
this.getNodeService().deleteNode(node.getNodeRef());
}
}
else
{
List<ChildAssociationRef> childRefs = this.nodeService.getChildAssocs(node.getNodeRef(),
List<ChildAssociationRef> childRefs = this.getNodeService().getChildAssocs(node.getNodeRef(),
ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
List<NodeRef> deleteRefs = new ArrayList<NodeRef>(childRefs.size());
for (ChildAssociationRef ref : childRefs)
{
NodeRef nodeRef = ref.getChildRef();
if (this.nodeService.exists(nodeRef))
if (this.getNodeService().exists(nodeRef))
{
if (DELETE_CONTENTS.equals(this.deleteMode))
{
@@ -108,18 +110,18 @@ public class DeleteSpaceDialog extends BaseDialogBean
else
{
// find it's type so we can see if it's a node we are interested in
QName type = this.nodeService.getType(nodeRef);
QName type = this.getNodeService().getType(nodeRef);
// make sure the type is defined in the data dictionary
TypeDefinition typeDef = this.dictionaryService.getType(type);
TypeDefinition typeDef = this.getDictionaryService().getType(type);
if (typeDef != null)
{
if (DELETE_FOLDERS.equals(this.deleteMode))
{
// look for folder type
if (this.dictionaryService.isSubClass(type, ContentModel.TYPE_FOLDER) == true &&
this.dictionaryService.isSubClass(type, ContentModel.TYPE_SYSTEM_FOLDER) == false)
if (this.getDictionaryService().isSubClass(type, ContentModel.TYPE_FOLDER) == true &&
this.getDictionaryService().isSubClass(type, ContentModel.TYPE_SYSTEM_FOLDER) == false)
{
deleteRefs.add(nodeRef);
}
@@ -127,7 +129,7 @@ public class DeleteSpaceDialog extends BaseDialogBean
else if (DELETE_FILES.equals(this.deleteMode))
{
// look for content file type
if (this.dictionaryService.isSubClass(type, ContentModel.TYPE_CONTENT))
if (this.getDictionaryService().isSubClass(type, ContentModel.TYPE_CONTENT))
{
deleteRefs.add(nodeRef);
}
@@ -148,7 +150,7 @@ public class DeleteSpaceDialog extends BaseDialogBean
tx = txService.getNonPropagatingUserTransaction();
tx.begin();
this.nodeService.deleteNode(nodeRef);
this.getNodeService().deleteNode(nodeRef);
tx.commit();
}
@@ -172,7 +174,7 @@ public class DeleteSpaceDialog extends BaseDialogBean
{
Node node = this.browseBean.getActionSpace();
if (node != null && this.nodeService.exists(node.getNodeRef()) == false)
if (node != null && this.getNodeService().exists(node.getNodeRef()) == false)
{
// remove this node from the breadcrumb if required
this.browseBean.removeSpaceFromBreadcrumb(node);

View File

@@ -73,7 +73,7 @@ public class EditSimpleWorkflowDialog extends BaseDialogBean
public Object execute() throws Throwable
{
// firstly retrieve all the properties for the current node
Map<QName, Serializable> updateProps = nodeService.getProperties(getNode().getNodeRef());
Map<QName, Serializable> updateProps = getNodeService().getProperties(getNode().getNodeRef());
// update the simple workflow properties
@@ -127,7 +127,7 @@ public class EditSimpleWorkflowDialog extends BaseDialogBean
}
// set the properties on the node
nodeService.setProperties(getNode().getNodeRef(), updateProps);
getNodeService().setProperties(getNode().getNodeRef(), updateProps);
return null;
}
};

View File

@@ -49,6 +49,8 @@ import org.alfresco.web.bean.repository.Node;
*/
public class EditSpaceDialog extends CreateSpaceDialog
{
private static final long serialVersionUID = 6090397957979372269L;
protected Node editableNode;
@Override
@@ -92,16 +94,16 @@ public class EditSpaceDialog extends CreateSpaceDialog
String name = (String)editedProps.get(ContentModel.PROP_NAME);
if (name != null)
{
this.fileFolderService.rename(nodeRef, name);
this.getFileFolderService().rename(nodeRef, name);
}
// get the current set of properties from the repository
Map<QName, Serializable> repoProps = this.nodeService.getProperties(nodeRef);
Map<QName, Serializable> repoProps = this.getNodeService().getProperties(nodeRef);
// add the "uifacets" aspect if required, properties will get set below
if (this.nodeService.hasAspect(nodeRef, ApplicationModel.ASPECT_UIFACETS) == false)
if (this.getNodeService().hasAspect(nodeRef, ApplicationModel.ASPECT_UIFACETS) == false)
{
this.nodeService.addAspect(nodeRef, ApplicationModel.ASPECT_UIFACETS, null);
this.getNodeService().addAspect(nodeRef, ApplicationModel.ASPECT_UIFACETS, null);
}
// overwrite the current properties with the edited ones
@@ -118,7 +120,7 @@ public class EditSpaceDialog extends CreateSpaceDialog
if ((propValue != null) && (propValue instanceof String) &&
(propValue.toString().length() == 0))
{
PropertyDefinition propDef = this.dictionaryService.getProperty(qname);
PropertyDefinition propDef = this.getDictionaryService().getProperty(qname);
if (propDef != null)
{
if (propDef.getDataType().getName().equals(DataTypeDefinition.DOUBLE) ||
@@ -135,7 +137,7 @@ public class EditSpaceDialog extends CreateSpaceDialog
}
// send the properties back to the repository
this.nodeService.setProperties(nodeRef, repoProps);
this.getNodeService().setProperties(nodeRef, repoProps);
// we also need to persist any association changes that may have been made
@@ -145,7 +147,7 @@ public class EditSpaceDialog extends CreateSpaceDialog
{
for (AssociationRef assoc : typedAssoc.values())
{
this.nodeService.createAssociation(assoc.getSourceRef(), assoc.getTargetRef(), assoc.getTypeQName());
this.getNodeService().createAssociation(assoc.getSourceRef(), assoc.getTargetRef(), assoc.getTypeQName());
}
}
@@ -155,7 +157,7 @@ public class EditSpaceDialog extends CreateSpaceDialog
{
for (AssociationRef assoc : typedAssoc.values())
{
this.nodeService.removeAssociation(assoc.getSourceRef(), assoc.getTargetRef(), assoc.getTypeQName());
this.getNodeService().removeAssociation(assoc.getSourceRef(), assoc.getTargetRef(), assoc.getTypeQName());
}
}
@@ -165,7 +167,7 @@ public class EditSpaceDialog extends CreateSpaceDialog
{
for (ChildAssociationRef assoc : typedAssoc.values())
{
this.nodeService.addChild(assoc.getParentRef(), assoc.getChildRef(), assoc.getTypeQName(), assoc.getTypeQName());
this.getNodeService().addChild(assoc.getParentRef(), assoc.getChildRef(), assoc.getTypeQName(), assoc.getTypeQName());
}
}
@@ -175,7 +177,7 @@ public class EditSpaceDialog extends CreateSpaceDialog
{
for (ChildAssociationRef assoc : typedAssoc.values())
{
this.nodeService.removeChild(assoc.getParentRef(), assoc.getChildRef());
this.getNodeService().removeChild(assoc.getParentRef(), assoc.getChildRef());
}
}

View File

@@ -37,6 +37,8 @@ import org.alfresco.web.bean.wizard.BaseInviteUsersWizard;
*/
public class InviteSpaceUsersWizard extends BaseInviteUsersWizard
{
private static final long serialVersionUID = -1584891656721183347L;
/** Cache of available folder permissions */
Set<String> folderPermissions = null;
@@ -45,7 +47,7 @@ public class InviteSpaceUsersWizard extends BaseInviteUsersWizard
{
if (this.folderPermissions == null)
{
this.folderPermissions = this.permissionService.getSettablePermissions(ContentModel.TYPE_FOLDER);
this.folderPermissions = getPermissionService().getSettablePermissions(ContentModel.TYPE_FOLDER);
}
return this.folderPermissions;

View File

@@ -56,6 +56,8 @@ import org.apache.commons.logging.LogFactory;
*/
public class RecentSpacesBean implements IContextListener
{
private static final long serialVersionUID = -6405913558933664909L;
private static Log logger = LogFactory.getLog(RecentSpacesBean.class);
/** The NavigationBean reference */

View File

@@ -56,6 +56,8 @@ import org.alfresco.web.ui.common.component.UIActionLink;
*/
public class SpaceDetailsDialog extends BaseDetailsBean implements NavigationSupport
{
private static final long serialVersionUID = -6066782024875635443L;
private static final String MSG_HAS_FOLLOWING_CATEGORIES = "has_following_categories_space";
private static final String MSG_NO_CATEGORIES_APPLIED = "no_categories_applied_space";
private static final String MSG_ERROR_ASPECT_CLASSIFY = "error_aspect_classify_space";
@@ -126,7 +128,7 @@ public class SpaceDetailsDialog extends BaseDetailsBean implements NavigationSup
if (ApplicationModel.TYPE_FOLDERLINK.equals(space.getType()))
{
NodeRef destRef = (NodeRef)space.getProperties().get(ContentModel.PROP_LINK_DESTINATION);
if (nodeService.exists(destRef))
if (getNodeService().exists(destRef))
{
space = new Node(destRef);
}
@@ -306,7 +308,7 @@ public class SpaceDetailsDialog extends BaseDetailsBean implements NavigationSup
{
// we know for now that the general classifiable aspect only will be
// applied so we can retrive the categories property direclty
Collection<NodeRef> categories = (Collection<NodeRef>)this.nodeService.getProperty(
Collection<NodeRef> categories = (Collection<NodeRef>)getNodeService().getProperty(
getSpace().getNodeRef(), ContentModel.PROP_CATEGORIES);
if (categories == null || categories.size() == 0)
@@ -321,10 +323,10 @@ public class SpaceDetailsDialog extends BaseDetailsBean implements NavigationSup
builder.append("<ul>");
for (NodeRef ref : categories)
{
if (this.nodeService.exists(ref))
if (getNodeService().exists(ref))
{
builder.append("<li>");
builder.append(Repository.getNameForNode(this.nodeService, ref));
builder.append(Repository.getNameForNode(getNodeService(), ref));
builder.append("</li>");
}
}
@@ -350,7 +352,7 @@ public class SpaceDetailsDialog extends BaseDetailsBean implements NavigationSup
tx.begin();
// add the general classifiable aspect to the node
this.nodeService.addAspect(getSpace().getNodeRef(), ContentModel.ASPECT_GEN_CLASSIFIABLE, null);
getNodeService().addAspect(getSpace().getNodeRef(), ContentModel.ASPECT_GEN_CLASSIFIABLE, null);
// commit the transaction
tx.commit();
@@ -449,14 +451,14 @@ public class SpaceDetailsDialog extends BaseDetailsBean implements NavigationSup
// apply the feedsource aspect if required
if (getNode().hasAspect(ApplicationModel.ASPECT_FEEDSOURCE) == false)
{
this.nodeService.addAspect(getNode().getNodeRef(), ApplicationModel.ASPECT_FEEDSOURCE, null);
getNodeService().addAspect(getNode().getNodeRef(), ApplicationModel.ASPECT_FEEDSOURCE, null);
}
// get the selected template Id from the Template Picker
NodeRef templateRef = new NodeRef(Repository.getStoreRef(), this.rssTemplate);
// set the template NodeRef into the templatable aspect property
this.nodeService.setProperty(getNode().getNodeRef(), ApplicationModel.PROP_FEEDTEMPLATE, templateRef);
getNodeService().setProperty(getNode().getNodeRef(), ApplicationModel.PROP_FEEDTEMPLATE, templateRef);
// reset node details for next refresh of details page
getNode().reset();
@@ -477,8 +479,8 @@ public class SpaceDetailsDialog extends BaseDetailsBean implements NavigationSup
try
{
// clear template property
this.nodeService.setProperty(getNode().getNodeRef(), ApplicationModel.PROP_FEEDTEMPLATE, null);
this.nodeService.removeAspect(getNode().getNodeRef(), ApplicationModel.ASPECT_FEEDSOURCE);
getNodeService().setProperty(getNode().getNodeRef(), ApplicationModel.PROP_FEEDTEMPLATE, null);
getNodeService().removeAspect(getNode().getNodeRef(), ApplicationModel.ASPECT_FEEDSOURCE);
// reset node details for next refresh of details page
getNode().reset();
@@ -510,7 +512,8 @@ public class SpaceDetailsDialog extends BaseDetailsBean implements NavigationSup
@Override
public String getContainerSubTitle()
{
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_LOCATION) + ": " + getSpace().getNodePath().toDisplayPath(nodeService, permissionService);
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_LOCATION) + ": " +
getSpace().getNodePath().toDisplayPath(getNodeService(), getPermissionService());
}
public String getContainerTitle()