Search in sources :

Example 6 with ClientConfigElement

use of org.alfresco.web.config.ClientConfigElement in project acs-community-packaging by Alfresco.

the class RecentSpacesBean method getMaxRecentSpaces.

// ------------------------------------------------------------------------------
// Helper methods
/**
 * @return the max number of recent spaces to show, retrieved from client config
 */
private int getMaxRecentSpaces() {
    if (maxRecentSpaces == null) {
        ClientConfigElement config = Application.getClientConfig(FacesContext.getCurrentInstance());
        maxRecentSpaces = Integer.valueOf(config.getRecentSpacesItems());
    }
    return maxRecentSpaces.intValue();
}
Also used : ClientConfigElement(org.alfresco.web.config.ClientConfigElement)

Aggregations

ClientConfigElement (org.alfresco.web.config.ClientConfigElement)6 ConfigService (org.springframework.extensions.config.ConfigService)4 User (org.alfresco.web.bean.repository.User)2 IOException (java.io.IOException)1 FacesContext (javax.faces.context.FacesContext)1 PortletException (javax.portlet.PortletException)1 PortletRequestDispatcher (javax.portlet.PortletRequestDispatcher)1 PortletSession (javax.portlet.PortletSession)1 UserTransaction (javax.transaction.UserTransaction)1 SessionUser (org.alfresco.repo.SessionUser)1 AuthenticationException (org.alfresco.repo.security.authentication.AuthenticationException)1 NodeRef (org.alfresco.service.cmr.repository.NodeRef)1 StoreRef (org.alfresco.service.cmr.repository.StoreRef)1 AuthenticationService (org.alfresco.service.cmr.security.AuthenticationService)1 AuthorityService (org.alfresco.service.cmr.security.AuthorityService)1 PermissionService (org.alfresco.service.cmr.security.PermissionService)1 WorkflowTask (org.alfresco.service.cmr.workflow.WorkflowTask)1 WorkflowTaskQuery (org.alfresco.service.cmr.workflow.WorkflowTaskQuery)1 Node (org.alfresco.web.bean.repository.Node)1 TransientMapNode (org.alfresco.web.bean.repository.TransientMapNode)1