Package org.wso2.carbon.registry.admin.api.info

# Interface IInfoService<CommentBean,TagBean,RatingBean,EventTypeBean,SubscriptionBean>

Type Parameters:
  `CommentBean` - contains a list of comments that were made against this resource. This bean also contains whether the current view is the standard view or whether it is the version view of a resource. Also, if there were any exceptions during the process of retrieving the comments, they too will be available on this bean.
  `TagBean` - contains a list of tags that were added against this resource. This bean also contains whether the current view is the standard view or whether it is the version view of a resource. Also, if there were any exceptions during the process of retrieving the tags, they too will be available on this bean.
  `RatingBean` - contains a list of ratings that were given to this resource. This bean also contains whether the current view is the standard view or whether it is the version view of a resource. Also, if there were any exceptions during the process of retrieving the ratings, they too will be available on this bean. The ratings bean displays the ratings for the resource (or collection) that was given by the current user, and also the average rating given by all the users.
  `EventTypeBean` - contains a list of events that is available for this resource. This bean also contains details of any exceptions during the process of retrieving the event types.
  `SubscriptionBean` - contains a list of subscriptions that were added against this resource. This bean also contains whether the current view is the standard view or whether it is the version view of a resource. Also, if there were any exceptions during the process of retrieving the tags, they too will be available on this bean. In addition to that, this bean contains the user name of the currently logged-in user, and also the level of access the user has. Users who can read resources will have an access level of '1'. Users who can delete resources will have an access level of '2'. Users who can grant privileges to other users will have an access level of '3'.

public interface IInfoService<CommentBean,TagBean,RatingBean,EventTypeBean,SubscriptionBean>
Provides functionality to access the community features available around each registry resource and collection.
Statistics:

- subscribe
- subscribeREST
- unsubscribe

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addComment(String comment, String path, String sessionId)`
  Method to add a new comment to this a resource/collection.
  `void`
  `addTag(String tag, String path, String sessionId)`
  Method to add a new tag to a resource/collection.
  `CommentBean`
  `getComments(String path, String sessionId)`
  Method to obtain a list of comments that were made against a resource/collection.
  `EventTypeBean`
  `getEventTypes(String path, String sessionId)`
  Method to obtain a list of event types that are available for a resource/collection.
  `RatingBean`
  `getRatings(String path, String sessionId)`
  Method to obtain a list of ratings that were made against a resource/collection.
  `String`
  `getRemoteURL(String path, String sessionId)`
  Method to obtain the remote url of the given resource or collection.
  `SubscriptionBean`
  `getSubscriptions(String path, String sessionId)`
  Method to obtain a list of subscriptions that were made against a resource/collection.
  `TagBean`
  `getTags(String path, String sessionId)`
  Method to obtain a list of tags that were made against a resource/collection.
  `boolean`
  `isProfileExisting(String username, String sessionId)`
  Method to determine whether the given user has a valid user profile on the system.
  `boolean`
  `isResource(String path, String sessionId)`
  Method to determine whether the given path is a resource or collection.
  `boolean`
  `isRoleProfileExisting(String role, String sessionId)`
  Method to determine whether the given role has a valid profile on the system.
  `boolean`
  `isRoleValid(String role, String sessionId)`
  Method to determine whether the given role identifies a valid role on the system.
  `boolean`
  `isUserValid(String username, String sessionId)`
  Method to determine whether the given username identifies a valid user on the system.
  `void`
  `rateResource(String rating, String path, String sessionId)`
  Method to add a rating to a resource/collection.
  `void`
  `removeComment(String commentPath, String sessionId)`
  Method to remove a comment that has been added to a resource/collection.
  `void`
  `removeTag(String tag, String path, String sessionId)`
  Method to remove a tag that has been added to a resource/collection.
  `SubscriptionBean`
  `subscribe(String path, String endpoint, String eventName, String sessionId)`
  Method to add a subscription to a resource/collection.
  `SubscriptionBean`
  `subscribeREST(String path, String endpoint, String eventName, String sessionId)`
  Method to add a REST subscription to a resource/collection.
  `boolean`
  `unsubscribe(String path, String id, String sessionId)`
  Method to remove a subscription to a resource/collection.
  `String`
  `verifyEmail(String data, String sessionId)`
  Method to verify an e-mail address.

- ## Method Details

  - ### getComments

    CommentBean getComments(String path, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to obtain a list of comments that were made against a resource/collection.
    Parameters:
      `path` - the resource path of this resource/collection.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Returns:
      a bean containing the list of comments.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### addComment

    void addComment(String comment, String path, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to add a new comment to this a resource/collection.
    Parameters:
      `comment` - the new comment.
      `path` - the resource path of this resource/collection.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### removeComment

    void removeComment(String commentPath, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to remove a comment that has been added to a resource/collection.
    Parameters:
      `commentPath` - the path of the comment to be removed.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### getTags

    TagBean getTags(String path, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to obtain a list of tags that were made against a resource/collection.
    Parameters:
      `path` - the resource path of this resource/collection.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Returns:
      a bean containing the list of tags.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### addTag

    void addTag(String tag, String path, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to add a new tag to a resource/collection.
    Parameters:
      `tag` - the new tag.
      `path` - the resource path of this resource/collection.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### removeTag

    void removeTag(String tag, String path, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to remove a tag that has been added to a resource/collection.
    Parameters:
      `tag` - the tag to be removed.
      `path` - the resource path of this resource/collection.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### getRatings

    RatingBean getRatings(String path, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to obtain a list of ratings that were made against a resource/collection.
    Parameters:
      `path` - the resource path of this resource/collection.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Returns:
      a bean containing the list of ratings.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### rateResource

    void rateResource(String rating, String path, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to add a rating to a resource/collection.
    Parameters:
      `rating` - the rating.
      `path` - the resource path of this resource/collection.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### getEventTypes

    EventTypeBean getEventTypes(String path, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to obtain a list of event types that are available for a resource/collection.
    Parameters:
      `path` - the resource path of this resource/collection.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Returns:
      a bean containing the list of event types.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### getSubscriptions

    SubscriptionBean getSubscriptions(String path, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to obtain a list of subscriptions that were made against a resource/collection.
    Parameters:
      `path` - the resource path of this resource/collection.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Returns:
      a bean containing the list of subscriptions.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### subscribe

    SubscriptionBean subscribe(String path, String endpoint, String eventName, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to add a subscription to a resource/collection.
    Parameters:
      `path` - the resource path of this resource/collection.
      `endpoint` - the endpoint to which the notification should be delivered.
      `eventName` - the name of the event that you need to subscribe to.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Returns:
      the subscription that was added.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### subscribeREST

    SubscriptionBean subscribeREST(String path, String endpoint, String eventName, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to add a REST subscription to a resource/collection.
    Parameters:
      `path` - the resource path of this resource/collection.
      `endpoint` - the endpoint to which the notification should be delivered.
      `eventName` - the name of the event that you need to subscribe to.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Returns:
      the subscription that was added.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### isResource

    boolean isResource(String path, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to determine whether the given path is a resource or collection.
    Parameters:
      `path` - the resource path of this resource/collection.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Returns:
      true if the given path contains a resource.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### getRemoteURL

    String getRemoteURL(String path, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to obtain the remote url of the given resource or collection. This method should only be used for resources that are made available through a remote mount.
    Parameters:
      `path` - the resource path of this resource/collection.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Returns:
      the remote url of the given resource or collection.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### verifyEmail

    String verifyEmail(String data, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to verify an e-mail address.
    Parameters:
      `data` - data used for the purpose of e-mail address verificiation.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Returns:
      the e-mail address verified.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### unsubscribe

    boolean unsubscribe(String path, String id, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to remove a subscription to a resource/collection.
    Parameters:
      `path` - the resource path of this resource/collection.
      `id` - the subscription identifier
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Returns:
      true if the subscription was successfully removed, or false if not.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### isUserValid

    boolean isUserValid(String username, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to determine whether the given username identifies a valid user on the system.
    Parameters:
      `username` - the username for which the validity should be determined.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Returns:
      true if the user is valid, or false if not.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### isProfileExisting

    boolean isProfileExisting(String username, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to determine whether the given user has a valid user profile on the system.
    Parameters:
      `username` - the username for which the validity should be determined.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Returns:
      true if the user has a valid user profile, or false if not.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### isRoleValid

    boolean isRoleValid(String role, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to determine whether the given role identifies a valid role on the system.
    Parameters:
      `role` - the role for which the validity should be determined.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Returns:
      true if the role is valid, or false if not.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.

  - ### isRoleProfileExisting

    boolean isRoleProfileExisting(String role, String sessionId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to determine whether the given role has a valid profile on the system.
    Parameters:
      `role` - the role for which the validity should be determined.
      `sessionId` - a session identifier. This parameter is not used in the current API.
    Returns:
      true if the role has a valid profile, or false if not.
    Throws:
      `org.wso2.carbon.registry.core.exceptions.RegistryException` - if the operation failed.