mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
svn merge -r 2570:2595 svn://www.alfresco.org/alfresco/BRANCHES/V1.2.0/root HEAD/root
svn merge -r 2597:2649 svn://www.alfresco.org/alfresco/BRANCHES/V1.2.0/root HEAD/root git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2650 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -34,6 +34,8 @@ public class ClientConfigElement extends ConfigElementAdapter
|
||||
private int recentSpacesItems = 6;
|
||||
private boolean shelfVisible = true;
|
||||
private int searchMinimum = 3;
|
||||
private boolean forceAndTerms = false;
|
||||
private int searchMaxResults = -1;
|
||||
private String helpUrl = null;
|
||||
private String editLinkType = "http";
|
||||
private String homeSpacePermission = null;
|
||||
@@ -121,6 +123,16 @@ public class ClientConfigElement extends ConfigElementAdapter
|
||||
newElement.setSearchMinimum(existingElement.getSearchMinimum());
|
||||
}
|
||||
|
||||
if (existingElement.getForceAndTerms() != newElement.getForceAndTerms())
|
||||
{
|
||||
newElement.setForceAndTerms(existingElement.getForceAndTerms());
|
||||
}
|
||||
|
||||
if (existingElement.getSearchMaxResults() != newElement.getSearchMaxResults())
|
||||
{
|
||||
newElement.setSearchMaxResults(existingElement.getSearchMaxResults());
|
||||
}
|
||||
|
||||
if (existingElement.isShelfVisible() != newElement.isShelfVisible())
|
||||
{
|
||||
newElement.setShelfVisible(existingElement.isShelfVisible());
|
||||
@@ -263,6 +275,44 @@ public class ClientConfigElement extends ConfigElementAdapter
|
||||
{
|
||||
this.searchMinimum = searchMinimum;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return If true enables AND text terms for simple/advanced search by default.
|
||||
*/
|
||||
public boolean getForceAndTerms()
|
||||
{
|
||||
return this.forceAndTerms;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param forceAndTerms True to enable AND text terms for simple/advanced search by default.
|
||||
*/
|
||||
/*package*/ void setForceAndTerms(boolean forceAndTerms)
|
||||
{
|
||||
this.forceAndTerms = forceAndTerms;
|
||||
}
|
||||
|
||||
/**
|
||||
* If positive, this will limit the size of the result set from the search.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
||||
public int getSearchMaxResults()
|
||||
{
|
||||
return searchMaxResults;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set if the the result set from a search will be of limited size.
|
||||
* If negative it is unlimited, by convention, this is set to -1.
|
||||
*
|
||||
* @param searchMaxResults
|
||||
*/
|
||||
/*package*/ void setSearchMaxResults(int searchMaxResults)
|
||||
{
|
||||
this.searchMaxResults = searchMaxResults;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the default Home Space permissions.
|
||||
|
@@ -34,6 +34,8 @@ public class ClientElementReader implements ConfigElementReader
|
||||
public static final String ELEMENT_HELPURL = "help-url";
|
||||
public static final String ELEMENT_EDITLINKTYPE = "edit-link-type";
|
||||
public static final String ELEMENT_SEARCHMINIMUM = "search-minimum";
|
||||
public static final String ELEMENT_SEARCHANDTERMS = "search-and-terms";
|
||||
public static final String ELEMENT_SEARCHMAXRESULTS = "search-max-results";
|
||||
public static final String ELEMENT_HOMESPACEPERMISSION = "home-space-permission";
|
||||
public static final String ELEMENT_FROMEMAILADDRESS = "from-email-address";
|
||||
public static final String ELEMENT_SHELFVISIBLE = "shelf-visible";
|
||||
@@ -93,6 +95,20 @@ public class ClientElementReader implements ConfigElementReader
|
||||
configElement.setSearchMinimum(Integer.parseInt(searchMin.getTextTrim()));
|
||||
}
|
||||
|
||||
// get the search force AND terms setting
|
||||
Element searchForceAnd = element.element(ELEMENT_SEARCHANDTERMS);
|
||||
if (searchForceAnd != null)
|
||||
{
|
||||
configElement.setForceAndTerms(Boolean.parseBoolean(searchForceAnd.getTextTrim()));
|
||||
}
|
||||
|
||||
// get the search max results size
|
||||
Element searchMaxResults = element.element(ELEMENT_SEARCHMAXRESULTS);
|
||||
if (searchMaxResults != null)
|
||||
{
|
||||
configElement.setSearchMaxResults(Integer.parseInt(searchMaxResults.getTextTrim()));
|
||||
}
|
||||
|
||||
// get the default permission for newly created users Home Spaces
|
||||
Element permission = element.element(ELEMENT_HOMESPACEPERMISSION);
|
||||
if (permission != null)
|
||||
|
Reference in New Issue
Block a user