Friday, April 10, 2009

Moving From IBM Workplace Web Content Management API V.5.x To V6.0

Table of Contents
Moving From IBM Workplace Web Content Management API V.5.x To V6.0 1
Introduction 1
What's New In The API 2
Direct and Linked Content 3
Libraries 3
Moving and Copying Items 4
Retrieving a Repository Object Via Portal Services 4
Component Types 5
Limitations 5
Deprecated Methods 6
Example 6
Summary Comparison of the WCM API v5.x and 6.0 Interfaces 6
A Detailed Look At Key Individual Interfaces 9
Taxonomies 9
Categories 10
Site 11
SiteArea 13
Content 15
ContentComponents 17
LibraryFile, LibraryImage, LibraryHTML 19


Introduction
The IBM Workplace Web Content Management (WCM) Java API allows a programmer to access Web Content Management functionality in order to create custom portlets, servlets and other applications such as bulk resource import and importing of content from third-party web content management systems.. The API provides access to important items during the content creation and rendering process. Specifically the API provides interfaces for WCM items such as workspace, content, sites, site areas, taxonomies, categories, workflows and library components.
Since the WCM API is not new there are a number of good resources available. For example:
• The API Java doc was_profile_root\AppServer\profiles\wp_profile\installedApps\nodename\wcm.ear\ilwwcm.war\webinterface\
• A section in the redbook for WCM 5.x: http://www.redbooks.ibm.com/redbooks/SG246792/wwhelp/wwhimpl/js/html/wwhelp.htm
• A developerworks article for WCM 2.0
http://www-128.ibm.com/developerworks/lotus/library/lwwcm-api/
• The Portal 6.0 InfoCenter

This article describes the differences between version 5.x and version 6.0 of the APIs, and therefore assumes the reader is familiar with the v5.x API. In that light, this document adds to the information in the above resources:
• explaining new functionality available via the 6.0 version of the API as well as any limitations of the API.
• outlining the new interfaces and methods
• identifying deprecated methods and what to use in place of them .
• providing tables that summarize the comparison of the two API interfaces and methods
• providing updated code examples

What's New In The API

There are a number of new interfaces and methods in the v6.0 API. These include support for:
• Libraries
• Additional Library Component Types:
• Date
• DocumentManager
• Link
• Numeric
• StyleSheet
• UserSelection
• Additional ContentComponent Types:
• Date
• DocumentManager
• Link
• Numeric
• OptionSelection
• UserSelection
• Direct and Linked Content in a SiteFrameworkContainer
• Getting a Repository object via Portal Services
• Additional capabilities for items: such as locking, moving, copying and create/add/remove content components.
• References

The InfoCenter has background information on most of the above topics such as libraries and the different component types. The InfoCenter combined with the Javadoc makes some topics straightforward. There are however some points that we raise or expand on in this article.

Best Practice Even though the WCM API is powerful and can be used to build custom rendering portlets, that may not be the best approach for a given project. The OOB functionality of WCM and Rendering Portlets can save a lot of time and be more performant. Each project should consider their unique needs. Similarly, categorization and Personalization rules should be used to personalize a site rather than using the WCM API.

Note Only the WCM public APIs are supported.
Direct and Linked Content

Because of a different underlying storage mechanism being used by WCM (the Java Content Repository often referred to as the JCR), there were some changes in the API regarding the handling child items. In addition, the current Javadoc version requires some clarification to lessen confusion.

For explanation purposes let's look at SiteAreas. Content is now either directly contained within a SiteArea (think containment) or is linked in. So instead of just two methods for retrieving children (SiteFrameworkContainer.getChildren which gets the immediate children and SiteFrameworkContainer.getAllChildren which gets all descendants), there are now two additional ones (SiteFrameworkContainer.getDirectChildren and SiteFrameworkContainer.getAllDirectChildren). When you see the word 'direct', that implies that ContentLinks will not be returned. Alternatively, if you want just the linked content you would use SiteArea.getLinkedChildren.

There are other manifestations of this change in the API. For example, SiteArea.hasDirectContent to check whether the SiteArea has a direct child of the specified item. Similarly, there is also SiteArea.hasLinkedContent.

To create new content you would use Workspace.createContent(templateId, siteAreaId,sibling, position), or to link in content- Workspace.CreateContentLink. Workspace.delete would be called for deleting content. The DocumentId that is passed in to delete will determine what happens- for example, if the DocumentId is returned from a SiteArea that links that content, the link is removed on the call to delete.

Another item to note about the creation of content with the deprecated methods is that you could create content (with workspace.create()), save it, and then later attach it to a site area (with siteArea.addContent). This behavior is maintained in 6.0 by saving content items that do not have parents into the root folder, and then the user can explicitly associate them with a site area by moving them out of the root folder into the site hierarchy (the move methods are discussed below). It is preferable now however to create a content item in a location that already exists since it will simplify the work done in the background and perform better.

Libraries
The introduction of libraries brings WCM in line with the IBM Content Model partitioning concepts. Libraries are used to partition the content repository. This can be leveraged in several ways:
• Roles can be defined that users and groups may have when working with different item types in libraries. This allows sharing or restricting access to content at the library level.
• Syndication is performed at the library level rather that at the repository level. This allows libraries to be syndicated at different frequencies.
• Libraries are essential for cleanly partitioned virtual portals. For example virtual portals can contain different authoring portlets pointing to shared and non-shared libraries.

The WCM API has a number of methods to work with libraries. For example, use the Workspace.setCurrentDocumentLibrary method to make API calls library specific. If not specified, the default library identified in the WCMConfigService.properties file is used (This file is in portal_server_root/wcm/shared/app/config/wcmservices. The property is connect.connector.contentmodelconnector.defaultlibrary=DM). TBD verify property
The are other methods available to get the current document library, get the document libraries available for a user of a workspace, copy and move items to another library, and to determine the containing library for a document:
• Workspace.getCurrentDocumentLibrary
• Workspace.getDocumentLibraries
• Workspace.getDocumentLibrary
• Workspace.copyToLibrary
• Workspace.moveToLibrary
• Document.getOwnerLibrary
Moving and Copying Items


There are three methods that have been introduced in 6.0 related to moving items:
• Workplace.MoveSiteFrameworkDocument
• Workplace.moveCategory, and
• Workspace.moveToLibrary
Workspace.moveSiteFrameworkDocument can be used for SiteArea, Content or ContentLinks, and can be used to move these items to another library as well. Workspace.moveCategory can also be used within or between libraries. Workspace.moveToLibrary can be used to move root items.
Similarly Workspace.copyCategory and Workspace.copySiteFrameworkDocument are used to copy items within and between libraries and Workspace.copyToLibrary can be used for root items.
TBD Verify info about moveToLibrary and copyToLibyrary.
Retrieving a Repository Object Via Portal Services
As introduced in v5.x, Repository and Workspace objects can be created in the following manner:
Repository repository = WCM_API.getRepository();
Workspace workspace = repository.getWorkspace("wpsadmin", "wpsadmin pw");
In v6.0, the WCMApiService also enables a user to access the WCM API through Portal services. The service must be configured in "\shared\app\config\services.properties" as such:
com.ibm.workplace.wcm.api.WCMApiService = com.ibm.workplace.wcm.api.WCMApiServiceImpl

The following code example demonstrates how to use this:

com.ibm.wps.services.Service service =
com.ibm.wps.services.ServiceManager.getService(WCMApiService.class);
WCMApiServiceImpl wcmService = (WCMApiServiceImpl) service;
com.ibm.workplace.wcm.api.Repository rep = wcmService.getRepository();

TBD verify the above.

Best Practice The workspace object instance for each user in the session should be cached for performance reasons since creating a workspace for a user can be a time consuming operation.


Component Types
There are a number of new Library and Content component types in the API. These interfaces are straightforward to use with the Javadoc and InfoCenter on hand.

• Additional Library Component Types:
• Date
• DocumentManager
• Link
• Numeric
• StyleSheet
• UserSelection
• Additional ContentComponent Types:
• Date
• DocumentManager
• Link
• Numeric
• OptionSelection (related to single/multiple select, min/max choices, enumerators, radio buttones, drop down, check boxes...)
• UserSelection

Best Practice ContentComponentContainer.getComponentByReference should be called instead of ContentComponentContainer.getComponent when the component is not going to be edited. This improves performance when the component will be read only.

Best Practice PDM can be an effective way to store documents. Syndication needs must be considered however.
Limitations

The v6.0 API has added a lot of functionality as can be seen in the tables in the following sections. There are still some limitations however. Specifically, the current version of the IBM Workplace Web Content Management API does not allow read and write access to all items of the Web content management system. Some functionality is excluded to avoid potential damage to the data integrity or to avoid exposing functionality which can be changed significantly in future releases of the product.
You cannot create, update, or delete workflows, workflow stages, workflow actions, taxonomies, categories, syndicators, subscribers, presentation templates and authoring templates.

In general, reviewing the tables in the following sections will quickly show the reader what functionality is missing for specific WCM objects.
Deprecated Methods

There are a number of deprecated methods in v6.0. These mainly involve the following areas:
• Creating, adding and removing content from a SiteArea
• Working with Live Access Members
• Adding and removing SiteAreas

Adding and removing content was described above in a previous section. Calls to 'Live' access methods have the same effect as the 'Read' access method calls, so any 'live' access related methods are now deprecated. Other deprecated methods and their alternatives are straightforward and are identified in the tables in the following sections.

Example

The DeveloperWorks article “Introducing the Lotus Workplace Web Content Management API” (http://www-128.ibm.com/developerworks/lotus/library/lwwcm-api/), introduces a sample WCM API application. This sample application requires a couple of changes if the deprecated methods are to be avoided. In the CreateContentText.java file the createContent() method would require changes highlighted like this:

public void runPost(HttpServletRequest request, HttpServletResponse response){
Workspace workspace = config.getWorkspace();
output = new StringBuffer();
String publishingTemplateId = request.getParameter("publishingtemplateid");
String siteAreaId = request.getParameter("siteareaid");
String contentTitle = request.getParameter("contenttitle");
String contentDescription = request.getParameter("contentdescription");
String body = request.getParameter("body");
Content content;
SiteArea siteArea;
DocumentIdIterator siteAreaChildren;
HTMLComponent bodyComponent;
int index = 0;
try {
//Replace the use of the deprecated createContent and addContent methods:
//content = workspace.createContent(workspace.createDocumentId(publishingTemplateId));
//siteArea = (SiteArea) workspace.getById(workspace.createDocumentId(siteAreaId));
//siteArea.addContent(content.getId());

// with this:
siteArea = (SiteArea) workspace.getById(workspace.createDocumentId(siteAreaId));
content =
workspace.createContent(workspace.createDocumentId
(publishingTemplateId), siteArea.getId(), null, ChildPosition.END);

siteAreaChildren = siteArea.getChildren();
...

Summary Comparison of the WCM API v5.x and 6.0 Interfaces

Table 1 below shows a summary comparison of the WCM API interfaces between version 5.x and 6.0.Each row lists one of the main interfaces. Interfaces that have changed are explained in more detail in subsequent tables.

Color Key:
Unchanged interface
New interface
Interface that has changed or inherits from a changed interface
Version 5.x Public API Version 6.0 Public API Comments




AuthoringTemplate AuthoringTemplate Unchanged
Category Category Unchanged, although some changes in inherited interfaces

ChildPosition new
Content Content

ContentComponent ContentComponent Unchanged. There are new components however
ContentComponentContainer ContentComponentContainer


ContetLink new

DateComponent new
Document Document

DocumentId DocumentId


DocumentLibrary new

DocumentManagerComponent new
DocumentType DocumentType Unchanged
DocumentTypes DocumentTypes

Editable Editable

EditableLibraryComponent EditableLibraryComponent

EmbeddedImageMap EmbeddedImageMap Unchanged
FileComponent FileComponent Unchanged
HTMLComponent HTMLComponent Unchanged
ImageComponent ImageComponent Unchanged
LibraryComponent LibraryComponent Unchanged. There are new library components however

LibraryDateComponent new

LibraryDocumentManagerComponent new
LibraryFileComponent LibraryFileComponent Unchanged, although some changes in inherited interfaces
LibraryHTMLComponent LibraryHTMLComponent Unchanged, although some changes in inherited interfaces
LibraryImageComponent LibraryImageComponent Unchanged, although some changes in inherited interfaces

LibraryLinkComponent new

LibraryNumericComponent new

LibraryStyleSheetComponent new

LibraryUserSelectionComponent new

LinkComponent new

NumericComponent new

OptionSelectionComponent new
PresentationTemplate PresentationTemplate Unchanged

Reference new
ReferenceComponent ReferenceComponent Unchanged
RenderingContext RenderingContext Unchanged
Repository Repository Unchanged
RichTextComponent RichTextComponent Unchanged
Site Site Unchanged, although some changes in inherited interfaces
SiteArea SiteArea

SiteFrameworkContainer SiteFrameworkContainer

Taxonomy Taxonomy Unchanged
TextComponent TextComponent Unchanged
UserProfile UserProfile Unchanged

UserSelectionComponent new

WCMApiService new

WCMApiServiceImpl new

WCMServiceHome new
Workflow Workflow Unchanged
WorkflowStage WorkflowStage Unchanged
Workspace Workspace

WCM_API


Table 1 Summary Comparison of the WCM API v5.x and 6.0 Interfaces

A Detailed Look At Key Individual Interfaces

The following sections provide tables that show what methods are needed to carry out specific functionality for each of the key WCM objects. The tables also show the differences between specificV5 and V6 interfaces as well as alternatives for deprecated methods. The WCM objects discussed include:
• Taxonomies
• Categories
• Content
• ContentComponents
• Sites
• SiteAreas
• LibraryFileComponents, LibraryHTMLComponents, LibraryImageComponents


Taxonomies

The following table lists each major Taxonomy function and what interface and method is required to carry out that functionality for both the V5 and V6 APIs.

Taxonomy Functions V5 Public API V6 Public API

Create New Taxonomy N/A N/A
Update Existng Taxonomy N/A N/A
Remove Existing Taxonomy N/A N/A

Get ID Document.getId() Same as V5
Get Name Document.getName() Same as V5
Get Title N/A Document.getTitle()
Get Description Document.getDescription() Same as V5
Get Authors Document.getAuthors() Same as V5
Get Owners Document.getOwners() Same as V5
Get Modified Date N/A Document.getModifiedDate
Get Owner Library N/A Document.getOwnerLibrary
Get Live Accesss Members Document.getLiveAccessMembers Same as V5 - Deprecated
Get Read Access Members Document.getReadAccessMembers Same as V5
Get Edit Access Members Document.getEditAccessMembers Same as V5
Get Delete Access Members Document.getDeleteAccessMembers Same as V5

Set Name N/A N/A
Set Title N/A N/A
Set Description N/A N/A
Add Authors N/A N/A
Remove Authors N/A N/A
Add Owners N/A N/A
Remove Owners N/A N/A
Add Live Access Members N/A N/A
Add Read Access Members N/A N/A
Add Edit Access Members N/A N/A
Add Delete Access Members N/A N/A
Remove Live Access Members N/A N/A
Remove Read Access Members N/A N/A
Remove Edit Access Members N/A N/A
Remove Delete Access Members N/A N/A

Get Immediate Children Taxonomy.getChildren() Same as V5
Get All Children Taxonomy.getAllChildren() Same as V5
Add Child Category N/A N/A
Remove Child Category N/A N/A


Categories

The following table lists each major Category function and what interface and method is required to carry out that functionality for both the V5 and V6 APIs.

Category Functions V5 Public API V6 Public API

Create New Category N/A N/A
Update Existing Category N/A N/A
Remove Existing Category N/A N/A
Copy Category N/A Workspace.copyCategory
Move Category N/A Workspace.moveCategory

Get ID Document.getId() Same as V5
Get Name Document.getName() Same as V5
Get Title N/A Document.getTitle()
Get Description Document.getDescription() Same as V5
Get Authors Document.getAuthors() Same as V5
Get Owners Document.getOwners() Same as V5
Get Modified Date N/A Document.getModifiedDate()
Get Owner Library N/A Document.getOwnerLibrary()
Get Live Accesss Members Document.getLiveAccessMembers() Same as V5 - Deprecated
Get Read Access Members Document.getReadAccessMembers() Same as V5
Get Edit Access Members Document.getEditAccessMembers() Same as V5
Get Delete Access Members Document.getDeleteAccessMembers() Same as V5
Set Name N/A N/A
Set Title N/A N/A
Set Description N/A N/A
Add Authors N/A N/A
Remove Authors N/A N/A
Add Owners N/A N/A
Remove Owners N/A N/A
Add Live Access Members N/A N/A
Add Read Access Members N/A N/A
Add Edit Access Members N/A N/A
Add Delete Access Members N/A N/A
Remove Live Access Members N/A N/A
Remove Read Access Members N/A N/A
Remove Edit Access Members N/A N/A
Remove Delete Access Members N/A N/A

Get Immediate Children Category.getChildren() Same as V5
Get All Children Category.getAllChildren() Same as V5
Get Parent Category.getParent() Same as V5
Add Child Category N/A N/A
Remove Child Category N/A N/A

Site

The following table lists each major Site function and what interface and method is required to carry out that functionality for both the V5 and V6 APIs.



Site Functions V5 Public API V6 Public API

Methods from Workspace Interface
Create New Site Workspace.createSite() Same as V5
Update Existing Site Workspace.save() Same as V5
Remove Existing Site Workspace.delete() Same as V5

Methods from Document Interface
Get ID Document.getId() Same as V5
Get Name Document.getName() Same as V5
Get Title N/A Document.getTitle()
Get Description Document.getDescription() Same as V5
Get Authors Document.getAuthors() Same as V5
Get Owners Document.getOwners() Same as V5
Get Modified Date N/A Document.getModifiedDate()
Get Owner Library N/A Document.getOwnerLibrary()
Get Live Accesss Members Document.getLiveAccessMembers() Same as V5 - Deprecated
Get Read Access Members Document.getReadAccessMembers() Same as V5
Get Edit Access Members Document.getEditAccessMembers() Same as V5
Get Delete Access Members Document.getDeleteAccessMembers() Same as V5

Methods from Editable Interface
Set Name Editable.setName() Same as V5
Set Title N/A Editable.setTitle()
Set Description Editable.setDescription() Same as V5
Add Authors Editable.addAuthors() Same as V5
Remove Authors Editable.removeAuthors() Same as V5
Add Owners Editable.addOwners() Same as V5
Remove Owners Editable.removeOwners() Same as V5
Add Live Access Members Editable.addLiveAccessMembers() Same as V5 - Deprecated
Add Read Access Members Editable.addReadAccessMembers() Same as V5
Add Edit Access Members Editable.addEditAccessMembers() Same as V5
Add Delete Access Members Editable.addDeleteAccessMembers() Same as V5
Remove Live Access Members Editable.removeLiveAccessMembers() Same as V5 - Deprecated
Remove Read Access Members Editable.removeReadAccessMembers() Same as V5
Remove Edit Access Members Editable.removeEditAccessMembers() Same as V5
Remove Delete Access Members Editable.removeDeleteAccessMembers() Same as V5
Is Changed? Editable.isChanged Same as V5

Methods from ContentComponent Interface
Get Component ContentComponentContainer.getComponent
ContentComponentContainer.getComponentByReference Same as V5
Get All Components ContentComponentContainer.componentIterator Same as V5
Get All Component Names N/A ContentComponentContainer.getComponentNames
Check Has Component ContentComponentContainer.hasComponent() Same as V5
Set Component Value ContentComponentContainer.setComponent() Same as V5
Create New Component N/A ContentComponentContainer.createComponent
Add New Component N/A ContentComponentContainer.addComponent
Remove Component N/A ContentComponentContainer.removeComponent

Methods from SiteFrameworkContainer
Get Immediate Children SiteFrameworkContainer.getChildren() SiteFrameworkContainer.getDirectChildren
SiteFrameworkContainer.getChildren
Get All Children SiteFrameworkContainer.getAllChildren() SiteFrameworkContainer.getAllDirectChildren
SiteFrameworkContainer.getAllChildren
Add Child Site Area SiteFrameworkContainer.addSiteArea() Same as V5 - Deprecated - use Workspace.createSiteArea
Has Child Site Area SiteFrameworkContainer.hasSiteArea() Same as V5
Insert Child Site Area SiteFrameworkContainer.insertSiteArea() Same as V5 - Deprecated - use Workspace.createSiteArea
Check Has Child Site Area SiteFrameworkContainer.hasSiteArea() Same as V5
Remove Child Site Area SiteFrameworkContainer.removeSiteArea() Same as V5 - Deprecated - use Workspace.delete
Get Default Content SiteFramworkContainer.getDefaultContent Same as V5
Set Default Content SiteFrameworkContainer.setDefaultContent Same as V5
Get Template Mapping SiteFrameworkContainer.getTemplateMapping Same as V5
Add Template Mapping SiteFrameworkContainer.addTemplateMapping Same as V5
Check Has Template Mapping SiteFrameworkContainer.hasTemplateMapping Same as V5
Remove Template Mapping SiteFrameworkContainer.removeTemplateMapping Same as V5
Get Associated Auth Tmplts N/A SiteFrameworkContainer.getAuthoringTemplateIds



SiteArea

The following table lists each major SiteArea function and what interface and method is required to carry out that functionality for both the V5 and V6 APIs.


SiteArea Functions V5 Public API V6 Public API

Methods from Workspace Interface
Create New SiteArea Workspace.createSiteArea() Same as V5
Update Existing SiteArea Workspace.save() Same as V5
Remove Existing SiteArea Workspace.delete() Same as V5
Copy SiteArea N/A Workspace.copySiteFrameworkDocument

Methods from Document Interface
Get ID Document.getId() Same as V5
Get Name Document.getName() Same as V5
Get Title N/A Document.getTitle()
Get Description Document.getDescription() Same as V5
Get Authors Document.getAuthors() Same as V5
Get Owners Document.getOwners() Same as V5
Get Modified Date N/A Document.getModifiedDate()
Get Owner Library N/A Document.getOwnerLibrary()
Get Live Accesss Members Document.getLiveAccessMembers() Same as V5 - Deprecated
Get Read Access Members Document.getReadAccessMembers() Same as V5
Get Edit Access Members Document.getEditAccessMembers() Same as V5
Get Delete Access Members Document.getDeleteAccessMembers() Same as V5

Methods from Editable Interface
Set Name Editable.setName() Same as V5
Set Title N/A Editable.setTitle()
Set Description Editable.setDescription() Same as V5
Add Authors Editable.addAuthors() Same as V5
Remove Authors Editable.removeAuthors() Same as V5
Add Owners Editable.addOwners() Same as V5
Remove Owners Editable.removeOwners() Same as V5
Add Live Access Members Editable.addLiveAccessMembers() Same as V5 - Deprecated
Add Read Access Members Editable.addReadAccessMembers() Same as V5
Add Edit Access Members Editable.addEditAccessMembers() Same as V5
Add Delete Access Members Editable.addDeleteAccessMembers() Same as V5
Remove Live Access Members Editable.removeLiveAccessMembers() Same as V5 - Deprecated
Remove Read Access Members Editable.removeReadAccessMembers() Same as V5
Remove Edit Access Members Editable.removeEditAccessMembers() Same as V5
Remove Delete Access Members Editable.removeDeleteAccessMembers() Same as V5
Is Changed? Editable.isChanged() Same as V5

Methods from ContentComponentContainer
Get Component ContentComponentContainer.getComponent()
ContentComponentContainer.getComponentByReference() Same as V5
Get All Components ContentComponentContainer.componentIterator() Same as V5
Get All Component Names N/A ContentComponentContainer.getComponentNames()
Check Has Component ContentComponentContainer.hasComponent() Same as V5
Set Component Value ContentComponentContainer.setComponent() Same as V5
Create New Component N/A ContentComponentContainer.createComponent()
Add New Component N/A ContentComponentContainer.addComponent()
Remove Component N/A ContentComponentContainer.removeComponent()

Methods from SiteFrameworkContainer
Get Immediate Children SiteFrameworkContainer.getChildren() SiteFrameworkContainer.getDirectChildren()
SiteFrameworkContainer.getChildren()
Get All Children SiteFrameworkContainer.getAllChildren() SiteFrameworkContainer.getAllChildren() SiteFrameworkContainer.getAllDirectChildren()
Add Child Site Area SiteFrameworkContainer.addSiteArea() Same as V5 - Deprecated - use Workspace.createSiteArea()
Insert Child Site Area SiteFrameworkContainer.insertSiteArea() Same as V5 - Deprecated - use Workspace.createSiteArea()
Check Has Child Site Area SiteFrameworkContainer.hasSiteArea() Same as V5
Remove Child Site Area SiteFrameworkContainer.removeSiteArea() Same as V5 - Deprecated - use Workspace.delete()
Get Default Content SiteFramworkContainer.getDefaultContent() Same as V5
Set Default Content SiteFrameworkContainer.setDefaultContent() Same as V5
Get Template Mapping SiteFrameworkContainer.getTemplateMapping() Same as V5
Add Template Mapping SiteFrameworkContainer.addTemplateMapping() Same as V5
Check Has Template Mapping SiteFrameworkContainer.hasTemplateMapping() Same as V5
Remove Template Mapping SiteFrameworkContainer.removeTemplateMapping Same as V5
Get Associated Auth Tmplts N/A SiteFrameworkContainer.getAuthoringTemplateIds()

Methods from SiteArea Interface
Get Parent SiteArea.getParent() Same as V5
Add Child Content SiteArea.addContent() Same as V5 - Deprecated - use Workspace.createContent()
Insert Child Content SiteArea.insertContent() Same as V5 - Deprecated - use Workspace.createContent()
Check Has Child Content SiteArea.hasContent() SiteArea.hasContent()
SiteArea.hasDirectContent()
SiteArea.hasLinkedContent()
Remove Child Content SiteArea.removeContent() Same as V5 - Deprecated - use Workspace.delete()
Has Direct Content N/A SiteArea.hasDirectConten()
Has Linked Content N/A SiteArea.hasLinkedContent()
Has Content SiteArea.hasContent() Same as V5
Get Linked Children N/A SiteArea.getLinkedChildren()

Content

The following table lists each major Content function and what interface and method is required to carry out that functionality for both the V5 and V6 APIs.


Content Functions V5 Public API V6 Public API

Methods from Workspace Interface
Create New Content Workspace.createContent() Same as V5
Update Existing Content Workspace.save() Same as V5
Remove Existing Content Workspace.delete() Same as V5
Copy Content N/A Workspace.copySiteFrameworkDocument()
Lock/Unlock/IsLocked N/A Workspace.lock() Workspace.unlock() Workspace.isLocked()
Move Content N/A Workspace.MoveSiteFrameworkDocument()

Methods from Document Interface
Get ID Document.getId() Same as V5
Get Name Document.getName() Same as V5
Get Title N/A Document.getTitle()
Get Description Document.getDescription() Same as V5
Get Authors Document.getAuthors() Same as V5
Get Owners Document.getOwners() Same as V5
Get Modified Date N/A Document.getModifiedDate()
Get Owner Library N/A Document.getOwnerLibrary()
Get Live Accesss Members Document.getLiveAccessMembers() Same as V5 - Deprecated
Get Read Access Members Document.getReadAccessMembers() Same as V5
Get Edit Access Members Document.getEditAccessMembers() Same as V5
Get Delete Access Members Document.getDeleteAccessMembers() Same as V5

Methods from Editable Interface
Set Name Editable.setName() Same as V5
Set Description Editable.setDescription() Same as V5
Set Title N/A Document.setTitle()
Add Authors Editable.addAuthors() Same as V5
Remove Authors Editable.removeAuthors() Same as V5
Add Owners Editable.addOwners() Same as V5
Remove Owners Editable.removeOwners() Same as V5
Add Live Access Members Editable.addLiveAccessMembers() Same as V5 - Deprecated
Add Read Access Members Editable.addReadAccessMembers() Same as V5
Add Edit Access Members Editable.addEditAccessMembers() Same as V5
Add Delete Access Members Editable.addDeleteAccessMembers() Same as V5
Remove Live Access Members Editable.removeLiveAccessMembers() Same as V5 - Deprecated
Remove Read Access Members Editable.removeReadAccessMembers() Same as V5
Remove Edit Access Members Editable.removeEditAccessMembers() Same as V5
Remove Delete Access Members Editable.removeDeleteAccessMembers() Same as V5
Is Changed? Editable.isChanged() Same as V5

Methods from ContentComponentContainer
Get Component ContentComponentContainer.getComponent()
ContentComponentContainer.getComponentByReference() Same as V5
Get All Components ContentComponentContainer.componentIterator() Same as V5
Get All Component Names N/A ContentComponentContainer.getComponentNames()
Check Has Component ContentComponentContainer.hasComponent() Same as V5
Set Component Value ContentComponentContainer.setComponent() Same as V5
Create New Component N/A ContentComponentContainer.createComponent()
Add New Component N/A ContentComponentContainer.addComponent()
Remove Component N/A ContentComponentContainer.removeComponent()

Methods from Content Interface
Get Authoring Template Content.getAuthoringTemplateID() Same as V5
Change Authoring Template N/A N/A
Get Parents Content.getParents() Content.getParents()
Content.getDirectParent()
Content.getLinkedParents()
Get Categories Content.getCategoryIds() Same as V5
Add Categories Content.addCategoryIds() Same as V5
Remove Categories Content.removeCategoryIds() Same as V5
Get Keywords Content.getKeywords() Same as V5
Add Keywords Content.setKeywords() Same as V5
Remove Keywords Content.setKeywords() Same as V5
Get Current Workflow Content.getWorkflowId() Same as V5
Set Workflow Content.setWorkflowId() Same as V5
Restart Workflow Content.restartWorkflow() Same as V5
Get Current Workflow Stage Content.getWorkflowStageId() Same as V5
Set Workflow Stage Content.nextWorkflowStage() Same as V5
Get Approvers Content.getCurrentApprovers() Same as V5
Approve Content Content.nextWorkflowStage() Same as V5
Reject Content Content.decline() Same as V5
Check Status is Draft Content.isDraft() Same as V5
Check Status is Published Content.isPublished() Same as V5
Check Status is Expired Content.isExpired() Same as V5
Create New Draft Content.createDraft() Same as V5
Check Has Draft Content.hasDraft() Same as V5
Get Publish Date Content.getEffectiveDate() Same as V5
Set Publish Date Content.setEffectiveDate() Same as V5
Get Expiration Date Content.getExpiryDate() Same as V5
Set Expiration Date Content.setExpiryDate() Same as V5
Get General Date One Content.getGeneralDateOne() Same as V5
Set General Date One Content.setGeneralDateOne() Same as V5
Get General Date Two Content.getGeneralDateTwo() Same as V5
Set General Date Two Content.setGeneralDateTwo() Same as V5
Get Additional Viewers Content.getAddlViewers() Same as V5
Add Additional Viewers Content.addAddlViewers() Same as V5
Remove Additional Viewers Content.removeAddlViewers() Same as V5

ContentComponents

The following table lists each major ContentComponent function and what interface and method is required to carry out that functionality for both the V5 and V6 APIs. It also shows the specialized ContentComponent objects and their methods.


Content Component Functions V5 Public API V6 Public API

Methods from ContentComponent
Get Container ContentComponent.getContainer() Same as V5
Get Name ContentComponent.getName() Same as V5

TextComponent Methods
Get Text TextComponent.getText() Same as V5
Set Text TextComponent.setText() Same as V5

HTMLComponent Methods
Get HTML HTMLComponent.getHTML() Same as V5
Set HTML HTMLComponent.setHTML() Same as V5

RichTextComponent
Get Rich Text RichTextComponent.getRichText() Same as V5
Set Rich Text RichTextComponent.setRichText() Same as V5

FileComponent Methods
Get File Name FileComponent.getFileName() Same as V5
Set File contained in component FileComponent.setFile() Same as V5
Get File Contents FileComponent.getFile() Same as V5

ImageComponent Methods
Get Image File Name ImageComponent.getImageFileName() Same as V5
Set Image File Name ImageComponent.setImage() Same as V5
Get Image File Contents ImageComponent.getImage() Same as V5
Set Image File Contents ImageComponent.setImage() Same as V5
Get Alt Text ImageComponent.getAltText() Same as V5
Set Alt Text ImageComponent.setAltText() Same as V5
Get Border ImageComponent.getBorder() Same as V5
Set Border ImageComponent.setBorder() Same as V5
Get Height ImageComponent.getHeight() Same as V5
Set Height ImageComponent.setHeight() Same as V5
Get Width ImageComponent.getWidth() Same as V5
Set Width ImageComponent.setWidth() Same as V5
Get HTML Name ImageComponent.getNameTag() Same as V5
Set HTML Name ImageComponent.setNameTag() Same as V5

ReferenceComponent Methods
Get Component Reference ReferenceComponent.getComponentRef() Same as V5
Set Component Reference ReferenceComponent.setComponentRef() Same as V5

DocumentManagerComponent Methods
Get PDM Document Library N/A DocumentManagerComponent.getDocumentLibrary()
Set PDM Document Library N/A DocumentManagerComponent.setDocumentInformation()
Get PDM Document Path N/A DocumentManagerComponent.getDocumentPath()
Set PDM Document Path N/A DocumentManagerComponent.setDocumentInformation()
Get PDM Document Version Name N/A DocumentManagerComponent.getVersionName()
Check If Locked To Version N/A DocumentManagerComponent.isLockedToVersion()
Lock To Version N/A DocumentManagerComponent.setLockToVersion()
Refresh PDM Document Info N/A DocumentManagerComponent.refreshDocument()

DateComponent Methods
Get Date N/A DateComponent.getDate()
Set Date N/A DateComponent.setDate()
Get Date Format N/A DateComponent.getDateType()
Set Date Format N/A DateComponent.setDateType()

NumericComponent Methods
Get Number N/A NumericComponent.getNumber()
Set Number N/A NumericComponent.setNumber()
Get Number Type N/A NumericComponent.getNumberType()
Set Number Type N/A NumericComponent.setNumberType()

OptionSelectionComponent Methods
Get Option Selections -array of strings N/A OptionSelectionComponent.getSelections()
Set Option Selections- array of strings N/A OptionSelectionComponent.setSelections()

UserSelectionComponent Methods
Get User Selections- principals N/A UserSelectionComponent.getSelections()
Set User Selections- principals N/A UserSelectionComponent.setSelections

LinkComponent Methods
Get/Set Additional Attribute N/A LinkComponent.get/setAdditionalAttribute()
Get/Set Document Reference N/A LinkComponent.get/setDocumentReference()
Get/Set Link Description N/A LinkComponent.get/setLinkDescription()
Get/Set Link Image N/A LinkComponent.get/setLinkImage()
Get/Set Link Target N/A LinkComponent.get/setLinkTarget()
Get/Set Link Text N/A LinkComponent.get/setLinkText()
Get Link Text Type N/A LinkComponent.getLinkTextType()
Get Link Type N/A LinkComponent.getLinkType()
Get/Set Query String N/A LinkComponent.get/setQueryString()
Get Reference Display Name N/A LinkComponent.getReferenceDisplayName()
Set/Get Is Clearable N/A LinkComponent.set/IsClearable()
Get/Set s Use Reference Description N/A LinkComponent.get/IsUseReferenceDescription()
Get/Set Is Use Reference Link Text Enabled N/A LinkComponent.get/IsUseReferenceLinkTextEnabled()
Set External Reference N/A LinkComponent.setExterntalReference()

LibraryFile, LibraryImage, LibraryHTML

The following table lists each major LibraryFile, LibraryImage and LibraryHTML function and what interface and method is required to carry out that functionality for both the V5 and V6 APIs.


LibraryFile LibraryImage LibraryHTML Functions V5 Public API V6 Public API

Methods from Workspace Interface
Create New Library File Cmpnt Workspace.createFileComponent() Same as V5
Update Existing Library File Cmpnt Workspace.save() Same as V5
Remove Existing Library File Cmpnt Workspace.delete() Same as V5

Methods from Document Interface
Get ID Document.getId() Same as V5
Get Name Document.getName() Same as V5
Get Description Document.getDescription() Same as V5
Get Title N/A Document.getTitle()
Get Authors Document.getAuthors() Same as V5
Get Owners Document.getOwners() Same as V5
Get Modified Date N/A Document.getModifiedDate()
Get Owner Library N/A Document.getOwnerLibrary()
Get Live Accesss Members Document.getLiveAccessMembers() Same as V5
Get Read Access Members Document.getReadAccessMembers() Same as V5
Get Edit Access Members Document.getEditAccessMembers() Same as V5
Get Delete Access Members Document.getDeleteAccessMembers() Same as V5

Methods from EditableLibraryComponent Interface
Set Name EditableLibraryComponent.setName() Same as V5
Set Description EditableLibraryComponent.setDescription() Same as V5
Set Title N/A Document.setTitle()
Add Authors EditableLibraryComponent.addAuthors() Same as V5
Remove Authors EditableLibraryComponent.removeAuthors() Same as V5
Add Owners EditableLibraryComponent.addOwners() Same as V5
Remove Owners EditableLibraryComponent.removeOwners() Same as V5
Add Live Access Members EditableLibraryComponent.addLiveAccessMembers() Same as V5
Add Read Access Members EditableLibraryComponent.addReadAccessMembers() Same as V5
Add Edit Access Members EditableLibraryComponent.addEditAccessMembers() Same as V5
Add Delete Access Members EditableLibraryComponent.addDeleteAccessMembers() Same as V5
Remove Live Access Members EditableLibraryComponent.removeLiveAccessMembers() Same as V5
Remove Read Access Members EditableLibraryComponent.removeReadAccessMembers() Same as V5
Remove Edit Access Members EditableLibraryComponent.removeEditAccessMembers() Same as V5
Remove Delete Access Members EditableLibraryComponent.removeDeleteAccessMembers() Same as V5
Is Changed EditableLibraryComponent.isChanged()

Methods from LibraryFileComponent Interface
Get File Name LibraryFileComponent.getFileName() Same as V5
Get File Contents LibraryFileComponent.getFile() Same as V5
Set File LibraryFileComponent.setFile() Same as V5

Methods from LibraryImageComponent Interface
Get Image File Name LibraryImageComponent.getImageFileName() Same as V5
Set Image File Name LibraryImageComponent.setImage() Same as V5
Get Image File Contents LibraryImageComponent.getImage() Same as V5
Set Image File Contents LibraryImageComponent.setImage() Same as V5
Get Alt Text LibraryImageComponent.getAltText() Same as V5
Set Alt Text LibraryImageComponent.setAltText() Same as V5
Get Border LibraryImageComponent.getBorder() Same as V5
Set Border LibraryImageComponent.setBorder() Same as V5
Get Height LibraryImageComponent.getHeight() Same as V5
Set Height LibraryImageComponent.setHeight() Same as V5
Get Width LibraryImageComponent.getWidth() Same as V5
Set Width LibraryImageComponent.setWidth() Same as V5
Get HTML Name LibraryImageComponent.getHTMLNameTag() Same as V5
Set HTML Name LibraryImageComponent.setHTMLNameTag() Same as V5

Methods from LibraryHTMLComponent Interface
Get HTML LibraryHTMLComponent.getHTML() Same as V5
Set HTML LibraryHTMLComponent.setHTML() Same as V5