| java.lang.Object org.sakaiproject.content.impl.BaseContentService
All known Subclasses: org.sakaiproject.content.impl.DbContentService,
Inner Class :protected class CollectionStorageUser implements StorageUser | |
Inner Class :protected class ResourceStorageUser implements StorageUser | |
Inner Class :protected class SizeHolder | |
Inner Class :abstract public class BasicGroupAwareEdit implements GroupAwareEdit | |
Inner Class :protected interface Storage | |
Method Summary | |
protected void | WTUserIdTrans(Element el, Map userIdTrans) | public ContentResource | addAttachmentResource(String name, String type, byte[] content, ResourceProperties properties) Create a new resource as an attachment to some other resource in the system. | public ContentResource | addAttachmentResource(String name, String site, String tool, String type, byte[] content, ResourceProperties properties) Create a new resource as an attachment to some other resource in the system. | public ContentResourceEdit | addAttachmentResource(String name) Create a new resource as an attachment to some other resource in the system, locked for update. | public ContentCollection | addCollection(String id, ResourceProperties properties) Create a new collection with the given resource id.
Parameters: id - The id of the collection. Parameters: properties - A java Properties object with the properties to add to the new collection. exception: IdUsedException - if the id is already in use. exception: IdInvalidException - if the id is invalid. exception: PermissionException - if the user does not have permission to add a collection, or add a member to a collection. exception: InconsistentException - if the containing collection does not exist. | public ContentCollection | addCollection(String id, ResourceProperties properties, Collection groups) | public ContentCollection | addCollection(String id, ResourceProperties properties, Collection groups, boolean hidden, Time releaseDate, Time retractDate) | public ContentCollectionEdit | addCollection(String id) Create a new collection with the given resource id, locked for update. | public ContentCollectionEdit | addCollection(String collectionId, String name) Parameters: collectionId - Parameters: name - exception: PermissionException - if the user does not have permission to add a resource to the containing collection. exception: IdUnusedException - if the collectionId does not identify an existing collection. | public ContentResource | addDeleteResource(String id, String type, byte[] content, ResourceProperties properties, String uuid, String userId, int priority) | protected void | addLiveCollectionProperties(ContentCollectionEdit c) Create the live properties for a collection. | protected void | addLiveResourceProperties(ContentResourceEdit r) Create the live properties for a resource. | protected void | addLiveUpdateCollectionProperties(ContentCollectionEdit c) Create the live properties for a collection. | protected void | addLiveUpdateResourceProperties(ContentResourceEdit r) Update the live properties for a resource when modified (for a resource). | protected void | addProperties(ResourcePropertiesEdit p, ResourceProperties props) Add properties for a resource. | public ResourceProperties | addProperty(String id, String name, String value) Add / update a property for a resource, either collection or resource.
Parameters: id - The resource id. Parameters: name - The properties name to add or update Parameters: value - The new value for the property. exception: PermissionException - if the user does not have premissions to write properties on this object or read through containing collections. exception: IdUnusedException - if the resource id is not found. exception: TypeException - if any property requested cannot be set (it may be live). exception: InUseException - if the resource is locked by someone else. exception: ServerOverloadException - if the server is configured to write the resource body to the filesystem and the save fails. | public ContentResource | addResource(String id, String type, byte[] content, ResourceProperties properties, Collection groups, int priority) Create a new resource with the given resource id and attributes, including group awareness.
Parameters: id - The id of the new resource. Parameters: type - The mime type string of the resource. Parameters: content - An array containing the bytes of the resource's content. Parameters: properties - A java Properties object with the properties to add to the new resource. Parameters: groups - A collection (String) of references to Group objects representing the site subgroups that should have access to this entity.May be empty to indicate access is not limited to a group or groups. Parameters: priority - The notification priority for this commit. exception: PermissionException - if the user does not have permission to add a resource to the containing collection. exception: IdUsedException - if the resource id is already in use. exception: IdInvalidException - if the resource id is invalid. exception: InconsistentException - if the containing collection does not exist. exception: OverQuotaException - if this would result in being over quota. exception: ServerOverloadException - if the server is configured to write the resource body to the filesystem and the save fails. | public ContentResource | addResource(String id, String type, byte[] content, ResourceProperties properties, int priority) Create a new resource with the given resource id and attributes but no group awareness.
Parameters: id - The id of the new resource. Parameters: type - The mime type string of the resource. Parameters: content - An array containing the bytes of the resource's content. Parameters: properties - A java Properties object with the properties to add to the new resource. Parameters: priority - The notification priority for this commit. exception: PermissionException - if the user does not have permission to add a resource to the containing collection. exception: IdUsedException - if the resource id is already in use. exception: IdInvalidException - if the resource id is invalid. exception: InconsistentException - if the containing collection does not exist. exception: OverQuotaException - if this would result in being over quota. exception: ServerOverloadException - if the server is configured to write the resource body to the filesystem and the save fails. | public ContentResource | addResource(String name, String collectionId, int limit, String type, byte[] content, ResourceProperties properties, Collection groups, boolean hidden, Time releaseDate, Time retractDate, int priority) Create a new resource with the given resource name used as a resource id within the specified collection or (if that id is already in use) with a resource id based on a variation on the name to achieve a unique id, provided a unique id can be found
before a limit is reached on the number of attempts to achieve uniqueness. | public ContentResourceEdit | addResource(String collectionId, String basename, String extension, int maximum_tries) | public ContentResource | addResource(String name, String collectionId, int limit, String type, byte[] content, ResourceProperties properties, int priority) Create a new resource with the given resource name used as a resource id within the specified collection or (if that id is already in use) with a resource id based on a variation on the name to achieve a unique id, provided a unique id can be found
before a limit is reached on the number of attempts to achieve uniqueness. | public ContentResourceEdit | addResource(String id) Create a new resource with the given resource id, locked for update. | public ContentResource | addResource(String name, String collectionId, int limit, String type, byte[] content, ResourceProperties properties, Collection groups, int priority) Create a new resource with the given resource name used as a resource id within the specified collection or (if that id is already in use) with a resource id based on a variation on the name to achieve a unique id, provided a unique id can be found
before a limit is reached on the number of attempts to achieve uniqueness. | public void | addResourceToDeleteTable(ContentResourceEdit edit, String uuid, String userId) | protected void | addSizeCache(ContentResourceEdit edit) | protected ContentCollectionEdit | addValidPermittedCollection(String id) Create a new collection with the given resource id, locked for update. | protected void | adjustGroups(ContentEntity member, Collection groups) | public boolean | allowAddAttachmentResource() check permissions for addAttachmentResource(). | public boolean | allowAddCollection(String id) check permissions for addCollection().
Parameters: id - The id of the new collection. | public boolean | allowAddProperty(String id) check permissions for addProperty().
Parameters: id - The id of the new resource. | public boolean | allowAddResource(String id) check permissions for addResource().
Parameters: id - The id of the new resource. | public boolean | allowCopy(String id, String new_id) check permissions for copy().
Parameters: id - The id of the new resource. Parameters: new_id - The desired id of the new resource. | public boolean | allowGetCollection(String id) check permissions for getCollection().
Parameters: id - The id of the collection. | public boolean | allowGetProperties(String id) check permissions for getProperties().
Parameters: id - The id of the new resource. | public boolean | allowGetResource(String id) check permissions for getResource().
Parameters: id - The id of the new resource. | protected boolean | allowRemove(String id) check permissions for removing collections or resources
Note: for just this collection, not the members on down.
Parameters: id - The id of the collection. | public boolean | allowRemoveCollection(String id) check permissions for removeCollection(). | public boolean | allowRemoveProperty(String id) check permissions for removeProperty().
Parameters: id - The id of the new resource. | public boolean | allowRemoveResource(String id) check permissions for removeResource().
Parameters: id - The id of the new resource. | public boolean | allowRename(String id, String new_id) check permissions for rename(). | public boolean | allowUpdate(String id) check permissions for revising collections or resources
Parameters: id - The id of the collection. | public boolean | allowUpdateCollection(String id) check permissions for editCollection()
Parameters: id - The id of the collection. | public boolean | allowUpdateResource(String id) check permissions for updateResource().
Parameters: id - The id of the new resource. | public String | archive(String siteId, Document doc, Stack stack, String archivePath, List attachments) | protected void | archiveCollection(ContentCollection collection, Document doc, Stack stack, String storagePath, String siteCollectionId, StringBuffer results) Archive the collection, then the members of the collection - recursively for collection members. | protected String | archiveResource(ContentResource resource, Document doc, Stack stack, String storagePath, String siteCollectionId) Archive a singe resource
Parameters: resource - The content resource to archive Parameters: doc - The XML document. Parameters: stack - The stack of elements. Parameters: storagePath - The path to the folder where we are writing files. Parameters: siteCollectionId - The resource id of the site collection (optional). | public String | archiveResources(List attachments, Document doc, Stack stack, String archivePath) | protected void | assureResourceProperties(ContentResourceEdit r) Make sure that the entire set of properties are present, adding whatever is needed, replacing nothing that's there already. | protected boolean | availabilityCheck(String id) Check whether the resource is hidden. | protected long | bytes2k(long bytes) Convert bytes to Kbytes, rounding up, and counting even 0 bytes as 1 k.
Parameters: bytes - The size in bytes. | public void | cancelCollection(ContentCollectionEdit edit) Cancel the changes made object, and release the lock. | public void | cancelResource(ContentResourceEdit edit) Cancel the changes made object, and release the lock. | public void | checkCollection(String id) Check access to the collection with this local resource id. | protected void | checkExplicitLock(String id) | public void | checkResource(String id) Check access to the resource with this local resource id. | public void | commitCollection(ContentCollectionEdit edit) Commit the changes made, and release the lock. | public void | commitResource(ContentResourceEdit edit) Commit the changes made, and release the lock. | public void | commitResource(ContentResourceEdit edit, int priority) Commit the changes made, and release the lock. | protected void | commitResourceEdit(ContentResourceEdit edit, int priority) Commit the changes made, and release the lock - no quota check. | public void | contextCreated(String context, boolean toolPlacement) | public void | contextDeleted(String context, boolean toolPlacement) | public void | contextUpdated(String context, boolean toolPlacement) | protected String | convertIdToUserEid(String id) If the id is to the /user/ area, make an id that is based on the user EID not ID, if the EID is available.
Parameters: id - The resource id. | protected String | convertLockIfDropbox(String lock, String id) If the id is for a resource in a dropbox, change the function to a dropbox check, which is to check for write.
You have full or no access to a dropbox.
Parameters: lock - The lock we are checking. Parameters: id - The resource id. | public String | copy(String id, String new_id) Copy a resource or collection. | public String | copyCollection(ContentCollection thisCollection, String new_id) Copy a collection.
Parameters: thisCollection - The collection to be copied Parameters: new_id - The desired id of the new collection. | public String | copyIntoFolder(String id, String folder_id) Copy a collection or resource from one location to another. | public String | copyResource(ContentResource resource, String new_id) Copy a resource.
Parameters: thisResource - The resource to be copied Parameters: new_id - The desired id of the new resource. | public void | createDropboxCollection() Create the site's dropbox collection and one for each qualified user that the current user can make. | public void | createDropboxCollection(String siteId) Create the site's dropbox collection and one for each qualified user that the current user can make. | public void | createIndividualDropbox(String siteId) Create an individual dropbox collection for the current user if the site-level dropbox exists
and the current user has AUTH_DROPBOX_OWN for the site. | protected String | deepcopyCollection(ContentCollection thisCollection, String new_folder_id) Make a deep copy of a collection. | public void | destroy() Returns to uninitialized state. | protected void | disableDropbox(String context) Remove resources area for a site. | protected void | disableResources(String context) Remove resources area for a site. | public ContentCollectionEdit | editCollection(String id) Access the collection with this local resource id, locked for update. | public ContentResourceEdit | editResource(String id) Access the resource with this resource id, locked for update. | protected ContentResourceEdit | editResourceForDelete(String id) Access the resource with this resource id, locked for update. | public void | eliminateDuplicates(Collection resourceIds) Eliminate from the collection any duplicates as well as any items that are contained within another item whose resource-id is in the collection. | protected void | enableDropbox(String context) Make sure a home in resources for dropbox exists for the site. | protected void | enableResources(String context) Make sure a home in resources exists for the site. | protected List | filterArtifacts(List artifacts, String type, String primaryMimeType, String subMimeType) | protected List | filterArtifacts(List artifacts, String type, String primaryMimeType, String subMimeType, boolean checkPerms) | protected ContentCollection | findCollection(String id) Access the collection with this local resource id. | protected ContentResource | findResource(String id) Access the resource with this resource id. | public List | findResources(String type, String primaryMimeType, String subMimeType) | protected Hashtable | fixTypeAndId(String id, String type) Check the fixed type and id infomation: The same or better content type based on the known type for this id's extension, if any. | protected void | generateCollections(String target) Attempt to create any collections needed so that the parameter collection exists. | protected String | getAccessPoint(boolean relative) Access the partial URL that forms the root of resource URLs.
Parameters: relative - if true, form within the access path only (i.e. | public List | getAllEntities(String id) Access a List of ContentEntity objects (resources and collections) in this path (and below) if the current user has access to the collection.
Parameters: id - A collection id. | protected void | getAllEntities(ContentCollection collection, List rv, boolean includeCollections) Access a List of all the ContentResource objects in this collection (and below). | public List | getAllResources(String id) Access a List of all the ContentResource objects in this path (and below) which the current user has access.
Parameters: id - A collection id. | protected void | getAllResources(ContentCollection collection, List rv, boolean includeCollections) Access a List of all the ContentResource objects in this collection (and below) which the current user has access. | public boolean | getAllowGroupResources() | protected String | getAlternateReferenceRoot(String id, String rootProperty) Compute an alternate root for a reference, based on the value of the specified property.
Parameters: rootProperty - The property name. | public ContentCollection | getCollection(String id) Access the collection with this local resource id. | public Map | getCollectionMap() Return a map of Worksite collections roots that the user has access to. | public String | getContainingCollectionId(String id) Access the resource id of the collection which contains this collection or resource. | public int | getDepth(String resourceId, String baseCollectionId) | public String | getDropboxCollection() | public String | getDropboxCollection(String siteId) | public String | getDropboxDisplayName() Access the default dropbox collection display name for the current request. | public String | getDropboxDisplayName(String siteId) Access the default dropbox collection display name for the site. | public Entity | getEntity(Reference ref) | public Collection | getEntityAuthzGroups(Reference ref, String userId) | public String | getEntityDescription(Reference ref) | protected Collection | getEntityHierarchyAuthzGroups(Reference ref) | public ResourceProperties | getEntityResourceProperties(Reference ref) | public String | getEntityUrl(Reference ref) | protected List | getFlatResources(String parentId) get all the resources under a given directory. | protected Collection | getGroupsAllowFunction(String function, String refString) Get a collection (Group) of groups that are defined in the containing context of a resource and that this user can access
in the way described by a function string. | public Collection | getGroupsWithAddPermission(String collectionId) Access a collection (Group) of groups to which this user has access and whose members have "content.new" permission in the collection. | public Collection | getGroupsWithReadAccess(String collectionId) Access a collection (Group) of groups to which this user has access and whose members have "content.read" permission in the collection. | public Collection | getGroupsWithRemovePermission(String collectionId) Access a collection (Group) of groups to which this user has access and whose members have "content.delete" permission in the collection. | public HttpAccess | getHttpAccess() | public String | getLabel() | public boolean | getPrioritySortEnabled() | public ResourceProperties | getProperties(String id) Access the properties of a resource with this resource id, either collection or resource.
Parameters: id - The resource id. exception: PermissionException - if the user does not have permissions to read properties on this object or read through containing collections. exception: IdUnusedException - if the resource id is not found. | public long | getQuota(ContentCollection collection) gets the quota for a site collection or for a user's my workspace collection
Parameters: collection - the collection on which to test for a quota. | public String | getReference(String id) Access the internal reference from a resource id.
Parameters: id - The resource id. | public ContentResource | getResource(String id) Access the resource with this resource id. | public ResourceTypeRegistry | getResourceTypeRegistry() | public String | getSiteCollection(String siteId) | public String | getUrl(String id) Access the resource URL from a resource id.
Parameters: id - The resource id. | public String | getUrl(String id, String rootProperty) Access the alternate URL which can be used to access the entity.
Parameters: id - The resource id. Parameters: rootProperty - The name of the entity property whose value controls which alternate reference URL is requested. | protected boolean | groupCollectionContainsRefString(Collection groups, String groupRef) Test a collection of Group object for the specified group reference
Parameters: groups - The collection (Group) of groups Parameters: groupRef - The string group reference to find. | protected void | handleAccessCollection(HttpServletRequest req, HttpServletResponse res, Reference ref, Collection copyrightAcceptedRefs) Process the access request for a collection, producing the "apache" style HTML file directory listing (complete with index.html redirect if found). | protected void | handleAccessResource(HttpServletRequest req, HttpServletResponse res, Reference ref, Collection copyrightAcceptedRefs) Process the access request for a resource. | public void | init() Final initialization, once all dependencies are set. | public boolean | isAttachmentResource(String id) Check whether a resource id or collection id references an entity in the attachments collection. | public boolean | isAvailabilityEnabled() Access flag indicating whether entities can be hidden (scheduled or otherwise). | public boolean | isAvailable(String entityId) Determine whether an entity is available to this user at this time, taking into account whether the item is hidden and the user's
status with respect to viewing hidden entities in this context.
Parameters: entityId - true if the item is not hidden or it's hidden but the user has permissions to view hidden items in this context (site? folder? group?), and false otherwise. | public boolean | isCollection(String entityId) Determine whether the entityId parameter identifies a collection (as opposed to a resource). | public boolean | isDropboxMaintainer() | public boolean | isDropboxMaintainer(String siteId) Determine whether the default dropbox collection id for this user in some site is the site's entire dropbox collection or just the current user's collection within the site's dropbox. | public boolean | isInDropbox(String entityId) Check whether an id would identify an entity in a dropbox. | public boolean | isInheritingPubView(String id) | public boolean | isPubView(String id) | public boolean | isRootCollection(String id) Test if this id (reference, or URL) refers to the root collection. | public boolean | isShortRefs() | public boolean | isSortByPriorityEnabled() Access flag indicating whether sorting by "priority" is enabled. | protected String | isolateContainingId(String id) Find the containing collection id of a given resource id.
Parameters: id - The resource id. | protected String | isolateName(String id) Find the resource name of a given resource id.
Parameters: id - The resource id. | public String | merge(String siteId, Element root, String archivePath, String mergeId, Map attachmentNames, Map userIdTrans, Set userListAllowImport) Merge the resources from the archive into the given site.
Parameters: siteId - The id of the site getting imported into. Parameters: root - The XML DOM tree of content to merge. Parameters: archviePath - The path to the folder where we are reading auxilary files. | protected ContentCollection | mergeCollection(Element element) Merge in a collection from an XML DOM definition. | protected ContentResource | mergeResource(Element element) Merge in a resource from an XML DOM definition. | protected ContentResource | mergeResource(Element element, byte[] body) Merge in a resource from an XML DOM definition and a body bytes array. | protected String | moveCollection(ContentCollectionEdit thisCollection, String new_folder_id) Move a collection to a new folder. | public String | moveIntoFolder(String id, String folder_id) Move a resource or collection to a (different) folder. | protected String | moveResource(ContentResourceEdit thisResource, String new_id) Move a resource to a new folder. | public String[] | myToolIds() | public Comparator | newContentHostingComparator(String property, boolean ascending) | protected String | newName(String id, String folder_id) Calculate a candidate for a resource id for a resource being copied/moved into a new folder. | public ResourcePropertiesEdit | newResourceProperties() Construct a stand-alone, not associated with any particular resource, ResourceProperties object. | abstract protected Storage | newStorage() Construct a Storage object. | protected boolean | overQuota(ContentResourceEdit edit) Test if this resource edit would place the account" over quota.
Parameters: edit - The proposed resource edit. | public boolean | parseEntityReference(String reference, Reference ref) | public Object | refresh(Object key, Object oldValue, Event event) Get a new value for this key whose value has already expired in the cache.
Parameters: key - The key whose value has expired and needs to be refreshed. Parameters: oldValue - The old exipred value of the key. Parameters: event - The event which triggered this refresh. | public void | removeCollection(ContentCollectionEdit edit) Remove just a collection. | public void | removeCollection(String id) Remove a collection and all members of the collection, internal or deeper.
Parameters: id - The id of the collection. exception: IdUnusedException - if the id does not exist. exception: TypeException - if the resource exists but is not a collection. exception: PermissionException - if the user does not have permissions to remove this collection, read through any containing exception: InUseException - if the collection or a contained member is locked by someone else. | public ResourceProperties | removeProperty(String id, String name) Remove a property from a resource, either collection or resource.
Parameters: id - The resource id. Parameters: name - The property name to be removed from the resource. exception: PermissionException - if the user does not have premissions to write properties on this object or read through containing collections. exception: IdUnusedException - if the resource id is not found. exception: TypeException - if the property named cannot be removed. exception: InUseException - if the resource is locked by someone else. exception: ServerOverloadException - if the server is configured to write the resource body to the filesystem and the save fails. | protected void | removeRecursive(ContentCollection parent) used to remove any members of a collection whoes add was canceled. | public void | removeResource(String id) Remove a resource. | public void | removeResource(ContentResourceEdit edit) Remove a resource that is locked for update. | protected void | removeSizeCache(ContentResourceEdit edit) | public String | rename(String id, String new_id) Rename a collection or resource.
Parameters: id - The id of the collection. Parameters: new_id - The desired id of the collection. | public void | setAliasService(AliasService service) Dependency: AliasService. | public void | setAllowGroupResources(boolean allowGroupResources) | public void | setAuthzGroupService(AuthzGroupService service) Dependency: AuthzGroupService. | public void | setAvailabilityChecksEnabled(boolean value) | public void | setBodyPath(String value) Configuration: set the external file system path for body storage If set, the resource binary database table will not be used. | public void | setBodyVolumes(String value) Configuration: set the external file system volume folders (folder just within the bodyPath) as a comma separated list of folder names. | public void | setCaching(String value) | public void | setEntityManager(EntityManager service) Dependency: EntityManager. | public void | setMemoryService(MemoryService service) Dependency: MemoryService. | public void | setNotificationService(NotificationService service) Dependency: NotificationService. | public void | setPrioritySortEnabled(boolean value) | public void | setPubView(String id, boolean pubview) Set this resource or collection to the pubview setting. | public void | setResourceTypeRegistry(ResourceTypeRegistry registry) | public void | setSecurityService(SecurityService service) Dependency: SecurityService. | public void | setServerConfigurationService(ServerConfigurationService service) Dependency: ServerConfigurationService. | public void | setShortRefs(String value) | public void | setSiteAlias(String value) | public void | setSiteQuota(String quota) Set the site quota. | public void | setSiteService(SiteService service) Dependency: SiteService. | public void | setUseResourceTypeRegistry(boolean useRegistry) | abstract protected void | setUuidInternal(String id, String uuid) | public void | transferCopyEntities(String fromContext, String toContext, List resourceIds) | protected void | unlock(String lock, String id) Check security permission. | protected boolean | unlockCheck(String lock, String id) Check security permission.
Parameters: lock - The lock id string. Parameters: id - The resource id string, or null if no resource is involved. | public ContentResource | updateResource(String id, String type, byte[] content) Update the body and or content type of an existing resource with the given resource id.
Parameters: id - The id of the resource. Parameters: type - The mime type string of the resource (if null, no change). Parameters: content - An array containing the bytes of the resource's content (if null, no change). exception: PermissionException - if the user does not have permission to add a resource to the containing collection or write the resource. exception: IdUnusedException - if the resource id is not defined. exception: TypeException - if the resource is a collection. exception: InUseException - if the resource is locked by someone else. exception: OverQuotaException - if this would result in being over quota. exception: ServerOverloadException - if the server is configured to write the resource body to the filesystem and the save fails. | public boolean | usingResourceTypeRegistry() | protected void | verifyGroups(ContentCollection collection, Collection groups) Recursively traverse the heirarchy of ContentEntity objects contained within a collection and remove access groups if they
are not included in the set defined for the initial collection. | public boolean | willArchiveMerge() |
END_OF_TIME | final protected static long END_OF_TIME(Code) | | |
PROP_MEMBER_DROPBOX_DESCRIPTION | final protected static String PROP_MEMBER_DROPBOX_DESCRIPTION(Code) | | |
PROP_SITE_DROPBOX_DESCRIPTION | final protected static String PROP_SITE_DROPBOX_DESCRIPTION(Code) | | |
SITE_UPDATE_ACCESS | final public static String SITE_UPDATE_ACCESS(Code) | | |
START_OF_TIME | final protected static long START_OF_TIME(Code) | | |
STREAM_BUFFER_SIZE | final protected static int STREAM_BUFFER_SIZE(Code) | | The chunk size used when streaming (100k).
|
STREAM_CONTENT | final protected static boolean STREAM_CONTENT(Code) | | stream content requests if true, read all into memory and send if false.
|
m_allowGroupResources | protected boolean m_allowGroupResources(Code) | | Dependency: allowGroupResources setting
|
m_availabilityChecksEnabled | protected boolean m_availabilityChecksEnabled(Code) | | flag indicating whether entities can be hidden (scheduled or otherwise)
|
m_bodyPath | protected String m_bodyPath(Code) | | Optional path to external file system file store for body binary.
|
m_bodyVolumes | protected String[] m_bodyVolumes(Code) | | Optional set of folders just within the m_bodyPath to distribute files among.
|
m_cache | protected Cache m_cache(Code) | | A Cache for this service - ContentResource and ContentCollection keyed by reference.
|
m_caching | protected boolean m_caching(Code) | | Configuration: cache, or not.
|
m_prioritySortEnabled | protected boolean m_prioritySortEnabled(Code) | | flag indicating whether custom sort order based on "priority" is enabled
|
m_relativeAccessPoint | protected String m_relativeAccessPoint(Code) | | The initial portion of a relative access point URL.
|
m_shortRefs | protected boolean m_shortRefs(Code) | | Configuration: short refs
|
m_siteAlias | protected boolean m_siteAlias(Code) | | Configuration: allow use of alias for site id in references.
|
m_siteQuota | protected long m_siteQuota(Code) | | The quota for content resource body bytes (in Kbytes) for any hierarchy in the /user/ or /group/ areas, or 0 if quotas are not enforced.
|
m_storage | protected Storage m_storage(Code) | | A Storage object for persistent storage.
|
useResourceTypeRegistry | protected boolean useResourceTypeRegistry(Code) | | |
WTUserIdTrans | protected void WTUserIdTrans(Element el, Map userIdTrans)(Code) | | Replace the WT user id with the new qualified id
Parameters: el - The XML element holding the perproties Parameters: useIdTrans - The HashMap to track old WT id to new CTools id |
addAttachmentResource | public ContentResource addAttachmentResource(String name, String type, byte[] content, ResourceProperties properties) throws IdInvalidException, InconsistentException, IdUsedException, PermissionException, OverQuotaException, ServerOverloadException(Code) | | Create a new resource as an attachment to some other resource in the system. The new resource will be placed into a newly created collecion in the attachment collection, with an auto-generated id, and given the specified resource name within this
collection.
Parameters: name - The name of the new resource, i.e. a partial id relative to the collection where it will live. Parameters: type - The mime type string of the resource. Parameters: content - An array containing the bytes of the resource's content. Parameters: properties - A ResourceProperties object with the properties to add to the new resource. exception: IdUsedException - if the resource name is already in use (not likely, as the containing collection is auto-generated!) exception: IdInvalidException - if the resource name is invalid. exception: InconsistentException - if the containing collection (or it's containing collection...) does not exist. exception: PermissionException - if the user does not have permission to add a collection, or add a member to a collection. exception: OverQuotaException - if this would result in being over quota. exception: ServerOverloadException - if the server is configured to write the resource body to the filesystem and the save fails. a new ContentResource object. |
addAttachmentResource | public ContentResource addAttachmentResource(String name, String site, String tool, String type, byte[] content, ResourceProperties properties) throws IdInvalidException, InconsistentException, IdUsedException, PermissionException, OverQuotaException, ServerOverloadException(Code) | | Create a new resource as an attachment to some other resource in the system. The new resource will be placed into a newly created collecion in the attachment collection, with an auto-generated id, and given the specified resource name within this
collection.
Parameters: name - The name of the new resource, i.e. a partial id relative to the collection where it will live. Parameters: site - The string identifier for the site where the attachment is being added. Parameters: tool - The display-name for the tool through which the attachment is being added within the site's attachments collection. Parameters: type - The mime type string of the resource. Parameters: content - An array containing the bytes of the resource's content. Parameters: properties - A ResourceProperties object with the properties to add to the new resource. exception: IdUsedException - if the resource name is already in use (not likely, as the containing collection is auto-generated!) exception: IdInvalidException - if the resource name is invalid. exception: InconsistentException - if the containing collection (or it's containing collection...) does not exist. exception: PermissionException - if the user does not have permission to add a collection, or add a member to a collection. exception: OverQuotaException - if this would result in being over quota. exception: ServerOverloadException - if the server is configured to write the resource body to the filesystem and the save fails. a new ContentResource object. |
addAttachmentResource | public ContentResourceEdit addAttachmentResource(String name) throws IdInvalidException, InconsistentException, IdUsedException, PermissionException(Code) | | Create a new resource as an attachment to some other resource in the system, locked for update. Must commitResource() to make official, or cancelResource() when done! The new resource will be placed into a newly created collecion in the attachment
collection, with an auto-generated id, and given the specified resource name within this collection.
Parameters: name - The name of the new resource, i.e. a partial id relative to the collection where it will live. exception: IdUsedException - if the resource name is already in use (not likely, as the containing collection is auto-generated!) exception: IdInvalidException - if the resource name is invalid. exception: InconsistentException - if the containing collection (or it's containing collection...) does not exist. exception: PermissionException - if the user does not have permission to add a collection, or add a member to a collection. a new ContentResource object. |
addLiveCollectionProperties | protected void addLiveCollectionProperties(ContentCollectionEdit c)(Code) | | Create the live properties for a collection.
Parameters: c - The collection. |
addLiveResourceProperties | protected void addLiveResourceProperties(ContentResourceEdit r)(Code) | | Create the live properties for a resource.
Parameters: r - The resource. |
addLiveUpdateCollectionProperties | protected void addLiveUpdateCollectionProperties(ContentCollectionEdit c)(Code) | | Create the live properties for a collection.
Parameters: c - The collection. |
addLiveUpdateResourceProperties | protected void addLiveUpdateResourceProperties(ContentResourceEdit r)(Code) | | Update the live properties for a resource when modified (for a resource).
Parameters: r - The resource. |
addResource | public ContentResource addResource(String id, String type, byte[] content, ResourceProperties properties, Collection groups, int priority) throws PermissionException, IdUsedException, IdInvalidException, InconsistentException, OverQuotaException, ServerOverloadException(Code) | | Create a new resource with the given resource id and attributes, including group awareness.
Parameters: id - The id of the new resource. Parameters: type - The mime type string of the resource. Parameters: content - An array containing the bytes of the resource's content. Parameters: properties - A java Properties object with the properties to add to the new resource. Parameters: groups - A collection (String) of references to Group objects representing the site subgroups that should have access to this entity.May be empty to indicate access is not limited to a group or groups. Parameters: priority - The notification priority for this commit. exception: PermissionException - if the user does not have permission to add a resource to the containing collection. exception: IdUsedException - if the resource id is already in use. exception: IdInvalidException - if the resource id is invalid. exception: InconsistentException - if the containing collection does not exist. exception: OverQuotaException - if this would result in being over quota. exception: ServerOverloadException - if the server is configured to write the resource body to the filesystem and the save fails. a new ContentResource object. |
addResource | public ContentResource addResource(String name, String collectionId, int limit, String type, byte[] content, ResourceProperties properties, Collection groups, boolean hidden, Time releaseDate, Time retractDate, int priority) throws PermissionException, IdUniquenessException, IdLengthException, IdInvalidException, InconsistentException, OverQuotaException, ServerOverloadException(Code) | | Create a new resource with the given resource name used as a resource id within the specified collection or (if that id is already in use) with a resource id based on a variation on the name to achieve a unique id, provided a unique id can be found
before a limit is reached on the number of attempts to achieve uniqueness. Used to create a group-aware resource.
Parameters: name - The name of the new resource (such as a filename). Parameters: collectionId - The id of the collection to which the resource should be added. Parameters: limit - The maximum number of attempts at finding a unique id based on the given name. Parameters: type - The mime type string of the resource. Parameters: content - An array containing the bytes of the resource's content. Parameters: properties - A ResourceProperties object with the properties to add to the new resource. Parameters: groups - A collection (String) of references to Group objects representing the site subgroups that should have access to this entity.May be empty to indicate access is not limited to a group or groups. Parameters: priority - The notification priority for this commit. exception: PermissionException - if the user does not have permission to add a resource to the containing collection. exception: IdUniquenessException - if a unique resource id cannot be found before the limit on the number of attempts is reached. exception: IdLengthException - if the resource id exceeds the maximum number of characters for a valid resource id. exception: IdInvalidException - if the resource id is invalid. exception: InconsistentException - if the containing collection does not exist. exception: OverQuotaException - if this would result in being over quota. exception: ServerOverloadException - if the server is configured to write the resource body to the filesystem and the save fails. a new ContentResource object. |
addResource | public ContentResource addResource(String name, String collectionId, int limit, String type, byte[] content, ResourceProperties properties, int priority) throws PermissionException, IdUniquenessException, IdLengthException, IdInvalidException, InconsistentException, OverQuotaException, ServerOverloadException(Code) | | Create a new resource with the given resource name used as a resource id within the specified collection or (if that id is already in use) with a resource id based on a variation on the name to achieve a unique id, provided a unique id can be found
before a limit is reached on the number of attempts to achieve uniqueness. Used to create a resource that is not group aware.
Parameters: name - The name of the new resource (such as a filename). Parameters: collectionId - The id of the collection to which the resource should be added. Parameters: limit - The maximum number of attempts at finding a unique id based on the given name. Parameters: type - The mime type string of the resource. Parameters: content - An array containing the bytes of the resource's content. Parameters: properties - A ResourceProperties object with the properties to add to the new resource. Parameters: priority - The notification priority for this commit. exception: PermissionException - if the user does not have permission to add a resource to the containing collection. exception: IdUniquenessException - if a unique resource id cannot be found before the limit on the number of attempts is reached. exception: IdLengthException - if the resource id exceeds the maximum number of characters for a valid resource id. exception: IdInvalidException - if the resource id is invalid. exception: InconsistentException - if the containing collection does not exist. exception: OverQuotaException - if this would result in being over quota. exception: ServerOverloadException - if the server is configured to write the resource body to the filesystem and the save fails. a new ContentResource object. |
addResource | public ContentResource addResource(String name, String collectionId, int limit, String type, byte[] content, ResourceProperties properties, Collection groups, int priority) throws PermissionException, IdUniquenessException, IdLengthException, IdInvalidException, InconsistentException, OverQuotaException, ServerOverloadException(Code) | | Create a new resource with the given resource name used as a resource id within the specified collection or (if that id is already in use) with a resource id based on a variation on the name to achieve a unique id, provided a unique id can be found
before a limit is reached on the number of attempts to achieve uniqueness. Used to create a group-aware resource.
Parameters: name - The name of the new resource (such as a filename). Parameters: collectionId - The id of the collection to which the resource should be added. Parameters: limit - The maximum number of attempts at finding a unique id based on the given name. Parameters: type - The mime type string of the resource. Parameters: content - An array containing the bytes of the resource's content. Parameters: properties - A ResourceProperties object with the properties to add to the new resource. Parameters: groups - A collection (String) of references to Group objects representing the site subgroups that should have access to this entity.May be empty to indicate access is not limited to a group or groups. Parameters: priority - The notification priority for this commit. exception: PermissionException - if the user does not have permission to add a resource to the containing collection. exception: IdUniquenessException - if a unique resource id cannot be found before the limit on the number of attempts is reached. exception: IdLengthException - if the resource id exceeds the maximum number of characters for a valid resource id. exception: IdInvalidException - if the resource id is invalid. exception: InconsistentException - if the containing collection does not exist. exception: OverQuotaException - if this would result in being over quota. exception: ServerOverloadException - if the server is configured to write the resource body to the filesystem and the save fails. a new ContentResource object. |
allowAddAttachmentResource | public boolean allowAddAttachmentResource()(Code) | | check permissions for addAttachmentResource().
true if the user is allowed to addAttachmentResource(), false if not. |
allowAddCollection | public boolean allowAddCollection(String id)(Code) | | check permissions for addCollection().
Parameters: id - The id of the new collection. true if the user is allowed to addCollection(id), false if not. |
allowAddProperty | public boolean allowAddProperty(String id)(Code) | | check permissions for addProperty().
Parameters: id - The id of the new resource. true if the user is allowed to addProperty(id), false if not. |
allowAddResource | public boolean allowAddResource(String id)(Code) | | check permissions for addResource().
Parameters: id - The id of the new resource. true if the user is allowed to addResource(id), false if not. |
allowCopy | public boolean allowCopy(String id, String new_id)(Code) | | check permissions for copy().
Parameters: id - The id of the new resource. Parameters: new_id - The desired id of the new resource. true if the user is allowed to copy(id,new_id), false if not. |
allowGetCollection | public boolean allowGetCollection(String id)(Code) | | check permissions for getCollection().
Parameters: id - The id of the collection. true if the user is allowed to getCollection(id), false if not. |
allowGetProperties | public boolean allowGetProperties(String id)(Code) | | check permissions for getProperties().
Parameters: id - The id of the new resource. true if the user is allowed to getProperties(id), false if not. |
allowGetResource | public boolean allowGetResource(String id)(Code) | | check permissions for getResource().
Parameters: id - The id of the new resource. true if the user is allowed to getResource(id), false if not. |
allowRemove | protected boolean allowRemove(String id)(Code) | | check permissions for removing collections or resources
Note: for just this collection, not the members on down.
Parameters: id - The id of the collection. true if the user is allowed to removeCollection(id), false if not. |
allowRemoveCollection | public boolean allowRemoveCollection(String id)(Code) | | check permissions for removeCollection(). Note: for just this collection, not the members on down.
Parameters: id - The id of the collection. true if the user is allowed to removeCollection(id), false if not. |
allowRemoveProperty | public boolean allowRemoveProperty(String id)(Code) | | check permissions for removeProperty().
Parameters: id - The id of the new resource. true if the user is allowed to removeProperty(id), false if not. |
allowRemoveResource | public boolean allowRemoveResource(String id)(Code) | | check permissions for removeResource().
Parameters: id - The id of the new resource. true if the user is allowed to removeResource(id), false if not. |
allowRename | public boolean allowRename(String id, String new_id)(Code) | | check permissions for rename(). Note: for just this collection, not the members on down.
Parameters: id - The id of the collection. true if the user is allowed to rename(id), false if not. |
allowUpdate | public boolean allowUpdate(String id)(Code) | | check permissions for revising collections or resources
Parameters: id - The id of the collection. true if the user is allowed to update the collection, false if not. |
allowUpdateCollection | public boolean allowUpdateCollection(String id)(Code) | | check permissions for editCollection()
Parameters: id - The id of the collection. true if the user is allowed to update the collection, false if not. |
allowUpdateResource | public boolean allowUpdateResource(String id)(Code) | | check permissions for updateResource().
Parameters: id - The id of the new resource. true if the user is allowed to updateResource(id), false if not. |
archiveCollection | protected void archiveCollection(ContentCollection collection, Document doc, Stack stack, String storagePath, String siteCollectionId, StringBuffer results)(Code) | | Archive the collection, then the members of the collection - recursively for collection members.
Parameters: collection - The collection whose members are to be archived. Parameters: doc - The document to contain the xml. Parameters: stack - The stack of elements, the top of which will be the containing element of the "collection" or "resource" element. Parameters: storagePath - The path to the folder where we are writing files. Parameters: siteCollectionId - The resource id of the site collection. Parameters: results - A log of messages from the archive. |
archiveResource | protected String archiveResource(ContentResource resource, Document doc, Stack stack, String storagePath, String siteCollectionId)(Code) | | Archive a singe resource
Parameters: resource - The content resource to archive Parameters: doc - The XML document. Parameters: stack - The stack of elements. Parameters: storagePath - The path to the folder where we are writing files. Parameters: siteCollectionId - The resource id of the site collection (optional). A log of messages from the archive. |
assureResourceProperties | protected void assureResourceProperties(ContentResourceEdit r)(Code) | | Make sure that the entire set of properties are present, adding whatever is needed, replacing nothing that's there already.
Parameters: r - The resource. |
bytes2k | protected long bytes2k(long bytes)(Code) | | Convert bytes to Kbytes, rounding up, and counting even 0 bytes as 1 k.
Parameters: bytes - The size in bytes. The size in Kbytes, rounded up. |
cancelCollection | public void cancelCollection(ContentCollectionEdit edit)(Code) | | Cancel the changes made object, and release the lock. The Object is disabled, and not to be used after this call.
Parameters: edit - The ContentCollectionEdit object to commit. |
cancelResource | public void cancelResource(ContentResourceEdit edit)(Code) | | Cancel the changes made object, and release the lock. The Object is disabled, and not to be used after this call.
Parameters: edit - The ContentResourceEdit object to commit. |
commitCollection | public void commitCollection(ContentCollectionEdit edit)(Code) | | Commit the changes made, and release the lock. The Object is disabled, and not to be used after this call.
Parameters: edit - The ContentCollectionEdit object to commit. throws: PermissionException - |
commitResource | public void commitResource(ContentResourceEdit edit, int priority) throws OverQuotaException, ServerOverloadException(Code) | | Commit the changes made, and release the lock. The Object is disabled, and not to be used after this call.
Parameters: edit - The ContentResourceEdit object to commit. Parameters: priority - The notification priority of this commit. exception: OverQuotaException - if this would result in being over quota (the edit is then cancled). exception: ServerOverloadException - if the server is configured to write the resource body to the filesystem and the save fails. |
commitResourceEdit | protected void commitResourceEdit(ContentResourceEdit edit, int priority) throws ServerOverloadException(Code) | | Commit the changes made, and release the lock - no quota check. The Object is disabled, and not to be used after this call.
Parameters: edit - The ContentResourceEdit object to commit. Parameters: priority - The notification priority of this commit. throws: PermissionException - |
contextCreated | public void contextCreated(String context, boolean toolPlacement)(Code) | | |
contextDeleted | public void contextDeleted(String context, boolean toolPlacement)(Code) | | |
contextUpdated | public void contextUpdated(String context, boolean toolPlacement)(Code) | | |
convertIdToUserEid | protected String convertIdToUserEid(String id)(Code) | | If the id is to the /user/ area, make an id that is based on the user EID not ID, if the EID is available.
Parameters: id - The resource id. The modified id. |
convertLockIfDropbox | protected String convertLockIfDropbox(String lock, String id)(Code) | | If the id is for a resource in a dropbox, change the function to a dropbox check, which is to check for write.
You have full or no access to a dropbox.
Parameters: lock - The lock we are checking. Parameters: id - The resource id. The lock to check. |
copyIntoFolder | public String copyIntoFolder(String id, String folder_id) throws PermissionException, IdUnusedException, TypeException, InUseException, IdLengthException, IdUniquenessException, OverQuotaException, InconsistentException, IdUsedException, ServerOverloadException(Code) | | Copy a collection or resource from one location to another. Creates a new collection with an id similar to new_folder_id and recursively copies all nested collections and resources within thisCollection to the new collection.
Parameters: id - The id of the resource. Parameters: folder_id - The id of the folder in which the copy should be created. The full id of the new copy of the resource. exception: PermissionException - if the user does not have permissions to read a containing collection, or to remove this resource. exception: IdUnusedException - if the resource id is not found. exception: TypeException - if the resource is a collection. exception: InUseException - if the resource is locked by someone else. exception: IdLengthException - if the new id of the copied item (or any nested item) is longer than the maximum length of an id. exception: InconsistentException - if the destination folder (folder_id) is contained within the source folder (id). exception: IdUsedException - if a unique resource id cannot be found after some arbitrary number of attempts (@see MAXIMUM_ATTEMPTS_FOR_UNIQUENESS). exception: ServerOverloadException - if the server is configured to write the resource body to the filesystem and the save fails. |
createDropboxCollection | public void createDropboxCollection()(Code) | | Create the site's dropbox collection and one for each qualified user that the current user can make.
|
createDropboxCollection | public void createDropboxCollection(String siteId)(Code) | | Create the site's dropbox collection and one for each qualified user that the current user can make.
Parameters: siteId - the Site id. |
createIndividualDropbox | public void createIndividualDropbox(String siteId)(Code) | | Create an individual dropbox collection for the current user if the site-level dropbox exists
and the current user has AUTH_DROPBOX_OWN for the site.
Parameters: siteId - the Site id. |
destroy | public void destroy()(Code) | | Returns to uninitialized state.
|
disableDropbox | protected void disableDropbox(String context)(Code) | | Remove resources area for a site.
Parameters: site - The site. |
disableResources | protected void disableResources(String context)(Code) | | Remove resources area for a site.
Parameters: site - The site. |
editCollection | public ContentCollectionEdit editCollection(String id) throws IdUnusedException, TypeException, PermissionException, InUseException(Code) | | Access the collection with this local resource id, locked for update. Must commitCollection() to make official, or cancelCollection() when done! The collection internal members and properties are accessible from the returned Collection object.
Parameters: id - The id of the collection. exception: IdUnusedException - if the id does not exist. exception: TypeException - if the resource exists but is not a collection. exception: PermissionException - if the user does not have permissions to see this collection (or read through containing collections). exception: InUseException - if the Collection is locked by someone else. The ContentCollection object found. |
editResource | public ContentResourceEdit editResource(String id) throws PermissionException, IdUnusedException, TypeException, InUseException(Code) | | Access the resource with this resource id, locked for update. For non-collection resources only. Must commitEdit() to make official, or cancelEdit() when done! The resource content and properties are accessible from the returned Resource object.
Parameters: id - The id of the resource. exception: PermissionException - if the user does not have permissions to read the resource or read through any containing collection. exception: IdUnusedException - if the resource id is not found. exception: TypeException - if the resource is a collection. exception: InUseException - if the resource is locked by someone else. the ContentResource object found. |
editResourceForDelete | protected ContentResourceEdit editResourceForDelete(String id) throws PermissionException, IdUnusedException, TypeException, InUseException(Code) | | Access the resource with this resource id, locked for update. For non-collection resources only. Must commitEdit() to make official, or cancelEdit() when done! The resource content and properties are accessible from the returned Resource object.
Parameters: id - The id of the resource. exception: PermissionException - if the user does not have permissions to read the resource or read through any containing collection. exception: IdUnusedException - if the resource id is not found. exception: TypeException - if the resource is a collection. exception: InUseException - if the resource is locked by someone else. the ContentResource object found. |
eliminateDuplicates | public void eliminateDuplicates(Collection resourceIds)(Code) | | Eliminate from the collection any duplicates as well as any items that are contained within another item whose resource-id is in the collection.
Parameters: resourceIds - A collection of strings (possibly empty) identifying items and/or collections. |
enableDropbox | protected void enableDropbox(String context)(Code) | | Make sure a home in resources for dropbox exists for the site.
Parameters: site - The site. |
enableResources | protected void enableResources(String context)(Code) | | Make sure a home in resources exists for the site.
Parameters: site - The site. |
findCollection | protected ContentCollection findCollection(String id) throws TypeException(Code) | | Access the collection with this local resource id. Internal find does the guts of finding without security or event tracking. The collection internal members and properties are accessible from the returned Colelction object.
Parameters: id - The id of the collection. exception: TypeException - if the resource exists but is not a collection. The ContentCollection object found, or null if not. |
findResource | protected ContentResource findResource(String id) throws TypeException(Code) | | Access the resource with this resource id. For non-collection resources only. Internal find that doesn't do security or event tracking The resource content and properties are accessible from the returned Resource object.
Parameters: id - The resource id. exception: TypeException - if the resource is a collection. the ContentResource object found, or null if there's a problem. |
fixTypeAndId | protected Hashtable fixTypeAndId(String id, String type)(Code) | | Check the fixed type and id infomation: The same or better content type based on the known type for this id's extension, if any. The same or added extension id based on the know MIME type, if any Only if the type is the unknown type already.
Parameters: id - The resource id with possible file extension to check. Parameters: type - The content type. the best guess content type based on this resource's id and resource id with extension based on this resource's MIME type. |
generateCollections | protected void generateCollections(String target)(Code) | | Attempt to create any collections needed so that the parameter collection exists.
Parameters: target - The collection that we want to exist. |
getAccessPoint | protected String getAccessPoint(boolean relative)(Code) | | Access the partial URL that forms the root of resource URLs.
Parameters: relative - if true, form within the access path only (i.e. starting with /content) the partial URL that forms the root of resource URLs. |
getAllEntities | public List getAllEntities(String id)(Code) | | Access a List of ContentEntity objects (resources and collections) in this path (and below) if the current user has access to the collection.
Parameters: id - A collection id. a List of the ContentEntity objects. |
getAllEntities | protected void getAllEntities(ContentCollection collection, List rv, boolean includeCollections)(Code) | | Access a List of all the ContentResource objects in this collection (and below).
Parameters: collection - The collection. Parameters: rv - The list in which to accumulate resource objects. Parameters: includeCollections - TODO |
getAllResources | public List getAllResources(String id)(Code) | | Access a List of all the ContentResource objects in this path (and below) which the current user has access.
Parameters: id - A collection id. a List of the ContentResource objects. |
getAllResources | protected void getAllResources(ContentCollection collection, List rv, boolean includeCollections)(Code) | | Access a List of all the ContentResource objects in this collection (and below) which the current user has access.
Parameters: collection - The collection. Parameters: rv - The list in which to accumulate resource objects. Parameters: includeCollections - TODO |
getAllowGroupResources | public boolean getAllowGroupResources()(Code) | | Get
allowGroupResources |
getAlternateReferenceRoot | protected String getAlternateReferenceRoot(String id, String rootProperty)(Code) | | Compute an alternate root for a reference, based on the value of the specified property.
Parameters: rootProperty - The property name. The alternate root, or "" if there is none. |
getCollectionMap | public Map getCollectionMap()(Code) | | Return a map of Worksite collections roots that the user has access to.
Map of worksite resource root id (String) to worksite title (String) |
getContainingCollectionId | public String getContainingCollectionId(String id)(Code) | | Access the resource id of the collection which contains this collection or resource.
Parameters: id - The resource id (reference, or URL) of the ContentCollection or ContentResource the resource id (reference, or URL, depending on the id parameter) of the collection which contains this resource. |
getDepth | public int getDepth(String resourceId, String baseCollectionId)(Code) | | Get the depth of the resource/collection object in the hireachy based on the given collection id
Parameters: resourceId - The Id of the resource/collection object to be tested Parameters: baseCollectionId - The Id of the collection as the relative root level the integer value reflecting the relative hierarchy depth of the test resource/collection object based on the given base collection level |
getDropboxCollection | public String getDropboxCollection()(Code) | | |
getDropboxDisplayName | public String getDropboxDisplayName()(Code) | | Access the default dropbox collection display name for the current request. If the current user has permission to modify the site's dropbox collection, this is returned. Otherwise, the current user's collection within the site's dropbox is
returned.
The default dropbox collection display name for the current request. |
getDropboxDisplayName | public String getDropboxDisplayName(String siteId)(Code) | | Access the default dropbox collection display name for the site. If the current user has permission to modify the site's dropbox collection, this is returned. Otherwise, the current user's collection within the site's dropbox is returned.
Parameters: siteId - the Site id. The default dropbox collection display name for the site. |
getFlatResources | protected List getFlatResources(String parentId)(Code) | | get all the resources under a given directory.
Parameters: parentId - List of all the ContentResource objects under this directory. |
getGroupsAllowFunction | protected Collection getGroupsAllowFunction(String function, String refString)(Code) | | Get a collection (Group) of groups that are defined in the containing context of a resource and that this user can access
in the way described by a function string.
Parameters: function - The function to check Parameters: refString - The reference for the resource. |
getGroupsWithAddPermission | public Collection getGroupsWithAddPermission(String collectionId)(Code) | | Access a collection (Group) of groups to which this user has access and whose members have "content.new" permission in the collection.
In effect, this method returns a collection that identifies groups that are defined for the collection (locally or inherited) in which
this user has permission to add content entities. If access to the collection is determined by group-membership, the return is limited
to groups that have "add" permission in the specified collection. If access is not defined by groups (i.e. it is "site" access), the return
includes all groups defined in the site for which this user has add permission in this collection.
Parameters: collectionId - The id for the collection. |
getGroupsWithReadAccess | public Collection getGroupsWithReadAccess(String collectionId)(Code) | | Access a collection (Group) of groups to which this user has access and whose members have "content.read" permission in the collection.
In effect, this method returns a collection that identifies groups that are defined for the collection (locally or inherited) that
this user can access. If access to the collection is determined by group-membership, the return is limited to groups that have
access to the specified collection. If access is not defined by groups (i.e. it is "site" access), the return includes all groups
defined in the site for which this user has read permission.
Parameters: collectionId - The id for the collection. |
getGroupsWithRemovePermission | public Collection getGroupsWithRemovePermission(String collectionId)(Code) | | Access a collection (Group) of groups to which this user has access and whose members have "content.delete" permission in the collection.
In effect, this method returns a collection that identifies groups that are defined for the collection (locally or inherited) in which
this user has permission to remove content entities. If access to the collection is determined by group-membership, the return is limited
to groups that have "remove" permission in the specified collection. If access is not defined by groups (i.e. it is "site" access), the return
includes all groups defined in the site for which this user has remove permission in this collection.
Parameters: collectionId - The id for the collection. |
getPrioritySortEnabled | public boolean getPrioritySortEnabled()(Code) | | Configuration: set a flag indicating whether custom sort order based on "priority" is enabled
Parameters: value - The value indicating whether custom sort order is enabled. |
getQuota | public long getQuota(ContentCollection collection)(Code) | | gets the quota for a site collection or for a user's my workspace collection
Parameters: collection - the collection on which to test for a quota. this can be the collection for a siteor a user's workspace collection the quota in kb |
getReference | public String getReference(String id)(Code) | | Access the internal reference from a resource id.
Parameters: id - The resource id. The internal reference from a resource id. |
getUrl | public String getUrl(String id)(Code) | | Access the resource URL from a resource id.
Parameters: id - The resource id. The resource URL. |
getUrl | public String getUrl(String id, String rootProperty)(Code) | | Access the alternate URL which can be used to access the entity.
Parameters: id - The resource id. Parameters: rootProperty - The name of the entity property whose value controls which alternate reference URL is requested. If null, the native 'raw' URL is requested. The resource URL. |
groupCollectionContainsRefString | protected boolean groupCollectionContainsRefString(Collection groups, String groupRef)(Code) | | Test a collection of Group object for the specified group reference
Parameters: groups - The collection (Group) of groups Parameters: groupRef - The string group reference to find. true if found, false if not. |
init | public void init()(Code) | | Final initialization, once all dependencies are set.
|
isAttachmentResource | public boolean isAttachmentResource(String id)(Code) | | Check whether a resource id or collection id references an entity in the attachments collection. This method makes no guarantees that a resource actually exists with this id.
Parameters: id - Assumed to be a valid resource id or collection id. true if the id (assuming it is a valid id for an existing resource or collection) references an entity in the hidden attachments area created through one of this class's addAttachmentResource methods. |
isAvailabilityEnabled | public boolean isAvailabilityEnabled()(Code) | | Access flag indicating whether entities can be hidden (scheduled or otherwise).
true if the availability features are enabled, false otherwise. |
isAvailable | public boolean isAvailable(String entityId)(Code) | | Determine whether an entity is available to this user at this time, taking into account whether the item is hidden and the user's
status with respect to viewing hidden entities in this context.
Parameters: entityId - true if the item is not hidden or it's hidden but the user has permissions to view hidden items in this context (site? folder? group?), and false otherwise. |
isCollection | public boolean isCollection(String entityId)(Code) | | Determine whether the entityId parameter identifies a collection (as opposed to a resource).
This method does not necessarily verify that a ContentEntity with this id exists.
It merely determines whether the id could identify a collection.
Parameters: entityId - true if the entityId could identify a collection, false otherwise. |
isDropboxMaintainer | public boolean isDropboxMaintainer()(Code) | | Determine whether the default dropbox collection id for this user in this site
is the site's entire dropbox collection or just the current user's collection
within the site's dropbox.
True if user sees all dropboxes in the site, false otherwise. |
isDropboxMaintainer | public boolean isDropboxMaintainer(String siteId)(Code) | | Determine whether the default dropbox collection id for this user in some site is the site's entire dropbox collection or just the current user's collection within the site's dropbox.
True if user sees all dropboxes in the site, false otherwise. |
isInDropbox | public boolean isInDropbox(String entityId)(Code) | | Check whether an id would identify an entity in a dropbox. Does not determine existence of the entity, just whether its id indicates it is a dropbox or contained within a dropbox.
true if the entity is a dropbox or in a dropbox, false otherwise. |
isInheritingPubView | public boolean isInheritingPubView(String id)(Code) | | |
isRootCollection | public boolean isRootCollection(String id)(Code) | | Test if this id (reference, or URL) refers to the root collection.
Parameters: id - The resource id (reference, or URL) of a ContentCollection true if this is the root collection |
isShortRefs | public boolean isShortRefs()(Code) | | |
isSortByPriorityEnabled | public boolean isSortByPriorityEnabled()(Code) | | Access flag indicating whether sorting by "priority" is enabled.
true if the custom sort by priority is enabled, false otherwise. |
isolateContainingId | protected String isolateContainingId(String id)(Code) | | Find the containing collection id of a given resource id.
Parameters: id - The resource id. the containing collection id. |
isolateName | protected String isolateName(String id)(Code) | | Find the resource name of a given resource id.
Parameters: id - The resource id. the resource name. |
merge | public String merge(String siteId, Element root, String archivePath, String mergeId, Map attachmentNames, Map userIdTrans, Set userListAllowImport)(Code) | | Merge the resources from the archive into the given site.
Parameters: siteId - The id of the site getting imported into. Parameters: root - The XML DOM tree of content to merge. Parameters: archviePath - The path to the folder where we are reading auxilary files. A log of status messages from the archive. |
moveCollection | protected String moveCollection(ContentCollectionEdit thisCollection, String new_folder_id) throws PermissionException, IdUnusedException, TypeException, InUseException, OverQuotaException, IdUsedException, ServerOverloadException(Code) | | Move a collection to a new folder. Moves the existing collection or creates a new collection with an id similar to the new_folder_id (in which case the original collection is removed) and recursively moves all nested collections and resources
within thisCollection to the new collection. When finished, thisCollection no longer exists, but the collection identified by the return value has the same structure and all of the members the original had (or copies of them).
Parameters: thisCollection - The collection to be copied Parameters: new_folder_id - The desired id of the collection after it is moved. The full id of the moved collection. exception: PermissionException - if the user does not have permissions to perform the operations exception: IdUnusedException - if the collection id is not found. exception: TypeException - if the resource is not a collection. exception: InUseException - if the collection is locked by someone else. exception: IdUsedException - if a unique resource id cannot be found after some arbitrary number of attempts to find a unique variation of the new_id (@see MAXIMUM_ATTEMPTS_FOR_UNIQUENESS). exception: ServerOverloadException - if the server is configured to save content bodies in the server's filesystem and an error occurs trying to access the filesystem. |
moveIntoFolder | public String moveIntoFolder(String id, String folder_id) throws PermissionException, IdUnusedException, TypeException, InUseException, OverQuotaException, IdUsedException, InconsistentException, ServerOverloadException(Code) | | Move a resource or collection to a (different) folder. This may be accomplished by renaming the resource or by recursively renaming the collection and all enclosed members (no matter how deep) to effectively change their locations. Alternatively,
it may be accomplished by copying the resource and recursively copying collections from their existing collection to the new collection and ultimately deleting the original resource(s) and/or collections(s).
Parameters: id - The id of the resource or collection to be moved. Parameters: folder_id - The id of the folder to which the resource should be moved. The full id of the resource after the move is completed. exception: PermissionException - if the user does not have permissions to read a containing collection, or to remove this resource. exception: IdUnusedException - if the resource id is not found. exception: TypeException - if the resource is a collection. exception: InUseException - if the resource is locked by someone else. exception: InconsistentException - if the containing collection does not exist. exception: InconsistentException - if the destination folder (folder_id) is contained within the source folder (id). exception: IdUsedException - if a unique resource id cannot be found after some arbitrary number of attempts (@see MAXIMUM_ATTEMPTS_FOR_UNIQUENESS). exception: ServerOverloadException - if the server is configured to write the resource body to the filesystem and the save fails. |
moveResource | protected String moveResource(ContentResourceEdit thisResource, String new_id) throws PermissionException, IdUnusedException, TypeException, InUseException, OverQuotaException, IdUsedException, ServerOverloadException(Code) | | Move a resource to a new folder. Either creates a new resource with an id similar to the new_folder_id and and removes the original resource, or renames the resource with an id similar to the new id, which effectively moves the resource to a new
location.
Parameters: thisResource - The resource to be copied Parameters: new_id - The desired id of the resource after it is moved. The full id of the moved resource (which may be a variation on the new_id to ensure uniqueness within the new folder. exception: PermissionException - if the user does not have permissions to perform the operations exception: IdUnusedException - if the resource id is not found. exception: TypeException - if the resource is a collection. exception: InUseException - if the resource is locked by someone else. exception: IdUsedException - if a unique resource id cannot be found after some arbitrary number of attempts to find a unique variation of the new_id (@see MAXIMUM_ATTEMPTS_FOR_UNIQUENESS). exception: ServerOverloadException - if the server is configured to save content bodies in the server's filesystem and an error occurs trying to access the filesystem. |
newContentHostingComparator | public Comparator newContentHostingComparator(String property, boolean ascending)(Code) | | |
newResourceProperties | public ResourcePropertiesEdit newResourceProperties()(Code) | | Construct a stand-alone, not associated with any particular resource, ResourceProperties object.
The new ResourceProperties object. |
newStorage | abstract protected Storage newStorage()(Code) | | Construct a Storage object.
The new storage object. |
overQuota | protected boolean overQuota(ContentResourceEdit edit)(Code) | | Test if this resource edit would place the account" over quota.
Parameters: edit - The proposed resource edit. true if this change would palce the "account" over quota, false if not. |
refresh | public Object refresh(Object key, Object oldValue, Event event)(Code) | | Get a new value for this key whose value has already expired in the cache.
Parameters: key - The key whose value has expired and needs to be refreshed. Parameters: oldValue - The old exipred value of the key. Parameters: event - The event which triggered this refresh. a new value for use in the cache for this key; if null, the entry will be removed. |
removeRecursive | protected void removeRecursive(ContentCollection parent)(Code) | | used to remove any members of a collection whoes add was canceled.
Parameters: parent - |
removeResource | public void removeResource(ContentResourceEdit edit) throws PermissionException(Code) | | Remove a resource that is locked for update.
Parameters: edit - The ContentResourceEdit object to remove. exception: PermissionException - if the user does not have permissions to read a containing collection, or to remove this resource. |
setAliasService | public void setAliasService(AliasService service)(Code) | | Dependency: AliasService.
Parameters: service - The AliasService. |
setAllowGroupResources | public void setAllowGroupResources(boolean allowGroupResources)(Code) | | Dependency: allowGroupResources
Parameters: allowGroupResources - the setting |
setAuthzGroupService | public void setAuthzGroupService(AuthzGroupService service)(Code) | | Dependency: AuthzGroupService.
Parameters: service - The AuthzGroupService. |
setAvailabilityChecksEnabled | public void setAvailabilityChecksEnabled(boolean value)(Code) | | Configuration: set a flag indicating whether entities can be hidden (scheduled or otherwise)
Parameters: value - The value indicating whether entities can be hidden. |
setBodyPath | public void setBodyPath(String value)(Code) | | Configuration: set the external file system path for body storage If set, the resource binary database table will not be used.
Parameters: value - The complete path to the root of the external file system storage area for resource body bytes. |
setBodyVolumes | public void setBodyVolumes(String value)(Code) | | Configuration: set the external file system volume folders (folder just within the bodyPath) as a comma separated list of folder names. If set, files will be distributed over these folders.
Parameters: value - The comma separated list of folder names within body path to distribute files among. |
setCaching | public void setCaching(String value)(Code) | | Configuration: set the locks-in-db
Parameters: path - The storage path. |
setEntityManager | public void setEntityManager(EntityManager service)(Code) | | Dependency: EntityManager.
Parameters: service - The EntityManager. |
setMemoryService | public void setMemoryService(MemoryService service)(Code) | | Dependency: MemoryService.
Parameters: service - The MemoryService. |
setNotificationService | public void setNotificationService(NotificationService service)(Code) | | Dependency: NotificationService.
Parameters: service - The NotificationService. |
setPrioritySortEnabled | public void setPrioritySortEnabled(boolean value)(Code) | | Configuration: set a flag indicating whether custom sort order based on "priority" is enabled
Parameters: value - The value indicating whether custom sort order is enabled. |
setPubView | public void setPubView(String id, boolean pubview)(Code) | | Set this resource or collection to the pubview setting.
Parameters: id - The resource or collection id. Parameters: pubview - The desired public view setting. |
setResourceTypeRegistry | public void setResourceTypeRegistry(ResourceTypeRegistry registry)(Code) | | Dependency: inject the ResourceTypeRegistry
Parameters: registry - |
setSecurityService | public void setSecurityService(SecurityService service)(Code) | | Dependency: SecurityService.
Parameters: service - The SecurityService. |
setServerConfigurationService | public void setServerConfigurationService(ServerConfigurationService service)(Code) | | Dependency: ServerConfigurationService.
Parameters: service - The ServerConfigurationService. |
setShortRefs | public void setShortRefs(String value)(Code) | | Configuration: set the short refs
Parameters: value - The short refs value. |
setSiteAlias | public void setSiteAlias(String value)(Code) | | Configuration: set the alias for site
Parameters: value - The alias for site value. |
setSiteQuota | public void setSiteQuota(String quota)(Code) | | Set the site quota.
Parameters: quota - The site quota (as a string). |
setSiteService | public void setSiteService(SiteService service)(Code) | | Dependency: SiteService.
Parameters: service - The SiteService. |
setUseResourceTypeRegistry | public void setUseResourceTypeRegistry(boolean useRegistry)(Code) | | |
setUuidInternal | abstract protected void setUuidInternal(String id, String uuid)(Code) | | Parameters: id - id of the resource to set the UUID for Parameters: uuid - the new UUID of the resource |
transferCopyEntities | public void transferCopyEntities(String fromContext, String toContext, List resourceIds)(Code) | | |
unlock | protected void unlock(String lock, String id) throws PermissionException(Code) | | Check security permission.
Parameters: lock - The lock id string. Parameters: id - The resource id string, or null if no resource is involved. exception: PermissionException - Thrown if the user does not have access |
unlockCheck | protected boolean unlockCheck(String lock, String id)(Code) | | Check security permission.
Parameters: lock - The lock id string. Parameters: id - The resource id string, or null if no resource is involved. true if permitted, false if not. |
usingResourceTypeRegistry | public boolean usingResourceTypeRegistry()(Code) | | |
verifyGroups | protected void verifyGroups(ContentCollection collection, Collection groups)(Code) | | Recursively traverse the heirarchy of ContentEntity objects contained within a collection and remove access groups if they
are not included in the set defined for the initial collection. The branching stops whenever we verify a ContentCollection
with "grouped" access or a ContentResource.
Parameters: collection - Parameters: groups - |
willArchiveMerge | public boolean willArchiveMerge()(Code) | | |
|
|