mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
First phase of client configuration re-org
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2289 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -33,8 +33,6 @@ import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.FileUploadBean;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Handler class used by the Add Content Wizard
|
||||
@@ -43,8 +41,6 @@ import org.apache.commons.logging.LogFactory;
|
||||
*/
|
||||
public class AddContentWizard extends BaseContentWizard
|
||||
{
|
||||
private static Log logger = LogFactory.getLog(AddContentWizard.class);
|
||||
|
||||
// TODO: retrieve these from the config service
|
||||
private static final String WIZARD_TITLE_ID = "add_content_title";
|
||||
private static final String WIZARD_DESC_ID = "add_content_desc";
|
||||
|
@@ -41,7 +41,6 @@ import org.alfresco.repo.action.executer.MoveActionExecuter;
|
||||
import org.alfresco.repo.action.executer.SimpleWorkflowActionExecuter;
|
||||
import org.alfresco.repo.action.executer.SpecialiseTypeActionExecuter;
|
||||
import org.alfresco.repo.action.executer.TransformActionExecuter;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.action.ActionDefinition;
|
||||
import org.alfresco.service.cmr.action.ActionService;
|
||||
import org.alfresco.service.cmr.dictionary.AspectDefinition;
|
||||
@@ -58,7 +57,6 @@ import org.alfresco.web.data.IDataContainer;
|
||||
import org.alfresco.web.data.QuickSort;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.web.jsf.FacesContextUtils;
|
||||
|
||||
/**
|
||||
* Base handler class containing common code used by the New Space Wizard and New Action Wizard
|
||||
@@ -559,8 +557,7 @@ public abstract class BaseActionWizard extends AbstractWizardBean
|
||||
{
|
||||
if (this.encodings == null)
|
||||
{
|
||||
ConfigService svc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
|
||||
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
|
||||
ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance());
|
||||
Config wizardCfg = svc.getConfig("Action Wizards");
|
||||
if (wizardCfg != null)
|
||||
{
|
||||
@@ -617,8 +614,7 @@ public abstract class BaseActionWizard extends AbstractWizardBean
|
||||
{
|
||||
if (this.transformers == null)
|
||||
{
|
||||
ConfigService svc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
|
||||
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
|
||||
ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance());
|
||||
Config wizardCfg = svc.getConfig("Action Wizards");
|
||||
if (wizardCfg != null)
|
||||
{
|
||||
@@ -682,8 +678,7 @@ public abstract class BaseActionWizard extends AbstractWizardBean
|
||||
{
|
||||
if (this.imageTransformers == null)
|
||||
{
|
||||
ConfigService svc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
|
||||
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
|
||||
ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance());
|
||||
Config wizardCfg = svc.getConfig("Action Wizards");
|
||||
if (wizardCfg != null)
|
||||
{
|
||||
@@ -747,8 +742,7 @@ public abstract class BaseActionWizard extends AbstractWizardBean
|
||||
{
|
||||
if (this.aspects == null)
|
||||
{
|
||||
ConfigService svc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
|
||||
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
|
||||
ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance());
|
||||
Config wizardCfg = svc.getConfig("Action Wizards");
|
||||
if (wizardCfg != null)
|
||||
{
|
||||
@@ -825,8 +819,7 @@ public abstract class BaseActionWizard extends AbstractWizardBean
|
||||
Application.getMessage(context, "content")));
|
||||
|
||||
// add any configured content sub-types to the list
|
||||
ConfigService svc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
|
||||
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
|
||||
ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance());
|
||||
Config wizardCfg = svc.getConfig("Custom Content Types");
|
||||
if (wizardCfg != null)
|
||||
{
|
||||
|
@@ -51,7 +51,6 @@ import org.alfresco.web.data.QuickSort;
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.web.jsf.FacesContextUtils;
|
||||
|
||||
/**
|
||||
* Base Handler class used by the Content Wizards
|
||||
@@ -499,8 +498,7 @@ public abstract class BaseContentWizard extends AbstractWizardBean
|
||||
Application.getMessage(context, "content")));
|
||||
|
||||
// add any configured content sub-types to the list
|
||||
ConfigService svc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
|
||||
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
|
||||
ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance());
|
||||
Config wizardCfg = svc.getConfig("Custom Content Types");
|
||||
if (wizardCfg != null)
|
||||
{
|
||||
|
@@ -23,8 +23,6 @@ import javax.faces.event.ValueChangeEvent;
|
||||
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Handler class used by the Create In-line Content Wizard
|
||||
@@ -36,8 +34,6 @@ public class CreateContentWizard extends BaseContentWizard
|
||||
protected static final String CONTENT_TEXT = "txt";
|
||||
protected static final String CONTENT_HTML = "html";
|
||||
|
||||
private static Log logger = LogFactory.getLog(CreateContentWizard.class);
|
||||
|
||||
// TODO: retrieve these from the config service
|
||||
private static final String WIZARD_TITLE_ID = "create_content_title";
|
||||
private static final String WIZARD_DESC_ID = "create_content_desc";
|
||||
|
@@ -63,7 +63,6 @@ import org.alfresco.web.data.QuickSort;
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.web.jsf.FacesContextUtils;
|
||||
|
||||
/**
|
||||
* Handler class used by the New Space Wizard
|
||||
@@ -948,8 +947,7 @@ public class NewRuleWizard extends BaseActionWizard
|
||||
{
|
||||
if (this.modelTypes == null)
|
||||
{
|
||||
ConfigService svc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
|
||||
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
|
||||
ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance());
|
||||
Config wizardCfg = svc.getConfig("Action Wizards");
|
||||
if (wizardCfg != null)
|
||||
{
|
||||
|
@@ -31,7 +31,6 @@ import javax.transaction.UserTransaction;
|
||||
|
||||
import org.alfresco.config.Config;
|
||||
import org.alfresco.config.ConfigElement;
|
||||
import org.alfresco.config.ConfigService;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.dictionary.TypeDefinition;
|
||||
@@ -52,7 +51,6 @@ import org.alfresco.web.ui.common.component.UIListItem;
|
||||
import org.alfresco.web.ui.common.component.description.UIDescription;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.web.jsf.FacesContextUtils;
|
||||
|
||||
/**
|
||||
* Handler class used by the New Space Wizard
|
||||
@@ -78,12 +76,12 @@ public class NewSpaceWizard extends AbstractWizardBean
|
||||
|
||||
private static final String ERROR = "error_space";
|
||||
private static final String DEFAULT_SPACE_TYPE_ICON = "/images/icons/space.gif";
|
||||
private static final String ICONS_LOOKUP_KEY = " icons";
|
||||
|
||||
// new space wizard specific properties
|
||||
protected SearchService searchService;
|
||||
protected NamespaceService namespaceService;
|
||||
protected DictionaryService dictionaryService;
|
||||
protected ConfigService configService;
|
||||
|
||||
protected String spaceType;
|
||||
protected String icon;
|
||||
@@ -559,9 +557,8 @@ public class NewSpaceWizard extends AbstractWizardBean
|
||||
this.folderTypeDescriptions.add(defaultDesc);
|
||||
|
||||
// add any configured content sub-types to the list
|
||||
ConfigService svc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
|
||||
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
|
||||
Config wizardCfg = svc.getConfig("Custom Folder Types");
|
||||
Config wizardCfg = Application.getConfigService(FacesContext.getCurrentInstance()).
|
||||
getConfig("Custom Folder Types");
|
||||
if (wizardCfg != null)
|
||||
{
|
||||
ConfigElement typesCfg = wizardCfg.getConfigElement("folder-types");
|
||||
@@ -689,7 +686,8 @@ public class NewSpaceWizard extends AbstractWizardBean
|
||||
QName type = QName.createQName(this.spaceType);
|
||||
String typePrefixForm = type.toPrefixString(this.namespaceService);
|
||||
|
||||
Config config = this.configService.getConfig(typePrefixForm);
|
||||
Config config = Application.getConfigService(FacesContext.getCurrentInstance()).
|
||||
getConfig(typePrefixForm + ICONS_LOOKUP_KEY);
|
||||
if (config != null)
|
||||
{
|
||||
ConfigElement iconsCfg = config.getConfigElement("icons");
|
||||
@@ -774,16 +772,6 @@ public class NewSpaceWizard extends AbstractWizardBean
|
||||
{
|
||||
this.dictionaryService = dictionaryService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the config service
|
||||
*
|
||||
* @param configService The ConfigService
|
||||
*/
|
||||
public void setConfigService(ConfigService configService)
|
||||
{
|
||||
this.configService = configService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the copyPolicy.
|
||||
|
@@ -30,13 +30,11 @@ import javax.faces.event.ActionEvent;
|
||||
import javax.faces.validator.ValidatorException;
|
||||
import javax.transaction.UserTransaction;
|
||||
|
||||
import org.alfresco.config.ConfigService;
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.InvalidNodeRefException;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||
import org.alfresco.service.cmr.security.AuthenticationService;
|
||||
import org.alfresco.service.cmr.security.OwnableService;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
@@ -44,7 +42,6 @@ import org.alfresco.service.cmr.security.PersonService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.ContextListener;
|
||||
import org.alfresco.web.app.context.UIContextService;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
@@ -97,9 +94,6 @@ public class NewUserWizard extends AbstractWizardBean
|
||||
|
||||
/** OwnableService bean reference */
|
||||
private OwnableService ownableService;
|
||||
|
||||
/** ConfigService bean reference */
|
||||
private ConfigService configService;
|
||||
|
||||
/** action context */
|
||||
private Node person = null;
|
||||
@@ -150,14 +144,6 @@ public class NewUserWizard extends AbstractWizardBean
|
||||
{
|
||||
this.ownableService = ownableService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param configService The ConfigService to set.
|
||||
*/
|
||||
public void setConfigService(ConfigService configService)
|
||||
{
|
||||
this.configService = configService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialises the wizard
|
||||
@@ -968,9 +954,7 @@ public class NewUserWizard extends AbstractWizardBean
|
||||
*/
|
||||
private String getDefaultPermission()
|
||||
{
|
||||
ClientConfigElement config = (ClientConfigElement)this.configService.getGlobalConfig().getConfigElement(
|
||||
ClientConfigElement.CONFIG_ELEMENT_ID);
|
||||
|
||||
ClientConfigElement config = Application.getClientConfig(FacesContext.getCurrentInstance());
|
||||
return config.getHomeSpacePermission();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user