. Added client config setting to allow the Shelf component to be hidden by default

. Added ExpiringValueCache class used to hold simple lists in the client that don't need refreshing constantly

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2105 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-01-12 17:29:56 +00:00
parent 2652d33f08
commit aaff54e53c
7 changed files with 127 additions and 89 deletions

View File

@@ -61,9 +61,18 @@ import org.apache.log4j.Logger;
*/
public class NavigationBean
{
/**
* Default constructor
*/
public NavigationBean()
{
initFromClientConfig();
}
// ------------------------------------------------------------------------------
// Bean property getters and setters
// Bean property getters and setters
/**
* @param nodeService The nodeService to set.
*/
@@ -104,14 +113,6 @@ public class NavigationBean
this.contentDiskDriver = contentDiskDriver;
}
/**
* @param configService The ConfigService to set.
*/
public void setConfigService(ConfigService configService)
{
this.configService = configService;
}
/**
* @return the User object representing the current instance for this user
*/
@@ -177,10 +178,6 @@ public class NavigationBean
*/
public String getHelpUrl()
{
if (this.clientConfig == null)
{
initFromClientConfig();
}
return this.helpUrl;
}
@@ -534,6 +531,7 @@ public class NavigationBean
return this.cifsServerPath;
}
// ------------------------------------------------------------------------------
// Private helpers
@@ -542,12 +540,15 @@ public class NavigationBean
*/
private void initFromClientConfig()
{
this.clientConfig = (ClientConfigElement)this.configService.getGlobalConfig().getConfigElement(
ClientConfigElement.CONFIG_ELEMENT_ID);
this.clientConfig = (ClientConfigElement)Application.getConfigService(
FacesContext.getCurrentInstance()).getGlobalConfig().
getConfigElement(ClientConfigElement.CONFIG_ELEMENT_ID);
this.helpUrl = clientConfig.getHelpUrl();
this.shelfExpanded = clientConfig.isShelfVisible();
}
// ------------------------------------------------------------------------------
// Inner classes
@@ -636,9 +637,6 @@ public class NavigationBean
/** CIFS content disk driver bean reference */
private ContentDiskInterface contentDiskDriver;
/** ConfigService bean reference */
private ConfigService configService;
/** Client configuration object */
private ClientConfigElement clientConfig = null;