list
java.util.Collection<ccc.rest.dto.ResourceSummary> list(java.lang.String tag,
java.lang.Long before,
java.lang.Long after,
java.lang.String sort,
ccc.types.SortOrder order,
int pageNo,
int pageSize)
throws RestException
- List existing resources.
-
- Parameters:
tag
- Filter resources by tag. NULL will return all.
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.
- Returns:
- A list of resources.
- Throws:
RestException
- If the method fails.
resource
ccc.rest.dto.ResourceSummary resource(java.util.UUID resourceId)
throws RestException,
UnauthorizedException
- Get the resource located at the specified path.
-
- Parameters:
resourceId
- The id of the existing resource.
- Returns:
- A summary of the resource.
- Throws:
RestException
- If the method fails
UnauthorizedException
- If the user does not have right to access.
deleteResource
void deleteResource(java.util.UUID resourceId)
throws RestException
- Delete the resource located at the specified path.
-
- Parameters:
resourceId
- The id of the existing resource.
- Throws:
RestException
- If the method fails.
getAbsolutePath
java.lang.String getAbsolutePath(java.util.UUID resourceId)
throws RestException
- Determine the absolute path to a resource.
-
- Parameters:
resourceId
- The id of the resource.
- Returns:
- The absolute path as a string.
- Throws:
RestException
- If the method fails
locked
java.util.Collection<ccc.rest.dto.ResourceSummary> locked()
- List all locked resources.
-
- Returns:
- The list of resources.
history
java.util.Collection<ccc.rest.dto.RevisionDto> history(java.util.UUID resourceId)
throws RestException
- Retrieve the history of a resource.
-
- Parameters:
resourceId
- The id of the resource whose history we will look up.
- Returns:
- The list of resources.
- Throws:
RestException
- If the method fails
metadata
java.util.Map<java.lang.String,java.lang.String> metadata(java.util.UUID resourceId)
throws RestException
- Retrieve the metadata for a resource.
-
- Parameters:
resourceId
- The id of the resource.
- Returns:
- The metadata in a hashmap.
- Throws:
RestException
- If the method fails
roles
ccc.rest.dto.AclDto roles(java.util.UUID resourceId)
throws RestException
- List the roles for a resource.
-
- Parameters:
resourceId
- The resource's id.
- Returns:
- The access control list for the specified resource.
- Throws:
RestException
- If the method fails
cacheDuration
ccc.types.Duration cacheDuration(java.util.UUID resourceId)
throws RestException
- Retrieve resource's cache duration.
-
- Parameters:
resourceId
- The id of the resource.
- Returns:
- Duration.
- Throws:
RestException
- If the method fails
computeTemplate
ccc.rest.dto.TemplateSummary computeTemplate(java.util.UUID resourceId)
throws RestException
- Returns summary of the template assigned for a resource.
-
- Parameters:
resourceId
- Id of the resource.
- Returns:
- TemplateSummary.
- Throws:
RestException
- If the method fails
resourceForPath
ccc.rest.dto.ResourceSummary resourceForPath(java.lang.String path)
throws RestException
- Look up the resource for a specified path.
-
- Parameters:
path
- The absolute path.
- Returns:
- A summary of the corresponding resource.
- Throws:
RestException
- If the method fails
resourceForLegacyId
ccc.rest.dto.ResourceSummary resourceForLegacyId(java.lang.String legacyId)
throws RestException
- Look up the resource for a specified legacy id.
-
- Parameters:
legacyId
- The legacy id of the resource.
- Returns:
- A summary of the corresponding resource.
- Throws:
RestException
- If the method fails
resourceForMetadataKey
java.util.Collection<ccc.rest.dto.ResourceSummary> resourceForMetadataKey(java.lang.String key)
throws RestException
- Look up the resource for a specified metadata key.
-
- Parameters:
key
- The legacy id of the resource.
- Returns:
- A summary of the corresponding resource.
- Throws:
RestException
- If the method fails
updateCacheDuration
void updateCacheDuration(java.util.UUID resourceId,
ccc.rest.dto.ResourceDto duration)
throws RestException
- Update the period that a resource should be cached for.
-
- Parameters:
resourceId
- The resource to update.
duration
- DTO specifying the cache duration.
- Throws:
RestException
- If the method fails.
lock
void lock(java.util.UUID resourceId)
throws RestException
- Lock the specified resource. The resource will be locked by the currently logged in user. If the resource is already locked a CCCException will be thrown.
-
- Parameters:
resourceId
- The uuid of the resource to lock.
- Throws:
RestException
- If the method fails.
applyWorkingCopy
void applyWorkingCopy(java.util.UUID resourceId)
throws RestException
- Apply a resource's working copy.
-
- Parameters:
resourceId
- The id of the resource.
- Throws:
RestException
- If the method fails.
updateResourceTemplate
void updateResourceTemplate(java.util.UUID resourceId,
ccc.rest.dto.ResourceDto template)
throws RestException
- Update the specified resource's template on the server.
-
- Parameters:
resourceId
- The id of the resource to update.
template
- DTO specifying the new template to set for the resource.
- Throws:
RestException
- If the method fails.
unlock
void unlock(java.util.UUID resourceId)
throws RestException
- Unlock the specified Resource. Unlocking an unlocked resource has no effect.
-
- Parameters:
resourceId
- The resource to unlock.
- Throws:
RestException
- If the method fails.
unpublish
void unpublish(java.util.UUID resourceId)
throws RestException
- Unpublish the specified resource.
-
- Parameters:
resourceId
- The id of the resource to update.
- Throws:
RestException
- If the method fails.
publish
void publish(java.util.UUID resourceId)
throws RestException
- Publish the specified resource.
-
- Parameters:
resourceId
- The id of the resource to update.
- Throws:
RestException
- If the method fails.
move
void move(java.util.UUID resourceId,
java.util.UUID newParentId)
throws RestException
- Changes a resource's parent.
-
- Parameters:
resourceId
- The id of the resource to move.
newParentId
- The id of the folder to which the resource should be moved.
- Throws:
RestException
- If the method fails.
rename
void rename(java.util.UUID resourceId,
java.lang.String name)
throws RestException
- Rename resource.
-
- Parameters:
resourceId
- The id of the resource to rename.
name
- The new name.
- Throws:
RestException
- If the method fails.
changeRoles
void changeRoles(java.util.UUID resourceId,
ccc.rest.dto.AclDto acl)
throws RestException
- Change the security roles for a resource.
-
- Parameters:
resourceId
- The resource to update.
acl
- The access control list for the specified resource.
- Throws:
RestException
- If the method fails.
excludeFromMainMenu
void excludeFromMainMenu(java.util.UUID resourceId)
throws RestException
- Specify whether a resource should not be included in a site's main menu.
-
- Parameters:
resourceId
- The id of the resource to update.
- Throws:
RestException
- If the method fails.
includeInMainMenu
void includeInMainMenu(java.util.UUID resourceId)
throws RestException
- Specify that a resource should be included in a site's main menu.
-
- Parameters:
resourceId
- The id of the resource to update.
- Throws:
RestException
- If the method fails.
updateMetadata
void updateMetadata(java.util.UUID resourceId,
ccc.serialization.Json json)
throws RestException
- Update metadata of the resource.
-
- Parameters:
resourceId
- The id of the resource to update.
json
- JSON representation of the metadata.
- Throws:
RestException
- If the method fails.
clearWorkingCopy
void clearWorkingCopy(java.util.UUID pageId)
throws RestException
- Delete the working copy for a page.
-
- Parameters:
pageId
- The id of the page with a working copy.
- Throws:
RestException
- If the method fails.
createWorkingCopy
void createWorkingCopy(java.util.UUID resourceId,
ccc.rest.dto.ResourceDto dto)
throws RestException
- Create a working copy for the specified resource, using the specified revision.
-
- Parameters:
resourceId
- The id of the resource.
dto
- The DTO specifying the number of the revision to use.
- Throws:
RestException
- If the method fails.
deleteCacheDuration
void deleteCacheDuration(java.util.UUID id)
throws RestException
- Clear the cache duration for the specified resource.
-
- Parameters:
id
- The id of the resource to update.
- Throws:
RestException
- If the update fails.
createLogEntry
void createLogEntry(java.util.UUID resourceId,
java.lang.String action,
java.lang.String detail)
throws RestException
- Create a new log entry for the resource.
-
- Parameters:
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.
- Throws:
RestException
- If the method fails.
getSiblings
java.util.Collection<ccc.rest.dto.ResourceSummary> getSiblings(java.util.UUID resourceId)
throws RestException,
UnauthorizedException
- Returns siblings of the resource, the resource included.
-
- Parameters:
resourceId
- The id of the resource to create log entry for.
- Returns:
- The list of siblings.
- Throws:
RestException
- If the method fails.
UnauthorizedException
- If the user does not have right to access.