Java Doc for BaseContentService.java in  » ERP-CRM-Financial » sakai » org » sakaiproject » content » impl » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » sakai » org.sakaiproject.content.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.sakaiproject.content.impl.BaseContentService

All known Subclasses:   org.sakaiproject.content.impl.DbContentService,
BaseContentService
abstract public class BaseContentService implements ContentHostingService,CacheRefresher,ContextObserver,EntityTransferrer(Code)

BaseContentService is an abstract base implementation of the Sakai ContentHostingService.


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 :public class BaseCollectionEdit extends BasicGroupAwareEdit implements ContentCollectionEdit,SessionBindingListener
Inner Class :public class BaseResourceEdit extends BasicGroupAwareEdit implements ContentResourceEdit,SessionBindingListener
Inner Class :protected interface Storage

Field Summary
final public static  StringACCESS_MODE
    
final public static  StringCUSTOM_ORDER
    
final public static  StringCUSTOM_RANK
    
final protected static  StringDROPBOX_ID
    
final protected static  longEND_OF_TIME
    
final protected static  StringGROUP_LIST
    
final protected static  StringGROUP_NAME
    
final public static  StringHIDDEN
    
final public static  StringMEMBER_ID
    
final protected static  StringPROP_MEMBER_DROPBOX_DESCRIPTION
    
final protected static  StringPROP_SITE_DROPBOX_DESCRIPTION
    
final public static  StringRANK
    
final public static  StringRELEASE_DATE
    
final public static  StringRETRACT_DATE
    
final public static  StringSITE_UPDATE_ACCESS
    
final protected static  longSTART_OF_TIME
    
final protected static  intSTREAM_BUFFER_SIZE
     The chunk size used when streaming (100k).
final protected static  booleanSTREAM_CONTENT
     stream content requests if true, read all into memory and send if false.
protected  AliasServicem_aliasService
     Dependency: AliasService.
protected  booleanm_allowGroupResources
    
protected  AuthzGroupServicem_authzGroupService
     Dependency: AuthzGroupService.
protected  booleanm_availabilityChecksEnabled
    
protected  Stringm_bodyPath
     Optional path to external file system file store for body binary.
protected  String[]m_bodyVolumes
     Optional set of folders just within the m_bodyPath to distribute files among.
protected  Cachem_cache
     A Cache for this service - ContentResource and ContentCollection keyed by reference.
protected  booleanm_caching
     Configuration: cache, or not.
protected  EntityManagerm_entityManager
     Dependency: EntityManager.
protected  MemoryServicem_memoryService
     Dependency: MemoryService.
protected  NotificationServicem_notificationService
     Dependency: NotificationService.
protected  booleanm_prioritySortEnabled
    
protected  Stringm_relativeAccessPoint
     The initial portion of a relative access point URL.
protected  ResourceTypeRegistrym_resourceTypeRegistry
    
protected  SecurityServicem_securityService
     Dependency: SecurityService.
protected  ServerConfigurationServicem_serverConfigurationService
     Dependency: ServerConfigurationService.
protected  booleanm_shortRefs
    
protected  booleanm_siteAlias
     Configuration: allow use of alias for site id in references.
protected  longm_siteQuota
     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.
protected  SiteServicem_siteService
     Dependency: SiteService.
protected  Storagem_storage
     A Storage object for persistent storage.
protected  booleanuseResourceTypeRegistry
    


Method Summary
protected  voidWTUserIdTrans(Element el, Map userIdTrans)
    
public  ContentResourceaddAttachmentResource(String name, String type, byte[] content, ResourceProperties properties)
     Create a new resource as an attachment to some other resource in the system.
public  ContentResourceaddAttachmentResource(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  ContentResourceEditaddAttachmentResource(String name)
     Create a new resource as an attachment to some other resource in the system, locked for update.
public  ContentCollectionaddCollection(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  ContentCollectionaddCollection(String id, ResourceProperties properties, Collection groups)
    
public  ContentCollectionaddCollection(String id, ResourceProperties properties, Collection groups, boolean hidden, Time releaseDate, Time retractDate)
    
public  ContentCollectionEditaddCollection(String id)
     Create a new collection with the given resource id, locked for update.
public  ContentCollectionEditaddCollection(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  ContentResourceaddDeleteResource(String id, String type, byte[] content, ResourceProperties properties, String uuid, String userId, int priority)
    
protected  voidaddLiveCollectionProperties(ContentCollectionEdit c)
     Create the live properties for a collection.
protected  voidaddLiveResourceProperties(ContentResourceEdit r)
     Create the live properties for a resource.
protected  voidaddLiveUpdateCollectionProperties(ContentCollectionEdit c)
     Create the live properties for a collection.
protected  voidaddLiveUpdateResourceProperties(ContentResourceEdit r)
     Update the live properties for a resource when modified (for a resource).
protected  voidaddProperties(ResourcePropertiesEdit p, ResourceProperties props)
     Add properties for a resource.
public  ResourcePropertiesaddProperty(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  ContentResourceaddResource(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  ContentResourceaddResource(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  ContentResourceaddResource(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  ContentResourceEditaddResource(String collectionId, String basename, String extension, int maximum_tries)
    
public  ContentResourceaddResource(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  ContentResourceEditaddResource(String id)
     Create a new resource with the given resource id, locked for update.
public  ContentResourceaddResource(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  voidaddResourceToDeleteTable(ContentResourceEdit edit, String uuid, String userId)
    
protected  voidaddSizeCache(ContentResourceEdit edit)
    
protected  ContentCollectionEditaddValidPermittedCollection(String id)
     Create a new collection with the given resource id, locked for update.
protected  voidadjustGroups(ContentEntity member, Collection groups)
    
public  booleanallowAddAttachmentResource()
     check permissions for addAttachmentResource().
public  booleanallowAddCollection(String id)
     check permissions for addCollection().
Parameters:
  id - The id of the new collection.
public  booleanallowAddProperty(String id)
     check permissions for addProperty().
Parameters:
  id - The id of the new resource.
public  booleanallowAddResource(String id)
     check permissions for addResource().
Parameters:
  id - The id of the new resource.
public  booleanallowCopy(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  booleanallowGetCollection(String id)
     check permissions for getCollection().
Parameters:
  id - The id of the collection.
public  booleanallowGetProperties(String id)
     check permissions for getProperties().
Parameters:
  id - The id of the new resource.
public  booleanallowGetResource(String id)
     check permissions for getResource().
Parameters:
  id - The id of the new resource.
protected  booleanallowRemove(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  booleanallowRemoveCollection(String id)
     check permissions for removeCollection().
public  booleanallowRemoveProperty(String id)
     check permissions for removeProperty().
Parameters:
  id - The id of the new resource.
public  booleanallowRemoveResource(String id)
     check permissions for removeResource().
Parameters:
  id - The id of the new resource.
public  booleanallowRename(String id, String new_id)
     check permissions for rename().
public  booleanallowUpdate(String id)
     check permissions for revising collections or resources
Parameters:
  id - The id of the collection.
public  booleanallowUpdateCollection(String id)
     check permissions for editCollection()
Parameters:
  id - The id of the collection.
public  booleanallowUpdateResource(String id)
     check permissions for updateResource().
Parameters:
  id - The id of the new resource.
public  Stringarchive(String siteId, Document doc, Stack stack, String archivePath, List attachments)
    
protected  voidarchiveCollection(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  StringarchiveResource(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  StringarchiveResources(List attachments, Document doc, Stack stack, String archivePath)
    
protected  voidassureResourceProperties(ContentResourceEdit r)
     Make sure that the entire set of properties are present, adding whatever is needed, replacing nothing that's there already.
protected  booleanavailabilityCheck(String id)
     Check whether the resource is hidden.
protected  longbytes2k(long bytes)
     Convert bytes to Kbytes, rounding up, and counting even 0 bytes as 1 k.
Parameters:
  bytes - The size in bytes.
public  voidcancelCollection(ContentCollectionEdit edit)
     Cancel the changes made object, and release the lock.
public  voidcancelResource(ContentResourceEdit edit)
     Cancel the changes made object, and release the lock.
public  voidcheckCollection(String id)
     Check access to the collection with this local resource id.
protected  voidcheckExplicitLock(String id)
    
public  voidcheckResource(String id)
     Check access to the resource with this local resource id.
public  voidcommitCollection(ContentCollectionEdit edit)
     Commit the changes made, and release the lock.
public  voidcommitResource(ContentResourceEdit edit)
     Commit the changes made, and release the lock.
public  voidcommitResource(ContentResourceEdit edit, int priority)
     Commit the changes made, and release the lock.
protected  voidcommitResourceEdit(ContentResourceEdit edit, int priority)
     Commit the changes made, and release the lock - no quota check.
public  voidcontextCreated(String context, boolean toolPlacement)
    
public  voidcontextDeleted(String context, boolean toolPlacement)
    
public  voidcontextUpdated(String context, boolean toolPlacement)
    
protected  StringconvertIdToUserEid(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  StringconvertLockIfDropbox(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  Stringcopy(String id, String new_id)
     Copy a resource or collection.
public  StringcopyCollection(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  StringcopyIntoFolder(String id, String folder_id)
     Copy a collection or resource from one location to another.
public  StringcopyResource(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  voidcreateDropboxCollection()
     Create the site's dropbox collection and one for each qualified user that the current user can make.
public  voidcreateDropboxCollection(String siteId)
     Create the site's dropbox collection and one for each qualified user that the current user can make.
public  voidcreateIndividualDropbox(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  StringdeepcopyCollection(ContentCollection thisCollection, String new_folder_id)
     Make a deep copy of a collection.
public  voiddestroy()
     Returns to uninitialized state.
protected  voiddisableDropbox(String context)
     Remove resources area for a site.
protected  voiddisableResources(String context)
     Remove resources area for a site.
public  ContentCollectionEditeditCollection(String id)
     Access the collection with this local resource id, locked for update.
public  ContentResourceEditeditResource(String id)
     Access the resource with this resource id, locked for update.
protected  ContentResourceEditeditResourceForDelete(String id)
     Access the resource with this resource id, locked for update.
public  voideliminateDuplicates(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  voidenableDropbox(String context)
     Make sure a home in resources for dropbox exists for the site.
protected  voidenableResources(String context)
     Make sure a home in resources exists for the site.
protected  ListfilterArtifacts(List artifacts, String type, String primaryMimeType, String subMimeType)
    
protected  ListfilterArtifacts(List artifacts, String type, String primaryMimeType, String subMimeType, boolean checkPerms)
    
protected  ContentCollectionfindCollection(String id)
     Access the collection with this local resource id.
protected  ContentResourcefindResource(String id)
     Access the resource with this resource id.
public  ListfindResources(String type, String primaryMimeType, String subMimeType)
    
protected  HashtablefixTypeAndId(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  voidgenerateCollections(String target)
     Attempt to create any collections needed so that the parameter collection exists.
protected  StringgetAccessPoint(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  ListgetAllEntities(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  voidgetAllEntities(ContentCollection collection, List rv, boolean includeCollections)
     Access a List of all the ContentResource objects in this collection (and below).
public  ListgetAllResources(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  voidgetAllResources(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  booleangetAllowGroupResources()
    
protected  StringgetAlternateReferenceRoot(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  ContentCollectiongetCollection(String id)
     Access the collection with this local resource id.
public  MapgetCollectionMap()
     Return a map of Worksite collections roots that the user has access to.
public  StringgetContainingCollectionId(String id)
     Access the resource id of the collection which contains this collection or resource.
public  intgetDepth(String resourceId, String baseCollectionId)
    
public  StringgetDropboxCollection()
    
public  StringgetDropboxCollection(String siteId)
    
public  StringgetDropboxDisplayName()
     Access the default dropbox collection display name for the current request.
public  StringgetDropboxDisplayName(String siteId)
     Access the default dropbox collection display name for the site.
public  EntitygetEntity(Reference ref)
    
public  CollectiongetEntityAuthzGroups(Reference ref, String userId)
    
public  StringgetEntityDescription(Reference ref)
    
protected  CollectiongetEntityHierarchyAuthzGroups(Reference ref)
    
public  ResourcePropertiesgetEntityResourceProperties(Reference ref)
    
public  StringgetEntityUrl(Reference ref)
    
protected  ListgetFlatResources(String parentId)
     get all the resources under a given directory.
protected  CollectiongetGroupsAllowFunction(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  CollectiongetGroupsWithAddPermission(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  CollectiongetGroupsWithReadAccess(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  CollectiongetGroupsWithRemovePermission(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  HttpAccessgetHttpAccess()
    
public  StringgetLabel()
    
public  booleangetPrioritySortEnabled()
    
public  ResourcePropertiesgetProperties(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  longgetQuota(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  StringgetReference(String id)
     Access the internal reference from a resource id.
Parameters:
  id - The resource id.
public  ContentResourcegetResource(String id)
     Access the resource with this resource id.
public  ResourceTypeRegistrygetResourceTypeRegistry()
    
public  StringgetSiteCollection(String siteId)
    
public  StringgetUrl(String id)
     Access the resource URL from a resource id.
Parameters:
  id - The resource id.
public  StringgetUrl(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  booleangroupCollectionContainsRefString(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  voidhandleAccessCollection(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  voidhandleAccessResource(HttpServletRequest req, HttpServletResponse res, Reference ref, Collection copyrightAcceptedRefs)
     Process the access request for a resource.
public  voidinit()
     Final initialization, once all dependencies are set.
public  booleanisAttachmentResource(String id)
     Check whether a resource id or collection id references an entity in the attachments collection.
public  booleanisAvailabilityEnabled()
     Access flag indicating whether entities can be hidden (scheduled or otherwise).
public  booleanisAvailable(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  booleanisCollection(String entityId)
     Determine whether the entityId parameter identifies a collection (as opposed to a resource).
public  booleanisDropboxMaintainer()
    
public  booleanisDropboxMaintainer(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  booleanisInDropbox(String entityId)
     Check whether an id would identify an entity in a dropbox.
public  booleanisInheritingPubView(String id)
    
public  booleanisPubView(String id)
    
public  booleanisRootCollection(String id)
     Test if this id (reference, or URL) refers to the root collection.
public  booleanisShortRefs()
    
public  booleanisSortByPriorityEnabled()
     Access flag indicating whether sorting by "priority" is enabled.
protected  StringisolateContainingId(String id)
     Find the containing collection id of a given resource id.
Parameters:
  id - The resource id.
protected  StringisolateName(String id)
     Find the resource name of a given resource id.
Parameters:
  id - The resource id.
public  Stringmerge(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  ContentCollectionmergeCollection(Element element)
     Merge in a collection from an XML DOM definition.
protected  ContentResourcemergeResource(Element element)
     Merge in a resource from an XML DOM definition.
protected  ContentResourcemergeResource(Element element, byte[] body)
     Merge in a resource from an XML DOM definition and a body bytes array.
protected  StringmoveCollection(ContentCollectionEdit thisCollection, String new_folder_id)
     Move a collection to a new folder.
public  StringmoveIntoFolder(String id, String folder_id)
     Move a resource or collection to a (different) folder.
protected  StringmoveResource(ContentResourceEdit thisResource, String new_id)
     Move a resource to a new folder.
public  String[]myToolIds()
    
public  ComparatornewContentHostingComparator(String property, boolean ascending)
    
protected  StringnewName(String id, String folder_id)
     Calculate a candidate for a resource id for a resource being copied/moved into a new folder.
public  ResourcePropertiesEditnewResourceProperties()
     Construct a stand-alone, not associated with any particular resource, ResourceProperties object.
abstract protected  StoragenewStorage()
     Construct a Storage object.
protected  booleanoverQuota(ContentResourceEdit edit)
     Test if this resource edit would place the account" over quota.
Parameters:
  edit - The proposed resource edit.
public  booleanparseEntityReference(String reference, Reference ref)
    
public  Objectrefresh(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  voidremoveCollection(ContentCollectionEdit edit)
     Remove just a collection.
public  voidremoveCollection(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  ResourcePropertiesremoveProperty(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  voidremoveRecursive(ContentCollection parent)
     used to remove any members of a collection whoes add was canceled.
public  voidremoveResource(String id)
     Remove a resource.
public  voidremoveResource(ContentResourceEdit edit)
     Remove a resource that is locked for update.
protected  voidremoveSizeCache(ContentResourceEdit edit)
    
public  Stringrename(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  voidsetAliasService(AliasService service)
     Dependency: AliasService.
public  voidsetAllowGroupResources(boolean allowGroupResources)
    
public  voidsetAuthzGroupService(AuthzGroupService service)
     Dependency: AuthzGroupService.
public  voidsetAvailabilityChecksEnabled(boolean value)
    
public  voidsetBodyPath(String value)
     Configuration: set the external file system path for body storage If set, the resource binary database table will not be used.
public  voidsetBodyVolumes(String value)
     Configuration: set the external file system volume folders (folder just within the bodyPath) as a comma separated list of folder names.
public  voidsetCaching(String value)
    
public  voidsetEntityManager(EntityManager service)
     Dependency: EntityManager.
public  voidsetMemoryService(MemoryService service)
     Dependency: MemoryService.
public  voidsetNotificationService(NotificationService service)
     Dependency: NotificationService.
public  voidsetPrioritySortEnabled(boolean value)
    
public  voidsetPubView(String id, boolean pubview)
     Set this resource or collection to the pubview setting.
public  voidsetResourceTypeRegistry(ResourceTypeRegistry registry)
    
public  voidsetSecurityService(SecurityService service)
     Dependency: SecurityService.
public  voidsetServerConfigurationService(ServerConfigurationService service)
     Dependency: ServerConfigurationService.
public  voidsetShortRefs(String value)
    
public  voidsetSiteAlias(String value)
    
public  voidsetSiteQuota(String quota)
     Set the site quota.
public  voidsetSiteService(SiteService service)
     Dependency: SiteService.
public  voidsetUseResourceTypeRegistry(boolean useRegistry)
    
abstract protected  voidsetUuidInternal(String id, String uuid)
    
public  voidtransferCopyEntities(String fromContext, String toContext, List resourceIds)
    
protected  voidunlock(String lock, String id)
     Check security permission.
protected  booleanunlockCheck(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  ContentResourceupdateResource(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  booleanusingResourceTypeRegistry()
    
protected  voidverifyGroups(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  booleanwillArchiveMerge()
    

Field Detail
ACCESS_MODE
final public static String ACCESS_MODE(Code)



CUSTOM_ORDER
final public static String CUSTOM_ORDER(Code)



CUSTOM_RANK
final public static String CUSTOM_RANK(Code)



DROPBOX_ID
final protected static String DROPBOX_ID(Code)



END_OF_TIME
final protected static long END_OF_TIME(Code)



GROUP_LIST
final protected static String GROUP_LIST(Code)



GROUP_NAME
final protected static String GROUP_NAME(Code)



HIDDEN
final public static String HIDDEN(Code)



MEMBER_ID
final public static String MEMBER_ID(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)



RANK
final public static String RANK(Code)



RELEASE_DATE
final public static String RELEASE_DATE(Code)



RETRACT_DATE
final public static String RETRACT_DATE(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_aliasService
protected AliasService m_aliasService(Code)
Dependency: AliasService.



m_allowGroupResources
protected boolean m_allowGroupResources(Code)
Dependency: allowGroupResources setting



m_authzGroupService
protected AuthzGroupService m_authzGroupService(Code)
Dependency: AuthzGroupService.



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_entityManager
protected EntityManager m_entityManager(Code)
Dependency: EntityManager.



m_memoryService
protected MemoryService m_memoryService(Code)
Dependency: MemoryService.



m_notificationService
protected NotificationService m_notificationService(Code)
Dependency: NotificationService.



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_resourceTypeRegistry
protected ResourceTypeRegistry m_resourceTypeRegistry(Code)
Dependency: the ResourceTypeRegistry



m_securityService
protected SecurityService m_securityService(Code)
Dependency: SecurityService.



m_serverConfigurationService
protected ServerConfigurationService m_serverConfigurationService(Code)
Dependency: ServerConfigurationService.



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_siteService
protected SiteService m_siteService(Code)
Dependency: SiteService.



m_storage
protected Storage m_storage(Code)
A Storage object for persistent storage.



useResourceTypeRegistry
protected boolean useResourceTypeRegistry(Code)





Method Detail
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.



addCollection
public ContentCollection addCollection(String id, ResourceProperties properties) throws IdUsedException, IdInvalidException, PermissionException, InconsistentException(Code)
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. a new ContentCollection object.



addCollection
public ContentCollection addCollection(String id, ResourceProperties properties, Collection groups) throws IdUsedException, IdInvalidException, PermissionException, InconsistentException(Code)



addCollection
public ContentCollection addCollection(String id, ResourceProperties properties, Collection groups, boolean hidden, Time releaseDate, Time retractDate) throws IdUsedException, IdInvalidException, PermissionException, InconsistentException(Code)



addCollection
public ContentCollectionEdit addCollection(String id) throws IdUsedException, IdInvalidException, PermissionException, InconsistentException(Code)
Create a new collection with the given resource id, locked for update. Must commitCollection() to make official, or cancelCollection() when done!
Parameters:
  id - The id of the 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. a new ContentCollection object.



addCollection
public ContentCollectionEdit addCollection(String collectionId, String name) throws PermissionException, IdUnusedException, IdUsedException, IdLengthException, IdInvalidException, TypeException(Code)

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.
exception:
  IdUnusedException - if the collection id for the proposed name already exists in this collection.
exception:
  IdLengthException - if the new collection id exceeds the maximum number of characters for a valid collection id.
exception:
  IdInvalidException - if the resource id is invalid.



addDeleteResource
public ContentResource addDeleteResource(String id, String type, byte[] content, ResourceProperties properties, String uuid, String userId, int priority) throws PermissionException(Code)



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.



addProperties
protected void addProperties(ResourcePropertiesEdit p, ResourceProperties props)(Code)
Add properties for a resource.
Parameters:
  r - The resource.
Parameters:
  props - The properties.



addProperty
public ResourceProperties addProperty(String id, String name, String value) throws PermissionException, IdUnusedException, TypeException, InUseException, ServerOverloadException(Code)
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. the ResourceProperties object for this 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 id, String type, byte[] content, ResourceProperties properties, int priority) throws PermissionException, IdUsedException, IdInvalidException, InconsistentException, OverQuotaException, ServerOverloadException(Code)
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. 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 ContentResourceEdit addResource(String collectionId, String basename, String extension, int maximum_tries) throws PermissionException, IdUniquenessException, IdLengthException, IdInvalidException, IdUnusedException, OverQuotaException, ServerOverloadException(Code)



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 ContentResourceEdit addResource(String id) throws PermissionException, IdUsedException, IdInvalidException, InconsistentException(Code)
Create a new resource with the given resource id, locked for update. Must commitResource() to make official, or cancelResource() when done!
Parameters:
  id - The id of the new resource.
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. 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.



addResourceToDeleteTable
public void addResourceToDeleteTable(ContentResourceEdit edit, String uuid, String userId) throws PermissionException(Code)
Store the resource in a separate delete table
Parameters:
  edit -
Parameters:
  uuid -
Parameters:
  userId -
exception:
  PermissionException -
exception:
  ServerOverloadException - if server is configured to save resource body in filesystem and attempt to read from filesystem fails.



addSizeCache
protected void addSizeCache(ContentResourceEdit edit)(Code)



addValidPermittedCollection
protected ContentCollectionEdit addValidPermittedCollection(String id) throws IdUsedException, InconsistentException(Code)
Create a new collection with the given resource id, locked for update. Must commitCollection() to make official, or cancelCollection() when done!
Parameters:
  id - The id of the collection.
exception:
  IdUsedException - if the id is already in use.
exception:
  InconsistentException - if the containing collection does not exist. a new ContentCollection object.



adjustGroups
protected void adjustGroups(ContentEntity member, Collection groups)(Code)



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.



archive
public String archive(String siteId, Document doc, Stack stack, String archivePath, List attachments)(Code)



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.



archiveResources
public String archiveResources(List attachments, Document doc, Stack stack, String archivePath)(Code)



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.



availabilityCheck
protected boolean availabilityCheck(String id) throws IdUnusedException(Code)
Check whether the resource is hidden.
Parameters:
  id -
throws:
  IdUnusedException -



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.



checkCollection
public void checkCollection(String id) throws IdUnusedException, TypeException, PermissionException(Code)
Check access to the collection with this local resource id.
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).



checkExplicitLock
protected void checkExplicitLock(String id) throws PermissionException(Code)
Throws a PermissionException if the resource with the given Id is explicitly locked
Parameters:
  id -
throws:
  PermissionException -



checkResource
public void checkResource(String id) throws PermissionException, IdUnusedException, TypeException(Code)
Check access to the resource with this local resource id. For non-collection resources only.
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.



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) 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.
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.
exception:
  PermissionException - if the user is trying to make a change for which they lack permission.



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.



copy
public String copy(String id, String new_id) throws PermissionException, IdUnusedException, TypeException, InUseException, OverQuotaException, IdUsedException, ServerOverloadException(Code)
Copy a resource or collection.
Parameters:
  id - The id of the resource.
Parameters:
  new_id - The desired id of the new 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:
  IdUsedException - if copied item is a collection and the new id is already in use or if the copied item is not a collection and a unique id cannot be found in 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.
See Also:    copyIntoFolder(String, String) method (preferred method for invocation from a tool).



copyCollection
public String copyCollection(ContentCollection thisCollection, String new_id) throws PermissionException, IdUnusedException, TypeException, InUseException, OverQuotaException, IdUsedException(Code)
Copy a collection.
Parameters:
  thisCollection - The collection to be copied
Parameters:
  new_id - The desired id of the new collection. The full id of the new copy of the resource.
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 resource is locked by someone else.
exception:
  IdUsedException - if the new collection id is already in use.



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.



copyResource
public String copyResource(ContentResource resource, String new_id) throws PermissionException, IdUnusedException, TypeException, InUseException, OverQuotaException, IdUsedException, ServerOverloadException(Code)
Copy a resource.
Parameters:
  thisResource - The resource to be copied
Parameters:
  new_id - The desired id of the new resource. 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:
  OverQuotaException - if copying the resource would exceed the quota.
exception:
  IdUsedException - if a unique id cannot be found in 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.



deepcopyCollection
protected String deepcopyCollection(ContentCollection thisCollection, String new_folder_id) throws PermissionException, IdUnusedException, TypeException, InUseException, IdLengthException, IdUniquenessException, OverQuotaException, IdUsedException, ServerOverloadException(Code)
Make a deep copy of a collection. 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:
  thisCollection - The collection to be copied
Parameters:
  new_folder_id - The desired id of the new collection. The full id of the copied collection (which may be a slight variation on the desired id to ensure uniqueness).
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 id cannot be found for the new collection after some arbitrary number of attempts to find a unique variation of the new_folder_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.



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.



filterArtifacts
protected List filterArtifacts(List artifacts, String type, String primaryMimeType, String subMimeType)(Code)



filterArtifacts
protected List filterArtifacts(List artifacts, String type, String primaryMimeType, String subMimeType, boolean checkPerms)(Code)



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.



findResources
public List findResources(String type, String primaryMimeType, String subMimeType)(Code)



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.



getCollection
public ContentCollection getCollection(String id) throws IdUnusedException, TypeException, PermissionException(Code)
Access the collection with this local resource id. The collection internal members and properties are accessible from the returned Colelction 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). The ContentCollection object found.



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)



getDropboxCollection
public String getDropboxCollection(String siteId)(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.



getEntity
public Entity getEntity(Reference ref)(Code)



getEntityAuthzGroups
public Collection getEntityAuthzGroups(Reference ref, String userId)(Code)



getEntityDescription
public String getEntityDescription(Reference ref)(Code)



getEntityHierarchyAuthzGroups
protected Collection getEntityHierarchyAuthzGroups(Reference ref)(Code)



getEntityResourceProperties
public ResourceProperties getEntityResourceProperties(Reference ref)(Code)



getEntityUrl
public String getEntityUrl(Reference ref)(Code)



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.



getHttpAccess
public HttpAccess getHttpAccess()(Code)



getLabel
public String getLabel()(Code)



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.



getProperties
public ResourceProperties getProperties(String id) throws PermissionException, IdUnusedException(Code)
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. the ResourceProperties object for this resource.



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.



getResource
public ContentResource getResource(String id) throws PermissionException, IdUnusedException, TypeException(Code)
Access the resource with this resource id. For non-collection resources only. The resource content and properties are accessible from the returned Resource object.
Parameters:
  id - The resource id.
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. the ContentResource object found.



getResourceTypeRegistry
public ResourceTypeRegistry getResourceTypeRegistry()(Code)
the ResourceTypeRegistry



getSiteCollection
public String getSiteCollection(String siteId)(Code)



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.



handleAccessCollection
protected void handleAccessCollection(HttpServletRequest req, HttpServletResponse res, Reference ref, Collection copyrightAcceptedRefs) throws EntityPermissionException, EntityNotDefinedException, EntityAccessOverloadException, EntityCopyrightException(Code)
Process the access request for a collection, producing the "apache" style HTML file directory listing (complete with index.html redirect if found).
Parameters:
  req -
Parameters:
  res -
Parameters:
  ref -
Parameters:
  copyrightAcceptedRefs -
throws:
  PermissionException -
throws:
  IdUnusedException -
throws:
  ServerOverloadException -



handleAccessResource
protected void handleAccessResource(HttpServletRequest req, HttpServletResponse res, Reference ref, Collection copyrightAcceptedRefs) throws EntityPermissionException, EntityNotDefinedException, EntityAccessOverloadException, EntityCopyrightException(Code)
Process the access request for a resource.
Parameters:
  req -
Parameters:
  res -
Parameters:
  ref -
Parameters:
  copyrightAcceptedRefs -
throws:
  PermissionException -
throws:
  IdUnusedException -
throws:
  ServerOverloadException -
throws:
  CopyrightException -



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)



isPubView
public boolean isPubView(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.



mergeCollection
protected ContentCollection mergeCollection(Element element) throws PermissionException, InconsistentException, IdInvalidException(Code)
Merge in a collection from an XML DOM definition. Take whole if not defined already. Ignore if already here.
Parameters:
  element - The XML DOM element containing the collection definition.
exception:
  PermissionException - if the user does not have permission to add a collection.
exception:
  InconsistentException - if the containing collection does not exist.
exception:
  IdInvalidException - if the id is not valid. a new ContentCollection object, or null if it was not created.



mergeResource
protected ContentResource mergeResource(Element element) throws PermissionException, InconsistentException, IdInvalidException, OverQuotaException, ServerOverloadException(Code)
Merge in a resource from an XML DOM definition. Ignore if already defined. Take whole if not.
Parameters:
  element - The XML DOM element containing the collection definition.
exception:
  PermissionException - if the user does not have permission to add a resource.
exception:
  InconsistentException - if the containing collection does not exist.
exception:
  IdInvalidException - if the id is not valid.
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, or null if it was not created.



mergeResource
protected ContentResource mergeResource(Element element, byte[] body) throws PermissionException, InconsistentException, IdInvalidException, OverQuotaException, ServerOverloadException(Code)
Merge in a resource from an XML DOM definition and a body bytes array. Ignore if already defined. Take whole if not.
Parameters:
  element - The XML DOM element containing the collection definition.
Parameters:
  body - The body bytes.
exception:
  PermissionException - if the user does not have permission to add a resource.
exception:
  InconsistentException - if the containing collection does not exist.
exception:
  IdInvalidException - if the id is not valid.
exception:
  OverQuotaException - if this would result in being over quota. a new ContentResource object, or null if it was not created.



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.



myToolIds
public String[] myToolIds()(Code)



newContentHostingComparator
public Comparator newContentHostingComparator(String property, boolean ascending)(Code)



newName
protected String newName(String id, String folder_id) throws PermissionException, IdUnusedException(Code)
Calculate a candidate for a resource id for a resource being copied/moved into a new folder.
Parameters:
  id -
Parameters:
  folder_id -
exception:
  PermissionException - if the user does not have permissions to read the properties for the existing resource.
exception:
  IdUnusedException - if the resource id is not found.



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.



parseEntityReference
public boolean parseEntityReference(String reference, Reference ref)(Code)



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.



removeCollection
public void removeCollection(ContentCollectionEdit edit) throws TypeException, PermissionException, InconsistentException, ServerOverloadException(Code)
Remove just a collection. It must be empty.
Parameters:
  collection - The collection to remove.
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:
  InconsistentException - if the collection has members, so that the removal would leave things in an inconsistent state.
exception:
  ServerOverloadException - if the server is configured to write the resource body to the filesystem and an attempt to access the resource body of any collection member fails.



removeCollection
public void removeCollection(String id) throws IdUnusedException, TypeException, PermissionException, InUseException, ServerOverloadException(Code)
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. collections, or remove any members of the collection.
exception:
  ServerOverloadException - if the server is configured to write the resource body to the filesystem and an attempt to access the resource body of any collection member fails.



removeProperty
public ResourceProperties removeProperty(String id, String name) throws PermissionException, IdUnusedException, TypeException, InUseException, ServerOverloadException(Code)
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. the ResourceProperties object for this resource.



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(String id) throws PermissionException, IdUnusedException, TypeException, InUseException(Code)
Remove a resource. For non-collection resources only.
Parameters:
  id - The resource id.
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.



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.



removeSizeCache
protected void removeSizeCache(ContentResourceEdit edit)(Code)



rename
public String rename(String id, String new_id) throws IdUnusedException, TypeException, PermissionException, InUseException, OverQuotaException, InconsistentException, IdUsedException, ServerOverloadException(Code)
Rename a collection or resource.
Parameters:
  id - The id of the collection.
Parameters:
  new_id - The desired id of the collection. The full id of the resource after the rename is completed.
exception:
  IdUnusedException - if the id does not exist.
exception:
  TypeException - if the resource exists but is not a collection or resource.
exception:
  PermissionException - if the user does not have permissions to rename
exception:
  InUseException - if the id or a contained member is locked by someone else. collections, or remove any members of the collection.
exception:
  IdUsedException - if copied item is a collection and the new id is already in use or if the copied item is not a collection and a unique id cannot be found in 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.



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.



updateResource
public ContentResource updateResource(String id, String type, byte[] content) throws PermissionException, IdUnusedException, TypeException, InUseException, OverQuotaException, ServerOverloadException(Code)
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. a new ContentResource object.



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)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.