mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
. 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:
@@ -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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user