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

@@ -24,6 +24,7 @@
*/
package org.alfresco.web.bean.dialog;
import java.io.Serializable;
import java.text.MessageFormat;
import java.util.Collections;
import java.util.List;
@@ -53,7 +54,7 @@ import org.alfresco.web.ui.common.Utils;
*
* @author gavinc
*/
public abstract class BaseDialogBean implements IDialogBean
public abstract class BaseDialogBean implements IDialogBean, Serializable
{
protected Map<String, String> parameters;
protected boolean isFinished = false;
@@ -61,11 +62,12 @@ public abstract class BaseDialogBean implements IDialogBean
// services common to most dialogs
protected BrowseBean browseBean;
protected NavigationBean navigator;
protected NodeService nodeService;
protected FileFolderService fileFolderService;
protected SearchService searchService;
protected DictionaryService dictionaryService;
protected NamespaceService namespaceService;
transient private NodeService nodeService;
transient private FileFolderService fileFolderService;
transient private SearchService searchService;
transient private DictionaryService dictionaryService;
transient private NamespaceService namespaceService;
public void init(Map<String, String> parameters)
{
@@ -241,6 +243,15 @@ public abstract class BaseDialogBean implements IDialogBean
this.nodeService = nodeService;
}
protected NodeService getNodeService()
{
if (this.nodeService == null)
{
this.nodeService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getNodeService();
}
return this.nodeService;
}
/**
* @param fileFolderService used to manipulate folder/folder model nodes
*/
@@ -248,6 +259,15 @@ public abstract class BaseDialogBean implements IDialogBean
{
this.fileFolderService = fileFolderService;
}
protected FileFolderService getFileFolderService()
{
if (this.fileFolderService == null)
{
this.fileFolderService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getFileFolderService();
}
return this.fileFolderService;
}
/**
* @param searchService the service used to find nodes
@@ -257,6 +277,15 @@ public abstract class BaseDialogBean implements IDialogBean
this.searchService = searchService;
}
protected SearchService getSearchService()
{
if (this.searchService == null)
{
this.searchService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getSearchService();
}
return this.searchService;
}
/**
* Sets the dictionary service
*
@@ -267,6 +296,15 @@ public abstract class BaseDialogBean implements IDialogBean
this.dictionaryService = dictionaryService;
}
protected DictionaryService getDictionaryService()
{
if (this.dictionaryService == null)
{
this.dictionaryService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getDictionaryService();
}
return this.dictionaryService;
}
/**
* @param namespaceService The NamespaceService
*/
@@ -275,6 +313,15 @@ public abstract class BaseDialogBean implements IDialogBean
this.namespaceService = namespaceService;
}
protected NamespaceService getNamespaceService()
{
if (this.namespaceService == null)
{
this.namespaceService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getNamespaceService();
}
return this.namespaceService;
}
/**
* Returns the default cancel outcome
*
@@ -354,4 +401,5 @@ public abstract class BaseDialogBean implements IDialogBean
FacesContext.getCurrentInstance(), getErrorMessageId()),
exception.getMessage());
}
}