public class ScriptAuthorityService extends BaseScopableProcessorExtension
Modifier and Type | Field and Description |
---|---|
static String |
ON_FIRST_SPACE
RegEx to split a String on the first space.
|
Constructor and Description |
---|
ScriptAuthorityService() |
Modifier and Type | Method and Description |
---|---|
ScriptGroup |
createRootGroup(String shortName,
String displayName)
Create a new root group in the default application zones
|
ScriptGroup[] |
getAllRootGroups()
Search the root groups, those without a parent group.
|
ScriptGroup[] |
getAllRootGroups(int maxItems,
int skipCount)
Search the root groups, those without a parent group.
|
ScriptGroup[] |
getAllRootGroups(ScriptPagingDetails paging)
Search the root groups, those without a parent group.
|
ScriptGroup[] |
getAllRootGroupsInZone(String zone)
Get the root groups, those without a parent group.
|
ScriptGroup[] |
getAllRootGroupsInZone(String zone,
int maxItems,
int skipCount)
Get the root groups, those without a parent group.
|
ScriptGroup[] |
getAllRootGroupsInZone(String zone,
ScriptPagingDetails paging,
String sortBy)
Get the root groups, those without a parent group.
|
AuthorityService |
getAuthorityService() |
ScriptGroup |
getGroup(String shortName)
Get a group given its short name
|
ScriptGroup |
getGroupForFullAuthorityName(String fullAuthorityName)
Get a group given it full authority name (Which must begin with 'GROUP_'
|
ScriptGroup[] |
getGroups(String filter,
ScriptPagingDetails paging)
Retreives groups matching the given filter from all zones.
|
ScriptGroup[] |
getGroups(String filter,
ScriptPagingDetails paging,
String sortBy)
Retreives groups matching the given filter from all zones.
|
ScriptGroup[] |
getGroupsInZone(String filter,
String zone,
ScriptPagingDetails paging,
String sortBy)
Deprecated.
|
ScriptGroup[] |
getGroupsInZone(String filter,
String zone,
ScriptPagingDetails paging,
String sortBy,
boolean sortAsc)
Retrieves groups matching the given filter from the given zone.
|
ScriptUser |
getUser(String username)
Get a user given their username
|
ScriptGroup[] |
searchGroups(String shortNameFilter)
Search for groups in all zones.
|
ScriptGroup[] |
searchGroups(String shortNameFilter,
ScriptPagingDetails paging,
String sortBy)
Search for groups in all zones.
|
ScriptGroup[] |
searchGroupsInZone(String shortNameFilter,
String zone)
Search for groups in a specific zone
|
ScriptGroup[] |
searchGroupsInZone(String shortNameFilter,
String zone,
int maxItems,
int skipCount)
Search for groups in a specific zone
Includes paging parameters to limit size of results returned.
|
ScriptGroup[] |
searchGroupsInZone(String shortNameFilter,
String zone,
ScriptPagingDetails paging,
String sortBy)
Search for groups in a specific zone
Includes paging parameters to limit size of results returned.
|
ScriptGroup[] |
searchRootGroups(String displayNamePattern)
Search the root groups, those without a parent group.
|
ScriptGroup[] |
searchRootGroups(String displayNamePattern,
ScriptPagingDetails paging,
String sortBy)
Search the root groups, those without a parent group.
|
ScriptGroup[] |
searchRootGroupsInZone(String displayNamePattern,
String zone)
Search the root groups, those without a parent group.
|
ScriptGroup[] |
searchRootGroupsInZone(String displayNamePattern,
String zone,
int maxItems,
int skipCount)
Search the root groups, those without a parent group.
|
ScriptGroup[] |
searchRootGroupsInZone(String displayNamePattern,
String zone,
ScriptPagingDetails paging,
String sortBy)
Search the root groups, those without a parent group.
|
ScriptUser[] |
searchUsers(String nameFilter,
ScriptPagingDetails paging,
String sortBy)
Deprecated.
see People.getPeople(String filter, ScriptPagingDetails pagingRequest, String sortBy)
|
void |
setServiceRegistry(ServiceRegistry serviceRegistry) |
getScope, setScope
getExtensionName, register, setExtensionName, setProcessor
public static final String ON_FIRST_SPACE
public void setServiceRegistry(ServiceRegistry serviceRegistry)
public AuthorityService getAuthorityService()
public ScriptGroup[] searchRootGroupsInZone(String displayNamePattern, String zone)
public ScriptGroup[] searchRootGroupsInZone(String displayNamePattern, String zone, int maxItems, int skipCount)
maxItems
- Maximum number of items returned.skipCount
- number of items to skip.public ScriptGroup[] searchRootGroupsInZone(String displayNamePattern, String zone, ScriptPagingDetails paging, String sortBy)
paging
- Paging object with max number to return, and items to skipsortBy
- What to sort on (authorityName, shortName or displayName)public ScriptGroup[] searchRootGroups(String displayNamePattern)
public ScriptGroup[] searchRootGroups(String displayNamePattern, ScriptPagingDetails paging, String sortBy)
paging
- Paging object with max number to return, and items to skipsortBy
- What to sort on (authorityName, shortName or displayName)public ScriptGroup[] getAllRootGroups()
public ScriptGroup[] getAllRootGroups(int maxItems, int skipCount)
public ScriptGroup[] getAllRootGroups(ScriptPagingDetails paging)
public ScriptGroup[] getAllRootGroupsInZone(String zone)
zone
- zone to search in.public ScriptGroup[] getAllRootGroupsInZone(String zone, int maxItems, int skipCount)
zone
- zone to search in.maxItems
- Maximum number of items returned.skipCount
- number of items to skip.public ScriptGroup[] getAllRootGroupsInZone(String zone, ScriptPagingDetails paging, String sortBy)
zone
- zone to search in.paging
- Paging object with max number to return, and items to skipsortBy
- What to sort on (authorityName, shortName or displayName)public ScriptGroup[] getGroups(String filter, ScriptPagingDetails paging)
filter
- Pattern to filter groups bypaging
- Paging detailspublic ScriptGroup[] getGroups(String filter, ScriptPagingDetails paging, String sortBy)
filter
- Pattern to filter groups bypaging
- Paging detailssortBy
- Field to sort by, can be shortName
or displayName
otherwise
the results are ordered by the authorityNamepublic ScriptGroup[] getGroupsInZone(String filter, String zone, ScriptPagingDetails paging, String sortBy)
public ScriptGroup[] getGroupsInZone(String filter, String zone, ScriptPagingDetails paging, String sortBy, boolean sortAsc)
filter
- Pattern to filter groups byzone
- The zone in which to search for groupspaging
- Paging detailssortBy
- Field to sort by, can be shortName
, displayName
or
authorityName
, the default is displayNamesortAsc
- sort ascending or notpublic ScriptGroup getGroup(String shortName)
shortName
- the shortName of the grouppublic ScriptGroup getGroupForFullAuthorityName(String fullAuthorityName)
fullAuthorityName
- the shortName of the grouppublic ScriptGroup createRootGroup(String shortName, String displayName)
public ScriptGroup[] searchGroups(String shortNameFilter)
shortNameFilter
- partial match on shortName (* and ?) work. If empty then matches everything.public ScriptGroup[] searchGroups(String shortNameFilter, ScriptPagingDetails paging, String sortBy)
shortNameFilter
- partial match on shortName (* and ?) work. If empty then matches everything.paging
- Paging object with max number to return, and items to skipsortBy
- What to sort on (authorityName, shortName or displayName)public ScriptGroup[] searchGroupsInZone(String shortNameFilter, String zone)
shortNameFilter
- partial match on shortName (* and ?) work. If empty then matches everything.zone
- zone to search in.public ScriptGroup[] searchGroupsInZone(String shortNameFilter, String zone, int maxItems, int skipCount)
shortNameFilter
- partial match on shortName (* and ?) work. If empty then matches everything.zone
- zone to search in.maxItems
- Maximum number of items returned.skipCount
- number of items to skip.public ScriptGroup[] searchGroupsInZone(String shortNameFilter, String zone, ScriptPagingDetails paging, String sortBy)
shortNameFilter
- partial match on shortName (* and ?) work. If empty then matches everything.zone
- zone to search in.paging
- Paging object with max number to return, and items to skipsortBy
- What to sort on (authorityName, shortName or displayName)public ScriptUser getUser(String username)
username
- the username of the userpublic ScriptUser[] searchUsers(String nameFilter, ScriptPagingDetails paging, String sortBy)
nameFilter
- partial match of the name (username, first name, last name). If empty then matches everyone.paging
- Paging object with max number to return, and items to skipsortBy
- What to sort on (firstName, lastName or userName)Copyright © 2005–2017 Alfresco Software. All rights reserved.