ALF-1999: Refactored AuthorityService.findAuthorities to support search options required by Alfresco Explorer client in efficient manner

- optional parentAuthority argument - when set will only search for authorities under a given group
- optional immediate flag - when false means do a recursive search. When true means only return first level. When true and parentAuthority is null means root groups.
- search expression - which is tested against the short name and the display name
- reworked all existing calls for new semantics
- this method is for UI search only - not for existence checking!
  - removed some ill-informed calls


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19203 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2010-03-10 18:46:02 +00:00
parent fbe601d121
commit 36cdb669b1
8 changed files with 196 additions and 248 deletions

View File

@@ -134,27 +134,7 @@ public interface AuthorityService
*/
@Auditable(parameters = {"type"})
public Set<String> getAllAuthorities(AuthorityType type);
/**
* Find authorities by pattern matching (* and ?) against the authority name.
* @param type - the authority type
* @param namePattern - the pattern which will be matched against the shortName.
* @return the names of the authorities matching the pattern and type.
*/
@Auditable(parameters = {"type"})
public Set<String> findAuthoritiesByShortName(AuthorityType type, String shortNamePattern);
/**
* Find authorities by pattern matching (* and ?) against the full authority name.
* @param type - the authority type
* @param namePattern - the pattern which will be matched against the full authority name.
* @return the names of the authorities matching the pattern and type.
*/
@Auditable(parameters = {"type"})
public Set<String> findAuthorities(AuthorityType type, String namePattern);
/**
* Get all root authorities by type. Root authorities are ones that were
* created without an authority as the parent authority;
@@ -419,23 +399,16 @@ public interface AuthorityService
public Set<String> getDefaultZones();
/**
* Find authorities by pattern matching (* and ?) against the full authority name in a particular zone
* @param type - the authority type
* @param namePattern - the pattern which will be matched against the full authority name.
* @param zone - the zone
* @return the names of the authorities matching the pattern and type.
*/
@Auditable(parameters = {"type"})
public Set<String> findAuthoritiesInZone(AuthorityType type, String namePattern, String zone);
/**
* Find authorities by pattern matching (* and ?) against the authority name.
* @param type - the authority type
* @param shortNamePattern - the pattern which will be matched against the shortName.
* @param zone
* @return the names of the authorities matching the pattern and type.
* @param type
* @param parentAuthority if non-null, will look only for authorities who are a child of the named parent
* @param immediate if <code>true</code> then only search root groups if parentAuthority is null, or immediate children of parentAuthority if it is non-null.
* @param displayNamePattern
* @param zoneName - may be null to indicate all zones
* @return
*/
@Auditable(parameters = {"type"})
public Set<String> findAuthoritiesByShortNameInZone(AuthorityType type, String shortNamePattern, String zone);
}
public Set<String> findAuthorities(AuthorityType type, String parentAuthority, boolean immediate,
String displayNamePattern, String zoneName);
}