. Added support for folder-type restrictions in Advanced Search config

- Added forums folder type to list by default
 - Added folder-type drop-down to Advanced Search UI

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2878 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-05-12 16:06:00 +00:00
parent fbe26a49f2
commit 0cdf8e216f
9 changed files with 206 additions and 13 deletions

View File

@@ -33,6 +33,7 @@ public class AdvancedSearchConfigElement extends ConfigElementAdapter
public static final String CONFIG_ELEMENT_ID = "advanced-search";
private List<String> contentTypes = null;
private List<String> folderTypes = null;
private List<CustomProperty> customProps = null;
/**
@@ -78,6 +79,13 @@ public class AdvancedSearchConfigElement extends ConfigElementAdapter
combinedElement.addContentType(type);
}
}
if (this.folderTypes != null)
{
for (String type : this.folderTypes)
{
combinedElement.addFolderType(type);
}
}
if (this.customProps != null)
{
@@ -139,6 +147,38 @@ public class AdvancedSearchConfigElement extends ConfigElementAdapter
}
}
/**
* @return Returns the folderTypes.
*/
public List<String> getFolderTypes()
{
return this.folderTypes;
}
/**
* @param folderTypes The folderTypes to set.
*/
/*package*/ void setFolderTypes(List<String> folderTypes)
{
this.folderTypes = folderTypes;
}
/**
* @param folderType Adds the given folder type to the list
*/
/*package*/ void addFolderType(String folderType)
{
if (this.folderTypes == null)
{
this.folderTypes = new ArrayList<String>(3);
}
if (this.folderTypes.contains(folderType) == false)
{
this.folderTypes.add(folderType);
}
}
/**
* @return Returns the customProps.
*/