*** 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:
-
Field Summary
Fields inherited from class com.sas.services.information.metadata.Metadata
_actionInterfaces, _children, _isCompatible, _isDestroyPending, _isReadCompatible, _myRefreshInterval, _myState, _omrCreateDate, _omrModifyDate, _repository, _repositoryFlag, _repositoryObject, _treeRefreshTime, formats, gmtZone, OMSOBJ_STRING, REPOSITORY_DAV, REPOSITORY_LOMR, REPOSITORY_NONE, REPOSITORY_OMR, SLASHFields inherited from class java.rmi.server.RemoteObject
refFields inherited from interface com.sas.services.information.metadata.MetadataInterface
METADATA_STATE_DELETED, METADATA_STATE_DESTROYED, METADATA_STATE_NEW, METADATA_STATE_NORMAL, PERMISSION_READMETADATA, PERMISSION_WRITEMETADATA -
Constructor Summary
ConstructorsModifierConstructorDescriptionRemarks()Constructs a default instance.Remarks(DAVRemarks remarks) Constructs a default instance.protectedRemarks(DAVRemarks remarks, Class theClass) Constructs a default instance.Remarks(UserContextInterface user, String topic) protectedRemarks(Class theClass) Constructs a default instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComment(CommentInterface comment) Add a comment - as long as user is an allowed participantvoidaddReferral(String entityKey) Sets the referral, which is the item that refers to this remark.voidclear()Clear the list of comments - only owner is allowed to do thisvoiddelete()Override delete to make sure that only the owner can delete the remark.getComment(CommentFilterInterface filter) Get a comment that satisfies the filter.ListgetComments(CommentFilterInterface filter) Get a list of all comments that satisfy the filter.StringgetOwner()Gets the owner of the discussion threadStringgetProperty(String propertyName) Returns the value of a property.SetDateReturns the date the discussion thread was startedStringgetStarted(DateFormat df) Returns the date the discussion thread was startedStringGet the thread identifier for this remarkStringgetTopic()Gets the topic of discussionStringgetType()Get the object type.voidsetOwner(UserContextInterface owner) Sets the owner of the discussion thread.voidsetProperty(String propertyName, String propertyValue) Sets the value of a propertyvoidsetThreadId(String threadId) Sets the thread identifier for this remark.voidsetTopic(String topic) Sets the topic of discussion.voidupdate()Persist any changes to the object back to the repository.Methods inherited from class com.sas.services.information.metadata.Metadata
add, addAccessControl, addAttribute, addAttributes, addDocument, addExtension, addGroup, addImplementor, addKeyword, addNoteTextStore, addNoteTextStore, addObjectProperty, addObjectProperty, addPermissions, addProcessorInterface, addPrompt, addPropertySet, addRemark, addResponsibleParty, addToList, addTransactionListener, addUsedByPrototype, checkin, checkout, checkPulse, clearInformationService, commit, copyTo, countAssociatedObjects, deleteAttribute, deleteAttributes, deleteRootObject, destroy, fromByteArray, getAccessControls, getAttribute, getAttributes, getAuthorizationUtil, getContainer, getCreateDate, getCreatedBy, getDefaultLocalizableProperties, getDescription, getDocuments, getEntityKey, getEntityURL, getExtensions, getGroups, getGUID, getIdentifier, getIdentities, getImplementors, getInformationService, getKeywords, getLockedBy, getModifiedBy, getModifyDate, getName, getNoteTextStore, getNoteTextStores, getNoteTextStoresByRole, getObjectProperties, getObjectURI, getParent, getParentPath, getParents, getPath, getPaths, getPathUrl, getPathUrl, getPermission, getPermissions, getPermissions, getPreviousVersionNames, getPrimaryPropertyGroup, getProcessorInterface, getPrompt, getPrompts, getPropertyBag, getPropertySets, getRemarksList, getReposId, getRepository, getRepositoryEntity, getRepositoryName, getReposKey, getResponsibleParties, getState, getTrackingId, getTreeRefresh, getTypeDescriptor, getUsageVersion, getUsedByPrototypes, getUsingPrototype, getVersion, hashCode, isAuthorized, isCompatible, isConnectionException, isDeleted, isDestroyed, isLoggingEnabled, isObjectAlive, isReadCompatible, logFormat, logFormat, logFormat, logFormat, logMessage, logMessage, logThrowable, mapNameToFilesystem, mapUrlToFilesystem, moveTo, newServiceObject, notifyTransactionListeners, refresh, removeAccessControl, removeDocument, removeExtension, removeFromList, removeGroup, removeImplementor, removeKeyword, removeNoteTextStore, removeObjectProperty, removePermissions, removePrompt, removePropertySet, removeResponsibleParty, removeResponsiblePartyByIdentity, removeUsedByPrototype, reset, rollback, setAttribute, setAttributes, setCompatibility, setDefaultLocalizableProperties, setDeleted, setDescription, setDocuments, setExtensions, setGroups, setGUID, setKeywords, setName, setNoteTextStores, setObjectProperties, setPermission, setPrimaryPropertyGroup, setPrompt, setPrompts, setRemarksList, setRepository, setTreeRefresh, setUsingPrototype, startTransaction, toByteArray, toString, transactionEvent, uncheckout, updateFromBag, validateNameAndFolder, validateNameAndFolder, versionMethods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObjectMethods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLogMethods inherited from class java.rmi.server.RemoteObject
equals, getRef, toStubMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.sas.services.information.metadata.MetadataInterface
add, addAccessControl, addAttribute, addAttributes, addDocument, addExtension, addGroup, addImplementor, addKeyword, addNoteTextStore, addNoteTextStore, addObjectProperty, addObjectProperty, addPermissions, addPrompt, addPropertySet, addRemark, addResponsibleParty, addTransactionListener, addUsedByPrototype, checkin, checkout, commit, copyTo, countAssociatedObjects, deleteAttribute, deleteAttributes, destroy, getAccessControls, getAttribute, getAttributes, getAuthorizationUtil, getCreateDate, getCreatedBy, getDescription, getDocuments, getEntityKey, getEntityURL, getExtensions, getGroups, getGUID, getIdentities, getImplementors, getKeywords, getLockedBy, getModifiedBy, getModifyDate, getNoteTextStore, getNoteTextStores, getNoteTextStoresByRole, getObjectProperties, getParent, getParentPath, getParents, getPath, getPaths, getPermission, getPermissions, getPermissions, getPreviousVersionNames, getPrimaryPropertyGroup, getPrompt, getPrompts, getPropertyBag, getPropertySets, getRemarksList, getReposId, getRepository, getRepositoryEntity, getRepositoryName, getReposKey, getResponsibleParties, getState, getTrackingId, getUsageVersion, getUsedByPrototypes, getUsingPrototype, getVersion, isAuthorized, isCompatible, isDeleted, isDestroyed, isObjectAlive, isReadCompatible, mapNameToFilesystem, mapUrlToFilesystem, moveTo, newServiceObject, refresh, removeAccessControl, removeDocument, removeExtension, removeGroup, removeImplementor, removeKeyword, removeNoteTextStore, removeObjectProperty, removePermissions, removePrompt, removePropertySet, removeResponsibleParty, removeResponsiblePartyByIdentity, removeUsedByPrototype, rollback, setAttribute, setAttributes, setDeleted, setDescription, setDocuments, setExtensions, setGroups, setGUID, setKeywords, setName, setNoteTextStores, setObjectProperties, setPermission, setPrimaryPropertyGroup, setPrompt, setPrompts, setRemarksList, setRepository, setUsingPrototype, startTransaction, toByteArray, transactionEvent, uncheckout, updateFromBag, versionMethods inherited from interface com.sas.services.information.publicobject.PublicObjectInterface
addProcessorInterface, getContainer, getIdentifier, getName, getObjectURI, getPathUrl, getProcessorInterface, getTypeDescriptor
-
Constructor Details
-
Remarks
public Remarks() throws RemoteExceptionConstructs a default instance.- Throws:
RemoteException- if unable to export the remote object.
-
Remarks
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
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
- Throws:
RemoteException
-
-
Method Details
-
getType
public String getType() throws RemoteExceptionDescription copied from class:MetadataGet 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:
getTypein interfaceMetadataInterface- Overrides:
getTypein classMetadata- Returns:
- A type string for the object.
- Throws:
RemoteException- in the event of remote object failure
-
addComment
Description copied from interface:RemarksInterfaceAdd a comment - as long as user is an allowed participant- Specified by:
addCommentin interfaceRemarksInterface- 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
Description copied from interface:RemarksInterfaceGet a comment that satisfies the filter. No filter is attained by passing a null filter or setting NOMODIFIER in the CommentFilter.- Specified by:
getCommentin interfaceRemarksInterface- 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:RemarksInterfaceSets the thread identifier for this remark.- Specified by:
setThreadIdin interfaceRemarksInterface- Parameters:
threadId- Thread identifier for this remark.- Throws:
RemoteException- In the event of remote object failure.
-
getThreadId
public String getThreadId()Description copied from interface:RemarksInterfaceGet the thread identifier for this remark- Specified by:
getThreadIdin interfaceRemarksInterface- Returns:
- String The thread identifier for this remark
-
getComments
Description copied from interface:RemarksInterfaceGet 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:
getCommentsin interfaceRemarksInterface- 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 RemoteExceptionDescription copied from interface:RemarksInterfaceClear the list of comments - only owner is allowed to do this- Specified by:
clearin interfaceRemarksInterface- Throws:
RemoteException- In the event of remote object failure.
-
delete
Override delete to make sure that only the owner can delete the remark. If there is no owner then allow deletion too.- Specified by:
deletein interfaceMetadataInterface- Overrides:
deletein classMetadata- Throws:
ServiceException- in the event of a repository failure.RemoteException- in the event of a network failure.
-
getOwner
public String getOwner() throws RemoteExceptionDescription copied from interface:RemarksInterfaceGets the owner of the discussion thread- Specified by:
getOwnerin interfaceRemarksInterface- Returns:
- String The owner/creator of the discussion thread
- Throws:
RemoteException- In the event of remote object failure.
-
getTopic
public String getTopic() throws RemoteExceptionDescription copied from interface:RemarksInterfaceGets the topic of discussion- Specified by:
getTopicin interfaceRemarksInterface- Returns:
- String The topic of discussion
- Throws:
RemoteException- In the event of remote object failure.
-
getStarted
public Date getStarted() throws RemoteExceptionDescription copied from interface:RemarksInterfaceReturns the date the discussion thread was started- Specified by:
getStartedin interfaceRemarksInterface- 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:RemarksInterfaceReturns the date the discussion thread was started- Specified by:
getStartedin interfaceRemarksInterface- 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
Description copied from class:MetadataPersist 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:
updatein interfaceMetadataInterface- Overrides:
updatein classMetadata- Throws:
ServiceException- if an error occurs in the repository.RemoteException- in the event of remote object failure
-
setOwner
Description copied from interface:RemarksInterfaceSets the owner of the discussion thread. If the owner is already set then an IllegalStateException is thrown.- Specified by:
setOwnerin interfaceRemarksInterface- Parameters:
owner- The user context that represents the owner/creator of the discussion thread- Throws:
IllegalStateException- If the owner is already setRemoteException- In the event of remote object failure.
-
setTopic
public void setTopic(String topic) throws IllegalStateException, RemoteException Description copied from interface:RemarksInterfaceSets the topic of discussion. If the topic is already set then an IllegalStateException is thrown.- Specified by:
setTopicin interfaceRemarksInterface- Parameters:
topic- The topic for this discussion thread- Throws:
IllegalStateException- If the topic is already setRemoteException- In the event of remote object failure.
-
getProperty
public String getProperty(String propertyName) throws RemoteException Description copied from interface:RemarksInterfaceReturns the value of a property. If the property does not exist then return null.- Specified by:
getPropertyin interfaceRemarksInterface- 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:RemarksInterfaceSets the value of a property- Specified by:
setPropertyin interfaceRemarksInterface- 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:RemarksInterfaceSets the referral, which is the item that refers to this remark. There can be more than one referral.- Specified by:
addReferralin interfaceRemarksInterface- 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
-