|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TemplateCatalogService
The TemplateCatalogService provides methods for searching and managing application templates. Furthermore it provides methods for managing application folders and favorites.
Nested Class Summary | |
---|---|
static class |
TemplateCatalogService.SearchPattern
This enumeration defines the search pattern that will be used for title-based finder methods. COMPLETE_TITLE searches for all templates with the exactly the specified title string. TITLE_STARTSWITH searches for all templates that have a title that starts with the specified title prefix. TITLE_CONTAINS searches for all templates that have a title that contains the specified title substring at any location. |
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
Method Summary | |
---|---|
ObjectID |
addFolder(Folder folder,
ObjectID parentFolderID)
Create a subfolder in the given parent folder. |
ObjectID |
copyIntoNewTemplate(ObjectID templateOID,
Localized templateInfo,
ObjectID folderID)
Create a new template in the specified template folder with the specified localized information based on the specfied template. |
void |
deleteFolder(ObjectID folderID,
boolean deleteContent)
Delete the specified folder. |
void |
deleteTemplate(ObjectID templateID)
Delete the specified template. |
void |
deleteTemplates(java.util.List<ObjectID> templateIDs)
Delete a several template at once. |
boolean |
doesTemplateExist(ObjectID templateID)
Check wether a template with the specified ObjectID is existing. |
void |
exportTemplate(ObjectID templateOID,
java.io.OutputStream out)
/** Store the template in the given stream. |
java.util.List<ObjectID> |
findChildFolders(ObjectID parentID)
Returns the child folders for the given folderOID the user is allowed to see. |
java.util.List<ObjectID> |
findTemplates()
Find all templates in all folders the executing user is allowed to see. |
java.util.List<ObjectID> |
findTemplatesByOwnerID(ObjectID ownerID)
Find all templates in all folders that are owned by the specified user. |
java.util.List<ObjectID> |
findTemplatesByOwnerIDInFolder(ObjectID ownerID,
ObjectID folderID)
Find all templates in the specified folder that are owned by the executing user. |
java.util.List<ObjectID> |
findTemplatesByTitle(java.lang.String title,
java.util.Locale locale,
TemplateCatalogService.SearchPattern searchPattern)
Find all templates that have the specified title or title fragment in the specified locale regarding to the search pattern. |
java.util.List<ObjectID> |
findTemplatesByTitleInFolder(java.lang.String title,
java.util.Locale locale,
ObjectID folderID,
TemplateCatalogService.SearchPattern searchPattern)
Find all templates in the specified folder (subfolders not included) that have the specified title or title fragment in the specified locale regarding to the search pattern. |
java.util.List<ObjectID> |
findTemplatesInFolder(ObjectID folderID)
Find all templates in the specified folder the executing user is allowed to see. |
Folder |
getFolder(ObjectID folderID)
Returns the folder with the given ObjectID. |
java.util.List<Folder> |
getFolders(java.util.List<ObjectID> folderIDs)
Returns a list the folder objects with the given ObjectIDs. |
ObjectID |
getParentFolder(ObjectID folderID)
Get the parent folder of the given folder. |
Folder |
getRootFolder()
Get the root template folder. |
ObjectID |
getRootFolderID()
Get the ObjectID of the root template folder. |
ObjectID |
importTemplate(java.lang.String filename,
java.io.InputStream data,
ObjectID folderID)
Import a template into a given folder. |
ObjectID |
importTemplate(java.lang.String filename,
java.io.InputStream data,
ObjectID folderID,
Localized templateInfo)
Import a template into a given folder and assign it the given name and description. |
void |
modifyFolder(Folder folder)
Modifies the data of the folder. |
void |
updateTemplate(ObjectID templateID,
java.io.InputStream data)
Update an existing template. |
void |
validateTemplate(java.io.InputStream data,
ObjectID folderID)
Validate a given template. |
Methods inherited from interface com.ibm.portal.Disposable |
---|
dispose |
Field Detail |
---|
static final java.lang.String COPYRIGHT
Method Detail |
---|
ObjectID addFolder(Folder folder, ObjectID parentFolderID) throws TemplateCatalogServiceException, UnknownFolderException, AccessControlException
parent
is null
a top level folder is created.
parentFolderID
- the folder the new folder will be child of. Must NOT be null.folder
- the new folder (title, description, ..)
TemplateCatalogServiceException
- if a general exception occured in the template catalog service
UnknownFolderException
- if the given parent folder does not exist
AccessControlException
- if the user has not enough rights to execute the actionvoid modifyFolder(Folder folder) throws TemplateCatalogServiceException, UnknownFolderException, AccessControlException
folder
- the folder object with modified data.
TemplateCatalogServiceException
- if a general exception occured in the template catalog service
UnknownFolderException
- if the specified folder does not exist
AccessControlException
- if the user has not enough rights to execute the actionvoid deleteFolder(ObjectID folderID, boolean deleteContent) throws TemplateCatalogServiceException, UnknownFolderException, FolderNotEmptyException, AccessControlException
deleteContents
is set to false
and the folder is
not empty then a FolderNotEmptyException
is thrown.
folderID
- the ObjectID of the folder to deletedeleteContent
- specify wether the content of the deleted folder should be deleted as well.
TemplateCatalogServiceException
- if a general exception occured in the template catalog service
UnknownFolderException
- if the folder with the given ObjectId does not exist
AccessControlException
- if the user has not enough rights to execute the action
FolderNotEmptyException
- if deleteContent is false, but the folder is not emptyObjectID getParentFolder(ObjectID folderID) throws TemplateCatalogServiceException, UnknownFolderException, AccessControlException
folderID
- the ObjectID of the folder to find the parent folder for
TemplateCatalogServiceException
- if a general exception occured in the template catalog service
UnknownFolderException
- if the folder with the given ObjectID does not exist
AccessControlException
- if the user has not enough rights to execute the actionFolder getRootFolder() throws TemplateCatalogServiceException, AccessControlException
TemplateCatalogServiceException
- if a general exception occured in the template catalog service
AccessControlException
- if the user has not enough rights to execute the actionObjectID getRootFolderID() throws TemplateCatalogServiceException, AccessControlException
TemplateCatalogServiceException
- if a general exception occured in the template catalog service
AccessControlException
- if the user has not enough rights to execute the actionFolder getFolder(ObjectID folderID) throws TemplateCatalogServiceException, UnknownFolderException, AccessControlException
folderOID
- the ObjectID of the requested folder
TemplateCatalogServiceException
- if a general exception occured in the template catalog service
AccessControlException
- if the user has not enough rights to execute the action
UnknownFolderException
java.util.List<Folder> getFolders(java.util.List<ObjectID> folderIDs) throws TemplateCatalogServiceException, UnknownFolderException, AccessControlException
folderIDs
- list of folder ObjectIDs
TemplateCatalogServiceException
- if a general exception occured in the template catalog service
UnknownFolderException
- if one of the specified folders does not exist
AccessControlException
- if the user has not enough rights to view one of the specified foldersjava.util.List<ObjectID> findChildFolders(ObjectID parentID) throws TemplateCatalogServiceException, UnknownFolderException
folderOID
- - of parent folder ObjectID
UnknownFolderException
- if the folder with the given ObjectId does not exist
TemplateCatalogServiceException
- if a general exception occured in the template catalog serviceObjectID importTemplate(java.lang.String filename, java.io.InputStream data, ObjectID folderID) throws TemplateCatalogServiceException, UnknownFolderException, AccessControlException
filename
- the name of the template filedata
- a stream containing the template itselffolderID
- the folder to store the template into, must not be null
AccessControlException
- if the user has not enough rights to execute the action
UnknownFolderException
- if the folder with the given ObjectId does not exist
TemplateCatalogServiceException
- if a general exception occured in the template catalog serviceObjectID importTemplate(java.lang.String filename, java.io.InputStream data, ObjectID folderID, Localized templateInfo) throws TemplateCatalogServiceException, UnknownFolderException, AccessControlException
filename
- the name of the template filedata
- a stream containing the template itselffolderID
- the folder to store the template into, must not be null
templateInfo
- the name and description to be used for the imported template
AccessControlException
- if the user has not enough rights to execute the action
UnknownFolderException
- if the folder with the given ObjectId does not exist
TemplateCatalogServiceException
- if a general exception occured in the template catalog servicevoid validateTemplate(java.io.InputStream data, ObjectID folderID) throws TemplateCatalogServiceException, TemplateValidationException, DuplicateTemplateTitleValidationException
folderID
- the folder to use for template title checksdata
- the template data
TemplateCatalogServiceException
- if a general exception occured in the template catalog service
TemplateValidationException
- thrown if the template is not well-formed
DuplicateTemplateTitleValidationException
- thrown if there is already a template existing in the specified folder that has the same title as the validated templatejava.util.List<ObjectID> findTemplates() throws TemplateCatalogServiceException
TemplateCatalogServiceException
- if a general exception occured in the template catalog servicejava.util.List<ObjectID> findTemplatesInFolder(ObjectID folderID) throws TemplateCatalogServiceException
TemplateCatalogServiceException
- if a general exception occured in the template catalog servicejava.util.List<ObjectID> findTemplatesByOwnerID(ObjectID ownerID) throws TemplateCatalogServiceException
TemplateCatalogServiceException
- if a general exception occured in the template catalog servicejava.util.List<ObjectID> findTemplatesByOwnerIDInFolder(ObjectID ownerID, ObjectID folderID) throws TemplateCatalogServiceException
TemplateCatalogServiceException
- if a general exception occured in the template catalog servicejava.util.List<ObjectID> findTemplatesByTitle(java.lang.String title, java.util.Locale locale, TemplateCatalogService.SearchPattern searchPattern) throws TemplateCatalogServiceException
title
- either the complete title or a fragment of the template titlelocale
- the locale the title is searched forsearchPattern
- specifies what type of search is done (Please see TemplateCatalogService.SearchPattern
)
TemplateCatalogServiceException
- if a general exception occured in the template catalog servicejava.util.List<ObjectID> findTemplatesByTitleInFolder(java.lang.String title, java.util.Locale locale, ObjectID folderID, TemplateCatalogService.SearchPattern searchPattern) throws TemplateCatalogServiceException
title
- either the complete title or a fragment of the template titlelocale
- the locale the title is searched forsearchPattern
- specifies what type of search is done (Please see TemplateCatalogService.SearchPattern
)
TemplateCatalogServiceException
- if a general exception occured in the template catalog serviceboolean doesTemplateExist(ObjectID templateID) throws TemplateCatalogServiceException
templateID
- the template ID to check for
TemplateCatalogServiceException
- if a general exception occured in the template catalog serviceObjectID copyIntoNewTemplate(ObjectID templateOID, Localized templateInfo, ObjectID folderID) throws TemplateCatalogServiceException, UnknownFolderException, AccessControlException
templateOID
- the ObjectID of the template the new template should be based ontemplateInfo
- the localized information to use in the new templatefolderID
- the target template folder
AccessControlException
- if the user has not enough rights to execute the action
UnknownFolderException
- if the folder with the given ObjectID does not exist
TemplateCatalogServiceException
- if a general exception occured in the template catalog servicevoid exportTemplate(ObjectID templateOID, java.io.OutputStream out) throws TemplateCatalogServiceException, UnknownTemplateException, AccessControlException
tempalteOID
- the template that should be exportedout
- the stream to write to
AccessControlException
- if the user has not enough rights to execute the action
TemplateCatalogServiceException
- if a general exception occured in the template catalog service
UnknownTemplateException
- thrown if the specified template ID is unknown to the systemvoid deleteTemplate(ObjectID templateID) throws TemplateCatalogServiceException, AccessControlException
templateID
- the ObjectID of the template to delete
AccessControlException
- if the user has not enough rights to execute the action
TemplateCatalogServiceException
- if a general exception occured in the template catalog servicevoid deleteTemplates(java.util.List<ObjectID> templateIDs) throws TemplateCatalogServiceException, AccessControlException
templateIDs
- the list of ObjectIDs of the templates to delete
AccessControlException
- if the user has not enough rights to execute the action
TemplateCatalogServiceException
- if a general exception occured in the template catalog servicevoid updateTemplate(ObjectID templateID, java.io.InputStream data) throws TemplateCatalogServiceException, UnknownTemplateException, AccessControlException
templateID
- the ObjectID of the template to be updated, must not be null
data
- a stream containing the template itself, must not be null
AccessControlException
- if the user has not enough rights to execute the action
TemplateCatalogServiceException
- if a general exception occured in the template catalog service
UnknownTemplateException
- thrown if the specified template ID is unknown to the system
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |