public class JahiaGroupImpl extends JahiaGroup
Principals which can be users
or groups. A group can have subgroups holding again users or subgroups.
Each group is defined with a name, which is unique inside a site, but not
necessarily unique between two sites. Each group has also a unique
identification key, which is unique in the database. This way, a group is
uniquely identified in all the sites and Jahia servers sharing the same
database.
The group names are used only to present an intuitive signification for the
administrators of each site. As the key is the only way to assure unicity
between the sites and servers, it will be used to represent the group inside
of jahia and not the group name.| Modifier and Type | Field and Description |
|---|---|
protected String |
name
Group unique identification name
|
protected String |
path
Group global identification key, unique in all the sites and Jahia
servers sharing the same groups data source.
|
hidden, membership, mGroupKey, mGroupname, mMembers, mSiteID, preloadedGroups| Constructor and Description |
|---|
JahiaGroupImpl(String name,
String path,
String siteKey,
Properties properties) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addMember(Principal user)
Adds the specified member to the group.
|
void |
addMembers(Collection<Principal> principals)
Adds the specified members to the group.
|
boolean |
equals(Object o)
Compares this principal to the specified object.
|
String |
getGroupKey()
Return the group key.
|
String |
getGroupname()
Returns the name of this group.
|
String |
getLocalPath()
Get the path of this user in the local store.
|
protected Set<Principal> |
getMembersMap()
Returns members of this group.
|
String |
getName()
Returns the unique identifier of this principal object.
|
Properties |
getProperties()
Get grp's properties list.
|
String |
getProperty(String key)
Retrieve the requested grp property.
|
String |
getProviderName()
Get the providerName of this user.
|
String |
getSiteKey() |
int |
hashCode()
Returns a hashcode for this principal.
|
boolean |
isMember(Principal principal)
Returns true if the passed principal is a member of the group.
|
Enumeration<Principal> |
members()
Returns an Iterator of the members in the group.
|
boolean |
removeMember(Principal user)
Removes the specified member from the group.
|
boolean |
removeProperty(String key)
Remove the specified property from the properties list.
|
boolean |
setProperty(String key,
String value)
Add (or update if not already in the property list) a property key-value
pair in the grp's properties list.
|
String |
toString()
Returns a string representation of this group.
|
getMembers, getRecursiveUserMembers, getSiteID, isHidden, isPreloadedGroups, removeMembers, setHiddenprotected String name
protected String path
public JahiaGroupImpl(String name, String path, String siteKey, Properties properties)
public Properties getProperties()
JahiaGroupgetProperties in class JahiaGrouppublic String getProperty(String key)
JahiaGroupgetProperty in class JahiaGroupkey - Property's name.public boolean removeProperty(String key)
JahiaGroupremoveProperty in class JahiaGroupkey - Property's name.public boolean setProperty(String key, String value)
JahiaGroupsetProperty in class JahiaGroupkey - Property's name.value - Property's value.public void addMembers(Collection<Principal> principals)
JahiaGroupaddMembers in class JahiaGroupprincipals - The principals to add to this group.public String getGroupKey()
getGroupKey in class JahiaGrouppublic String getName()
getName in interface PrincipalgetName in class JahiaGroupprotected Set<Principal> getMembersMap()
JahiaGroupgetMembersMap in class JahiaGrouppublic String getGroupname()
getGroupname in class JahiaGrouppublic boolean addMember(Principal user)
addMember in interface GroupaddMember in class JahiaGroupuser - the principal to add to this group.public boolean removeMember(Principal user)
removeMember in interface GroupremoveMember in class JahiaGroupuser - the principal to remove from this group.public boolean isMember(Principal principal)
isMember in interface GroupisMember in class JahiaGroupprincipal - The principal whose membership is to be checked.public Enumeration<Principal> members()
Principal or Group.
Note that the Group is an instantiation of the
Principal class.members in interface Groupmembers in class JahiaGrouppublic String toString()
toString in interface PrincipaltoString in class JahiaGrouppublic String getLocalPath()
public String getProviderName()
getProviderName in interface JahiaPrincipalgetProviderName in class JahiaGrouppublic String getSiteKey()
public boolean equals(Object o)
JahiaGroupequals in interface Principalequals in class JahiaGroupo - Principal to compare with.public int hashCode()
JahiaGrouphashCode in interface PrincipalhashCode in class JahiaGroupCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.