ccc.services
Interface Migration

All Known Implementing Classes:
MigrationEJB

public interface Migration

API for CC6 migration.

Author:
Civic Computing Ltd.

Field Summary
static java.lang.String NAME
          NAME : String.
 
Method Summary
 void applyWorkingCopy(java.util.UUID resourceId, java.util.UUID userId, java.util.Date happenedOn, boolean isMajorEdit, java.lang.String comment)
          Apply a resource's working copy.
 void changeAcl(java.util.UUID resourceId, ACL acl, java.util.UUID actorId, java.util.Date happenedOn)
          Change the ACL for a resource.
 ResourceSummary createFolder(java.util.UUID parentId, java.lang.String name, java.lang.String title, boolean publish, java.util.UUID actorId, java.util.Date happenedOn)
          Create a folder with the specified name and title.
 ResourceSummary createPage(java.util.UUID parentId, Page delta, boolean publish, java.util.UUID actorId, java.util.Date happenedOn)
          Creates a new page.
 void deleteResource(java.util.UUID resourceId, java.util.UUID actorId, java.util.Date happenedOn)
          Delete a resource.
 void includeInMainMenu(java.util.UUID resourceId, boolean include, java.util.UUID actorId, java.util.Date happenedOn)
          Specify whether a resource should be included in a site's main menu.
 void lock(java.util.UUID resourceId, java.util.UUID actorId, java.util.Date happenedOn)
          Lock the specified resource.
 void publish(java.util.UUID resourceId, java.util.UUID userId, java.util.Date publishDate)
          Publish the specified resource.
 void unlock(java.util.UUID resourceId, java.util.UUID actorId, java.util.Date happenedOn)
          Unlock the specified Resource.
 void unpublish(java.util.UUID resourceId, java.util.UUID userId, java.util.Date publishDate)
          Unpublish the specified resource.
 void updateMetadata(java.util.UUID resourceId, java.lang.String title, java.lang.String description, java.util.Set<java.lang.String> tags, java.util.Map<java.lang.String,java.lang.String> metadata, java.util.UUID actorId, java.util.Date happenedOn)
          Update metadata of the resource.
 void updatePage(java.util.UUID pageId, Page delta, java.util.UUID actorId, java.util.Date happenedOn)
          Update the specified page on the server.
 void updateResourceTemplate(java.util.UUID resourceId, java.util.UUID templateId, java.util.UUID actorId, java.util.Date happenedOn)
          Update the specified resource's template on the server.
 

Field Detail

NAME

static final java.lang.String NAME
NAME : String.

See Also:
Constant Field Values
Method Detail

createFolder

ResourceSummary createFolder(java.util.UUID parentId,
                             java.lang.String name,
                             java.lang.String title,
                             boolean publish,
                             java.util.UUID actorId,
                             java.util.Date happenedOn)
Create a folder with the specified name and title.

Parameters:
parentId - The folder in which the new folder should be created.
name - The name of the new folder.
title - The title of the folder.
publish - True if the title should be published, false otherwise.
actorId - The user id of the actor.
happenedOn - When the command happened.
Returns:
A resource summary describing the new folder.

updatePage

void updatePage(java.util.UUID pageId,
                Page delta,
                java.util.UUID actorId,
                java.util.Date happenedOn)
Update the specified page on the server.

Parameters:
pageId - The id of the page to update.
delta - The changes to apply.
actorId - The user id of the actor.
happenedOn - When the command happened.

createPage

ResourceSummary createPage(java.util.UUID parentId,
                           Page delta,
                           boolean publish,
                           java.util.UUID actorId,
                           java.util.Date happenedOn)
Creates a new page.

Parameters:
parentId - The folder in which the page will be created.
delta - The page's details.
publish - True if the folder should be published, false otherwise.
actorId - The user id of the actor.
happenedOn - When the command happened.
Returns:
A resource summary describing the new page.

applyWorkingCopy

void applyWorkingCopy(java.util.UUID resourceId,
                      java.util.UUID userId,
                      java.util.Date happenedOn,
                      boolean isMajorEdit,
                      java.lang.String comment)
Apply a resource's working copy.

Parameters:
resourceId - The id of the resource.
userId - The user applying the working copy.
happenedOn - When the command happened.
isMajorEdit - Was this a major change.
comment - A comment describing the change.

changeAcl

void changeAcl(java.util.UUID resourceId,
               ACL acl,
               java.util.UUID actorId,
               java.util.Date happenedOn)
Change the ACL for a resource.

Parameters:
resourceId - The resource to update.
acl - The access control list for this resource.
actorId - The user id of the actor.
happenedOn - When the command happened.

deleteResource

void deleteResource(java.util.UUID resourceId,
                    java.util.UUID actorId,
                    java.util.Date happenedOn)
Delete a resource.

Parameters:
resourceId - The id of the existing resource.
actorId - The user id of the actor.
happenedOn - When the command happened.

includeInMainMenu

void includeInMainMenu(java.util.UUID resourceId,
                       boolean include,
                       java.util.UUID actorId,
                       java.util.Date happenedOn)
Specify whether a resource should be included in a site's main menu.

Parameters:
resourceId - The id of the resource to update.
include - True if the resource should be included, false otherwise.
actorId - The user id of the actor.
happenedOn - When the command happened.

lock

void lock(java.util.UUID resourceId,
          java.util.UUID actorId,
          java.util.Date happenedOn)
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.
actorId - The user id of the actor.
happenedOn - When the command happened.

publish

void publish(java.util.UUID resourceId,
             java.util.UUID userId,
             java.util.Date publishDate)
Publish the specified resource.

Parameters:
resourceId - The id of the resource to update.
userId - The id of the publishing user.
publishDate - The date the resource was published.

unpublish

void unpublish(java.util.UUID resourceId,
               java.util.UUID userId,
               java.util.Date publishDate)
Unpublish the specified resource.

Parameters:
resourceId - The id of the resource to update.
userId - The id of the un-publishing user.
publishDate - The date the resource was un-published.

updateMetadata

void updateMetadata(java.util.UUID resourceId,
                    java.lang.String title,
                    java.lang.String description,
                    java.util.Set<java.lang.String> tags,
                    java.util.Map<java.lang.String,java.lang.String> metadata,
                    java.util.UUID actorId,
                    java.util.Date happenedOn)
Update metadata of the resource.

Parameters:
resourceId - The id of the resource to update.
title - The new title to set.
description - The new description to set.
tags - The new tags to set.
metadata - The metadata to update.
actorId - The user id of the actor.
happenedOn - When the command happened.

updateResourceTemplate

void updateResourceTemplate(java.util.UUID resourceId,
                            java.util.UUID templateId,
                            java.util.UUID actorId,
                            java.util.Date happenedOn)
Update the specified resource's template on the server.

Parameters:
resourceId - The id of the resource to update.
templateId - The new template to set for the resource.
actorId - The user id of the actor.
happenedOn - When the command happened.

unlock

void unlock(java.util.UUID resourceId,
            java.util.UUID actorId,
            java.util.Date happenedOn)
Unlock the specified Resource. If the logged in user does not have privileges to unlock this resource a CCCException will be thrown. Unlocking an unlocked resource has no effect.

Parameters:
resourceId - The resource to unlock.
actorId - The user id of the actor.
happenedOn - When the command happened.


Copyright © 2010. All Rights Reserved.