Added the following community contribution from Ray Gauss II "Add configuration to allow basic search to be changed to search X, Y, Z attributes by default."

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5649 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-05-09 16:40:28 +00:00
parent 0234890142
commit c9ceb5fc4f
4 changed files with 132 additions and 7 deletions

View File

@@ -24,6 +24,8 @@
*/
package org.alfresco.web.config;
import java.util.List;
import javax.faces.context.FacesContext;
import org.alfresco.config.ConfigElement;
@@ -31,6 +33,7 @@ import org.alfresco.config.JNDIConstants;
import org.alfresco.config.element.ConfigElementAdapter;
import org.alfresco.mbeans.VirtServerRegistry;
import org.alfresco.repo.cache.ExpiringValueCache;
import org.alfresco.service.namespace.QName;
import org.alfresco.web.bean.repository.Repository;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -68,6 +71,7 @@ public class ClientConfigElement extends ConfigElementAdapter
private boolean clipboardStatusVisible = true;
private boolean pasteAllAndClear = true;
private boolean allowGuestConfig = false;
private List<QName> simpleSearchAdditionalAttributes = null;
/**
* Default Constructor
@@ -204,6 +208,12 @@ public class ClientConfigElement extends ConfigElementAdapter
combinedElement.setAllowGuestConfig(newElement.getAllowGuestConfig());
}
if (newElement.getSimpleSearchAdditionalAttributes() != null &&
newElement.getSimpleSearchAdditionalAttributes().equals(combinedElement.getSimpleSearchAdditionalAttributes()) == false)
{
combinedElement.setSimpleSearchAdditionalAttributes(newElement.getSimpleSearchAdditionalAttributes());
}
return combinedElement;
}
@@ -547,4 +557,20 @@ public class ClientConfigElement extends ConfigElementAdapter
{
return this.allowGuestConfig;
}
/**
* @return Returns the additional attributes to search on a simple search
*/
public List<QName> getSimpleSearchAdditionalAttributes()
{
return this.simpleSearchAdditionalAttributes;
}
/**
* @param simpleSearchAdditionalAttributes The additional simple search attributes
*/
/*package*/ void setSimpleSearchAdditionalAttributes(List<QName> simpleSearchAdditionalAttributes)
{
this.simpleSearchAdditionalAttributes = simpleSearchAdditionalAttributes;
}
}