|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.security.authority.script.ScriptGroup
public class ScriptGroup
The Script group is a GROUP authority exposed to the scripting API. It provides access to the properties of the group including the children of the group which may be groups or users.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.alfresco.repo.security.authority.script.Authority |
---|
Authority.AuthorityComparator, Authority.ScriptAuthorityType |
Constructor Summary | |
---|---|
ScriptGroup(java.lang.String fullName,
AuthorityService authorityService)
Deprecated. Use #ScriptGroup(String, ServiceRegistry) instead |
|
ScriptGroup(java.lang.String fullName,
ServiceRegistry serviceRegistry,
org.mozilla.javascript.Scriptable scope)
New script group |
Method Summary | |
---|---|
void |
addAuthority(java.lang.String fullAuthorityName)
AddAuthority as a child of this group |
ScriptGroup |
createGroup(java.lang.String newShortName,
java.lang.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,
java.lang.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,
java.lang.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,
java.lang.String sortBy)
Get child groups of this group |
ScriptUser[] |
getChildUsers()
Get child users of this group |
ScriptUser[] |
getChildUsers(ScriptPagingDetails paging,
java.lang.String sortBy)
Get child users of this group |
java.lang.String |
getDisplayName()
|
java.lang.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,
java.lang.String sortBy)
Get the immediate parents of this group |
java.lang.String |
getShortName()
Get the short name |
int |
getUserCount()
Get the number of users contained within this group. |
boolean |
isAdminGroup()
Is this an admin group? |
boolean |
isRootGroup()
Is this a root group? |
static ScriptGroup[] |
makeScriptGroups(java.util.Collection authorities,
ScriptPagingDetails paging,
ServiceRegistry serviceRegistry,
org.mozilla.javascript.Scriptable scope)
|
static ScriptGroup[] |
makeScriptGroups(java.util.Collection authorities,
ScriptPagingDetails paging,
java.lang.String sortBy,
ServiceRegistry serviceRegistry,
org.mozilla.javascript.Scriptable scope)
|
static ScriptGroup[] |
makeScriptGroups(org.alfresco.query.PagingResults pagedGroups,
ScriptPagingDetails paging,
ServiceRegistry serviceRegistry,
org.mozilla.javascript.Scriptable scope)
Returns an array of ScriptGroup objects representing the given paged results. |
void |
removeAuthority(java.lang.String fullAuthorityName)
Remove child Authority from this group |
void |
removeGroup(java.lang.String newShortName)
remove sub group from this group |
void |
removeUser(java.lang.String newShortName)
Remove child user from this group |
void |
setAuthorityType(Authority.ScriptAuthorityType authorityType)
|
void |
setDisplayName(java.lang.String displayName)
Change the display name for this group. |
void |
setFullName(java.lang.String fullName)
|
void |
setShortName(java.lang.String shortName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScriptGroup(java.lang.String fullName, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)
fullName
- serviceRegistry
- public ScriptGroup(java.lang.String fullName, AuthorityService authorityService)
#ScriptGroup(String, ServiceRegistry)
instead
fullName
- authorityService
- Method Detail |
---|
public void deleteGroup()
public void setAuthorityType(Authority.ScriptAuthorityType authorityType)
public Authority.ScriptAuthorityType getAuthorityType()
getAuthorityType
in interface Authority
public void setShortName(java.lang.String shortName)
public java.lang.String getShortName()
getShortName
in interface Authority
public void setFullName(java.lang.String fullName)
public java.lang.String getFullName()
getFullName
in interface Authority
public void setDisplayName(java.lang.String displayName)
displayName
- public java.lang.String getDisplayName()
getDisplayName
in interface Authority
public ScriptUser[] getAllUsers()
public ScriptGroup[] getAllGroups()
public ScriptUser[] getChildUsers()
public ScriptUser[] getChildUsers(ScriptPagingDetails paging, java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.lang.String sortBy)
paging
- Paging object with max number to return, and items to skipsortBy
- What to sort on (authorityName, shortName or displayName)
public boolean isRootGroup()
public boolean isAdminGroup()
public int getUserCount()
public int getGroupCount()
public ScriptGroup createGroup(java.lang.String newShortName, java.lang.String newDisplayName)
public void removeGroup(java.lang.String newShortName)
newShortName
- the shortName of the sub group to remove from this group.public void removeUser(java.lang.String newShortName)
newShortName
- the shortName of the user to remove from this group.public void addAuthority(java.lang.String fullAuthorityName)
fullAuthorityName
- the full name of the authority to add to this group.public void removeAuthority(java.lang.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(java.util.Collection authorities, ScriptPagingDetails paging, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)
public static ScriptGroup[] makeScriptGroups(java.util.Collection authorities, ScriptPagingDetails paging, java.lang.String sortBy, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)
public static ScriptGroup[] makeScriptGroups(org.alfresco.query.PagingResults pagedGroups, ScriptPagingDetails paging, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)
groups
- The paged resultspaging
- Object representing the paging detailsserviceRegistry
- scope
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |