Sei sulla pagina 1di 67

EMC ® Documentum ®

CenterStage
Version 1

Development Guide

P/N 300-009-502 A01

EMC Corporation
Corporate Headquarters:
Hopkinton, MA 01748‑9103
1‑508‑435‑1000
www.EMC.com
Copyright© 2009 EMC Corporation. All rights reserved.
Published June 2009
EMC believes the information in this publication is accurate as of its publication date. The information is subject to change
without notice.
THE INFORMATION IN THIS PUBLICATION IS PROVIDED AS IS. EMC CORPORATION MAKES NO REPRESENTATIONS
OR WARRANTIES OF ANY KIND WITH RESPECT TO THE INFORMATION IN THIS PUBLICATION, AND SPECIFICALLY
DISCLAIMS IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Use, copying, and distribution of any EMC software described in this publication requires an applicable software license.
For the most up‑to‑date listing of EMC product names, see EMC Corporation Trademarks on EMC.com.
All other trademarks used herein are the property of their respective owners.
Table of Contents

Preface ................................................................................................................................ 9

Part 1 CenterStage Foundation Services ....................................................................... 11


Chapter 1 FeedService ................................................................................................. 13
getFeed operation ............................................................................................. 13
Java syntax ................................................................................................... 13
Parameters ................................................................................................... 13
Response ..................................................................................................... 13
Exception ..................................................................................................... 13
getFeedUrls operation....................................................................................... 14
Java syntax ................................................................................................... 14
Parameters ................................................................................................... 14
Response ..................................................................................................... 14
Exception ..................................................................................................... 14

Chapter 2 MembershipService ..................................................................................... 15


addMembersToSpace operation ......................................................................... 15
Java syntax ................................................................................................... 15
Parameters ................................................................................................... 15
Exception ..................................................................................................... 15
removeMembersFromSpace operation ............................................................... 16
Java syntax ................................................................................................... 16
Parameters ................................................................................................... 16
Exception ..................................................................................................... 16
changeMemberRoles operation ......................................................................... 16
Java syntax ................................................................................................... 16
Parameters ................................................................................................... 17
Exception ..................................................................................................... 17
getRole operation ............................................................................................. 17
Java syntax ................................................................................................... 17
Parameters ................................................................................................... 17
Response ..................................................................................................... 17
Exception ..................................................................................................... 18
getRoles operation ............................................................................................ 18
Java syntax ................................................................................................... 18
Parameters ................................................................................................... 18
Response ..................................................................................................... 18
Exception ..................................................................................................... 18
getMemberRoles operation ............................................................................... 18
Java syntax ................................................................................................... 19
Parameters ................................................................................................... 19
Response ..................................................................................................... 19
Exception ..................................................................................................... 19

EMC Documentum CenterStage Version 1 Development Guide 3


Table of Contents

Chapter 3 Page Service ............................................................................................... 21


createFromTemplate operation .......................................................................... 21
Java syntax ................................................................................................... 21
Parameters ................................................................................................... 21
Response ..................................................................................................... 22
Exception ..................................................................................................... 22
createPage operation ......................................................................................... 22
Java syntax ................................................................................................... 22
Parameters ................................................................................................... 22
Response ..................................................................................................... 22
Exception ..................................................................................................... 22
createSection operation ..................................................................................... 23
Java syntax ................................................................................................... 23
Parameters ................................................................................................... 23
Response ..................................................................................................... 23
Exception ..................................................................................................... 23
getPage operation ............................................................................................. 23
Java syntax ................................................................................................... 23
Parameters ................................................................................................... 24
Response ..................................................................................................... 24
Exception ..................................................................................................... 24
updatePage operation ....................................................................................... 24
Java syntax ................................................................................................... 24
Parameters ................................................................................................... 24
Response ..................................................................................................... 25
Exception ..................................................................................................... 25
lockPage operation ........................................................................................... 25
Java syntax ................................................................................................... 25
Parameters ................................................................................................... 25
Response ..................................................................................................... 25
Exception ..................................................................................................... 26
unlockPage operation ....................................................................................... 26
Java syntax ................................................................................................... 26
Parameters ................................................................................................... 26
Exception ..................................................................................................... 26
getVersions operation ....................................................................................... 26
Java syntax ................................................................................................... 26
Parameters ................................................................................................... 27
Response ..................................................................................................... 27
Exception ..................................................................................................... 27
getChildPages operation ................................................................................... 27
Java syntax ................................................................................................... 27
Parameters ................................................................................................... 27
Response ..................................................................................................... 28
Exception ..................................................................................................... 28
getAttachments operation ................................................................................. 28
Java syntax ................................................................................................... 28
Parameters ................................................................................................... 28
Response ..................................................................................................... 28
Exception ..................................................................................................... 29

Chapter 4 SpaceService .............................................................................................. 31


preCreateSpace operation ................................................................................. 31
Java syntax ................................................................................................... 31
Parameters ................................................................................................... 31

4 EMC Documentum CenterStage Version 1 Development Guide


Table of Contents

Response ..................................................................................................... 31
Exception ..................................................................................................... 32
createSpace operation ....................................................................................... 32
Java syntax ................................................................................................... 32
Parameters ................................................................................................... 32
Response ..................................................................................................... 32
Exception ..................................................................................................... 32
createSpaceFromTemplate operation.................................................................. 32
Java syntax ................................................................................................... 33
Parameters ................................................................................................... 33
Response ..................................................................................................... 33
Exception ..................................................................................................... 33
deleteSpace operation ....................................................................................... 33
Java syntax ................................................................................................... 33
Parameters ................................................................................................... 34
Response ..................................................................................................... 34
Exception ..................................................................................................... 34
validateSpace operation .................................................................................... 34
Java syntax ................................................................................................... 34
Parameters ................................................................................................... 34
Response ..................................................................................................... 35
Exception ..................................................................................................... 35
updateSpace operation...................................................................................... 35
Java syntax ................................................................................................... 35
Parameters ................................................................................................... 35
Response ..................................................................................................... 35
Exception ..................................................................................................... 35
getSpace operation ........................................................................................... 35
Java syntax ................................................................................................... 36
Parameters ................................................................................................... 36
Response ..................................................................................................... 36
Exception ..................................................................................................... 36
addFavorites operation ..................................................................................... 36
Java syntax ................................................................................................... 36
Parameters ................................................................................................... 36
Response ..................................................................................................... 37
Exception ..................................................................................................... 37
removeFavorites operation ................................................................................ 37
Java syntax ................................................................................................... 37
Parameters ................................................................................................... 37
Response ..................................................................................................... 37
Exception ..................................................................................................... 37
createRoles operation ........................................................................................ 37
Java syntax ................................................................................................... 38
Parameters ................................................................................................... 38
Response ..................................................................................................... 38
Exception ..................................................................................................... 38
validateRoles operation ..................................................................................... 38
Java syntax ................................................................................................... 38
Parameters ................................................................................................... 39
Response ..................................................................................................... 39
Exception ..................................................................................................... 39
updateRoles operation ...................................................................................... 39
Java syntax ................................................................................................... 39
Parameters ................................................................................................... 39

EMC Documentum CenterStage Version 1 Development Guide 5


Table of Contents

Response ..................................................................................................... 40
Exception ..................................................................................................... 40
deleteRoles operation........................................................................................ 40
Java syntax ................................................................................................... 40
Parameters ................................................................................................... 40
Response ..................................................................................................... 40
Exception ..................................................................................................... 41

Chapter 5 SubscriptionService .................................................................................... 43


subscribe operation........................................................................................... 43
Java syntax ................................................................................................... 43
Parameters ................................................................................................... 43
Response ..................................................................................................... 43
Exception ..................................................................................................... 43
unsubscribe operation ....................................................................................... 44
Java syntax ................................................................................................... 44
Parameters ................................................................................................... 44
Response ..................................................................................................... 44
Exception ..................................................................................................... 44

Chapter 6 TagService ................................................................................................... 45


getSpaceTagsByContent operation ..................................................................... 45
Java syntax ................................................................................................... 45
Parameters ................................................................................................... 45
Response ..................................................................................................... 45
Exception ..................................................................................................... 46
getSpaceContentTagCloud operation ................................................................. 46
Java syntax ................................................................................................... 46
Parameters ................................................................................................... 46
Response ..................................................................................................... 46
Exception ..................................................................................................... 46
getRecommendedTags operation ....................................................................... 46
Java syntax ................................................................................................... 47
Parameters ................................................................................................... 47
Response ..................................................................................................... 47
Exception ..................................................................................................... 47
createAndApplySpaceTags operation................................................................. 47
Java syntax ................................................................................................... 47
Parameters ................................................................................................... 48
Response ..................................................................................................... 48
Exception ..................................................................................................... 48
applyTags operation ......................................................................................... 48
Java syntax ................................................................................................... 48
Parameters ................................................................................................... 49
Exception ..................................................................................................... 49
deleteTag operation .......................................................................................... 49
Java syntax ................................................................................................... 49
Parameters ................................................................................................... 49
Exception ..................................................................................................... 49
removeTags operation ....................................................................................... 50
Java syntax ................................................................................................... 50
Parameters ................................................................................................... 50
Exception ..................................................................................................... 50
updateTag operation ......................................................................................... 50
Java syntax ................................................................................................... 50

6 EMC Documentum CenterStage Version 1 Development Guide


Table of Contents

Parameters ................................................................................................... 51
Response ..................................................................................................... 51
Exception ..................................................................................................... 51
getContentsByTag operation ............................................................................. 51
Java syntax ................................................................................................... 51
Parameters ................................................................................................... 51
Response ..................................................................................................... 51
Exception ..................................................................................................... 52
getContentByTagNames operation..................................................................... 52
Java syntax ................................................................................................... 52
Parameters ................................................................................................... 52
Response ..................................................................................................... 52
Exception ..................................................................................................... 52
getSpaceTaggingInfoByContent operation .......................................................... 52
Java syntax ................................................................................................... 53
Parameters ................................................................................................... 53
Response ..................................................................................................... 53
Exception ..................................................................................................... 53
getTaggingInfo operation .................................................................................. 53
Java syntax ................................................................................................... 53
Parameters ................................................................................................... 54
Response ..................................................................................................... 54
Exception ..................................................................................................... 54
getTaggingInfoByTag operation ......................................................................... 54
Java syntax ................................................................................................... 54
Parameters ................................................................................................... 54
Response ..................................................................................................... 54
Exception ..................................................................................................... 55

Chapter 7 TemplateService .......................................................................................... 57


createSpaceTemplate operation.......................................................................... 57
Java syntax ................................................................................................... 57
Parameters ................................................................................................... 57
Response ..................................................................................................... 57
Exception ..................................................................................................... 58
setTemplateData operation ................................................................................ 58
Java syntax ................................................................................................... 58
Parameters ................................................................................................... 58
Exception ..................................................................................................... 58
createSectionTemplate operation ....................................................................... 58
Java syntax ................................................................................................... 58
Parameters ................................................................................................... 59
Response ..................................................................................................... 59
Exception ..................................................................................................... 59
createPageTemplate operation ........................................................................... 59
Java syntax ................................................................................................... 59
Parameters ................................................................................................... 59
Response ..................................................................................................... 60
Exception ..................................................................................................... 60
updateSpaceTemplate operation ........................................................................ 60
Java syntax ................................................................................................... 60
Parameters ................................................................................................... 60
Response ..................................................................................................... 60
Exception ..................................................................................................... 61
updateSectionTemplate operation ...................................................................... 61

EMC Documentum CenterStage Version 1 Development Guide 7


Table of Contents

Java syntax ................................................................................................... 61


Parameters ................................................................................................... 61
Response ..................................................................................................... 61
Exception ..................................................................................................... 61
updatePageTemplate operation ......................................................................... 61
Java syntax ................................................................................................... 62
Parameters ................................................................................................... 62
Response ..................................................................................................... 62
Exception ..................................................................................................... 62
getSpaceTemplates operation ............................................................................ 62
Java syntax ................................................................................................... 62
Parameters ................................................................................................... 63
Response ..................................................................................................... 63
Exception ..................................................................................................... 63
getSectionTemplates operation .......................................................................... 63
Java syntax ................................................................................................... 63
Parameters ................................................................................................... 63
Response ..................................................................................................... 64
Exception ..................................................................................................... 64
getPageTemplates operation .............................................................................. 64
Java syntax ................................................................................................... 64
Parameters ................................................................................................... 64
Response ..................................................................................................... 64
Exception ..................................................................................................... 65

8 EMC Documentum CenterStage Version 1 Development Guide


Preface

This document describes the extension points for application developers working with EMC
Documentum CenterStage.

Intended Audience
The intended audience for this documentation is application developers and administrators who
customize CenterStage for their users.

Revision History
The following changes have been made to this document.

Revision Date Description


June 2009 Initial publication

EMC Documentum CenterStage Version 1 Development Guide 9


Preface

10 EMC Documentum CenterStage Version 1 Development Guide


Part 1
CenterStage Foundation Services

EMC Documentum CenterStage Version 1 Development Guide 11


CenterStage Foundation Services

12 EMC Documentum CenterStage Version 1 Development Guide


Chapter 1
FeedService

The FeedService provides the CenterStage AtomPub implmentation. In CenterStage 1.0, it only
supports feeds.

getFeed operation
Provides data for a feed, given the feed URL.

Java syntax
public FeedCollection getFeed(String feedUrl)
throws FoundationException

Parameters
Parameter Data type Description
feedUrl String The URL to the feed

Response
Returns a FeedCollection object.

Exception
Throws a FoundationException.

EMC Documentum CenterStage Version 1 Development Guide 13


FeedService

getFeedUrls operation
Gets the feed URLs for a set of objects.

Java syntax
public List<string> getFeedUrls(ObjectIdentitySet targets,
String feedKind)
throws FoundationException

Parameters
Parameter Data type Description
targets ObjectIdentifySet Objects whose feed URLs
should be retrieved.
feedKind String Kind of feed to retrieve. This
value can be set to null or an
empty string to get the default
feed for the object.

Response
Returns a list of feed URLs for the objects, where the first URL is the URL to the first object, and so on.

Exception
Throws a FoundationException if an exception occurs while determining the feed URL(s) for the
object(s).

14 EMC Documentum CenterStage Version 1 Development Guide


Chapter 2
MembershipService

This service is used to manage space membership.

addMembersToSpace operation
Adds members to the space and assigns them specified roles.

Java syntax
public void addMembersToSpace (ObjectIdentity spaceId,
MemberIdentitySet membersToAdd,
RoleSet initialRoles)
throws FoundationException

Parameters
Parameter Data type Description
spaceId ObjectIdentity Identity of the space to which
the members will be added.
membersToAdd MemberIdentitySet Members which will be added
to the space.
initialRoles RoleSet Roles that will be assigned to
the new members.

Exception
Throws a FoundationException.

EMC Documentum CenterStage Version 1 Development Guide 15


MembershipService

removeMembersFromSpace operation
Remove selected members from a space.

Java syntax
public void removeMembersFromSpace(ObjectIdentity spaceId,
MemberIdentitySet membersToRemove)
throws FoundationException

Parameters
Parameter Data type Description
spaceId ObjectIdentity Object Identity of the space
from which to remove the
members.
membersToRemove MemberIdentitySet List of member identities to
remove from the space.

Exception
Throws a FoundationException.

changeMemberRoles operation
Changes roles for one or more members. Each member can be assigned to multiple roles.

Java syntax
public void changeMemberRoles (ObjectIdentity spaceId,
MemberIdentitySet memberSet,
RoleSet rolesToUpdate,
RoleIntentModifier intentModifier)
throws FoundationException

16 EMC Documentum CenterStage Version 1 Development Guide


MembershipService

Parameters
Parameter Data type Description
spaceId ObjectIdentity ID of the space that contains
the members.
memberSet MemberIdentitySet Set of members whose roles
will be changed.
rolesToUpdate RoleSet Roles whose membership will
be updated.
intentModifier RoleIntentModifier Indicates how the members’
roles will be modified (Add,
Replace, or Remove).

Exception
Throws a FoundationException.

getRole operation
Description.

Java syntax
public Role getRole (ObjectIdentity spaceId,
MemberIdentity roleId)
throws FoundationException

Parameters
Parameter Data type Description
spaceId ObjectIdentity Object identity for the space.
roleId MemberIdentity Role inside the space.

Response
Returns the role, including the role name, description, permission level and members.

EMC Documentum CenterStage Version 1 Development Guide 17


MembershipService

Exception
Throws a FoundationException.

getRoles operation
Get the built‑in and custom roles for a space.

Java syntax
public RoleSet getRoles (ObjectIdentify spaceId,
boolean includeMembership)
throws FoundationException

Parameters
Parameter Data type Description
spaceId ObjectIdentity Identity of the space from
which roles should be retrieved.
includeMembership boolean For each Role instance,
indicates whether the direct
members of the roles should be
returned.

Response
Returns roles for the space with description, display name ID, kind and optionally members filled in.

Exception
Throws a FoundationException.

getMemberRoles operation
Gets a member’s roles within a space.

18 EMC Documentum CenterStage Version 1 Development Guide


MembershipService

Java syntax
public RoleSet getMemberRoles(ObjectIdentity spaceId,
MemberIdentity member)
throws FoundationException

Parameters
Parameter Data type Description
spaceId ObjectIdentity Object identity for the space (or
an item within a space)
member MemberIdentity Identity fo the member whose
roles are to be retrieved.

Response
Returns a set of roles to which the member belongs. Each returned role has the role identity (group)
and role display name filled in.

Exception
Throws a FoundationException.

EMC Documentum CenterStage Version 1 Development Guide 19


MembershipService

20 EMC Documentum CenterStage Version 1 Development Guide


Chapter 3
Page Service

The Page Service provides fundamental operations for creating, fetching, updating, and deleting
pages and page contents. The PageService also provides a set of special operations for page objects.

createFromTemplate operation
Create a new page from page template. The new page is created under the parent page. If a page
name is not specified in properties, the PageService generates a unique page name with the prefix
New Page. Pages created by this method are in a draft state, and they have the space’s Draft ACL
applied to them. This allows users to make edits to the page content without making the page visible
to other users, until the initial content has been applied. Pages created using this service call have an
aspect attached that disables versioning for the first update of the page.

Java syntax
public Page createFromTemplate(PropertySet properties,
ObjectIdentity templateId,
ObjectLocation location)
throws FoundationException

Parameters
Parameter Data type Description
properties PropertySet The name of the new page
which is going to be created
templateId ObjectIdentity A valid identity pointing to
a page template object in the
repository
location ObjectLocation Avalid identity pointing to a
page object which will be the
parent of the new page in the
repository

EMC Documentum CenterStage Version 1 Development Guide 21


Page Service

Response
Returns the new page, which is created under the parent page.

Exception
Throws a FoundationException.

createPage operation
Creates a page attached to the given parent. Page properties and contents can be passed in to
this service. During page creation, the method verifies the page name; if it is empty, PageService
automatically generates a unique name with the prefix New Page.

Java syntax
public Page createPage(Page newPage,
ObjectLocation parentPage)
throws FoundationException

Parameters
Parameter Data type Description
newPage Page The name of the new page that
is going to be created.
parentPage ObjectLocation A valid identity pointing to
a page object that will be the
parent of the new page in the
repository.

Response
Returns the new page, which is created under the parent page.

Exception
Throws a FoundationException.

22 EMC Documentum CenterStage Version 1 Development Guide


Page Service

createSection operation
Creates a section in the given space. Section properties and contents can be passed in to this service.

Java syntax
public Page createSection(Page newSection,
ObjectLocation space)
throws FoundationException

Parameters
Parameter Data type Description
newSection Page Metadata and contents for the
section.
space ObjectLocation Location containing a space
identity.

Response
Returns the new section.

Exception
Throws a FoundationException if the section cannot be created.

getPage operation
Get a single page. Based on the options, clients can request metadata and contents. The page identity
is returned using the URI format.

Java syntax
public Page getPage(ObjectIdentity pageIdentity,
PageProfile getOptions)
throws FoundationException

EMC Documentum CenterStage Version 1 Development Guide 23


Page Service

Parameters
Parameter Data type Description
pageIdentity ObjectIdentity A valid identity pointing to a
page object in the repository
getOptions PageProfile Optional property profile for
requesting specific properties

Response
Returns a page in which all the page properties are set.

Exception
Throws a FoundationException.

updatePage operation
Update a page, including the revision of property values and the page’s contents. Updating might
cause a check in, which changes the identity of the content.

Java syntax
public Page updatePage(Page newData,
PageProfile updateOptions)
throws FoundationException

Parameters
Parameter Data type Description
newData Page New data that are used to
modify the page, including
page properties and page
content properties that are
used to modify the page. The
restriction is that the page
identity in newData must be
the identity of the old page
and the content identity in the

24 EMC Documentum CenterStage Version 1 Development Guide


Page Service

newData must be the identity


of the old page content.
updateOptions PageProfile Optional property profile for
requesting specific properties.

Response
Returns the new, updated page.

Exception
Throws a FoundationException.

lockPage operation
Retrieve the page with the given identity, and acquire a lock on it. If a user is trying to lock a page
already locked by another user, this method throws an exception.

Java syntax
public Page lockPage(ObjectIdentity pageIdentity,
PageProfile getOptions)
throws FoundationException

Parameters
Parameter Data type Description
pageIdentity ObjectIdentity Identity of the page to lock
getOptions PageProfile Options used for returning the
page

Response
Returns a Page.

EMC Documentum CenterStage Version 1 Development Guide 25


Page Service

Exception
Throws a FoundationException if the Page cannot be locked.

unlockPage operation
Unlock the page if it is locked by other user. If the page is already unlocked, this service does
nothing. If the page is locked by another user, and the current user is a space Coordinator, the lock
will be broken.

Java syntax
public void unlockPage(ObjectIdentity pageIdentity)
throws FoundationException

Parameters
Parameter Data type Description
pageIdentity ObjectIdentity Identity of the page to unlock

Exception
Throws a FoundationException if the Page cannot be unlocked.

getVersions operation
Return all versions of the page content. Depending on the options, content, metadata or both may be
returned.

Java syntax
public DataPackage getVersions(ObjectIdentity pageIdentity,
PageProfile getOptions)
throws FoundationException

26 EMC Documentum CenterStage Version 1 Development Guide


Page Service

Parameters
Parameter Data type Description
pageIdentity ObjectIdentity A valid identity pointing to a
page object in the repository,
described by ObjectId or
ObjectPath
getOptions PageProfile Optional property profile for
requesting specific properties

Response
Returns a DataPackage with all versions.

Exception
Throws a FoundationException.

getChildPages operation
Get all child pages from the specified parent page.

Java syntax
public DataPackage getChildPages(ObjectIdentity parentPage,
PageProfile profile)
throws FoundationException

Parameters
Parameter Data type Description
parentPage ObjectIdentity A valid identity pointing to a
page object in the repository
profile PageProfile Optional property profile for
requesting specific properties

EMC Documentum CenterStage Version 1 Development Guide 27


Page Service

Response
Returns a DataPackage includes all child pages within the parent page.

Exception
Throws a FoundationException.

getAttachments operation
Return all the attachments of the specified page.

Java syntax
public DataPackage getAttachments(ObjectIdentity pageIdentity,
PageProfile options)
throws FoundationException

Parameters
Parameter Data type Description
pageIdentity ObjectIdentity Avalid identity pointing to a
page object in the repository
options PageProfile Optional property profile for
requesting specific properties

Response
Returns a DataPackage with all the attachment objects from the specified page.

28 EMC Documentum CenterStage Version 1 Development Guide


Page Service

Exception
Throws a FoundationException.

EMC Documentum CenterStage Version 1 Development Guide 29


Page Service

30 EMC Documentum CenterStage Version 1 Development Guide


Chapter 4
SpaceService

The SpaceService provides methods for space operations. Spaces are repository objects of type
dmc_room with dmc_space_aspect attached.

preCreateSpace operation
Returns the type information and default values for a space object. The space object is implemented
as an aspect with attributes. The space object base type could be specified by setting the parameter
type. Currently the only type supported is dmc_room. If the type is set to null, the default type
dmc_room is used.

Java syntax
public Space preCreateSpace(ObjectIdentity identity,
String objectType)
throws FoundationException

Parameters
Parameter Data type Description
identity Only the repository name
needs to be set.
objectType If this value is not set, then the
default space type (dmc_room)
is used

Response
Returns a Space object with default values.

EMC Documentum CenterStage Version 1 Development Guide 31


SpaceService

Exception
Throws a FoundationException.

createSpace operation
Creates a new space for the current user. The new space is created in the location specified in
the (app.xml). The repository of the space identity must be set. The identity in the returned
OperationStatusSet will be of type ʺOBJECT_KEYʺ, and contains both the URL name and object ID
of the newly created space. This identity can be used in subsequent service calls as with any other
identity.

Java syntax
public OperationStatusSet createSpace(Space space)
throws FoundationException

Parameters
Parameter Data type Description
space Space The identity must include the
repository name; the value in
the identity is ignored

Response
Returns an OperationStatusSet containing either the identity of the new space, or an error.

Exception
Throws a FoundationException.

createSpaceFromTemplate operation
Creates a new space with the current logged in user. The new space will be created in the location
specified in the (app.xml). The repository of the space identity must be set.

32 EMC Documentum CenterStage Version 1 Development Guide


SpaceService

Java syntax
public OperationStatusSet createSpaceFromTemplate(Space space,
ObjectIdentity templateId)
throws FoundationException

Parameters
Parameter Data type Description
space Space The identity must include the
repository name; the value in
the identity is ignored.
templateId ObjectIdentity the object id of the template

Response
Returns an OperationStatusSet containing either the identity of the new space, or an error.

Exception
Throws a FoundationException.

deleteSpace operation
Deletes the space object. Returns appropriate error messages if the space cannot be deleted. You
can set the qualification of the space by specifying just the name, ObjectIdentity spaceId = new
ObjectIdentity(new Qualification(ʺdm_folder where object_name=’ʺ+ spaceName + ʺ’ʺ),DOCBASE); or
by using the fully qualified name (dm_folder where object_name=’NewSpace’ and any r_aspect_name
= ’dmc_kw_aspect’).

Java syntax
public OperationStatusSet deleteSpace(ObjectIdentity spaceIdentity)
throws FoundationException

EMC Documentum CenterStage Version 1 Development Guide 33


SpaceService

Parameters
Parameter Data type Description
spaceIdentity ObjectIdentity The name of the space

Response
Returns an OperationStatusSet. A list of errors is returned if the function fails to delete the space. If
the call succeeds, only one OperationStatus is in the list with OperationStatusType set to SUCCESS.

Exception
Throws a FoundationException.

validateSpace operation
Used to validate the parameters of the space. The URL and space name for the space must be unique.

Java syntax
public OperationStatusSet validateSpace(Space space)
throws FoundationException

Parameters
Parameter Data type Description
space Space The identity of the space. It
must include the repository
name. The ObjectId in the
space identity does not have to
be set to support new spaces.
All the properties that need to
be validated must be passed in
the properties list.

34 EMC Documentum CenterStage Version 1 Development Guide


SpaceService

Response
Returns an OperationStatusSet. A list of errors is returned if the function fails. If the call succeeds,
only one OperationStatus is in the list with OperationStatusType set to SUCCESS.

Exception
Throws a FoundationException.

updateSpace operation

Java syntax
public OperationStatusSet updateSpace(Space space)
throws FoundationException

Parameters
Parameter Data type Description
space Space A valid identity pointing to
a valid space object with the
properties included.

Response
Returns an OperationStatusSet. A list of errors is returned if the function fails. If the call succeeds,
only one OperationStatus is in the list with OperationStatusType set to SUCCESS. .

Exception
Throws a FoundationException.

getSpace operation
Gets the properties and the type info for space objects.

EMC Documentum CenterStage Version 1 Development Guide 35


SpaceService

Java syntax
public Space (ObjectIdentity spaceIdentity, PropertyProfile propProfile)

Parameters
Parameter Data type Description
spaceIdentity ObjectIdentity A valid identity pointing to a
space object in the repository
propProfile PropertyProfile Optional property profile for
requesting specific properties

Response
Returns a Space with all space properties set.

Exception
Throws a FoundationException.

addFavorites operation
Add a set of spaces to the favorite spaces list for the current user.

Java syntax
public OperationStatusSet addFavorites(ObjectIdentitySet spaceIdentities)
throws FoundationException

Parameters
Parameter Data type Description
spaceIdentities ObjectIdentitySet A list of existing spaces

36 EMC Documentum CenterStage Version 1 Development Guide


SpaceService

Response
Returns an OperationStatusSet; a list of errors is returned if the function fails. If the call succeeds,
only one OperationStatus is in the list with OperationStatusType set to SUCCESS.

Exception
Throws a FoundationException.

removeFavorites operation
Removes a set of spaces from the favorite spaces list for the current user.

Java syntax
public OperationStatusSet removeFavorites(ObjectIdentitySet spaceIdentities)
throws FoundationException

Parameters
Parameter Data type Description
spaceIdentities ObjectIdentitySet A list of existing spaces

Response
Returns an OperationStatusSet. A list of errors is returned if the function fails. If the call succeeds,
only one OperationStatus is in the list with OperationStatusType set to SUCCESS.

Exception
Throws a FoundationException.

createRoles operation
Creates custom roles with the name, description and list of roles for the member specified.

EMC Documentum CenterStage Version 1 Development Guide 37


SpaceService

Java syntax
public OperationStatusSet createRoles(ObjectIdentity spaceIdentity,
RoleSet roles)
throws FoundationException

Parameters
Parameter Data type Description
spaceIdentity ObjectIdentity A valid identity pointing to a
space object in the repository
roles RoleSet A list of roles. The
PermissionLevel and the
role type must be specified.

Response
Returns an OperationStatusSet A list of errors is returned if the function fails. If the call succeeds,
only one OperationStatus is in the list with OperationStatusType set to SUCCESS.

Exception
Throws a FoundationException.

validateRoles operation
Verifies that roles are valid; returns an appropriate error message if the custom role name is not
unique or is invalid for any reason.

Java syntax
public OperationStatusSet validateRoles(ObjectIdentity spaceIdentity,
RoleSet roles)
throws FoundationException

38 EMC Documentum CenterStage Version 1 Development Guide


SpaceService

Parameters
Parameter Data type Description
spaceIdentity ObjectIdentity A valid identity pointing to a
space object in the repository
roles RoleSet A list of roles

Response
Returns an OperationStatusSet A list of errors is returned if the function fails. If the call succeeds,
then only one OperationStatus is in the list, with OperationStatusType set to SUCCESS.

Exception
Throws a FoundationException.

updateRoles operation
Updates custom roles and/or built‑in roles (permission and members only in the latter case) for
members.

Java syntax
public OperationStatusSet updateRoles(ObjectIdentity spaceIdentity,
RoleSet roles)
throws FoundationException

Parameters
Parameter Data type Description
spaceIdentity ObjectIdentity A valid identity pointing to a
space object in the repository
roles RoleSet A list of roles

EMC Documentum CenterStage Version 1 Development Guide 39


SpaceService

Response
Returns an OperationStatusSet A list of errors is returned if the function fails. If the call succeeds,
only one OperationStatus is in the list, with OperationStatusType set to SUCCESS.

Exception
Throws a FoundationException.

deleteRoles operation
Deletes a custom role.

Java syntax
public OperationStatusSet deleteRoles(ObjectIdentity spaceIdentity,
RoleSet roles)
throws FoundationException

Parameters
Parameter Data type Description
spaceIdentity Avalid identity pointing to a
space object in the repository
roles List of roles

Response
Returns an OperationStatusSet A list of errors is returned if the function fails. If the call succeeds,
only one OperationStatus is in the list, with OperationStatusType set to SUCCESS.

40 EMC Documentum CenterStage Version 1 Development Guide


SpaceService

Exception
Throws a FoundationException.

EMC Documentum CenterStage Version 1 Development Guide 41


SpaceService

42 EMC Documentum CenterStage Version 1 Development Guide


Chapter 5
SubscriptionService

The SubscriptionService provides methods to handle subscribe/unsubscribe events on a specified


object. When an object is updated or deleted, an email notification is sent to users who have
subscribed to that object.

subscribe operation
Creates a subscription for the current user to one or more items in the repository, based on the
object identities provided.

Java syntax
public SubscriptionStatusSet subscribe(ObjectIdentitySet objectIds)
throws FoundationException

Parameters
Parameter Data type Description
objectIds ObjectIdentitySet Objects to which the current
user will be subscribed.

Response
For each object identity, this method returns the SubscriptionStatusType.SUBSCRIBED if the
subscription is successful.

Exception
Throws a FoundationException.

EMC Documentum CenterStage Version 1 Development Guide 43


SubscriptionService

unsubscribe operation
Removes the specified object IDs from the list of subscribed objects for the current user.

Java syntax
public SubscriptionStatusSet unsubscribe(ObjectIdentitySet objectIds)

throws FoundationException

Parameters
Parameter Data type Description
objectIds ObjectIdentitySet IDs of objects that will be
removed from the list of
subscribed object for the
current user.

Response
Returns a list of SubscriptionStatus objects with the value SubscriptionStatusType.UNSUBSCRIBED.

Exception
Throws a FoundationException.

44 EMC Documentum CenterStage Version 1 Development Guide


Chapter 6
TagService

The TagService class provides methods for tagging operations, including creating, applying, getting,
removing and deleting tags, as well as some relative operations.

getSpaceTagsByContent operation
Get space tags applied to the specified content with no frequency. Returns an error if the content
identity is not specified.

Java syntax
public TagCloud getSpaceTagsByContent(ObjectIdentity spaceIdentity,
ObjectIdentity contentIdentity,
int nbTags)
throws FoundationException

Parameters
Parameter Data type Description
spaceIdentity ObjectIdentity The space identity
contentIdentity ObjectIdentity The content identity
nbTags int The number of tags to return

Response
Returns a TagCloud containing the requested tags.

EMC Documentum CenterStage Version 1 Development Guide 45


TagService

Exception
Throws a FoundationException.

getSpaceContentTagCloud operation
Returns a tag cloud for the content in the specified container. We only support folders as containers.
Returns the space tag cloud if the container identity is not specified.

Java syntax
public TagCloud getSpaceContentTagCloud(ObjectIdentity spaceIdentity,
ObjectIdentity containerIdentity,
int nbTags)
throws FoundationException

Parameters
Parameter Data type Description
spaceIdentity ObjectIdentity The space identity
ObjectIdentity ObjectIdentity The container identity
nbTags int The number of tags to return

Response
Returns a TagCloud object.

Exception
Throws a FoundationException if the tag cloud cannot be computed.

getRecommendedTags operation
Returns recommended tags for a given space.

46 EMC Documentum CenterStage Version 1 Development Guide


TagService

Java syntax
public TagCloud getRecommendedTags(ObjectIdentity spaceIdentity,
ObjectIdentity contentIdentity,
int nbRecommendations)
throws FoundationException

Parameters
Parameter Data type Description
spaceIdentity ObjectIdentity The space identity
contentIdentity ObjectIdentity The content identity
nbRecommendations int The number of tags to return

Response
Returns a TagCloud object.

Exception
Throws a FoundationException if the tag cloud cannot be computed.

createAndApplySpaceTags operation
The method starts with the assumption that the space tags that are going to be created do not exist. If
they do exist, an exception is thrown. Creates one or more space tags and applies them to the content
provided. The system creates space tags within a hidden folder named tags under the space provided.

Java syntax
public TagCloud createAndApplySpaceTags(ObjectIdentity spaceIdentity,
ObjectIdentitySet contentIds,
List<String> tagNames,
String comment)
throws FoundationException

EMC Documentum CenterStage Version 1 Development Guide 47


TagService

Parameters
Parameter Data type Description
spaceIdentity ObjectIdentity A valid identity pointing to a
space object in a repository on
which the user has an account
contentIds ObjectIdentitySet A list of valid identities
pointing to the contents to
which the method will apply
the tags
tagNames List<String> A list of names of space tags
that will be created in the
repository
comment String A description of the action

Response
Returns a TagCloud that contains new space tags created in the space.

Exception
Throws a FoundationException if the name of a space tag is not unique in the space.

applyTags operation
Apply one or more tags to one or more content objects. The relationship between the tag and content
is created, where the parent is the tag and its child is the content. At the same time, the method adds
a comment to the relation.

Java syntax
public void applyTags(ObjectIdentitySet contentIds,
List<Tag> tags,
String comment)
throws FoundationException

48 EMC Documentum CenterStage Version 1 Development Guide


TagService

Parameters
Parameter Data type Description
contentIds ObjectIdentitySet A set of valid identities pointing
to objects in the repository that
can be tagged
tags List<Tag> A list of tags that will be
applied to the content objects
comment String A description of the action that
applies tags to the content

Exception
Throws a FoundationException.

deleteTag operation
Delete one or more than one tags. At the same time, delete all relations to the tag.

Java syntax
public void deleteTag(ObjectIdentitySet tagIds)
throws FoundationException

Parameters
Parameter Data type Description
tagIds ObjectIdentitySet A set of valid identities pointing
to tag objects in the repository
that are to be deleted

Exception
Throws a FoundationException.

EMC Documentum CenterStage Version 1 Development Guide 49


TagService

removeTags operation
Remove a certain tag or tags currently applied to the specified content. If the list of tags passed as a
parameter is null or the size of the list is 0, by default the method removes all tags applied to the
specified content. This operation deletes the relation(s) between the content and the tag(s).

Java syntax
public void removeTags(ObjectIdentity contentIdentity,
List<Tag> tags)
throws FoundationException

Parameters
Parameter Data type Description
contentIdentity ObjectIdentity A valid identity pointing to an
object in the repository that has
been tagged
tags List<Tag> Tags applied to the content. If
the list of tags is null or the size
of the list is 0, by default all tags
applied to the specified content
are removed.

Exception
Throws a FoundationException.

updateTag operation
Update the name of a tag.

Java syntax
public Tag updateTag(Tag tag,
PropertyProfile tagProfile)
throws FoundationException

50 EMC Documentum CenterStage Version 1 Development Guide


TagService

Parameters
Parameter Data type Description
tag Tag A tag to update, including
the new name of the tag. The
identity of the tag must be the
identity of the old tag.
tagProfile PropertyProfile Optional property profile for
requesting specific properties.

Response
Returns the updated tag.

Exception
Throws a FoundationException.

getContentsByTag operation
Return all content objects to which the current tag is applied.

Java syntax
public List<DataObject> getContentsByTag(Tag tag)
throws FoundationException

Parameters
Parameter Data type Description
tag Tag The tag for which to return all
content objects.

Response
Returns a list of DataObjects to which the tag is applied.

EMC Documentum CenterStage Version 1 Development Guide 51


TagService

Exception
Throws a FoundationException.

getContentByTagNames operation
Returns a list of objects tagged by the tags specified in the TagQuery object.

Java syntax
public QueryResult getContentByTagNames(TagQuery query,
QueryExecution execution)
throws FoundationException

Parameters
Parameter Data type Description
query TagQuery The TagQuery to execute
execution QueryExecution The execution parameters

Response
Returns a list of objects, ordered according to TagQuery order by clauses, containing the attributes
specified in TagQuery select attributes list and the Object icons (or meta data to retrieve them),
ordered by r_modify_date.

Exception
Throws a FoundationException if the query fails.

getSpaceTaggingInfoByContent operation
Get the information of relations from dm_relation whose child is the content.

52 EMC Documentum CenterStage Version 1 Development Guide


TagService

Java syntax
public List<TaggingInfo> getSpaceTaggingInfoByContent(ObjectIdentity spaceIdentity,
ObjectIdentity contentIdentity)
throws FoundationException

Parameters
Parameter Data type Description
spaceIdentity ObjectIdentity A valid identity pointing to a
space object in the repository
contentIdentity ObjectIdentity A valid identity pointing to an
object in the repository that can
be tagged with space tags

Response
Returns a list of information of tagged relations whose child is content.

Exception
Throws a FoundationException.

getTaggingInfo operation
Get the information of relations from dm_relation whose parent is tag and child is content.

Java syntax
public TaggingInfo getTaggingInfo(Tag tag,
ObjectIdentity contentIdentity)
throws FoundationException

EMC Documentum CenterStage Version 1 Development Guide 53


TagService

Parameters
Parameter Data type Description
tag Tag A tag that is applied to the
content.
contentIdentity ObjectIdentity A valid identity pointing to an
object in the repository that can
have tags applied.

Response
Returns the information of the relation whose parent is tag and child is content.

Exception
Throws a FoundationException.

getTaggingInfoByTag operation
Get the information of relations from dm_relation whose parent is tag by the specified tag.

Java syntax
public List<TaggingInfo> getTaggingInfoByTag(Tag tag)
throws FoundationException

Parameters
Parameter Data type Description
tag Tag A tag that has been applied to
content.

Response
Returns the information of relations whose parent is the specified tag.

54 EMC Documentum CenterStage Version 1 Development Guide


TagService

Exception
Throws a FoundationException.

EMC Documentum CenterStage Version 1 Development Guide 55


TagService

56 EMC Documentum CenterStage Version 1 Development Guide


Chapter 7
TemplateService

The TemplateService provides methods to create and handle marshalling of templates to XML

createSpaceTemplate operation
Create a space template from the given space. The space templates are stored in /Templates/Spaces.

Java syntax
public OperationStatusSet createSpaceTemplate(ObjectIdentity space,
PropertySet templateData,
TemplateProfile templateProfile)
throws FoundationException

Parameters
Parameter Data type Description
space ObjectIdentity A valid identity pointing to a
space object in the repository
which will be as a template
templateData PropertySet The metadata of the space
template
templateProfile TemplateProfile Options for template creation

Response
Returns the identify of the space template object created from the given space.

EMC Documentum CenterStage Version 1 Development Guide 57


TemplateService

Exception
Throws a FoundationException.

setTemplateData operation
Set the data for a template.

Java syntax
protected void setTemplateData(PropertySet templData,
com.documentum.fc.client.IDfPersistentObject iDfObject)
throws com.documentum.fc.common.DfException

Parameters
Parameter Data type Description
templData PropertySet The metadata of the template.
iDfObject com.documentum.fc.client. The object from which to create
IDfPersistentObject the template.

Exception
Throws a com.documentum.fc.common.DfException.

createSectionTemplate operation
Create a section template from the given section. The section templates are stored in the space that
contains the section. They are in the directory /Space name/Templates/Section

Java syntax
public OperationStatusSet createSectionTemplate(ObjectIdentity section,
PropertySet templData,
TemplateProfile templateProfile)
throws FoundationException

58 EMC Documentum CenterStage Version 1 Development Guide


TemplateService

Parameters
Parameter Data type Description
section ObjectIdentity A valid identity pointing to a
section object in the repository
to use as a template
templData PropertySet The metadata of the section
template
templateProfile TemplateProfile Options for template creation

Response
Returns the identify of the section template object created from the given section.

Exception
Throws a FoundationException.

createPageTemplate operation
Create a page template from the given page. The page templates are stored in the space that contains
the page used to create the template. They stored in /Space name/Templates/Page

Java syntax
public OperationStatusSet createPageTemplate(ObjectIdentity page,
PropertySet templData,
TemplateProfile templateProfile)
throws FoundationException

Parameters
Parameter Data type Description
page ObjectIdentity A valid identity pointing to a
page object in the repository to
be used as a template

EMC Documentum CenterStage Version 1 Development Guide 59


TemplateService

templData PropertySet The metadata of the page


template
templateProfile TemplateProfile Options for template creation

Response
Returns the identity of the page template object created from the given page.

Exception
Throws a FoundationException.

updateSpaceTemplate operation

Java syntax
public OperationStatusSet updateSpaceTemplate(ObjectIdentity templtIdentity,
ObjectIdentity parentIdentity,
PropertySet templtData,
TemplateProfile templtProfile)
throws FoundationException

Parameters
Parameter Data type Description
templtIdentity ObjectIdentity A valid space template identity
parentIdentity ObjectIdentity Parent identity for the template
templtData PropertySet Metadata for template update
templtProfile TemplateProfile Options for template update

Response
Returns an updated template data package.

60 EMC Documentum CenterStage Version 1 Development Guide


TemplateService

Exception
Throws a FoundationException.

updateSectionTemplate operation

Java syntax
public OperationStatusSet updateSectionTemplate(ObjectIdentity templtIdentity,
ObjectIdentity parentIdentity,
PropertySet templtData,
TemplateProfile templtProfile)
throws FoundationException

Parameters
Parameter Data type Description
templtIdentity ObjectIdentity A valid section template
identity
parentIdentity ObjectIdentity Parent identity for the template
templtData PropertySet Metadata for template update
templtProfile TemplateProfile Options for template update

Response
Returns updated template data package.

Exception
Throws a FoundationException.

updatePageTemplate operation
Updates a page template. For space‑level templates, the update might include moving to site‑level if
it is identified as public in the template profile.

EMC Documentum CenterStage Version 1 Development Guide 61


TemplateService

Java syntax
public OperationStatusSet updatePageTemplate(ObjectIdentity templtIdentity,
ObjectIdentity parentIdentity,
PropertySet templtData,
TemplateProfile templtProfile)
throws FoundationException

Parameters
Parameter Data type Description
templtIdentity ObjectIdentity A valid page template identity
parentIdentity ObjectIdentity Parent identity for the template
templtData PropertySet Metadata for template update
templtProfile TemplateProfile Options for template update

Response
Returns updated template data package.

Exception
Throws a FoundationException.

getSpaceTemplates operation
Retrieve all space templates from the specified repository.

Java syntax
public DataPackage getSpaceTemplates(String repositoryName, P
throws FoundationException

62 EMC Documentum CenterStage Version 1 Development Guide


TemplateService

Parameters
Parameter Data type Description
repositoryName String String value with name of the
repository from which we will
get all space templates
property PropertyProfile Property profile to configure
the result object

Note: All the filters in the PropertyProfile are ignored.

Response
Returns all space templates from the specified repository.

Exception
Throws a FoundationException.

getSectionTemplates operation
Retrieve all section templates from the specified space.

Java syntax
public DataPackage getSectionTemplates(ObjectIdentity space,
TemplateProfile templateProfile)
throws FoundationException

Parameters
Parameter Data type Description
space ObjectIdentity A valid identity pointing to a
space object in the repository
from which we will retrieve all
section templates
templateProfile TemplateProfile Options for template creation

EMC Documentum CenterStage Version 1 Development Guide 63


TemplateService

Response
Returns all section templates within the specified space.

Exception
Throws a FoundationException.

getPageTemplates operation
Retrieve all page templates from the specified space.

Java syntax
public DataPackage getPageTemplates(ObjectIdentity space,
TemplateProfile templateProfile)
throws FoundationException

Parameters
Parameter Data type Description
space ObjectIdentity A valid identity pointing to a
space object in the repository
from which to retrieve all page
templates.
templateProfile TemplateProfile Options for template creation

Response
Returns all page templates from the specified space.

64 EMC Documentum CenterStage Version 1 Development Guide


TemplateService

Exception
Throws a FoundationException.

EMC Documentum CenterStage Version 1 Development Guide 65


TemplateService

66 EMC Documentum CenterStage Version 1 Development Guide


Index

EMC Documentum CenterStage Version 1 Development Guide 67

Potrebbero piacerti anche