Class Directories.CallBack

java.lang.Object
org.bedework.calfacade.ifs.Directories.CallBack
All Implemented Interfaces:
Serializable
Enclosing interface:
Directories

public abstract static class Directories.CallBack extends Object implements Serializable
Class to be implemented by caller and passed during init.
See Also:
  • Constructor Details

    • CallBack

      public CallBack()
  • Method Details

    • getSysid

      public abstract String 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

      public abstract BwPrincipal<?> getCurrentUser()
      Returns:
      BwUser representing current user
    • findGroup

      public abstract BwGroup<?> findGroup(String account, boolean admin)
      Find a group given its account name
      Parameters:
      account - String group name
      admin - true for an admin group
      Returns:
      BwGroup group object
      Throws:
      RuntimeException - If there's a problem
    • findGroupParents

      public abstract Collection<BwGroup<?>> findGroupParents(BwGroup<?> group, boolean admin)
      Parameters:
      group - BwGroup group object
      admin - true for an admin group
      Returns:
      Collection
    • updateGroup

      public abstract void updateGroup(BwGroup<?> group, boolean admin)
      Parameters:
      group - BwGroup group object to update
      admin - true for an admin group
    • removeGroup

      public abstract void removeGroup(BwGroup<?> group, boolean admin) throws CalFacadeException
      Delete a group
      Parameters:
      group - BwGroup group object to delete
      admin - 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 principal
      val - BwPrincipal new member
      admin - 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 principal
      val - BwPrincipal member
      admin - 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 add
      admin - true for an admin group
      Returns:
      list of members
      Throws:
      CalFacadeException
    • getAll

      public abstract Collection<BwGroup<?>> getAll(boolean admin) throws CalFacadeException
      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 principal
      admin - true for an admin group
      Returns:
      Collection of BwGroup
      Throws:
      CalFacadeException