Package org.bedework.calfacade.svc
Class PrincipalInfo
java.lang.Object
org.bedework.calfacade.svc.PrincipalInfo
- All Implemented Interfaces:
Serializable,org.bedework.access.Access.AccessCb
public abstract class PrincipalInfo
extends Object
implements org.bedework.access.Access.AccessCb, Serializable
Provide information about the current principal and given principals.
- Author:
- Mike Douglass douglm rpi.edu
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BwPrincipalprotected Stringprotected org.bedework.access.PrivilegeSetprotected BwPrincipalprotected booleanprotected boolean -
Constructor Summary
ConstructorsConstructorDescriptionPrincipalInfo(BwPrincipal principal, BwPrincipal authPrincipal, org.bedework.access.PrivilegeSet maxAllowedPrivs, boolean subscriptionsOnly) -
Method Summary
Modifier and TypeMethodDescriptiongetCalendarHomePath(org.bedework.access.AccessPrincipal pr) org.bedework.access.PrivilegeSetabstract org.bedework.access.AccessPrincipalgetPrincipal(String href) booleanbooleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bedework.access.Access.AccessCb
makeHref
-
Field Details
-
superUser
protected boolean superUser -
subscriptionsOnly
protected boolean subscriptionsOnly -
principal
-
calendarHomePath
-
authPrincipal
-
maxAllowedPrivs
protected org.bedework.access.PrivilegeSet maxAllowedPrivs
-
-
Constructor Details
-
PrincipalInfo
public PrincipalInfo(BwPrincipal principal, BwPrincipal authPrincipal, org.bedework.access.PrivilegeSet maxAllowedPrivs, boolean subscriptionsOnly) - Parameters:
principal- the principalauthPrincipal- the authenticated principalmaxAllowedPrivs- - used to filter access - e.g. force read only in public clientsubscriptionsOnly- - true if this user is limited to internal subscriptions
-
-
Method Details
-
getMaximumAllowedPrivs
public org.bedework.access.PrivilegeSet getMaximumAllowedPrivs()- Returns:
- max privs or null for no max
-
getPrincipal
public abstract org.bedework.access.AccessPrincipal getPrincipal(String href) throws CalFacadeException - Parameters:
href- principal href- Returns:
- AccessPrincipal or null for not valid
- Throws:
CalFacadeException
-
getCalendarHomePath
- Returns:
- the path for calendar home for the current principal, e.g. /user/douglm
-
getCalendarHomePath
- Parameters:
pr- the principal- Returns:
- the path for calendar home for the given principal, e.g. /user/douglm
-
getSuperUser
public boolean getSuperUser()- Returns:
- boolean
-
getSubscriptionsOnly
public boolean getSubscriptionsOnly() -
getPrincipal
- Returns:
- current principal
-
getAuthPrincipal
- Returns:
- principal we authenticated as
-