Use the API
Based on a Workspace Object:
- Interface to Web CM
- Associated with a Web CM User (and only a WCM User)
- Operations done for a particular User
Available Operations
- Use findBy methods to search for items
- Create new Objects for available types
- Save and delete editable objects
The WCM Workspace Object is the mechanism that is used with the WCM API to actually interface with the WCM core functions and objects.
In order to access the WCM core functions and objects a valid WCM User (ID and Password) must be provided in the API. Once the user is validated as a valid WCM user a new workspace object is created for the WCM instance.
Once the Workspace object is available you can then search for WCM objects using the findBy method, you can create new objects for those types that are editable and you can also save and delete those same objects.
The Workspace is the heart of the API. Items are created, saved, deleted and searched for in the Workspace item. A Workspace is basically an interface to Web Content Management that is associated with a user. Using a Workspace item, the user can perform operations as that user.
To get a Workspace item, the user must request one from the Repository singleton with the following call:
WCM_API.getRepository().getWorkspace("my username", "my password");If the user is not recognized as a Web Content Management user, or for some other reason could not be authenticated , an "OperationFailedException" will be thrown.
Only Web Content Management Users (including external LDAP users if enabled) are recognized. E.g. - A Workspace cannot be retrieved using an LTPA token.
Operations available on the Workspace include:
call endWorkspace() when finished with the Workspace item.
- searching for items with the provided "findBy" methods,
- creating new items of available editable types,
- saving and deleting editable items.
WCM_API.getRepository().endWorkspace();refer to the JavaDoc for more information. The JavaDoc are located under the "api-javadoc" folder of the WebApp folder on your Web Content Management server.
Parent topic: The Web Content Management API.
IBM Workplace Web Content Management - V5.1.0.1 -
Workplace Web Content Management is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.