*** This class provides Binary Compatibility only, not Source Compatibility ***

Class Remarks

java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
com.sas.services.information.metadata.Metadata
com.sas.services.information.metadata.Remarks
All Implemented Interfaces:
MetadataInterface, RemarksInterface, PublicObjectInterface, Serializable, Remote

@SASScope("ALL") @BinaryCompatibilityOnly public class Remarks extends Metadata implements RemarksInterface
Represents a set of comments or discussion thread on a particular topic.

A discussion thread or remarks occurs around a sequence of comments. Each individual comment has a text portion and one or more attachments (usually binary). Each comment maintains the time it was created, the author of the comment and it's contents. A discussion thread maintains the time it was created, the owner/creator and the current list of comments in the thread. The discussion thread is attached to the smart object for which the comments are meant.

Since:
1.1
See Also:
  • Constructor Details

    • Remarks

      public Remarks() throws RemoteException
      Constructs a default instance.
      Throws:
      RemoteException - if unable to export the remote object.
    • Remarks

      public Remarks(DAVRemarks remarks) throws RemoteException
      Constructs a default instance.
      Parameters:
      remarks - Remarks.
      Throws:
      RemoteException - if unable to export the remote object.
    • Remarks

      protected Remarks(Class theClass) throws RemoteException
      Constructs a default instance.
      Parameters:
      theClass - The subclass's class which will be used to determine appropriate RMI socket factories.
      Throws:
      RemoteException - if unable to export the remote object.
    • Remarks

      protected Remarks(DAVRemarks remarks, Class theClass) throws RemoteException
      Constructs a default instance.
      Parameters:
      remarks - Remarks.
      theClass - The subclass's class which will be used to determine appropriate RMI socket factories.
      Throws:
      RemoteException - if unable to export the remote object.
    • Remarks

      public Remarks(UserContextInterface user, String topic) throws RemoteException
      Throws:
      RemoteException
  • Method Details

    • getType

      public String getType() throws RemoteException
      Description copied from class: Metadata
      Get the object type. Subclasses of Metadata will return a repository-neutral type string. If no subclass exists, Metadata returns the repository-specific type.
      Specified by:
      getType in interface MetadataInterface
      Overrides:
      getType in class Metadata
      Returns:
      A type string for the object.
      Throws:
      RemoteException - in the event of remote object failure
    • addComment

      public void addComment(CommentInterface comment) throws RemoteException
      Description copied from interface: RemarksInterface
      Add a comment - as long as user is an allowed participant
      Specified by:
      addComment in interface RemarksInterface
      Parameters:
      comment - A comment to add to the discussion thread. The comment may contain attachments
      Throws:
      RemoteException - In the event of remote object failure.
    • getComment

      public CommentInterface getComment(CommentFilterInterface filter) throws RemoteException
      Description copied from interface: RemarksInterface
      Get a comment that satisfies the filter. No filter is attained by passing a null filter or setting NOMODIFIER in the CommentFilter.
      Specified by:
      getComment in interface RemarksInterface
      Parameters:
      filter - A filter to determine which comment in the discussion thread should be returned.
      Returns:
      CommentInterface A comment in the discussion thread
      Throws:
      RemoteException - In the event of remote object failure.
    • setThreadId

      public void setThreadId(String threadId) throws RemoteException
      Description copied from interface: RemarksInterface
      Sets the thread identifier for this remark.
      Specified by:
      setThreadId in interface RemarksInterface
      Parameters:
      threadId - Thread identifier for this remark.
      Throws:
      RemoteException - In the event of remote object failure.
    • getThreadId

      public String getThreadId()
      Description copied from interface: RemarksInterface
      Get the thread identifier for this remark
      Specified by:
      getThreadId in interface RemarksInterface
      Returns:
      String The thread identifier for this remark
    • getComments

      public List getComments(CommentFilterInterface filter) throws RemoteException
      Description copied from interface: RemarksInterface
      Get a list of all comments that satisfy the filter. No filter is attained by passing a null filter or setting NOMODIFIER in the CommentFilter.
      Specified by:
      getComments in interface RemarksInterface
      Parameters:
      filter - A filter to determine which comments in the discussion thread should be returned.
      Returns:
      List(of CommentInterface) A list of comments in the discussion thread
      Throws:
      RemoteException - In the event of remote object failure.
    • clear

      public void clear() throws RemoteException
      Description copied from interface: RemarksInterface
      Clear the list of comments - only owner is allowed to do this
      Specified by:
      clear in interface RemarksInterface
      Throws:
      RemoteException - In the event of remote object failure.
    • delete

      public void delete() throws ServiceException, RemoteException
      Override delete to make sure that only the owner can delete the remark. If there is no owner then allow deletion too.
      Specified by:
      delete in interface MetadataInterface
      Overrides:
      delete in class Metadata
      Throws:
      ServiceException - in the event of a repository failure.
      RemoteException - in the event of a network failure.
    • getOwner

      public String getOwner() throws RemoteException
      Description copied from interface: RemarksInterface
      Gets the owner of the discussion thread
      Specified by:
      getOwner in interface RemarksInterface
      Returns:
      String The owner/creator of the discussion thread
      Throws:
      RemoteException - In the event of remote object failure.
    • getTopic

      public String getTopic() throws RemoteException
      Description copied from interface: RemarksInterface
      Gets the topic of discussion
      Specified by:
      getTopic in interface RemarksInterface
      Returns:
      String The topic of discussion
      Throws:
      RemoteException - In the event of remote object failure.
    • getStarted

      public Date getStarted() throws RemoteException
      Description copied from interface: RemarksInterface
      Returns the date the discussion thread was started
      Specified by:
      getStarted in interface RemarksInterface
      Returns:
      Date The date the discussion thread was started
      Throws:
      RemoteException - In the event of remote object failure.
    • getStarted

      public String getStarted(DateFormat df) throws RemoteException
      Description copied from interface: RemarksInterface
      Returns the date the discussion thread was started
      Specified by:
      getStarted in interface RemarksInterface
      Parameters:
      df - A dateformat to apply to the date for formatting
      Returns:
      String The date the discussion thread was started
      Throws:
      RemoteException - In the event of remote object failure.
    • update

      public void update() throws ServiceException, RemoteException
      Description copied from class: Metadata
      Persist any changes to the object back to the repository. This is not done automatically in most cases. Any change to metadata requires an update call to write it to the back end server.

      Specified by:
      update in interface MetadataInterface
      Overrides:
      update in class Metadata
      Throws:
      ServiceException - if an error occurs in the repository.
      RemoteException - in the event of remote object failure
    • setOwner

      public void setOwner(UserContextInterface owner) throws IllegalStateException, RemoteException
      Description copied from interface: RemarksInterface
      Sets the owner of the discussion thread. If the owner is already set then an IllegalStateException is thrown.
      Specified by:
      setOwner in interface RemarksInterface
      Parameters:
      owner - The user context that represents the owner/creator of the discussion thread
      Throws:
      IllegalStateException - If the owner is already set
      RemoteException - In the event of remote object failure.
    • setTopic

      public void setTopic(String topic) throws IllegalStateException, RemoteException
      Description copied from interface: RemarksInterface
      Sets the topic of discussion. If the topic is already set then an IllegalStateException is thrown.
      Specified by:
      setTopic in interface RemarksInterface
      Parameters:
      topic - The topic for this discussion thread
      Throws:
      IllegalStateException - If the topic is already set
      RemoteException - In the event of remote object failure.
    • getProperty

      public String getProperty(String propertyName) throws RemoteException
      Description copied from interface: RemarksInterface
      Returns the value of a property. If the property does not exist then return null.
      Specified by:
      getProperty in interface RemarksInterface
      Parameters:
      propertyName - The name of the property. Use the format "{namespaceURI}name". If the property is not in any namespace then use either "{}name" or just "name".
      Returns:
      String The value of the property requested.
      Throws:
      RemoteException - In the event of remote object failure.
    • setProperty

      public void setProperty(String propertyName, String propertyValue) throws RemoteException
      Description copied from interface: RemarksInterface
      Sets the value of a property
      Specified by:
      setProperty in interface RemarksInterface
      Parameters:
      propertyName - The name of the property. Use the format "{namespaceURI}name". If the property is not in any namespace then use either "{}name" or just "name".
      propertyValue - The value for the property.
      Throws:
      RemoteException - In the event of remote object failure.
    • addReferral

      public void addReferral(String entityKey) throws RemoteException
      Description copied from interface: RemarksInterface
      Sets the referral, which is the item that refers to this remark. There can be more than one referral.
      Specified by:
      addReferral in interface RemarksInterface
      Parameters:
      entityKey - The entityKey of the smart object that refers to this remark.
      Throws:
      RemoteException - In the event of remote object failure.
    • getReferrals

      public Set getReferrals() throws RemoteException
      Throws:
      RemoteException