Package org.bedework.calfacade.ifs
Class Directories.CallBack
java.lang.Object
org.bedework.calfacade.ifs.Directories.CallBack
- All Implemented Interfaces:
Serializable
- Enclosing interface:
- Directories
Class to be implemented by caller and passed during init.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddMember(BwGroup<?> group, BwPrincipal<?> val, boolean admin) Add a member to a groupabstract BwGroup<?>Find a group given its account nameabstract Collection<BwGroup<?>>findGroupParents(BwGroup<?> group, boolean admin) abstract Collection<BwGroup<?>>getAll(boolean admin) Return all groups to which this user has some access.abstract BwPrincipal<?>abstract Collection<BwGroup<?>>getGroups(BwPrincipal<?> val, boolean admin) Return all groups of which the given principal is a member.abstract Collection<BwPrincipal<?>>getMembers(BwGroup<?> group, boolean admin) Get the direct members of the given group.abstract StringgetSysid()Get a name uniquely.identifying this system.abstract voidremoveGroup(BwGroup<?> group, boolean admin) Delete a groupabstract voidremoveMember(BwGroup<?> group, BwPrincipal<?> val, boolean admin) Remove a member from a groupabstract voidupdateGroup(BwGroup<?> group, boolean admin)
-
Constructor Details
-
CallBack
public CallBack()
-
-
Method Details
-
getSysid
Get a name uniquely.identifying this system. This should take the form
name@host
where- name identifies the particular calendar system at the site
- host part identifies the domain of the site. ..
- Returns:
- String globally unique system identifier.
-
getCurrentUser
- Returns:
- BwUser representing current user
-
findGroup
Find a group given its account name- Parameters:
account- String group nameadmin- true for an admin group- Returns:
- BwGroup group object
- Throws:
RuntimeException- If there's a problem
-
findGroupParents
- Parameters:
group- BwGroup group objectadmin- true for an admin group- Returns:
- Collection
-
updateGroup
- Parameters:
group- BwGroup group object to updateadmin- true for an admin group
-
removeGroup
Delete a group- Parameters:
group- BwGroup group object to deleteadmin- true for an admin group- Throws:
CalFacadeException- If there's a problem
-
addMember
public abstract void addMember(BwGroup<?> group, BwPrincipal<?> val, boolean admin) throws CalFacadeException Add a member to a group- Parameters:
group- a group principalval- BwPrincipal new memberadmin- true for an admin group- Throws:
CalFacadeException- For invalid usertype values.
-
removeMember
public abstract void removeMember(BwGroup<?> group, BwPrincipal<?> val, boolean admin) throws CalFacadeException Remove a member from a group- Parameters:
group- a group principalval- BwPrincipal memberadmin- true for an admin group- Throws:
CalFacadeException- For invalid usertype values.
-
getMembers
public abstract Collection<BwPrincipal<?>> getMembers(BwGroup<?> group, boolean admin) throws CalFacadeException Get the direct members of the given group.- Parameters:
group- BwGroup group object to addadmin- true for an admin group- Returns:
- list of members
- Throws:
CalFacadeException
-
getAll
Return all groups to which this user has some access. Never returns null.- Parameters:
admin- true for an admin group- Returns:
- Collection of BwGroup
- Throws:
CalFacadeException
-
getGroups
public abstract Collection<BwGroup<?>> getGroups(BwPrincipal<?> val, boolean admin) throws CalFacadeException Return all groups of which the given principal is a member. Never returns null.Does not check the returned groups for membership of other groups.
- Parameters:
val- a principaladmin- true for an admin group- Returns:
- Collection of BwGroup
- Throws:
CalFacadeException
-