| java.lang.Object org.sakaiproject.content.impl.BaseContentService org.sakaiproject.content.impl.DbContentService
DbContentService | public class DbContentService extends BaseContentService (Code) | |
DbContentService is an extension of the BaseContentService with a database
implementation.
The sql scripts in src/sql/chef_content.sql must be run on the database.
|
Inner Class :protected class DbStorage implements Storage | |
Inner Class :public class Counter | |
COLLECTION_FIELDS | final protected static String[] COLLECTION_FIELDS(Code) | | The extra field(s) to write to the database - collections.
|
RESOURCE_FIELDS | final protected static String[] RESOURCE_FIELDS(Code) | | The extra field(s) to write to the database - resources - when we are
doing bodys the db.
|
RESOURCE_FIELDS_FILE | final protected static String[] RESOURCE_FIELDS_FILE(Code) | | The extra field(s) to write to the database - resources - when we are
doing bodys in files.
|
STREAM_BUFFER_SIZE | final protected static int STREAM_BUFFER_SIZE(Code) | | The chunk size used when streaming (100k).
|
VALID_CHARS | final protected static String VALID_CHARS(Code) | | We allow these characters to go un-escaped into the file name.
|
m_autoDdl | protected boolean m_autoDdl(Code) | | Configuration: to run the ddl on init or not.
|
m_collectionTableName | protected String m_collectionTableName(Code) | | Table name for collections.
|
m_convertToFile | protected boolean m_convertToFile(Code) | | Set if we are to run the to-file conversion.
|
m_groupTableName | protected String m_groupTableName(Code) | | Table name for entity-group relationships.
|
m_locksInDb | protected boolean m_locksInDb(Code) | | If true, we do our locks in the remote database, otherwise we do them
here.
|
m_resourceBodyDeleteTableName | protected String m_resourceBodyDeleteTableName(Code) | | Table name for resources delete.
|
m_resourceBodyTableName | protected String m_resourceBodyTableName(Code) | | Table name for resources.
|
m_resourceDeleteTableName | protected String m_resourceDeleteTableName(Code) | | Table name for resources delete.
|
m_resourceTableName | protected String m_resourceTableName(Code) | | Table name for resources.
|
containsLockedNode | public boolean containsLockedNode(String id)(Code) | | |
convertToFile | protected void convertToFile()(Code) | | Create a file system body binary for any content_resource record that has
a null file_path.
|
escapeResourceName | protected String escapeResourceName(String id)(Code) | | Return file system safe escaped name, that's also unique if the initial id is unique. * Use only the name, not the path part of the id
Parameters: value - The id to escape. value escaped. |
externalResourceFileName | protected String externalResourceFileName(ContentResource resource)(Code) | | Form the full file path+name used to store the resource body in an external file system.
Parameters: resource - The resource. The resource external file name. |
getUuid | public String getUuid(String id)(Code) | | For a given id, return its UUID (creating it if it does not already
exist)
|
init | public void init()(Code) | | Final initialization, once all dependencies are set.
|
newStorage | protected Storage newStorage()(Code) | | Construct a Storage object.
The new storage object. |
resolveUuid | public String resolveUuid(String uuid)(Code) | | For a given UUID, attempt to lookup and return the corresponding id (URI)
|
setAutoDdl | public void setAutoDdl(String value)(Code) | | Configuration: to run the ddl on init or not.
Parameters: value - the auto ddl value. |
setCollectionTableName | public void setCollectionTableName(String name)(Code) | | Configuration: set the table name for collections.
Parameters: path - The table name for collections. |
setConvertToFile | public void setConvertToFile(String value)(Code) | | Configuration: run the to-file conversion.
Parameters: value - The conversion desired value. |
setEntityGroupTableName | public void setEntityGroupTableName(String name)(Code) | | |
setLockManager | public void setLockManager(LockManager lockManager)(Code) | | Dependency: LockManager
Parameters: service - The LockManager |
setLocksInDb | public void setLocksInDb(String value)(Code) | | Configuration: set the locks-in-db
Parameters: value - The locks-in-db value. |
setResourceBodyDeleteTableName | public void setResourceBodyDeleteTableName(String name)(Code) | | |
setResourceBodyTableName | public void setResourceBodyTableName(String name)(Code) | | Configuration: set the table name for resource body.
Parameters: path - The table name for resource body. |
setResourceDeleteTableName | public void setResourceDeleteTableName(String name)(Code) | | |
setResourceTableName | public void setResourceTableName(String name)(Code) | | Configuration: set the table name for resources.
Parameters: path - The table name for resources. |
setSqlService | public void setSqlService(SqlService service)(Code) | | Dependency: SqlService.
Parameters: service - The SqlService. |
Methods inherited from org.sakaiproject.content.impl.BaseContentService | protected void WTUserIdTrans(Element el, Map userIdTrans)(Code)(Java Doc) public ContentResource addAttachmentResource(String name, String type, byte[] content, ResourceProperties properties) throws IdInvalidException, InconsistentException, IdUsedException, PermissionException, OverQuotaException, ServerOverloadException(Code)(Java Doc) public ContentResource addAttachmentResource(String name, String site, String tool, String type, byte[] content, ResourceProperties properties) throws IdInvalidException, InconsistentException, IdUsedException, PermissionException, OverQuotaException, ServerOverloadException(Code)(Java Doc) public ContentResourceEdit addAttachmentResource(String name) throws IdInvalidException, InconsistentException, IdUsedException, PermissionException(Code)(Java Doc) public ContentCollection addCollection(String id, ResourceProperties properties) throws IdUsedException, IdInvalidException, PermissionException, InconsistentException(Code)(Java Doc) public ContentCollection addCollection(String id, ResourceProperties properties, Collection groups) throws IdUsedException, IdInvalidException, PermissionException, InconsistentException(Code)(Java Doc) public ContentCollection addCollection(String id, ResourceProperties properties, Collection groups, boolean hidden, Time releaseDate, Time retractDate) throws IdUsedException, IdInvalidException, PermissionException, InconsistentException(Code)(Java Doc) public ContentCollectionEdit addCollection(String id) throws IdUsedException, IdInvalidException, PermissionException, InconsistentException(Code)(Java Doc) public ContentCollectionEdit addCollection(String collectionId, String name) throws PermissionException, IdUnusedException, IdUsedException, IdLengthException, IdInvalidException, TypeException(Code)(Java Doc) public ContentResource addDeleteResource(String id, String type, byte[] content, ResourceProperties properties, String uuid, String userId, int priority) throws PermissionException(Code)(Java Doc) protected void addLiveCollectionProperties(ContentCollectionEdit c)(Code)(Java Doc) protected void addLiveResourceProperties(ContentResourceEdit r)(Code)(Java Doc) protected void addLiveUpdateCollectionProperties(ContentCollectionEdit c)(Code)(Java Doc) protected void addLiveUpdateResourceProperties(ContentResourceEdit r)(Code)(Java Doc) protected void addProperties(ResourcePropertiesEdit p, ResourceProperties props)(Code)(Java Doc) public ResourceProperties addProperty(String id, String name, String value) throws PermissionException, IdUnusedException, TypeException, InUseException, ServerOverloadException(Code)(Java Doc) public ContentResource addResource(String id, String type, byte[] content, ResourceProperties properties, Collection groups, int priority) throws PermissionException, IdUsedException, IdInvalidException, InconsistentException, OverQuotaException, ServerOverloadException(Code)(Java Doc) public ContentResource addResource(String id, String type, byte[] content, ResourceProperties properties, int priority) throws PermissionException, IdUsedException, IdInvalidException, InconsistentException, OverQuotaException, ServerOverloadException(Code)(Java Doc) 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)(Java Doc) public ContentResourceEdit addResource(String collectionId, String basename, String extension, int maximum_tries) throws PermissionException, IdUniquenessException, IdLengthException, IdInvalidException, IdUnusedException, OverQuotaException, ServerOverloadException(Code)(Java Doc) 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)(Java Doc) public ContentResourceEdit addResource(String id) throws PermissionException, IdUsedException, IdInvalidException, InconsistentException(Code)(Java Doc) 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)(Java Doc) public void addResourceToDeleteTable(ContentResourceEdit edit, String uuid, String userId) throws PermissionException(Code)(Java Doc) protected void addSizeCache(ContentResourceEdit edit)(Code)(Java Doc) protected ContentCollectionEdit addValidPermittedCollection(String id) throws IdUsedException, InconsistentException(Code)(Java Doc) protected void adjustGroups(ContentEntity member, Collection groups)(Code)(Java Doc) public boolean allowAddAttachmentResource()(Code)(Java Doc) public boolean allowAddCollection(String id)(Code)(Java Doc) public boolean allowAddProperty(String id)(Code)(Java Doc) public boolean allowAddResource(String id)(Code)(Java Doc) public boolean allowCopy(String id, String new_id)(Code)(Java Doc) public boolean allowGetCollection(String id)(Code)(Java Doc) public boolean allowGetProperties(String id)(Code)(Java Doc) public boolean allowGetResource(String id)(Code)(Java Doc) protected boolean allowRemove(String id)(Code)(Java Doc) public boolean allowRemoveCollection(String id)(Code)(Java Doc) public boolean allowRemoveProperty(String id)(Code)(Java Doc) public boolean allowRemoveResource(String id)(Code)(Java Doc) public boolean allowRename(String id, String new_id)(Code)(Java Doc) public boolean allowUpdate(String id)(Code)(Java Doc) public boolean allowUpdateCollection(String id)(Code)(Java Doc) public boolean allowUpdateResource(String id)(Code)(Java Doc) public String archive(String siteId, Document doc, Stack stack, String archivePath, List attachments)(Code)(Java Doc) protected void archiveCollection(ContentCollection collection, Document doc, Stack stack, String storagePath, String siteCollectionId, StringBuffer results)(Code)(Java Doc) protected String archiveResource(ContentResource resource, Document doc, Stack stack, String storagePath, String siteCollectionId)(Code)(Java Doc) public String archiveResources(List attachments, Document doc, Stack stack, String archivePath)(Code)(Java Doc) protected void assureResourceProperties(ContentResourceEdit r)(Code)(Java Doc) protected boolean availabilityCheck(String id) throws IdUnusedException(Code)(Java Doc) protected long bytes2k(long bytes)(Code)(Java Doc) public void cancelCollection(ContentCollectionEdit edit)(Code)(Java Doc) public void cancelResource(ContentResourceEdit edit)(Code)(Java Doc) public void checkCollection(String id) throws IdUnusedException, TypeException, PermissionException(Code)(Java Doc) protected void checkExplicitLock(String id) throws PermissionException(Code)(Java Doc) public void checkResource(String id) throws PermissionException, IdUnusedException, TypeException(Code)(Java Doc) public void commitCollection(ContentCollectionEdit edit)(Code)(Java Doc) public void commitResource(ContentResourceEdit edit) throws OverQuotaException, ServerOverloadException(Code)(Java Doc) public void commitResource(ContentResourceEdit edit, int priority) throws OverQuotaException, ServerOverloadException(Code)(Java Doc) protected void commitResourceEdit(ContentResourceEdit edit, int priority) throws ServerOverloadException(Code)(Java Doc) public void contextCreated(String context, boolean toolPlacement)(Code)(Java Doc) public void contextDeleted(String context, boolean toolPlacement)(Code)(Java Doc) public void contextUpdated(String context, boolean toolPlacement)(Code)(Java Doc) protected String convertIdToUserEid(String id)(Code)(Java Doc) protected String convertLockIfDropbox(String lock, String id)(Code)(Java Doc) public String copy(String id, String new_id) throws PermissionException, IdUnusedException, TypeException, InUseException, OverQuotaException, IdUsedException, ServerOverloadException(Code)(Java Doc) public String copyCollection(ContentCollection thisCollection, String new_id) throws PermissionException, IdUnusedException, TypeException, InUseException, OverQuotaException, IdUsedException(Code)(Java Doc) public String copyIntoFolder(String id, String folder_id) throws PermissionException, IdUnusedException, TypeException, InUseException, IdLengthException, IdUniquenessException, OverQuotaException, InconsistentException, IdUsedException, ServerOverloadException(Code)(Java Doc) public String copyResource(ContentResource resource, String new_id) throws PermissionException, IdUnusedException, TypeException, InUseException, OverQuotaException, IdUsedException, ServerOverloadException(Code)(Java Doc) public void createDropboxCollection()(Code)(Java Doc) public void createDropboxCollection(String siteId)(Code)(Java Doc) public void createIndividualDropbox(String siteId)(Code)(Java Doc) protected String deepcopyCollection(ContentCollection thisCollection, String new_folder_id) throws PermissionException, IdUnusedException, TypeException, InUseException, IdLengthException, IdUniquenessException, OverQuotaException, IdUsedException, ServerOverloadException(Code)(Java Doc) public void destroy()(Code)(Java Doc) protected void disableDropbox(String context)(Code)(Java Doc) protected void disableResources(String context)(Code)(Java Doc) public ContentCollectionEdit editCollection(String id) throws IdUnusedException, TypeException, PermissionException, InUseException(Code)(Java Doc) public ContentResourceEdit editResource(String id) throws PermissionException, IdUnusedException, TypeException, InUseException(Code)(Java Doc) protected ContentResourceEdit editResourceForDelete(String id) throws PermissionException, IdUnusedException, TypeException, InUseException(Code)(Java Doc) public void eliminateDuplicates(Collection resourceIds)(Code)(Java Doc) protected void enableDropbox(String context)(Code)(Java Doc) protected void enableResources(String context)(Code)(Java Doc) protected List filterArtifacts(List artifacts, String type, String primaryMimeType, String subMimeType)(Code)(Java Doc) protected List filterArtifacts(List artifacts, String type, String primaryMimeType, String subMimeType, boolean checkPerms)(Code)(Java Doc) protected ContentCollection findCollection(String id) throws TypeException(Code)(Java Doc) protected ContentResource findResource(String id) throws TypeException(Code)(Java Doc) public List findResources(String type, String primaryMimeType, String subMimeType)(Code)(Java Doc) protected Hashtable fixTypeAndId(String id, String type)(Code)(Java Doc) protected void generateCollections(String target)(Code)(Java Doc) protected String getAccessPoint(boolean relative)(Code)(Java Doc) public List getAllEntities(String id)(Code)(Java Doc) protected void getAllEntities(ContentCollection collection, List rv, boolean includeCollections)(Code)(Java Doc) public List getAllResources(String id)(Code)(Java Doc) protected void getAllResources(ContentCollection collection, List rv, boolean includeCollections)(Code)(Java Doc) public boolean getAllowGroupResources()(Code)(Java Doc) protected String getAlternateReferenceRoot(String id, String rootProperty)(Code)(Java Doc) public ContentCollection getCollection(String id) throws IdUnusedException, TypeException, PermissionException(Code)(Java Doc) public Map getCollectionMap()(Code)(Java Doc) public String getContainingCollectionId(String id)(Code)(Java Doc) public int getDepth(String resourceId, String baseCollectionId)(Code)(Java Doc) public String getDropboxCollection()(Code)(Java Doc) public String getDropboxCollection(String siteId)(Code)(Java Doc) public String getDropboxDisplayName()(Code)(Java Doc) public String getDropboxDisplayName(String siteId)(Code)(Java Doc) public Entity getEntity(Reference ref)(Code)(Java Doc) public Collection getEntityAuthzGroups(Reference ref, String userId)(Code)(Java Doc) public String getEntityDescription(Reference ref)(Code)(Java Doc) protected Collection getEntityHierarchyAuthzGroups(Reference ref)(Code)(Java Doc) public ResourceProperties getEntityResourceProperties(Reference ref)(Code)(Java Doc) public String getEntityUrl(Reference ref)(Code)(Java Doc) protected List getFlatResources(String parentId)(Code)(Java Doc) protected Collection getGroupsAllowFunction(String function, String refString)(Code)(Java Doc) public Collection getGroupsWithAddPermission(String collectionId)(Code)(Java Doc) public Collection getGroupsWithReadAccess(String collectionId)(Code)(Java Doc) public Collection getGroupsWithRemovePermission(String collectionId)(Code)(Java Doc) public HttpAccess getHttpAccess()(Code)(Java Doc) public String getLabel()(Code)(Java Doc) public boolean getPrioritySortEnabled()(Code)(Java Doc) public ResourceProperties getProperties(String id) throws PermissionException, IdUnusedException(Code)(Java Doc) public long getQuota(ContentCollection collection)(Code)(Java Doc) public String getReference(String id)(Code)(Java Doc) public ContentResource getResource(String id) throws PermissionException, IdUnusedException, TypeException(Code)(Java Doc) public ResourceTypeRegistry getResourceTypeRegistry()(Code)(Java Doc) public String getSiteCollection(String siteId)(Code)(Java Doc) public String getUrl(String id)(Code)(Java Doc) public String getUrl(String id, String rootProperty)(Code)(Java Doc) protected boolean groupCollectionContainsRefString(Collection groups, String groupRef)(Code)(Java Doc) protected void handleAccessCollection(HttpServletRequest req, HttpServletResponse res, Reference ref, Collection copyrightAcceptedRefs) throws EntityPermissionException, EntityNotDefinedException, EntityAccessOverloadException, EntityCopyrightException(Code)(Java Doc) protected void handleAccessResource(HttpServletRequest req, HttpServletResponse res, Reference ref, Collection copyrightAcceptedRefs) throws EntityPermissionException, EntityNotDefinedException, EntityAccessOverloadException, EntityCopyrightException(Code)(Java Doc) public void init()(Code)(Java Doc) public boolean isAttachmentResource(String id)(Code)(Java Doc) public boolean isAvailabilityEnabled()(Code)(Java Doc) public boolean isAvailable(String entityId)(Code)(Java Doc) public boolean isCollection(String entityId)(Code)(Java Doc) public boolean isDropboxMaintainer()(Code)(Java Doc) public boolean isDropboxMaintainer(String siteId)(Code)(Java Doc) public boolean isInDropbox(String entityId)(Code)(Java Doc) public boolean isInheritingPubView(String id)(Code)(Java Doc) public boolean isPubView(String id)(Code)(Java Doc) public boolean isRootCollection(String id)(Code)(Java Doc) public boolean isShortRefs()(Code)(Java Doc) public boolean isSortByPriorityEnabled()(Code)(Java Doc) protected String isolateContainingId(String id)(Code)(Java Doc) protected String isolateName(String id)(Code)(Java Doc) public String merge(String siteId, Element root, String archivePath, String mergeId, Map attachmentNames, Map userIdTrans, Set userListAllowImport)(Code)(Java Doc) protected ContentCollection mergeCollection(Element element) throws PermissionException, InconsistentException, IdInvalidException(Code)(Java Doc) protected ContentResource mergeResource(Element element) throws PermissionException, InconsistentException, IdInvalidException, OverQuotaException, ServerOverloadException(Code)(Java Doc) protected ContentResource mergeResource(Element element, byte[] body) throws PermissionException, InconsistentException, IdInvalidException, OverQuotaException, ServerOverloadException(Code)(Java Doc) protected String moveCollection(ContentCollectionEdit thisCollection, String new_folder_id) throws PermissionException, IdUnusedException, TypeException, InUseException, OverQuotaException, IdUsedException, ServerOverloadException(Code)(Java Doc) public String moveIntoFolder(String id, String folder_id) throws PermissionException, IdUnusedException, TypeException, InUseException, OverQuotaException, IdUsedException, InconsistentException, ServerOverloadException(Code)(Java Doc) protected String moveResource(ContentResourceEdit thisResource, String new_id) throws PermissionException, IdUnusedException, TypeException, InUseException, OverQuotaException, IdUsedException, ServerOverloadException(Code)(Java Doc) public String[] myToolIds()(Code)(Java Doc) public Comparator newContentHostingComparator(String property, boolean ascending)(Code)(Java Doc) protected String newName(String id, String folder_id) throws PermissionException, IdUnusedException(Code)(Java Doc) public ResourcePropertiesEdit newResourceProperties()(Code)(Java Doc) abstract protected Storage newStorage()(Code)(Java Doc) protected boolean overQuota(ContentResourceEdit edit)(Code)(Java Doc) public boolean parseEntityReference(String reference, Reference ref)(Code)(Java Doc) public Object refresh(Object key, Object oldValue, Event event)(Code)(Java Doc) public void removeCollection(ContentCollectionEdit edit) throws TypeException, PermissionException, InconsistentException, ServerOverloadException(Code)(Java Doc) public void removeCollection(String id) throws IdUnusedException, TypeException, PermissionException, InUseException, ServerOverloadException(Code)(Java Doc) public ResourceProperties removeProperty(String id, String name) throws PermissionException, IdUnusedException, TypeException, InUseException, ServerOverloadException(Code)(Java Doc) protected void removeRecursive(ContentCollection parent)(Code)(Java Doc) public void removeResource(String id) throws PermissionException, IdUnusedException, TypeException, InUseException(Code)(Java Doc) public void removeResource(ContentResourceEdit edit) throws PermissionException(Code)(Java Doc) protected void removeSizeCache(ContentResourceEdit edit)(Code)(Java Doc) public String rename(String id, String new_id) throws IdUnusedException, TypeException, PermissionException, InUseException, OverQuotaException, InconsistentException, IdUsedException, ServerOverloadException(Code)(Java Doc) public void setAliasService(AliasService service)(Code)(Java Doc) public void setAllowGroupResources(boolean allowGroupResources)(Code)(Java Doc) public void setAuthzGroupService(AuthzGroupService service)(Code)(Java Doc) public void setAvailabilityChecksEnabled(boolean value)(Code)(Java Doc) public void setBodyPath(String value)(Code)(Java Doc) public void setBodyVolumes(String value)(Code)(Java Doc) public void setCaching(String value)(Code)(Java Doc) public void setEntityManager(EntityManager service)(Code)(Java Doc) public void setMemoryService(MemoryService service)(Code)(Java Doc) public void setNotificationService(NotificationService service)(Code)(Java Doc) public void setPrioritySortEnabled(boolean value)(Code)(Java Doc) public void setPubView(String id, boolean pubview)(Code)(Java Doc) public void setResourceTypeRegistry(ResourceTypeRegistry registry)(Code)(Java Doc) public void setSecurityService(SecurityService service)(Code)(Java Doc) public void setServerConfigurationService(ServerConfigurationService service)(Code)(Java Doc) public void setShortRefs(String value)(Code)(Java Doc) public void setSiteAlias(String value)(Code)(Java Doc) public void setSiteQuota(String quota)(Code)(Java Doc) public void setSiteService(SiteService service)(Code)(Java Doc) public void setUseResourceTypeRegistry(boolean useRegistry)(Code)(Java Doc) abstract protected void setUuidInternal(String id, String uuid)(Code)(Java Doc) public void transferCopyEntities(String fromContext, String toContext, List resourceIds)(Code)(Java Doc) protected void unlock(String lock, String id) throws PermissionException(Code)(Java Doc) protected boolean unlockCheck(String lock, String id)(Code)(Java Doc) public ContentResource updateResource(String id, String type, byte[] content) throws PermissionException, IdUnusedException, TypeException, InUseException, OverQuotaException, ServerOverloadException(Code)(Java Doc) public boolean usingResourceTypeRegistry()(Code)(Java Doc) protected void verifyGroups(ContentCollection collection, Collection groups)(Code)(Java Doc) public boolean willArchiveMerge()(Code)(Java Doc)
|
|
|