|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectccc.commands.CommandFactory
public class CommandFactory
Factory for command objects.
Constructor Summary | |
---|---|
CommandFactory(ResourceRepository repository,
LogEntryRepository audit,
DataRepository data)
Constructor. |
Method Summary | |
---|---|
Command<? extends ResourceEntity> |
createAliasCommand(Alias alias)
Create a 'create alias' command. |
Command<java.lang.Void> |
createDeleteResourceCmd(java.util.UUID resourceId)
Create a 'delete resource' command. |
Command<FileEntity> |
createFileCommand(java.util.UUID parentFolder,
File file,
java.lang.String title,
java.lang.String description,
ResourceName resourceName,
RevisionMetadata rm,
java.io.InputStream dataStream)
Create a 'create file' command. |
Command<FolderEntity> |
createFolderCommand(java.util.UUID parentId,
java.lang.String name,
java.lang.String title)
Create a 'create folder' command. |
Command<PageEntity> |
createPageCommand(java.util.UUID parentId,
Page page)
Create a 'create page' command. |
Command<java.lang.Void> |
createRootCommand(FolderEntity f)
Create a 'create root' command. |
Command<Search> |
createSearchCommand(java.util.UUID parentId,
java.lang.String title)
Create a 'create search' command. |
Command<? extends ResourceEntity> |
createTemplateCommand(Template template)
Create a 'create template' command. |
Command<java.lang.Void> |
lockResourceCommand(java.util.UUID resourceId)
Create a 'lock resource' command. |
Command<ResourceSummary> |
publishResource(java.util.UUID resourceId)
Create a 'publish resource' command. |
Command<java.lang.Void> |
unlockResourceCommand(java.util.UUID resourceId)
Create an 'unlock resource' command. |
Command<java.lang.Void> |
unpublishResourceCommand(java.util.UUID resourceId)
Create an 'unpublish resource' command. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommandFactory(ResourceRepository repository, LogEntryRepository audit, DataRepository data)
repository
- The ResourceDao used for CRUD operations, etc.audit
- The audit logger, for logging business actions.data
- The data repository for storing binary data.Method Detail |
---|
public Command<java.lang.Void> createDeleteResourceCmd(java.util.UUID resourceId)
resourceId
- The id of the resource to delete.
public Command<? extends ResourceEntity> createTemplateCommand(Template template)
template
- Details of the template to create.
public Command<? extends ResourceEntity> createAliasCommand(Alias alias)
alias
- Details of the alias to create.
public Command<FileEntity> createFileCommand(java.util.UUID parentFolder, File file, java.lang.String title, java.lang.String description, ResourceName resourceName, RevisionMetadata rm, java.io.InputStream dataStream)
parentFolder
- The folder in which the file will be created.file
- The details of the file.title
- The file's title.description
- The file's description.resourceName
- The file's name.rm
- Details of the revision.dataStream
- The stream containing the contents of the file.
public Command<FolderEntity> createFolderCommand(java.util.UUID parentId, java.lang.String name, java.lang.String title)
name
- The name of the folder.parentId
- The folder's parent.title
- The folder's title.
public Command<java.lang.Void> createRootCommand(FolderEntity f)
f
- The folder to create.
public Command<PageEntity> createPageCommand(java.util.UUID parentId, Page page)
parentId
- The parent folder in which the page will be created.page
- The page to create.
public Command<Search> createSearchCommand(java.util.UUID parentId, java.lang.String title)
title
- The search's title.parentId
- The search's parent folder.
public Command<ResourceSummary> publishResource(java.util.UUID resourceId)
resourceId
- The ID of the resource to publish.
public Command<java.lang.Void> lockResourceCommand(java.util.UUID resourceId)
resourceId
- The ID of the resource to lock.
public Command<java.lang.Void> unlockResourceCommand(java.util.UUID resourceId)
resourceId
- The ID of the resource to unlock;
public Command<java.lang.Void> unpublishResourceCommand(java.util.UUID resourceId)
resourceId
- The ID of the resource to unpublish.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |