|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.wps.services.Service
com.ibm.workplace.wcm.api.WebContentLibraryService
public abstract class WebContentLibraryService
WebContentLibraryService enables access to Web Content Library methods through Portal services. To ensure that the service is available at runtime, the following line must be added to the services.properties file (<WPS profile home>\PortalServer\config\config\services.properties):
com.ibm.workplace.wcm.api.WebContentLibraryService = com.ibm.workplace.wcm.api.WebContentLibraryServiceImpl
Here is an example of how to retrieve the WebContentLibraryService:
try
{
// Construct and inital Context
InitialContext ctx = new InitialContext();
// Retrieve WebContentLibraryService using JNDI name
WebContentLibraryService webContentLibraryService = (WebContentLibraryService) ctx.lookup("portal:service/wcm/WebContentLibraryService");
}
catch (NamingException ne)
{
System.out.print("Naming Exception: " + ne);
}
| Constructor Summary | |
|---|---|
WebContentLibraryService()
Constructor |
|
| Method Summary | |
|---|---|
abstract LibraryTaskResult |
copyLibraries(Workspace workspace,
DocumentLibrary[] documentLibraries)
Copies the supplied document libraries as new libraries. |
abstract LibraryTaskResult |
copyLibraries(Workspace workspace,
DocumentLibrary[] documentLibraries,
java.util.Locale locale)
Copies the supplied document libraries as new libraries with the specified Locale. |
abstract LibraryTaskResult |
copyLibrary(Workspace workspace,
DocumentLibrary documentLibrary,
java.util.Locale locale)
Copies the supplied document library as a new library. |
abstract DocumentLibrary |
createLibrary(Workspace workspace,
java.util.Locale locale)
Creates a new Library. |
abstract LibraryTaskResult |
deleteLibrary(Workspace workspace,
DocumentLibrary documentLibrary)
Deletes the DocumentLibrary. |
abstract LibraryTaskResult |
exportLibraryToStream(Workspace workspace,
DocumentLibrary documentLibrary,
java.io.OutputStream outputStream)
Export a document library to the supplied output stream. |
abstract LibraryTaskResult |
importLibraryFromStream(Workspace workspace,
java.io.InputStream inputStream,
java.util.Locale locale)
Import document library from the supplied input stream as a new library. |
abstract LibraryTaskResult |
outputDocumentListToStream(Workspace workspace,
java.lang.String libraryName,
DocumentListWriter out,
java.util.Locale locale)
Export a list of all items in a document library to the passed character stream. |
abstract void |
saveLibrary(Workspace workspace,
DocumentLibrary documentLibrary)
Save the DocumentLibrary. |
| Methods inherited from class com.ibm.wps.services.Service |
|---|
inspect |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WebContentLibraryService()
| Method Detail |
|---|
public abstract DocumentLibrary createLibrary(Workspace workspace,
java.util.Locale locale)
throws java.lang.UnsupportedOperationException
Library.
DocumentLibrary object returned by this method will have
a system defined title. This title can then be changed by calling DocumentLibrary.setTitle().
workspace - The workspacelocale - locale of the library to be created
DocumentLibrary object
java.lang.UnsupportedOperationException - If the operation is not supported
public abstract void saveLibrary(Workspace workspace,
DocumentLibrary documentLibrary)
throws LibraryCreationException,
java.lang.UnsupportedOperationException
DocumentLibrary. If the document library is new, a library will be created.
workspace - The workspacedocumentLibrary - document library object to be saved
LibraryCreationException - If an error occurred creating the library
java.lang.UnsupportedOperationException - If the operation is not supported
public abstract LibraryTaskResult deleteLibrary(Workspace workspace,
DocumentLibrary documentLibrary)
throws OperationFailedException,
AuthorizationException,
java.lang.UnsupportedOperationException
DocumentLibrary.
This task will be executed synchronously.
LibraryTaskResult.getDocumentLibraries() will always return an empty array.
workspace - The workspacedocumentLibrary - the DocumentLibrary to delete
LibraryTaskResult object representing the result of this delete operation.
OperationFailedException - If the library could not be found
AuthorizationException - If sufficient authority to delete the library is not present
java.lang.UnsupportedOperationException - If the operation is not supported
public abstract LibraryTaskResult copyLibrary(Workspace workspace,
DocumentLibrary documentLibrary,
java.util.Locale locale)
throws OperationFailedException,
LibraryCreationException,
java.lang.UnsupportedOperationException
LibraryTaskResult object returned by this method contains the newly created library. To retrieve
the DocumentLibrary use the following code:
DocumentLibrary[] copiedDocumentLibraries = (DocumentLibrary[]) LibraryTaskResult.getDocumentLibraries();
LibraryTaskResult does not indicate a successful copy, the unsuccessfully copied library
can be retrieved by calling (DocumentLibrary[]) LibraryTaskResult.getDocumentLibraries(). The library can
then be deleted.
DocumentLibrary is created with a system defined title. The title can then be changed by calling
DocumentLibrary.setTitle()
workspace - The workspacedocumentLibrary - Source document librarylocale - Locale of the new library
LibraryTaskResult object that representing the result of this copy operation.
OperationFailedException - If a repository related exception occurred
LibraryCreationException - If an error occurred creating the library
java.lang.UnsupportedOperationException - If the operation is not supported
public abstract LibraryTaskResult copyLibraries(Workspace workspace,
DocumentLibrary[] documentLibraries)
throws OperationFailedException,
java.lang.UnsupportedOperationException
LibraryTaskResult object returned by this method contains the libraries that were created during
this operation.
LibraryTaskResult indicates a successful copy, the successfully copied libraries can be retrieved
by calling (DocumentLibrary[]) LibraryTaskResult.getDocumentLibraries().
LibraryTaskResult does not indicate a successful copy, the libraries that were created during the
operation can be retrieved by calling (DocumentLibraries[]) LibraryTaskResult.getResult(). All libraries
returned on an unsuccessful copy can then be deleted.
DocumentLibrary.setTitle()
for each DocumentLibrary.
workspace - The workspacedocumentLibraries - Source document libraries.
LibraryTaskResult object representing the result of this copy operation.
OperationFailedException - If a repository related exception occurred
java.lang.UnsupportedOperationException - If the operation is not supported
public abstract LibraryTaskResult copyLibraries(Workspace workspace,
DocumentLibrary[] documentLibraries,
java.util.Locale locale)
throws OperationFailedException,
java.lang.UnsupportedOperationException
Locale. Assigns unique
names to the new libraries.
LibraryTaskResult object returned by this method contains the libraries that were created during
this operation.
LibraryTaskResult indicates a successful copy, the successfully copied libraries can be retrieved
by calling (DocumentLibrary[]) LibraryTaskResult.getDocumentLibraries().
LibraryTaskResult does not indicate a successful copy, the libraries that were created during the
operation can be retrieved by calling (DocumentLibrary[]) LibraryTaskResult.getDocumentLibraries(). All libraries
returned on an unsuccessful copy can then be deleted.
DocumentLibrary.setTitle()
for each DocumentLibrary.
workspace - The workspacedocumentLibraries - Source document libraries.locale - Locale to use for all new libraries.
LibraryTaskResult object representing the result of this copy operation.
OperationFailedException - If a repository related exception occurred
java.lang.UnsupportedOperationException - If the operation is not supported
public abstract LibraryTaskResult exportLibraryToStream(Workspace workspace,
DocumentLibrary documentLibrary,
java.io.OutputStream outputStream)
throws OperationFailedException,
java.lang.UnsupportedOperationException
LibraryTaskResult.getDocumentLibraries() will always return an empty array.
workspace - The workspacedocumentLibrary - Source document libraryoutputStream - Output stream to export to
LibraryTaskResult object representing the result of this export operation.
OperationFailedException - if a repository related exception occurred
java.lang.UnsupportedOperationException - if the operation is not supported
public abstract LibraryTaskResult importLibraryFromStream(Workspace workspace,
java.io.InputStream inputStream,
java.util.Locale locale)
throws OperationFailedException,
LibraryCreationException,
java.lang.UnsupportedOperationException
LibraryTaskResult indicates a successful import, calling (DocumentLibrary[]) LibraryTaskResult.getDocumentLibraries()
returns the successfully imported library.
LibraryTaskResult does not indicate a successful import, calling (DocumentLibrary[]) LibraryTaskResult.getDocumentLibraries();
will return the the newly created library. The library can then be deleted.
workspace - The workspaceinputStream - Input stream to read data fromlocale - Locale of the new library
LibraryTaskResult object representing the result of this import operation.
OperationFailedException - If a repository related exception occurred
LibraryCreationException - If an error occurred creating the library
java.lang.UnsupportedOperationException - If the operation is not supported
public abstract LibraryTaskResult outputDocumentListToStream(Workspace workspace,
java.lang.String libraryName,
DocumentListWriter out,
java.util.Locale locale)
throws OperationFailedException,
java.lang.UnsupportedOperationException
DocumentListWriter for
each document item in this order:
workspace - The workspacelibraryName - The title of the document library to export the list forout - DocumentListWriter object the list is written to and that handles the format of the written list.locale - The locale used to localize
LibraryTaskResult object representing the result of this operation.
OperationFailedException - If a repository related exception occurred
java.lang.UnsupportedOperationException - If the operation is not supported
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||