public class ScriptGroup extends Object implements Authority, Serializable
Authority.AuthorityComparator, Authority.ScriptAuthorityType
Constructor and Description |
---|
ScriptGroup(String fullName,
AuthorityService authorityService)
Deprecated.
Use
ScriptGroup(String, ServiceRegistry, Scriptable) instead |
ScriptGroup(String fullName,
ServiceRegistry serviceRegistry,
org.mozilla.javascript.Scriptable scope)
New script group
|
ScriptGroup(String fullName,
String displayName,
ServiceRegistry serviceRegistry,
org.mozilla.javascript.Scriptable scope)
New script group
|
Modifier and Type | Method and Description |
---|---|
void |
addAuthority(String fullAuthorityName)
AddAuthority as a child of this group
|
ScriptGroup |
createGroup(String newShortName,
String newDisplayName)
Create a new group as a child of this group.
|
void |
deleteGroup()
Delete this group
|
ScriptGroup[] |
getAllGroups()
Get all sub groups (all decendants)
|
ScriptGroup[] |
getAllParentGroups()
Get all the parents of this this group
|
ScriptGroup[] |
getAllParentGroups(int maxItems,
int skipCount)
Get all the parents of this this group
|
ScriptGroup[] |
getAllParentGroups(ScriptPagingDetails paging,
String sortBy)
Get all the parents of this this group
|
ScriptUser[] |
getAllUsers()
Get all users contained in this group
|
Authority.ScriptAuthorityType |
getAuthorityType() |
Authority[] |
getChildAuthorities()
Get all the children of this group, regardless of type
|
Authority[] |
getChildAuthorities(ScriptPagingDetails paging,
String sortBy)
Get all the children of this group, regardless of type
|
ScriptGroup[] |
getChildGroups() |
ScriptGroup[] |
getChildGroups(int maxItems,
int skipCount)
Get child groups of this group
|
ScriptGroup[] |
getChildGroups(ScriptPagingDetails paging,
String sortBy)
Get child groups of this group
|
ScriptUser[] |
getChildUsers()
Get child users of this group
|
ScriptUser[] |
getChildUsers(ScriptPagingDetails paging,
String sortBy)
Get child users of this group
|
String |
getDisplayName() |
String |
getFullName()
Get the full internal name, also known
as the Authority Name
|
int |
getGroupCount()
Get the number of child groups contained within this group.
|
ScriptNode |
getGroupNode()
Return a ScriptNode wrapping the group
|
org.alfresco.service.cmr.repository.NodeRef |
getGroupNodeRef()
Return the NodeRef of the group
|
ScriptGroup[] |
getParentGroups()
Get the immediate parents of this group
|
ScriptGroup[] |
getParentGroups(int maxItems,
int skipCount)
Get the immediate parents of this group
|
ScriptGroup[] |
getParentGroups(ScriptPagingDetails paging,
String sortBy)
Get the immediate parents of this group
|
String |
getShortName()
Get the short name
|
int |
getUserCount()
Get the number of users contained within this group.
|
Set<String> |
getZones()
Gets all the zones of this group
|
static ScriptGroup[] |
makeScriptGroups(Collection<String> authorities,
ScriptPagingDetails paging,
ServiceRegistry serviceRegistry,
org.mozilla.javascript.Scriptable scope)
Deprecated.
|
static ScriptGroup[] |
makeScriptGroups(Collection<String> authorities,
ScriptPagingDetails paging,
String sortBy,
boolean sortAsc,
ServiceRegistry serviceRegistry,
org.mozilla.javascript.Scriptable scope) |
static ScriptGroup[] |
makeScriptGroups(Collection<String> authorities,
ScriptPagingDetails paging,
String sortBy,
ServiceRegistry serviceRegistry,
org.mozilla.javascript.Scriptable scope)
Deprecated.
|
static ScriptGroup[] |
makeScriptGroups(org.alfresco.query.PagingResults<String> pagedGroups,
ScriptPagingDetails paging,
ServiceRegistry serviceRegistry,
org.mozilla.javascript.Scriptable scope)
Deprecated.
|
static ScriptGroup[] |
makeScriptGroups(org.alfresco.query.PagingResults<String> pagedGroups,
ScriptPagingDetails paging,
String sortBy,
boolean sortAsc,
ServiceRegistry serviceRegistry,
org.mozilla.javascript.Scriptable scope)
Returns an array of ScriptGroup objects representing the given paged results.
|
static ScriptGroup[] |
makeScriptGroupsInfo(org.alfresco.query.PagingResults<AuthorityInfo> pagedGroups,
ScriptPagingDetails paging,
String sortBy,
boolean sortAsc,
ServiceRegistry serviceRegistry,
org.mozilla.javascript.Scriptable scope)
Returns an array of ScriptGroup objects representing the given paged results.
|
void |
removeAuthority(String fullAuthorityName)
Remove child Authority from this group
|
void |
removeGroup(String newShortName)
remove sub group from this group
|
void |
removeUser(String newShortName)
Remove child user from this group
|
void |
setAuthorityType(Authority.ScriptAuthorityType authorityType) |
void |
setDisplayName(String displayName)
Change the display name for this group.
|
void |
setFullName(String fullName) |
void |
setShortName(String shortName) |
public ScriptGroup(String fullName, String displayName, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)
fullName
- StringdisplayName
- StringserviceRegistry
- ServiceRegistryscope
- Scriptablepublic ScriptGroup(String fullName, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)
fullName
- StringserviceRegistry
- ServiceRegistryscope
- Scriptablepublic ScriptGroup(String fullName, AuthorityService authorityService)
ScriptGroup(String, ServiceRegistry, Scriptable)
insteadfullName
- StringauthorityService
- AuthorityServicepublic void deleteGroup()
public void setAuthorityType(Authority.ScriptAuthorityType authorityType)
public Authority.ScriptAuthorityType getAuthorityType()
getAuthorityType
in interface Authority
public void setShortName(String shortName)
public String getShortName()
getShortName
in interface Authority
public void setFullName(String fullName)
public String getFullName()
getFullName
in interface Authority
public void setDisplayName(String displayName)
displayName
- Stringpublic String getDisplayName()
getDisplayName
in interface Authority
public ScriptUser[] getAllUsers()
public ScriptGroup[] getAllGroups()
public ScriptUser[] getChildUsers()
public ScriptUser[] getChildUsers(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[] getChildGroups()
public ScriptGroup[] getChildGroups(int maxItems, int skipCount)
maxItems
- Maximum number of groups to return.skipCount
- number of groups to skip before returning the first result.public ScriptGroup[] getChildGroups(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 Authority[] getChildAuthorities()
public Authority[] getChildAuthorities(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[] getParentGroups()
public ScriptGroup[] getParentGroups(int maxItems, int skipCount)
maxItems
- Maximum number of groups to return.skipCount
- number of groups to skip before returning the first result.public ScriptGroup[] getParentGroups(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[] getAllParentGroups()
public ScriptGroup[] getAllParentGroups(int maxItems, int skipCount)
maxItems
- Maximum number of groups to return.skipCount
- number of groups to skip before returning the first result.public ScriptGroup[] getAllParentGroups(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 int getUserCount()
public int getGroupCount()
public ScriptGroup createGroup(String newShortName, String newDisplayName)
public void removeGroup(String newShortName)
newShortName
- the shortName of the sub group to remove from this group.public void removeUser(String newShortName)
newShortName
- the shortName of the user to remove from this group.public void addAuthority(String fullAuthorityName)
fullAuthorityName
- the full name of the authority to add to this group.public void removeAuthority(String fullAuthorityName)
fullAuthorityName
- the full name of the authority to remove from this group.public org.alfresco.service.cmr.repository.NodeRef getGroupNodeRef()
public ScriptNode getGroupNode()
public static ScriptGroup[] makeScriptGroups(Collection<String> authorities, ScriptPagingDetails paging, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)
public static ScriptGroup[] makeScriptGroups(Collection<String> authorities, ScriptPagingDetails paging, String sortBy, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)
public static ScriptGroup[] makeScriptGroups(Collection<String> authorities, ScriptPagingDetails paging, String sortBy, boolean sortAsc, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)
public static ScriptGroup[] makeScriptGroups(org.alfresco.query.PagingResults<String> pagedGroups, ScriptPagingDetails paging, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)
public static ScriptGroup[] makeScriptGroups(org.alfresco.query.PagingResults<String> pagedGroups, ScriptPagingDetails paging, String sortBy, boolean sortAsc, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)
pagedGroups
- The paged resultspaging
- Object representing the paging detailssortBy
- field for sortingsortAsc
- sort ascending or notserviceRegistry
- ServiceRegistryscope
- Scriptablepublic static ScriptGroup[] makeScriptGroupsInfo(org.alfresco.query.PagingResults<AuthorityInfo> pagedGroups, ScriptPagingDetails paging, String sortBy, boolean sortAsc, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)
pagedGroups
- sorted paged results (the page of results get sorted again taking I18n into account)paging
- Object representing the paging detailsserviceRegistry
- ServiceRegistryscope
- ScriptableCopyright © 2005–2017 Alfresco Software. All rights reserved.