Interface IssueMessagingSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates comments on issues and sends messages to
customers. A comment is a direct log entry that may not be visible to the
customer. A message is sent by some means to the customer and recorded in
the log. In both cases, LogEntryForms are used to specify the
content of the message or comment with an IssueAction of COMMENTED
or MESSAGE_SENT .
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can comment on Issues.booleancanCreateLogEntryCommentWithRecordTypes(Type[] logEntryRecordTypes) Tests if this user can create a singleLogEntryusing the desired record types.booleancanCreateLogEntryMessageWithRecordTypes(Type[] logEntryRecordTypes) Tests if this user can create a singleLogEntryusing the desired record types.booleancanDeleteComment(Id logEntryId) Tests if this user can delete a specified comment.booleanTests if this user can delete comments.booleanTests if this user can send customer messages.booleancanUpdateComment(Id logEntryId) Tests if this user can update a specifiedLogEntry.booleanTests if this user can update comments.comment(Id issueId, LogEntryForm logEntryForm) Comments on an issue.voiddeleteComment(Id logEntryId) Deletes a comment.voidDeletes all comments in thisFrontOffice.voiddeleteCommentsByDate(DateTime from, DateTime to) Deletes all comments within the given date range inclusive in thisFrontOffice.voiddeleteCommentsByDateForIssue(Id issueId, DateTime from, DateTime to) Deletes all comments within the given date range inclusive in thisIssue.voiddeleteCommentsByDateForQueue(Id queueId, DateTime from, DateTime to) Deletes all comments within the given date range inclusive in thisQueue.voiddeleteCommentsForIssue(Id issueId) Deletes all comments in anIssue.voiddeleteCommentsForQueue(Id queueId) Deletes all comments in aQueue.Gets theFrontOfficeassociated with this session.Gets theFrontOfficeIdassociated with this session.getLogEntryFormForCommenting(Type[] logEntryRecordTypes) Gets the log entry form for creating commenting on issues.Gets the log entry form for updating an existing comment.getLogEntryFormForMessaging(Type[] logEntryRecordTypes) Gets the log entry form for creating messages to customers.sendMessage(Id issueId, LogEntryForm logEntryForm) Send a customer a message and records it in the issue log.voidupdateComment(LogEntryForm logEntryForm) Updates an existing log entry.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getFrontOfficeId
Id getFrontOfficeId()Gets theFrontOfficeIdassociated with this session.- Returns:
- the
FrontOffice Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getFrontOffice
Gets theFrontOfficeassociated with this session.- Returns:
- the front office
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canComment
boolean canComment()Tests if this user can comment on Issues. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aLogEntrywill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer comment operations to an unauthorized user.- Returns:
falseif commenting is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateLogEntryCommentWithRecordTypes
Tests if this user can create a singleLogEntryusing the desired record types. WhileTrackingManager.getLogEntryRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificLogEntry. Providing an empty array tests if aLogEntrycan be created with no records.- Parameters:
logEntryRecordTypes- array of log entry record types- Returns:
trueifLogEntrycreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-logEntryRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getLogEntryFormForCommenting
LogEntryForm getLogEntryFormForCommenting(Type[] logEntryRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the log entry form for creating commenting on issues. A new form should be requested for each create transaction.- Parameters:
logEntryRecordTypes- array of log entry record types- Returns:
- the log entry form
- Throws:
NullArgumentException-logEntryRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
comment
LogEntry comment(Id issueId, LogEntryForm logEntryForm) throws NotFoundException, OperationFailedException, PermissionDeniedException Comments on an issue.- Parameters:
issueId- theIdof the issuelogEntryForm- the form for thisLogEntry- Returns:
- the new
LogEntry - Throws:
InvalidArgumentException- one or more of the form elements is invalidNotFoundException-issueIdis not foundNullArgumentException-issueIdorlogEntryFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-logEntryFormis not of this service- Compliance:
mandatory- This method must be implemented.
-
canUpdateComments
boolean canUpdateComments()Tests if this user can update comments. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a comment will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.- Returns:
falseif comment modification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canUpdateComment
Tests if this user can update a specifiedLogEntry. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating theLogEntrywill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer an update operation to an unauthorized user for this log entry.- Parameters:
logEntryId- theIdof the comment entry- Returns:
falseif log entry modification is not authorized,trueotherwise- Throws:
NullArgumentException-logEntryIdisnull- Compliance:
mandatory- This method must be implemented.- Notes:
If- the {@code logEntryId} is not found, then it is acceptable to return false to indicate the lack of an update available.
-
getLogEntryFormForCommentUpdate
LogEntryForm getLogEntryFormForCommentUpdate(Id Id) throws NotFoundException, OperationFailedException Gets the log entry form for updating an existing comment. A new log entry form should be requested for each update transaction.- Parameters:
Id- theIdof theLogEntry- Returns:
- the log entry form
- Throws:
NotFoundException-logEntryIdis not foundNullArgumentException-logEntryIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
updateComment
void updateComment(LogEntryForm logEntryForm) throws OperationFailedException, PermissionDeniedException Updates an existing log entry.- Parameters:
logEntryForm- the form containing the elements to be updated- Throws:
IllegalStateException-logEntryFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-logEntryFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-logEntryFormdid not originate fromgetCommentFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteComments
boolean canDeleteComments()Tests if this user can delete comments. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a comment will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.- Returns:
falseif comment deletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canDeleteComment
Tests if this user can delete a specified comment. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting the comment will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer an delete operation to an unauthorized user for this log entry.- Parameters:
logEntryId- theIdof the comment- Returns:
falseif deletion of thisLogEntryis not authorized,trueotherwise- Throws:
NullArgumentException-logEntryIdisnull- Compliance:
mandatory- This method must be implemented.- Notes:
If- the {@code logEntryId} is not found, then it is acceptable to return false to indicate the lack of an delete available.
-
deleteComment
void deleteComment(Id logEntryId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes a comment.- Parameters:
logEntryId- theIdof the comment to remove- Throws:
NotFoundException-logEntryIdnot foundNullArgumentException-logEntryIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteComments
Deletes all comments in thisFrontOffice.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteCommentsByDate
void deleteCommentsByDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Deletes all comments within the given date range inclusive in thisFrontOffice.- Parameters:
from- start dateto- end date- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteCommentsForQueue
void deleteCommentsForQueue(Id queueId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes all comments in aQueue.- Parameters:
queueId- theIdof aQueue- Throws:
NotFoundException-queueIdnot foundNullArgumentException-queueIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteCommentsByDateForQueue
void deleteCommentsByDateForQueue(Id queueId, DateTime from, DateTime to) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes all comments within the given date range inclusive in thisQueue.- Parameters:
queueId- theIdof aQueuefrom- start dateto- end date- Throws:
InvalidArgumentException-fromis greater thantoNotFoundException-queueIdnot foundNullArgumentException-queueId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteCommentsForIssue
void deleteCommentsForIssue(Id issueId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes all comments in anIssue.- Parameters:
issueId- theIdof anIssue- Throws:
NotFoundException-issueIdnot foundNullArgumentException-issueIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteCommentsByDateForIssue
void deleteCommentsByDateForIssue(Id issueId, DateTime from, DateTime to) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes all comments within the given date range inclusive in thisIssue.- Parameters:
issueId- theIdof anIssuefrom- start dateto- end date- Throws:
InvalidArgumentException-fromis greater thantoNotFoundException-issueIdnot foundNullArgumentException-issueId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canSendMessages
boolean canSendMessages()Tests if this user can send customer messages. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aLogEntrywill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer comment operations to an unauthorized user.- Returns:
falseif messaging is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateLogEntryMessageWithRecordTypes
Tests if this user can create a singleLogEntryusing the desired record types. WhileTrackingManager.getLogEntryRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificLogEntry. Providing an empty array tests if aLogEntrycan be created with no records.- Parameters:
logEntryRecordTypes- array of log entry record types- Returns:
trueifLogEntrycreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-logEntryRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getLogEntryFormForMessaging
LogEntryForm getLogEntryFormForMessaging(Type[] logEntryRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the log entry form for creating messages to customers. A new form should be requested for each create transaction.- Parameters:
logEntryRecordTypes- array of log entry record types- Returns:
- the log entry form
- Throws:
NullArgumentException-logEntryRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
sendMessage
LogEntry sendMessage(Id issueId, LogEntryForm logEntryForm) throws NotFoundException, OperationFailedException, PermissionDeniedException Send a customer a message and records it in the issue log.- Parameters:
issueId- theIdof the issuelogEntryForm- the form for thisLogEntry- Returns:
- the new
LogEntry - Throws:
InvalidArgumentException- one or more of the form elements is invalidNotFoundException-issueIdis not foundNullArgumentException-issueIdorlogEntryFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-logEntryFormis not of this service- Compliance:
mandatory- This method must be implemented.
-