public interface CalendarsI extends Serializable
To allow us to enforce access checks we wrap the object inside a wrapper class which blocks access to the getChildren method. To retrieve the children of a calendar object call the getCalendars(BwCalendar) method. The resulting collection is a set of access checked, wrapped objects. Only accessible children will be returned.
| Modifier and Type | Interface and Description |
|---|---|
static class |
CalendarsI.CheckSubscriptionResult |
static class |
CalendarsI.SynchStatusResponse |
| Modifier and Type | Method and Description |
|---|---|
BwCalendar |
add(BwCalendar val,
String parentPath)
Add a calendar object
|
CalendarsI.CheckSubscriptionResult |
checkSubscription(String path)
Check the subscription if this is an external subscription.
|
Collection<BwCalendar> |
decomposeVirtualPath(String vpath)
A virtual path might be for example "/user/adgrp_Eng/Lectures/Lectures"
which has two two components
"/user/adgrp_Eng/Lectures" and
"Lectures"
|
boolean |
delete(BwCalendar val,
boolean emptyIt,
boolean sendSchedulingMessage)
Delete a calendar.
|
BwCalendar |
get(String path)
Get a calendar given the path.
|
Set<BwCalendar> |
getAddContentCollections(boolean includeAliases)
Return a list of calendars in which calendar objects can be
placed by the current user.
|
AliasesInfo |
getAliasesInfo(String collectionHref,
String entityName)
Called to get information about aliases to a collection
containing the named entity.
|
Set<BwCategory> |
getCategorySet(String href) |
Collection<BwCalendar> |
getChildren(BwCalendar cal)
Returns children of the given calendar to which the current user has
some access.
|
Collection<BwCalendar> |
getChildrenIdx(BwCalendar col)
Returns children of the given collection to which the current user has
some access.
|
BwCalendar |
getHome()
Returns root of calendars owned by the current user.
|
BwCalendar |
getHome(BwPrincipal principal,
boolean freeBusy)
Returns root of calendars owned by the given principal.
|
BwCalendar |
getHomeDb(BwPrincipal principal,
boolean freeBusy)
Returns root of calendars owned by the given principal.
|
String |
getHomePath()
Returns root path of calendars owned by the current user.
|
BwCalendar |
getIdx(String path)
Get a calendar given the path.
|
String |
getPreferred(String entityType)
Get the default calendar for the current user for the given entity type.
|
BwCalendar |
getPublicCalendars()
Returns the root of the tree of public calendars.
|
String |
getPublicCalendarsRootPath()
Returns the href of the root of the public calendars tree.
|
BwCalendar |
getSpecial(BwPrincipal owner,
int calType,
boolean create,
int access) |
BwCalendar |
getSpecial(int calType,
boolean create)
Get a special calendar (e.g.
|
BwCalendar |
getSpecial(String principal,
int calType,
boolean create)
Get a special calendar (e.g.
|
CalendarsI.SynchStatusResponse |
getSynchStatus(String path) |
String |
getSyncToken(String path)
Return the value to be used as the sync-token property for the given path.
|
boolean |
isEmpty(BwCalendar val)
Check to see if a collection is empty.
|
boolean |
isUserRoot(BwCalendar cal)
Return true if cal != null and it represents a (local) user root
|
void |
move(BwCalendar val,
BwCalendar newParent)
Move a calendar object from one parent to another
|
void |
rename(BwCalendar val,
String newName)
Change the name (path segment) of a calendar object.
|
BwCalendar |
resolveAlias(BwCalendar val,
boolean resolveSubAlias,
boolean freeBusy)
Attempt to get calendar referenced by the alias.
|
BwCalendar |
resolveAliasIdx(BwCalendar val,
boolean resolveSubAlias,
boolean freeBusy)
Attempt to get calendar referenced by the alias.
|
void |
setPreferred(BwCalendar val)
set the default calendar for the current user.
|
void |
update(BwCalendar val)
Update a calendar object
|
String getPublicCalendarsRootPath() throws CalFacadeException
CalFacadeExceptionBwCalendar getPublicCalendars() throws CalFacadeException
CalFacadeExceptionString getHomePath() throws CalFacadeException
CalFacadeExceptionBwCalendar getHome() throws CalFacadeException
For authenticated, personal access this always returns the user entry in the /user calendar tree, e.g. for user smithj it would return an entry /user/smithj
CalFacadeExceptionBwCalendar getHome(BwPrincipal principal, boolean freeBusy) throws CalFacadeException
For authenticated, personal access this always returns the user entry in the /user calendar tree, e.g. for user smithj it would return an entry smithj with path /user/smithj Note: the returned object is NOT a live hibernate object.
principal - whose home we wantfreeBusy - true if this is for freebusy accessCalFacadeExceptionBwCalendar getHomeDb(BwPrincipal principal, boolean freeBusy) throws CalFacadeException
For authenticated, personal access this always returns the user entry in the /user calendar tree, e.g. for user smithj it would return an entry smithj with path /user/smithj Note: the returned object is a live hibernate object.
principal - whose home we wantfreeBusy - true if this is for freebusy accessCalFacadeExceptionCollection<BwCalendar> decomposeVirtualPath(String vpath) throws CalFacadeException
"/user/adgrp_Eng/Lectures" is a real path which is an alias to "/public/aliases/Lectures" which is a folder containing the alias "/public/aliases/Lectures/Lectures" which is aliased to the single calendar.
vpath - CalFacadeExceptionCollection<BwCalendar> getChildren(BwCalendar cal) throws CalFacadeException
cal - parent calendarCalFacadeExceptionCollection<BwCalendar> getChildrenIdx(BwCalendar col) throws CalFacadeException
The returned objects are from the indexer and are not live hibernate objects
col - parent collectionCalFacadeExceptionSet<BwCalendar> getAddContentCollections(boolean includeAliases) throws CalFacadeException
Caldav currently does not allow collections inside collections so that calendar collections are the leaf nodes only.
includeAliases - - true to include aliases - for public admin we don't
want aliasesCalFacadeExceptionboolean isEmpty(BwCalendar val) throws CalFacadeException
val - BwCalendar object to checkCalFacadeExceptionBwCalendar get(String path) throws CalFacadeException
path - String path of calendarCalFacadeExceptionBwCalendar getIdx(String path) throws CalFacadeException
path - String path of calendarCalFacadeExceptionBwCalendar getSpecial(int calType, boolean create) throws CalFacadeException
calType - int special calendar type.create - true if we should create it if non-existent.CalFacadeExceptionBwCalendar getSpecial(String principal, int calType, boolean create) throws CalFacadeException
principal - the principal href.calType - int special calendar type.create - true if we should create it if non-existent.CalFacadeExceptionvoid setPreferred(BwCalendar val) throws CalFacadeException
val - BwCalendarCalFacadeExceptionString getPreferred(String entityType) throws CalFacadeException
entityType - CalFacadeExceptionBwCalendar add(BwCalendar val, String parentPath) throws CalFacadeException
The new calendar object will be added to the db. If the indicated parent is null it will be added as a root level calendar.
Certain restrictions apply, mostly because of interoperability issues. A calendar cannot be added to another calendar which already contains entities, e.g. events etc.
Names cannot contain certain characters - (complete this)
Name must be unique at this level, i.e. all paths must be unique
val - BwCalendar new objectparentPath - String path to parent.CalFacadeException - on fatal errorvoid rename(BwCalendar val, String newName) throws CalFacadeException
val - BwCalendar objectnewName - String nameCalFacadeException - on fatal errorvoid move(BwCalendar val, BwCalendar newParent) throws CalFacadeException
val - BwCalendar objectnewParent - BwCalendar potential parentCalFacadeException - on fatal errorvoid update(BwCalendar val) throws CalFacadeException
val - BwCalendar objectCalFacadeException - on fatal errorboolean delete(BwCalendar val, boolean emptyIt, boolean sendSchedulingMessage) throws CalFacadeException
val - BwCalendar calendaremptyIt - true to delete contentssendSchedulingMessage - true if we should send cancelsCalFacadeException - for in use or marked as default calendarboolean isUserRoot(BwCalendar cal) throws CalFacadeException
cal - CalFacadeExceptionBwCalendar resolveAlias(BwCalendar val, boolean resolveSubAlias, boolean freeBusy) throws CalFacadeException
val - the aliasresolveSubAlias - - if true and the alias points to an alias, resolve
down to a non-alias.freeBusy - to determine trequired accessCalFacadeExceptionBwCalendar resolveAliasIdx(BwCalendar val, boolean resolveSubAlias, boolean freeBusy) throws CalFacadeException
This uses the index only. The returned object will not be a live hibernate object
val - the aliasresolveSubAlias - - if true and the alias points to an alias, resolve
down to a non-alias.freeBusy - to determine trequired accessCalFacadeExceptionAliasesInfo getAliasesInfo(String collectionHref, String entityName) throws CalFacadeException
collectionHref - the collectionentityName - the entityCalFacadeExceptionCalendarsI.SynchStatusResponse getSynchStatus(String path) throws CalFacadeException
path - to collectionCalFacadeExceptionCalendarsI.CheckSubscriptionResult checkSubscription(String path) throws CalFacadeException
path - to collectionCalFacadeExceptionString getSyncToken(String path) throws CalFacadeException
path - to collectionCalFacadeExceptionSet<BwCategory> getCategorySet(String href) throws CalFacadeException
CalFacadeExceptionBwCalendar getSpecial(BwPrincipal owner, int calType, boolean create, int access) throws CalFacadeException
CalFacadeExceptionCopyright © 2019 Bedework. All rights reserved.