|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.services.GroupService
public class GroupService
Bootstrap class for the IGroupService implementation.
Field Summary | |
---|---|
private static boolean |
composite
|
private ICompositeGroupService |
compositeGroupService
|
protected static java.lang.String |
GROUP_SERVICE_KEY
|
private IGroupService |
groupService
|
private static GroupService |
instance
|
private static org.apache.commons.logging.Log |
log
|
Fields inherited from interface org.jasig.portal.groups.IGroupConstants |
---|
CHANNEL_CATEGORIES, CONTAINS, ENDS_WITH, EVERYONE, IS, NODE_SEPARATOR, PORTAL_ADMINISTRATORS, STARTS_WITH |
Constructor Summary | |
---|---|
private |
GroupService()
Creates new GroupService |
Method Summary | |
---|---|
static IEntityGroup |
findGroup(java.lang.String key)
Returns a pre-existing IEntityGroup or null if the
IGroupMember does not exist. |
static ILockableEntityGroup |
findLockableGroup(java.lang.String key,
java.lang.String lockOwner)
Returns a pre-existing ILockableEntityGroup or null if the
group is not found. |
static void |
finishedSession(IPerson person)
Receives notice that the UserInstance has been unbound from the HttpSession. |
static ICompositeGroupService |
getCompositeGroupService()
Returns the ICompositeGroupService implementation in use. |
protected java.lang.String |
getDefaultServiceName()
|
static IEntityGroup |
getDistinguishedGroup(java.lang.String name)
Refers to the PropertiesManager to get the key for the group associated with 'name' and asks the group store implementation for the corresponding IEntityGroup . |
java.lang.String |
getDistinguishedGroupKey(java.lang.String name)
|
static IEntity |
getEntity(java.lang.String key,
java.lang.Class type)
Returns an IEntity representing a portal entity. |
static IEntity |
getEntity(java.lang.String key,
java.lang.Class type,
java.lang.String service)
Returns an IEntity representing a portal entity. |
static IGroupMember |
getGroupMember(EntityIdentifier underlyingEntityIdentifier)
Returns an IGroupMember representing either a group or a
portal entity, based on the EntityIdentifier , which
refers to the UNDERLYING entity for the IGroupMember . |
static IGroupMember |
getGroupMember(java.lang.String key,
java.lang.Class type)
Returns an IGroupMember representing either a group or a
portal entity. |
static IGroupService |
getGroupService()
Returns the IGroupService implementation in use. |
static IEntityGroup |
getRootGroup(java.lang.Class type)
Refers to the PropertiesManager to get the key for the root group associated with 'type' and asks the group store implementation for the corresponding IEntityGroup . |
protected GroupServiceConfiguration |
getServiceConfiguration()
|
protected IEntityGroup |
ifindGroup(java.lang.String key)
Returns a pre-existing IEntityGroup or null if the
IGroupMember does not exist. |
protected ILockableEntityGroup |
ifindLockableGroup(java.lang.String key,
java.lang.String lockOwner)
Returns a pre-existing ILockableEntityGroup or null if the
group is not found. |
protected void |
ifinishedSession(IPerson person)
Receives notice that the UserInstance has been unbound from the HttpSession. |
protected IEntityGroup |
igetDistinguishedGroup(java.lang.String name)
Refers to the PropertiesManager to get the key for the group associated with 'name' and asks the group store implementation for the corresponding IEntityGroup . |
protected IEntity |
igetEntity(java.lang.String key,
java.lang.Class type,
java.lang.String service)
Returns an IEntity representing a pre-existing portal entity. |
protected IGroupMember |
igetGroupMember(java.lang.String key,
java.lang.Class type)
Returns an IGroupMember representing either a group or a
portal entity. |
protected IEntityGroup |
igetRootGroup(java.lang.Class type)
Refers to the PropertiesManager to get the key for the root group associated with 'type' and asks the group store implementation for the corresponding IEntityGroup . |
protected IEntityGroup |
inewGroup(java.lang.Class type)
Returns a new IEntityGroup for the given Class with an unused
key. |
protected IEntityGroup |
inewGroup(java.lang.Class type,
java.lang.String serviceName)
Returns a new IEntityGroup for the given Class with an unused
key. |
private void |
initialize()
|
private void |
initializeCompositeService()
|
static GroupService |
instance()
|
static boolean |
isComposite()
Answer if the underlying group service is a composite service, implementing ICompositeGroupService. |
static IEntityGroup |
newGroup(java.lang.Class type)
Returns a new IEntityGroup for the given Class with an unused
key. |
static IEntityGroup |
newGroup(java.lang.Class type,
java.lang.String serviceName)
Returns a new IEntityGroup for the given Class with an unused
key. |
static java.lang.String |
parseLocalKey(java.lang.String compositeKey)
Extracts the final node from the String form of a composite key. |
static javax.naming.Name |
parseServiceName(java.lang.String serviceName)
Converts the String form of a service name into a Name. |
static EntityIdentifier[] |
searchForEntities(java.lang.String query,
int method,
java.lang.Class type)
|
static EntityIdentifier[] |
searchForEntities(java.lang.String query,
int method,
java.lang.Class type,
IEntityGroup ancestor)
|
static EntityIdentifier[] |
searchForGroups(java.lang.String query,
int method,
java.lang.Class leaftype)
|
static EntityIdentifier[] |
searchForGroups(java.lang.String query,
int method,
java.lang.Class leaftype,
IEntityGroup ancestor)
|
static void |
startUp()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.commons.logging.Log log
private static GroupService instance
private static boolean composite
private IGroupService groupService
private ICompositeGroupService compositeGroupService
protected static final java.lang.String GROUP_SERVICE_KEY
Constructor Detail |
---|
private GroupService() throws GroupsException
GroupsException
Method Detail |
---|
public static IEntityGroup findGroup(java.lang.String key) throws GroupsException
IEntityGroup
or null if the
IGroupMember
does not exist.
key
- String - the group key.
GroupsException
public static ILockableEntityGroup findLockableGroup(java.lang.String key, java.lang.String lockOwner) throws GroupsException
ILockableEntityGroup
or null if the
group is not found.
key
- String - the group key.lockOwner
- String - the owner of the lock, typically the user.
GroupsException
public static void finishedSession(IPerson person)
person
- org.jasig.portal.security.IPersonpublic static ICompositeGroupService getCompositeGroupService() throws GroupsException
ICompositeGroupService
implementation in use.
GroupsException
protected java.lang.String getDefaultServiceName() throws GroupsException
GroupsException
public static IEntityGroup getDistinguishedGroup(java.lang.String name) throws GroupsException
IEntityGroup
.
GroupsException
public java.lang.String getDistinguishedGroupKey(java.lang.String name)
public static IEntity getEntity(java.lang.String key, java.lang.Class type) throws GroupsException
IEntity
representing a portal entity. This does
not guarantee that the entity actually exists.
key
- String - the group key.type
- Class - the Class of the underlying IGroupMember.
GroupsException
public static IEntity getEntity(java.lang.String key, java.lang.Class type, java.lang.String service) throws GroupsException
IEntity
representing a portal entity. This does
not guarantee that the entity actually exists.
key
- String - the group key.type
- Class - the Class of the underlying IGroupMember.service
- String - the name of the component service.
GroupsException
public static IGroupMember getGroupMember(java.lang.String key, java.lang.Class type) throws GroupsException
IGroupMember
representing either a group or a
portal entity. If the parm type
is the group type, the
IGroupMember
is an IEntityGroup
else it is
an IEntity
.
GroupsException
public static IGroupMember getGroupMember(EntityIdentifier underlyingEntityIdentifier) throws GroupsException
IGroupMember
representing either a group or a
portal entity, based on the EntityIdentifier
, which
refers to the UNDERLYING entity for the IGroupMember
.
GroupsException
public static IGroupService getGroupService() throws GroupsException
IGroupService
implementation in use.
GroupsException
public static IEntityGroup getRootGroup(java.lang.Class type) throws GroupsException
IEntityGroup
.
GroupsException
protected GroupServiceConfiguration getServiceConfiguration() throws GroupsException
GroupsException
protected IEntityGroup ifindGroup(java.lang.String key) throws GroupsException
IEntityGroup
or null if the
IGroupMember
does not exist.
key
- String - the group key.
GroupsException
protected ILockableEntityGroup ifindLockableGroup(java.lang.String key, java.lang.String lockOwner) throws GroupsException
ILockableEntityGroup
or null if the
group is not found.
key
- String - the group key.lockOwner
- String - typically the user.
GroupsException
protected void ifinishedSession(IPerson person) throws GroupsException
person
- org.jasig.portal.security.IPerson
GroupsException
protected IEntityGroup igetDistinguishedGroup(java.lang.String name) throws GroupsException
IEntityGroup
.
GroupsException
protected IEntity igetEntity(java.lang.String key, java.lang.Class type, java.lang.String service) throws GroupsException
IEntity
representing a pre-existing portal entity.
key
- String - the group key.type
- Class - the Class of the underlying IGroupMember.
GroupsException
protected IGroupMember igetGroupMember(java.lang.String key, java.lang.Class type) throws GroupsException
IGroupMember
representing either a group or a
portal entity. If the parm type
is the group type,
the IGroupMember
is an IEntityGroup
else it is
an IEntity
.
GroupsException
protected IEntityGroup igetRootGroup(java.lang.Class type) throws GroupsException
IEntityGroup
.
GroupsException
protected IEntityGroup inewGroup(java.lang.Class type) throws GroupsException
IEntityGroup
for the given Class with an unused
key.
GroupsException
protected IEntityGroup inewGroup(java.lang.Class type, java.lang.String serviceName) throws GroupsException
IEntityGroup
for the given Class with an unused
key.
GroupsException
private void initialize() throws GroupsException
GroupsException
private void initializeCompositeService() throws GroupsException
GroupsException
public static GroupService instance() throws GroupsException
GroupsException
public static boolean isComposite()
public static IEntityGroup newGroup(java.lang.Class type) throws GroupsException
IEntityGroup
for the given Class with an unused
key.
GroupsException
public static IEntityGroup newGroup(java.lang.Class type, java.lang.String serviceName) throws GroupsException
IEntityGroup
for the given Class with an unused
key.
GroupsException
public static java.lang.String parseLocalKey(java.lang.String compositeKey) throws javax.naming.InvalidNameException, GroupsException
javax.naming.InvalidNameException
GroupsException
public static javax.naming.Name parseServiceName(java.lang.String serviceName) throws javax.naming.InvalidNameException, GroupsException
javax.naming.InvalidNameException
GroupsException
public static EntityIdentifier[] searchForEntities(java.lang.String query, int method, java.lang.Class type) throws GroupsException
GroupsException
public static EntityIdentifier[] searchForEntities(java.lang.String query, int method, java.lang.Class type, IEntityGroup ancestor) throws GroupsException
GroupsException
public static EntityIdentifier[] searchForGroups(java.lang.String query, int method, java.lang.Class leaftype) throws GroupsException
GroupsException
public static EntityIdentifier[] searchForGroups(java.lang.String query, int method, java.lang.Class leaftype, IEntityGroup ancestor) throws GroupsException
GroupsException
public static void startUp() throws GroupsException
GroupsException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |