|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Resources
Basic API for manipulating resources.
Field Summary | |
---|---|
static java.lang.String |
NAME
NAME : String. |
Method Summary | |
---|---|
ACL |
acl(java.util.UUID resourceId)
Get the access control list for a resource. |
void |
applyWorkingCopy(java.util.UUID resourceId)
Apply a resource's working copy. |
Duration |
cacheDuration(java.util.UUID resourceId)
Retrieve resource's cache duration. |
void |
changeAcl(java.util.UUID resourceId,
ACL acl)
Change the access control list for a resource. |
void |
clearWorkingCopy(java.util.UUID pageId)
Delete the working copy for a page. |
Template |
computeTemplate(java.util.UUID resourceId)
Returns summary of the template assigned for a resource. |
void |
createLogEntry(java.util.UUID resourceId,
java.lang.String action,
java.lang.String detail)
Create a new log entry for the resource. |
ResourceSummary |
createSearch(java.util.UUID parentId,
java.lang.String title)
Creates a new search. |
void |
createWorkingCopy(java.util.UUID resourceId,
Resource dto)
Create a working copy for the specified resource, using the specified revision. |
void |
delete(java.util.UUID resourceId)
Delete the resource located at the specified path. |
void |
deleteCacheDuration(java.util.UUID id)
Clear the cache duration for the specified resource. |
void |
excludeFromMainMenu(java.util.UUID resourceId)
Specify whether a resource should not be included in a site's main menu. |
boolean |
exists(java.util.UUID resourceId)
Does a resource with the specified ID exist. |
java.lang.String |
fileContentsFromPath(java.lang.String absolutePath,
java.lang.String charset)
Look up the contents of a file as a String. |
java.lang.String |
getAbsolutePath(java.util.UUID resourceId)
Determine the absolute path to a resource. |
PagedCollection<Revision> |
history(java.util.UUID resourceId)
Retrieve the history of a resource. |
void |
includeInMainMenu(java.util.UUID resourceId)
Specify that a resource should be included in a site's main menu. |
PagedCollection<ResourceSummary> |
list(ResourceCriteria criteria,
int pageNo,
int pageSize)
List existing resources. |
PagedCollection<ResourceSummary> |
list(java.util.UUID parent,
java.lang.String tag,
java.lang.Long before,
java.lang.Long after,
java.lang.String mainMenu,
java.lang.String type,
java.lang.String locked,
java.lang.String published,
java.lang.String sort,
SortOrder order,
int pageNo,
int pageSize)
List existing resources. |
void |
lock(java.util.UUID resourceId)
Lock the specified resource. |
java.util.Map<java.lang.String,java.lang.String> |
metadata(java.util.UUID resourceId)
Retrieve the metadata for a resource. |
void |
move(java.util.UUID resourceId,
java.util.UUID newParentId)
Changes a resource's parent. |
ResourceSummary |
publish(java.util.UUID resourceId)
Publish the specified resource. |
void |
rename(java.util.UUID resourceId,
java.lang.String name)
Rename resource. |
ResourceSummary |
resourceForLegacyId(java.lang.String legacyId)
Deprecated. |
PagedCollection<ResourceSummary> |
resourceForMetadataKey(java.lang.String key)
Deprecated. |
ResourceSummary |
resourceForPath(java.lang.String path)
Look up the resource for a specified path. |
Resource |
resourceForPathSecure(java.lang.String path)
Deprecated. |
ResourceSummary |
retrieve(java.util.UUID resourceId)
Get the resource located at the specified path. |
Resource |
revisionForPath(java.lang.String path,
int version)
Deprecated. |
void |
unlock(java.util.UUID resourceId)
Unlock the specified Resource. |
void |
unpublish(java.util.UUID resourceId)
Unpublish the specified resource. |
void |
updateCacheDuration(java.util.UUID resourceId,
Resource duration)
Update the period that a resource should be cached for. |
void |
updateMetadata(java.util.UUID resourceId,
Resource resource)
Update metadata of the resource. |
void |
updateResourceTemplate(java.util.UUID resourceId,
Resource template)
Update the specified resource's template on the server. |
Resource |
workingCopyForPath(java.lang.String path)
Deprecated. |
Field Detail |
---|
static final java.lang.String NAME
Method Detail |
---|
PagedCollection<ResourceSummary> list(java.util.UUID parent, java.lang.String tag, java.lang.Long before, java.lang.Long after, java.lang.String mainMenu, java.lang.String type, java.lang.String locked, java.lang.String published, java.lang.String sort, SortOrder order, int pageNo, int pageSize)
parent
- Filter resources by parent.tag
- Filter resources by tag.before
- Include only resources created before this date.after
- Include only resources created after this date.mainMenu
- Filter resources by 'included in main menu'.type
- Filter resources by type.locked
- Filter resources by locked (true or null).published
- Filter resources by published (true or null).sort
- The field results be sorted on.order
- The order results be sorted in.pageNo
- The page of results to return.pageSize
- The number of results in a page.
PagedCollection<ResourceSummary> list(ResourceCriteria criteria, int pageNo, int pageSize)
criteria
- The criteria by which to filter resources.pageNo
- The page of results to return.pageSize
- The number of results in a page.
boolean exists(java.util.UUID resourceId)
resourceId
- The id of the resource.
ResourceSummary retrieve(java.util.UUID resourceId)
resourceId
- The id of the existing resource.
void delete(java.util.UUID resourceId)
resourceId
- The id of the existing resource.java.lang.String getAbsolutePath(java.util.UUID resourceId)
resourceId
- The id of the resource.
PagedCollection<Revision> history(java.util.UUID resourceId)
resourceId
- The id of the resource whose history we will look up.
java.util.Map<java.lang.String,java.lang.String> metadata(java.util.UUID resourceId)
resourceId
- The id of the resource.
ACL acl(java.util.UUID resourceId)
resourceId
- The resource's id.
Duration cacheDuration(java.util.UUID resourceId)
resourceId
- The id of the resource.
Template computeTemplate(java.util.UUID resourceId)
resourceId
- Id of the resource.
ResourceSummary resourceForPath(java.lang.String path)
path
- The absolute path.
@Deprecated ResourceSummary resourceForLegacyId(java.lang.String legacyId)
legacyId
- The legacy id of the resource.
@Deprecated PagedCollection<ResourceSummary> resourceForMetadataKey(java.lang.String key)
key
- The legacy id of the resource.
void updateCacheDuration(java.util.UUID resourceId, Resource duration)
resourceId
- The resource to update.duration
- DTO specifying the cache duration.void lock(java.util.UUID resourceId)
resourceId
- The uuid of the resource to lock.void applyWorkingCopy(java.util.UUID resourceId)
resourceId
- The id of the resource.void updateResourceTemplate(java.util.UUID resourceId, Resource template)
resourceId
- The id of the resource to update.template
- DTO specifying the new template to set for the resource.void unlock(java.util.UUID resourceId)
resourceId
- The resource to unlock.void unpublish(java.util.UUID resourceId)
resourceId
- The id of the resource to update.ResourceSummary publish(java.util.UUID resourceId)
resourceId
- The id of the resource to update.void move(java.util.UUID resourceId, java.util.UUID newParentId)
resourceId
- The id of the resource to move.newParentId
- The id of the folder to which the resource should be
moved.void rename(java.util.UUID resourceId, java.lang.String name)
resourceId
- The id of the resource to rename.name
- The new name.void changeAcl(java.util.UUID resourceId, ACL acl)
resourceId
- The resource to update.acl
- The access control list for the specified resource.void excludeFromMainMenu(java.util.UUID resourceId)
resourceId
- The id of the resource to update.void includeInMainMenu(java.util.UUID resourceId)
resourceId
- The id of the resource to update.void updateMetadata(java.util.UUID resourceId, Resource resource)
resourceId
- The id of the resource to update.resource
- The resource containing new metadata.void clearWorkingCopy(java.util.UUID pageId)
pageId
- The id of the page with a working copy.void createWorkingCopy(java.util.UUID resourceId, Resource dto)
resourceId
- The id of the resource.dto
- The DTO specifying the number of the revision to use.void deleteCacheDuration(java.util.UUID id)
id
- The id of the resource to update.void createLogEntry(java.util.UUID resourceId, java.lang.String action, java.lang.String detail)
resourceId
- The id of the resource to create log entry for.action
- The action for the log entry.detail
- The details for the log entry.java.lang.String fileContentsFromPath(java.lang.String absolutePath, java.lang.String charset)
absolutePath
- The absolute path to the resource.charset
- The character set for the file.
@Deprecated Resource resourceForPathSecure(java.lang.String path)
path
- The absolute path.
@Deprecated Resource revisionForPath(java.lang.String path, int version)
path
- The absolute path.version
- The version number of the resource to retrieve.
@Deprecated Resource workingCopyForPath(java.lang.String path)
path
- The absolute path.
ResourceSummary createSearch(java.util.UUID parentId, java.lang.String title)
parentId
- The parent folder where the search should be created.title
- The title of the search.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |