mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
. 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:
@@ -61,6 +61,7 @@ public class ClientConfigElement extends ConfigElementAdapter
|
||||
private List<String> descendingSorts = new ArrayList<String>(1);
|
||||
|
||||
private int recentSpacesItems = 6;
|
||||
private boolean shelfVisible = true;
|
||||
private int searchMinimum = 3;
|
||||
private String helpUrl = null;
|
||||
private String editLinkType = null;
|
||||
@@ -260,6 +261,22 @@ public class ClientConfigElement extends ConfigElementAdapter
|
||||
this.recentSpacesItems = recentSpacesItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns if the shelf component is visible by default.
|
||||
*/
|
||||
public boolean isShelfVisible()
|
||||
{
|
||||
return this.shelfVisible;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param shelfVisible True if the shelf component is visible by default.
|
||||
*/
|
||||
/*package*/ void setShelfVisible(boolean shelfVisible)
|
||||
{
|
||||
this.shelfVisible = shelfVisible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a language locale and display label to the list.
|
||||
*
|
||||
|
@@ -59,6 +59,7 @@ public class ClientElementReader implements ConfigElementReader
|
||||
public static final String ATTRIBUTE_PROPERTY = "property";
|
||||
public static final String ATTRIBUTE_ASPECT = "aspect";
|
||||
public static final String ATTRIBUTE_DISPLAYLABEL = "displayLabelId";
|
||||
public static final String ELEMENT_SHELFVISIBLE = "shelf-visible";
|
||||
|
||||
private static Log logger = LogFactory.getLog(ClientElementReader.class);
|
||||
|
||||
@@ -164,6 +165,13 @@ public class ClientElementReader implements ConfigElementReader
|
||||
configElement.setRecentSpacesItems(Integer.parseInt(recentSpaces.getTextTrim()));
|
||||
}
|
||||
|
||||
// get the shelf component default visibility
|
||||
Element shelfVisible = element.element(ELEMENT_SHELFVISIBLE);
|
||||
if (shelfVisible != null)
|
||||
{
|
||||
configElement.setShelfVisible(Boolean.parseBoolean(shelfVisible.getTextTrim()));
|
||||
}
|
||||
|
||||
// get the Help url
|
||||
Element helpUrl = element.element(ELEMENT_HELPURL);
|
||||
if (helpUrl != null)
|
||||
|
Reference in New Issue
Block a user