Package org.bedework.calfacade.wrappers
Class CalendarWrapper
java.lang.Object
org.bedework.calfacade.base.DumpEntity<T>
org.bedework.calfacade.base.BwUnversionedDbentity<T>
org.bedework.calfacade.base.BwDbentity<T>
org.bedework.calfacade.base.BwOwnedDbentity<T>
org.bedework.calfacade.base.BwShareableDbentity<T>
org.bedework.calfacade.base.BwShareableContainedDbentity<BwCalendar>
org.bedework.calfacade.BwCalendar
org.bedework.calfacade.wrappers.CalendarWrapper
- All Implemented Interfaces:
Serializable,Comparable<BwCalendar>,CategorisedEntity,CollatableEntity,OwnedEntity,PropertiesEntity,ShareableEntity,EntityWrapper<BwCalendar>,org.bedework.util.logging.Logged
An object to wrap a calendar entity in Bedework. This allows us to limit
access to methods and attach thread or session information to the entity.
We should block access to methods if the caller does not have appropriate access.
XXX This should be generated by annotations
- Version:
- 1.0
- Author:
- Mike Douglass douglm @ rpi.edu
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bedework.calfacade.base.DumpEntity
DumpEntity.DumpType -
Field Summary
Fields inherited from class org.bedework.calfacade.BwCalendar
calTypeAlias, calTypeAttachments, calTypeBusy, calTypeCalendarCollection, calTypeDeleted, calTypeEventList, calTypeExtSub, calTypeFolder, calTypeInbox, calTypeNotifications, calTypeOutbox, calTypePendingInbox, calTypePoll, calTypeResourceCollection, calTypeTasks, calTypeTrash, calTypeUnknown, entityTypes, internalAliasUriPrefix, minRefreshRateSeconds, tombstonedFilter, tombstonedSuffix -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclone()Make visibleUsed to provide a new wrapper for an entityintvoidDump the entire entity into the given file.Avoid get and set so we don't expose the underlying object to request streams.Get the accessbooleanbooleangetAlias()true if this is some sort of aliasreturn the end of the chain of aliases or this object if not an alias.Get the aliased entityGet the aliased entityGet the alias uribooleantrue if this is to 'hold' calendar objectsintGet the typeGet the categoriesGet the categoriesGet the object's collection pathorg.bedework.access.CurrentAccessorg.bedework.access.CurrentAccessgetCurrentAccess(int desiredAccess) Get the descriptionbooleanbooleanGenerate an encoded url referring to this calendar.booleantrue if this is an alias to an external calendar.getHref()intgetId()booleantrue if this is an alias to an internal calendar.Return path if this is an alias to an internal calendar.intGet the mail list idgetName()Get the namebooleangetOpen()getPath()Get the pathbooleanintGet the refresh rate in secondsintgetSeq()Get the entity seqGet the summarybooleanIs this collection shared?booleaninthashCode()voidputEntity(BwCalendar val) voidSet the accessvoidsetAffectsFreeBusy(boolean val) voidsetAliasOrigin(BwCalendar val) Set the collection that was the root of the chain that referred to this collection, e.g.voidsetAliasTarget(BwCalendar val) Set the aliased entity - this is usualy the end of the chain of aliases, e.g.voidsetAliasUri(String val) Set the alias urivoidsetCalType(int val) Set the typevoidsetCategories(Set<BwCategory> val) Set the categories SetvoidsetCategoryHrefs(Set<String> val) Set list of referenced categoriesvoidsetChildren(Collection<BwCalendar> val) voidsetColPath(String val) Set the object's collection pathvoidsetCreatorHref(String val) Set the creatorvoidsetCurrentAccess(org.bedework.access.CurrentAccess val) voidsetCurrentAccess(org.bedework.access.CurrentAccess ca, int desiredAccess) voidsetDescription(String val) Set the descriptionvoidsetDisabled(boolean val) voidsetDisplay(boolean val) voidsetFilterExpr(String val) voidSet the hrefvoidsetId(int val) voidsetLastEtag(String val) voidvoidsetLastRefresh(String val) voidsetMailListId(String val) Set the mail list idvoidSet the namevoidsetOpen(boolean val) voidsetOwnerHref(String val) Set the ownervoidSet the pathvoidsetProperties(Set<BwProperty> val) voidsetPublick(Boolean val) voidsetPwNeedsEncrypt(boolean val) voidsetRefreshRate(int val) Set the refresh rate in secondsvoidsetRemoteId(String val) voidsetRemotePw(String val) voidsetSeq(int val) Set the seq for this entityvoidsetSummary(String val) Set the summaryvoidsetUnremoveable(boolean val) voidsetVirtualPath(String val) voidMake this thing a tombstoned collection.toString()voidupdateLastmod(Timestamp val) Update last mod fieldsMethods inherited from class org.bedework.calfacade.BwCalendar
addCategory, addProperty, checkName, cloneCategories, cloneProperties, copyCategories, copyProperties, findProperty, getAliasCalType, getAllCollectionInfo, getCanAlias, getCollateValue, getCollectionInfo, getColor, getCreated, getEtag, getEventList, getIgnoreTransparency, getIsTopicalArea, getLastRefreshStatus, getLocationKey, getMicrosecsVersion, getNumCategories, getNumProperties, getOrgSyncPublicOnly, getPrimaryCollection, getProperties, getProperty, getQproperty, getRestoreCallback, getShared, getSharedWritable, getSpecial, getSubscriptionId, getSubscriptionTargetType, getSupportedComponents, getSynchAdminCreateEprops, getSynchDeleteSuppressed, getSynchXcategories, getSynchXlocXcontacts, getTimezone, getVpollSupportedComponents, hasCategory, makeTombstoneCopy, removeCategory, removeProperties, removeProperty, removeQproperty, setAliasCalType, setColor, setCreated, setEventList, setIgnoreTransparency, setIsTopicalArea, setLastRefreshStatus, setLocationKey, setOrgSyncPublicOnly, setPrimaryCollection, setProperty, setQproperty, setShared, setSharedWritable, setSubscriptionId, setSubscriptionTargetType, setSupportedComponents, setSynchAdminCreateEprops, setSynchDeleteSuppressed, setSynchXcategories, setSynchXlocXcontacts, setTimezoneMethods inherited from class org.bedework.calfacade.base.BwShareableContainedDbentity
copyTo, setColPath, shallowCopyTo, toStringSegmentMethods inherited from class org.bedework.calfacade.base.BwShareableDbentity
copyTo, getCreatorEnt, setCreatorEnt, shallowCopyToMethods inherited from class org.bedework.calfacade.base.BwOwnedDbentity
copyTo, shallowCopyToMethods inherited from class org.bedework.calfacade.base.BwDbentity
addDeletedEntity, afterDeletion, beforeDeletion, beforeSave, beforeUpdate, getByteSize, getDeletedEntities, length, setByteSizeMethods inherited from class org.bedework.calfacade.base.BwUnversionedDbentity
equals, markUnsaved, unsavedMethods inherited from class org.bedework.calfacade.base.DumpEntity
dump, getLogger, hasDumpValueMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, trace, warn
-
Constructor Details
-
CalendarWrapper
Constructor- Parameters:
entity- to be wrappedaccessUtil- for access checks
-
-
Method Details
-
putEntity
- Specified by:
putEntityin interfaceEntityWrapper<BwCalendar>
-
fetchEntity
Description copied from interface:EntityWrapperAvoid get and set so we don't expose the underlying object to request streams.- Specified by:
fetchEntityin interfaceEntityWrapper<BwCalendar>- Returns:
- T
-
setId
public void setId(int val) - Overrides:
setIdin classBwUnversionedDbentity<BwCalendar>
-
getId
public int getId()- Overrides:
getIdin classBwUnversionedDbentity<BwCalendar>- Returns:
- int id
-
setSeq
public void setSeq(int val) Description copied from class:BwDbentitySet the seq for this entity- Overrides:
setSeqin classBwDbentity<BwCalendar>- Parameters:
val- int seq
-
getSeq
public int getSeq()Description copied from class:BwDbentityGet the entity seq- Overrides:
getSeqin classBwDbentity<BwCalendar>- Returns:
- int the entity seq
-
setOwnerHref
Set the owner- Specified by:
setOwnerHrefin interfaceOwnedEntity- Overrides:
setOwnerHrefin classBwOwnedDbentity<BwCalendar>- Parameters:
val- String owner of the entity
-
getOwnerHref
- Specified by:
getOwnerHrefin interfaceOwnedEntity- Overrides:
getOwnerHrefin classBwOwnedDbentity<BwCalendar>- Returns:
- String owner of the entity
-
setPublick
- Specified by:
setPublickin interfaceOwnedEntity- Overrides:
setPublickin classBwOwnedDbentity<BwCalendar>- Parameters:
val- public flag
-
getPublick
- Specified by:
getPublickin interfaceOwnedEntity- Overrides:
getPublickin classBwOwnedDbentity<BwCalendar>- Returns:
- boolean true for public
-
setCreatorHref
Description copied from interface:ShareableEntitySet the creator- Specified by:
setCreatorHrefin interfaceShareableEntity- Overrides:
setCreatorHrefin classBwShareableDbentity<BwCalendar>- Parameters:
val- String creator of the entity
-
getCreatorHref
- Specified by:
getCreatorHrefin interfaceShareableEntity- Overrides:
getCreatorHrefin classBwShareableDbentity<BwCalendar>- Returns:
- BwUser creator of the entity
-
setAccess
Description copied from interface:ShareableEntitySet the access- Specified by:
setAccessin interfaceShareableEntity- Overrides:
setAccessin classBwShareableDbentity<BwCalendar>- Parameters:
val- String access
-
getAccess
Description copied from interface:ShareableEntityGet the access- Specified by:
getAccessin interfaceShareableEntity- Overrides:
getAccessin classBwShareableDbentity<BwCalendar>- Returns:
- String access
-
setColPath
Set the object's collection path- Overrides:
setColPathin classBwShareableContainedDbentity<BwCalendar>- Parameters:
val- String path
-
getColPath
Get the object's collection path- Overrides:
getColPathin classBwShareableContainedDbentity<BwCalendar>- Returns:
- String path
-
setName
Description copied from class:BwCalendarSet the name- Overrides:
setNamein classBwCalendar- Parameters:
val- String name
-
getName
Description copied from class:BwCalendarGet the name- Overrides:
getNamein classBwCalendar- Returns:
- String name
-
setPath
Description copied from class:BwCalendarSet the path- Overrides:
setPathin classBwCalendar- Parameters:
val- String path
-
getPath
Description copied from class:BwCalendarGet the path- Overrides:
getPathin classBwCalendar- Returns:
- String path
-
setSummary
Description copied from class:BwCalendarSet the summary- Overrides:
setSummaryin classBwCalendar- Parameters:
val- String summary
-
getSummary
Description copied from class:BwCalendarGet the summary- Overrides:
getSummaryin classBwCalendar- Returns:
- String summary
-
setDescription
Description copied from class:BwCalendarSet the description- Overrides:
setDescriptionin classBwCalendar- Parameters:
val- description
-
getDescription
Description copied from class:BwCalendarGet the description- Overrides:
getDescriptionin classBwCalendar- Returns:
- String description
-
setMailListId
Description copied from class:BwCalendarSet the mail list id- Overrides:
setMailListIdin classBwCalendar- Parameters:
val- String mail list id
-
getMailListId
Description copied from class:BwCalendarGet the mail list id- Overrides:
getMailListIdin classBwCalendar- Returns:
- String mail list id
-
setCalType
public void setCalType(int val) Description copied from class:BwCalendarSet the type- Overrides:
setCalTypein classBwCalendar- Parameters:
val- type
-
getCalType
public int getCalType()Description copied from class:BwCalendarGet the type- Overrides:
getCalTypein classBwCalendar- Returns:
- int type
-
setLastmod
- Overrides:
setLastmodin classBwCalendar- Parameters:
val- lastmod info
-
getLastmod
- Overrides:
getLastmodin classBwCalendar- Returns:
- BwLastMod lastmod
-
setAliasUri
Description copied from class:BwCalendarSet the alias uri- Overrides:
setAliasUriin classBwCalendar- Parameters:
val- String uri
-
getAliasUri
Description copied from class:BwCalendarGet the alias uri- Overrides:
getAliasUriin classBwCalendar- Returns:
- String uri
-
setPwNeedsEncrypt
public void setPwNeedsEncrypt(boolean val) - Overrides:
setPwNeedsEncryptin classBwCalendar- Parameters:
val- boolean true if the password needs encrypting
-
getPwNeedsEncrypt
public boolean getPwNeedsEncrypt()- Overrides:
getPwNeedsEncryptin classBwCalendar- Returns:
- boolean true if the password needs encrypting
-
setFilterExpr
- Overrides:
setFilterExprin classBwCalendar- Parameters:
val- - the filter expression
-
getFilterExpr
- Overrides:
getFilterExprin classBwCalendar- Returns:
- String FilterExpr
-
setRefreshRate
public void setRefreshRate(int val) Description copied from class:BwCalendarSet the refresh rate in seconds- Overrides:
setRefreshRatein classBwCalendar- Parameters:
val- type
-
getRefreshRate
public int getRefreshRate()Description copied from class:BwCalendarGet the refresh rate in seconds- Overrides:
getRefreshRatein classBwCalendar- Returns:
- String description
-
setLastRefresh
- Overrides:
setLastRefreshin classBwCalendar- Parameters:
val- - the value
-
getLastRefresh
- Overrides:
getLastRefreshin classBwCalendar- Returns:
- String lastRefresh
-
setLastEtag
- Overrides:
setLastEtagin classBwCalendar- Parameters:
val- - the value
-
getLastEtag
- Overrides:
getLastEtagin classBwCalendar- Returns:
- String lastRefresh
-
setRemoteId
- Overrides:
setRemoteIdin classBwCalendar- Parameters:
val- If non-null we have a remote id and encrypted password
-
getRemoteId
- Overrides:
getRemoteIdin classBwCalendar- Returns:
- String remoteId
-
setRemotePw
- Overrides:
setRemotePwin classBwCalendar- Parameters:
val- If non-null the encrypted password
-
getRemotePw
- Overrides:
getRemotePwin classBwCalendar- Returns:
- String encrypted password
-
setDisplay
public void setDisplay(boolean val) - Overrides:
setDisplayin classBwCalendar- Parameters:
val- boolean true if the calendar is to be displayed
-
getDisplay
public boolean getDisplay()- Overrides:
getDisplayin classBwCalendar- Returns:
- boolean true if the calendar is to be displayed
-
setAffectsFreeBusy
public void setAffectsFreeBusy(boolean val) - Overrides:
setAffectsFreeBusyin classBwCalendar- Parameters:
val- true if the calendar takes part in free/busy calculations
-
getAffectsFreeBusy
public boolean getAffectsFreeBusy()- Overrides:
getAffectsFreeBusyin classBwCalendar- Returns:
- boolean true if the calendar takes part in free/busy calculations
-
setUnremoveable
public void setUnremoveable(boolean val) - Overrides:
setUnremoveablein classBwCalendar- Parameters:
val- boolean true if the calendar is unremoveable
-
getUnremoveable
public boolean getUnremoveable()- Overrides:
getUnremoveablein classBwCalendar- Returns:
- boolean true if the calendar is unremoveable
-
setCategories
Description copied from interface:CategorisedEntitySet the categories Set- Specified by:
setCategoriesin interfaceCategorisedEntity- Overrides:
setCategoriesin classBwCalendar- Parameters:
val- Set of categories
-
getCategories
Description copied from interface:CategorisedEntityGet the categories- Specified by:
getCategoriesin interfaceCategorisedEntity- Overrides:
getCategoriesin classBwCalendar- Returns:
- Set of categories
-
setCategoryHrefs
Description copied from class:BwCalendarSet list of referenced categories- Specified by:
setCategoryHrefsin interfaceCategorisedEntity- Overrides:
setCategoryHrefsin classBwCalendar- Parameters:
val- list of category hrefs
-
getCategoryHrefs
Description copied from interface:CategorisedEntityGet the categories- Specified by:
getCategoryHrefsin interfaceCategorisedEntity- Overrides:
getCategoryHrefsin classBwCalendar- Returns:
- list of category hrefs.
-
setProperties
- Specified by:
setPropertiesin interfacePropertiesEntity- Overrides:
setPropertiesin classBwCalendar
-
getProperties
- Specified by:
getPropertiesin interfacePropertiesEntity- Overrides:
getPropertiesin classBwCalendar- Returns:
- properties
-
getCalendarCollection
public boolean getCalendarCollection()Description copied from class:BwCalendartrue if this is to 'hold' calendar objects- Overrides:
getCalendarCollectionin classBwCalendar- Returns:
- boolean true if this is to 'hold' calendar objects
-
clearCurrentAccess
public void clearCurrentAccess() -
getCurrentAccess
public org.bedework.access.CurrentAccess getCurrentAccess()- Overrides:
getCurrentAccessin classBwCalendar- Returns:
- CurrentAccess
-
getCurrentAccess
public org.bedework.access.CurrentAccess getCurrentAccess(int desiredAccess) - Parameters:
desiredAccess- as key to access objects- Returns:
- currentAccess
-
setCurrentAccess
public void setCurrentAccess(org.bedework.access.CurrentAccess val) - Overrides:
setCurrentAccessin classBwCalendar- Parameters:
val- CurrentAccess
-
setCurrentAccess
public void setCurrentAccess(org.bedework.access.CurrentAccess ca, int desiredAccess) - Parameters:
ca- CurrentAccess objectdesiredAccess- associated access
-
evaluatedAccesses
- Returns:
- set of accesses we already evaluated. Used when re-evaluating
-
getLastDesiredAccess
public int getLastDesiredAccess()- Returns:
- int last desiredAccess
-
setVirtualPath
- Overrides:
setVirtualPathin classBwCalendar- Parameters:
val- virtual path for searches
-
getVirtualPath
- Overrides:
getVirtualPathin classBwCalendar- Returns:
- virtual path for searches
-
setOpen
public void setOpen(boolean val) - Overrides:
setOpenin classBwCalendar- Parameters:
val- ui open state
-
getOpen
public boolean getOpen()- Overrides:
getOpenin classBwCalendar- Returns:
- ui open state
-
setDisabled
public void setDisabled(boolean val) - Overrides:
setDisabledin classBwCalendar- Parameters:
val- boolean true if the target is unreachable
-
getDisabled
public boolean getDisabled()- Overrides:
getDisabledin classBwCalendar- Returns:
- boolean true if the target is unreachable
-
getAliasedEntity
Description copied from class:BwCalendarreturn the end of the chain of aliases or this object if not an alias. Assumes aliases have been resolved.- Overrides:
getAliasedEntityin classBwCalendar- Returns:
- boolean true if this is some sort of alias.
-
getAlias
public boolean getAlias()Description copied from class:BwCalendartrue if this is some sort of alias- Overrides:
getAliasin classBwCalendar- Returns:
- boolean true if this is some sort of alias.
-
getInternalAlias
public boolean getInternalAlias()Description copied from class:BwCalendartrue if this is an alias to an internal calendar.- Overrides:
getInternalAliasin classBwCalendar- Returns:
- boolean true if this is an alias to an internal calendar.
-
getExternalSub
public boolean getExternalSub()Description copied from class:BwCalendartrue if this is an alias to an external calendar.- Overrides:
getExternalSubin classBwCalendar- Returns:
- boolean true if this is an alias to an external calendar.
-
getInternalAliasPath
Description copied from class:BwCalendarReturn path if this is an alias to an internal calendar.- Overrides:
getInternalAliasPathin classBwCalendar- Returns:
- String path if this is an alias to an internal calendar otherwise null.
-
setChildren
- Overrides:
setChildrenin classBwCalendar- Parameters:
val- Collection of children objects
-
getChildren
- Overrides:
getChildrenin classBwCalendar- Returns:
- Collection of children objects
-
getCollectionInfo
- Overrides:
getCollectionInfoin classBwCalendar- Returns:
- CollectionInfo for this entity
-
getEncodedPath
Description copied from class:BwCalendarGenerate an encoded url referring to this calendar. XXX This should not be here- Overrides:
getEncodedPathin classBwCalendar- Returns:
- String encoded url (or path)
-
updateLastmod
Description copied from class:BwCalendarUpdate last mod fields- Overrides:
updateLastmodin classBwCalendar- Parameters:
val- timestamp
-
setHref
Set the href- Overrides:
setHrefin classBwCalendar- Parameters:
val- String href
-
getHref
- Overrides:
getHrefin classBwCalendar- Returns:
- non null unique href for the entity
-
setAliasTarget
Description copied from class:BwCalendarSet the aliased entity - this is usualy the end of the chain of aliases, e.g. in a->b->c this would be c.- Overrides:
setAliasTargetin classBwCalendar- Parameters:
val- BwCalendar object's alias target
-
getAliasTarget
Description copied from class:BwCalendarGet the aliased entity- Overrides:
getAliasTargetin classBwCalendar- Returns:
- BwCalendar the object's alias target
-
setAliasOrigin
Description copied from class:BwCalendarSet the collection that was the root of the chain that referred to this collection, e.g. in a->b->c this would be a.- Overrides:
setAliasOriginin classBwCalendar- Parameters:
val- BwCalendar object's alias target
-
getAliasOrigin
Description copied from class:BwCalendarGet the aliased entity- Overrides:
getAliasOriginin classBwCalendar- Returns:
- BwCalendar the object's alias target
-
tombstone
public void tombstone()Description copied from class:BwCalendarMake this thing a tombstoned collection. Non-reversible- Overrides:
tombstonein classBwCalendar
-
getTombstoned
public boolean getTombstoned()Description copied from class:BwCalendarIs this collection shared?- Overrides:
getTombstonedin classBwCalendar- Returns:
- true/false
-
dump
Description copied from class:DumpEntityDump the entire entity into the given file.- Overrides:
dumpin classDumpEntity<BwCalendar>- Parameters:
f- - the file
-
compareTo
- Specified by:
compareToin interfaceComparable<BwCalendar>- Overrides:
compareToin classBwCalendar
-
hashCode
public int hashCode()- Overrides:
hashCodein classBwCalendar
-
toString
- Overrides:
toStringin classBwCalendar
-
clone
Description copied from class:BwUnversionedDbentityMake visible- Overrides:
clonein classBwCalendar- Returns:
- Object of class T
-
cloneWrapper
Description copied from class:BwCalendarUsed to provide a new wrapper for an entity- Overrides:
cloneWrapperin classBwCalendar- Returns:
- Same entity with new wrapper
-
shallowClone
- Overrides:
shallowClonein classBwCalendar
-