|
Oracle Collaboration Suite Discussions Web Services Java API Reference 10g (10.1.2.2) Part No. B28210-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Webservice interface providing Oracle Discussions Category related operations.
A Category is an abstraction of a container where in it holds other categories and forums. A category cannot container messages directly under it.
The webservice interface provides operations for
Apart from these, it also provides bulk operations to create and delete multiple categories, in a single invocation.Axis specific Sample code illustrating the invocation/usage of CategoryService.Relevant changes are to be done, if a non-axis web services client is used.
//Initialize the webservice locator.The locator contains information about webservices endpoint. CategoryServiceServiceLocator mdssl = new CategoryServiceServiceLocator(); //Retrieve a reference to the remote webservices interface. CategoryService mdsl = mdssl.getCategoryService(); //Notify the axis server that client is interested in maintaining session. ((CategoryServiceSoapBindingStub)mdsl).setMaintainSession(true); //Set the cookie, retrieved during login service invocation. ((javax.xml.rpc.Stub)mdsl)._setProperty(HTTPConstants.HEADER_COOKIE,cookie); //Prepare the input parameters CategoryDefinition cDefn = new CategoryDefinition(); cDefn.setName("First category"); cDefn.setDisplayName("First Category"); //Invoke the webservices method. Category category = mdsl.create(-1,cDefn); if(category != null) { //Process the retrieved container listing. ........ }
ContainerService
Method Summary | |
Category |
create(long lParentId, CategoryDefinition cDef) Creates a new category in the repository. |
CreateCategoryBulkResponse[] |
createCategories(long lParentId, CategoryDefinition[] cDefn) Creates categories specified by array of cDefn beans, under the container specified by lParentId. |
void |
delete(long lCategoryId) Deletes the category specified by lCategoryId. |
DeleteElementBulkResponse[] |
deleteCategories(long[] lCategoryIds) Deletes the categories specified by an array of category ids. |
Category |
getCategoryById(long lCategoryId) Retrieves the category specified by lCategoryId. |
CategorySettings |
getCategorySettings(long lCategoryId) Retrieves category settings specified by lCategoryId. |
AbstractContainer[] |
list(long lContainerId, java.lang.String pattern, boolean bRefresh) Lists all the containers, that the user has access to, under the container represented by lContainerId. |
Category[] |
listCategories(long lContainerId, java.lang.String pattern, boolean bRefresh) Lists all the categories,that the user has access to, under the container represented by lContainerId. |
Forum[] |
listForums(long lContainerId, java.lang.String pattern, boolean bRefresh) Lists all the forums,that the user has access to, under the container represented by lContainerId. |
CategorySettings |
updateCategorySettings(long lCategoryId, CategorySettings cSettings) Updates the settings of the category specified by lCategoryId. |
Method Detail |
public AbstractContainer[] list(long lContainerId, java.lang.String pattern, boolean bRefresh) throws TdWSException
The container listing can be controlled by specifying pattern. It takes regular expression symbols to show the listing. For example, a * can be provided to retrieve all the containers under the current container. A % can be given to retrievel only first level containers, and so on.
The boolean value specifies if the container listing in the cache is to be refreshed from database, before fetching.
lContainerId
- - Id representing the container under which, containers are to be listed.pattern
- - Regular expression string to control the listing.bRefresh
- - Boolean value specifying if the container cache is to be refreshed from database.TdWSException
- - Thrown on
public Category[] listCategories(long lContainerId, java.lang.String pattern, boolean bRefresh) throws TdWSException
The category listing can be controlled by specifying pattern. It takes regular expression symbols to show the listing. For example, a * can be provided to retrieve all the categories under the current container. A % can be given to retrievel only first level categories, and so on.
The boolean value specifies if the category listing is to be refreshed from database. from database, before fetching.
lContainerId
- - Id representing the container under which, categories are to be listed.pattern
- - Regular expression string to control the listing.bRefresh
- - Boolean value specifying if the container cache is to be refreshed before listing.TdWSException
- - Thrown on
public Forum[] listForums(long lContainerId, java.lang.String pattern, boolean bRefresh) throws TdWSException
The forum listing can be controlled by specifying pattern. It takes regular expression symbols to show the listing. For example, a * can be provided to retrieve all the forums under the current container. A % can be given to retrievel only first level forums, and so on.
The boolean value specifies if the forum listing is to be refreshed from database, before fetching.
lContainerId
- - Id representing the container under which, forums are to be listed.pattern
- - Regular expression symbol (string) to control the listing.bRefresh
- - Boolean value specifying if the container cache is to be refreshed from database.TdWSException
- - Thrown on
public void delete(long lCategoryId) throws TdWSException
Once deleted, the category cannot be recovered.
All the elements under that category are recursively deleted. Any favorites/subscriptions that users hold on the category elements are cleaned up as well.
Root category, with category id -1 cannot be deleted.
lCategoryId
- - Id representing the category to be deleted.TdWSException
- - Thrown on
public Category create(long lParentId, CategoryDefinition cDef) throws TdWSException
If lParentId is -1, then a root level category is created.
Otherwise, a category is created under the container represented by lParentId. An exception is raised if lParentId does not materialize to a valid category.
The properties of the category to be created are specified in the category definition bean cDef.
Category Name and Category Displayname are mandatory arguments in category definition bean and hence they cannot be null.
Category name and display name should be carefully choosen so that they do not clash with those of any other category or forum at the same level. Otherwise, an exception is raised.
lParentId
- - Id representing parent category under which a new category is to be created.cDef
- - Category definition bean, representing category properties.TdWSException
- - Thrown on
public Category getCategoryById(long lCategoryId) throws TdWSException
lCategoryId
- - Id representing the category to be retrieved.TdWSException
- - Thrown on
public CategorySettings getCategorySettings(long lCategoryId) throws TdWSException
Settings specify category's
lCategoryId
- - Id representing the category for which, settings are to be retrieved.TdWSException
- - Thrown on
public CategorySettings updateCategorySettings(long lCategoryId, CategorySettings cSettings) throws TdWSException
Only the category displayname and description can be edited.
Category name, cannot be edited once the category is created.
Category display name should be edited so that it doesnot clash with the display name of any other category or forum at the same level.
Category display name is mandatory, and hence it cannot be specified as null.
lCategoryId
- - Id representing a category whose settings are to be updated.cSettings
- - Category settings bean representing the new settings to be applied.TdWSException
- - Thrown on
public CreateCategoryBulkResponse[] createCategories(long lParentId, CategoryDefinition[] cDefn) throws TdWSException
Category name and display name are mandatory in each of the category definition beans. An exception is raised if any of name and display name of categories at the same level clash.
An array of beans representing the result of the bulk operation is returned to the user.
Each of the beans in the array wraps around
lParentId
- - Id specifying the parent container under which the categories are created.cDefn
- - An array of category definition beans.TdWSException
- - Thrown on
public DeleteElementBulkResponse[] deleteCategories(long[] lCategoryIds) throws TdWSException
Root category (specified by id -1) cannot be deleted.
Once deleted, a category cannot be recovered again. All the contents of the categories deleted, are deleted as well.
Returns an array of bulk response beans if there is any error in deleting any of the categories. Each of the beans will have information about the element failed, the error message and the error stacktrace. Nothing is returned if the deletion of all the categories is successful.
lCategoryIds
- - Array of category ids specifying the categories to be deleted.TdWSException
- - Thrown on
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |