Interface LeaderMessageService
- All Superinterfaces:
com.appiancorp.services.ContextSensitiveService
,Service
Methods of service classes can all throw the unchecked exception
ServiceException
if any
system-level error (for example, server failure) occurs, and will in general
throw a checked exception (InvalidXXXException
) when an entity
to be retrieved is inaccessible, instead of returning null
.
Exceptions to this paradigm (including the use of ResultList
as
described below) are noted. All checked exceptions extend
AppianException
.
It may be necessary to retrieve a subset of results as opposed to an entire
collection, and also to sort the subset by some property of the returned
object. "Paging" methods which return a
ResultPage
are provided in certain
instances for this purpose. The ResultPage
will contain the
sorted subset of results
(via Result.getResults()
), and the
total number of items in the available result set
(via ResultPage.getAvailableItems()
).
It may also be necessary to retrieve some results, even if all results
cannot be retrieved (for instance, some of the entities corresponding
to a list of entity IDs may no longer exist). Methods which return a
ResultList
are provided for this
purpose. The Result.getResults()
method in this case will return all results which can be retrieved. In
addition, there will be a list of result codes
(ResultList.getResultCodes()
) that
represent the successful retrieval of an entity, or, if the entity could
not be retrieved, the reason for the failure. See the CODE_XXX
constants in ResultList
for details.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.Fields inherited from interface com.appiancorp.services.ContextSensitiveService
SET_SERVICE_CONTEXT_METHOD_NAME
-
Method Summary
Modifier and TypeMethodDescriptioncreateLeaderMessage
(Long portletId_, LeaderMessage lm_) Deprecated.Create a leader message.void
deleteLeaderMessage
(Long leaderMessageId_) Deprecated.Delete a leader message.findLeaderMessagesInPortletPaging
(LeaderMessage message_, Long portletId_, int index_, int count_) Deprecated.Searches through names of the leader messages the user can see, for a given portlet.findLeaderMessagesPaging
(LeaderMessage message_, int index_, int count_) Deprecated.Searches through names of leader messages that the current user can see.Deprecated.Gets the name of the application on which this service is running.getLeaderMessagesPage
(Long portletId_, int startPosition_, int batchSize_) Deprecated.Get a page of leader messages.String[]
Deprecated.Gets the current memory profile for the workspace.void
moveLeaderMessage
(Long leaderMessageId_, int newPosition_) Deprecated.Move a leader message within the total list of messages for a portlet This method takes an absolute position.shiftLeaderMessage
(Long leaderMessageId_, int numShift_) Deprecated.Shift a leader message to a new specified position within the list of messages for a portlet.void
Deprecated.Update a leader message.Methods inherited from interface com.appiancorp.services.ContextSensitiveService
setServiceContext
-
Field Details
-
createLeaderMessage$UPDATES
static final boolean createLeaderMessage$UPDATESDeprecated.- See Also:
-
updateLeaderMessage$UPDATES
static final boolean updateLeaderMessage$UPDATESDeprecated.- See Also:
-
deleteLeaderMessage$UPDATES
static final boolean deleteLeaderMessage$UPDATESDeprecated.- See Also:
-
getLeaderMessagesPage$UPDATES
static final boolean getLeaderMessagesPage$UPDATESDeprecated.- See Also:
-
moveLeaderMessage$UPDATES
static final boolean moveLeaderMessage$UPDATESDeprecated.- See Also:
-
shiftLeaderMessage$UPDATES
static final boolean shiftLeaderMessage$UPDATESDeprecated.- See Also:
-
findLeaderMessagesPaging$UPDATES
static final boolean findLeaderMessagesPaging$UPDATESDeprecated.- See Also:
-
findLeaderMessagesInPortletPaging$UPDATES
static final boolean findLeaderMessagesInPortletPaging$UPDATESDeprecated.- See Also:
-
getApplicationName$UPDATES
static final boolean getApplicationName$UPDATESDeprecated.- See Also:
-
getWorkspace$UPDATES
static final boolean getWorkspace$UPDATESDeprecated.- See Also:
-
-
Method Details
-
createLeaderMessage
Deprecated.Create a leader message. The last leader message created will be first in the list of returned messages for a portlet. The minimum required fields arelink
- Parameters:
portletId_
- the ID of the portlet in which this leader message is being created.lm_
- the leader message to create. ID will be ignored.- Returns:
- the ID of the new leader message.
- Throws:
InvalidPortletException
- if no portlet exists with the given IDServiceException
- if any system-level error occurs
-
updateLeaderMessage
Deprecated.Update a leader message.- Parameters:
lm_
- the new values for the leader message.- Throws:
InvalidLeaderMessageException
- if the ID of the leader message does not correspond to a valid leader messageServiceException
- if any system-level error occurs
-
deleteLeaderMessage
Deprecated.Delete a leader message.- Parameters:
leaderMessageId_
- the ID of the leader message to delete.- Throws:
InvalidLeaderMessageException
- if the ID does not correspond to a valid leader messageServiceException
- if any system-level error occurs
-
getLeaderMessagesPage
ResultPage getLeaderMessagesPage(Long portletId_, int startPosition_, int batchSize_) throws InvalidPortletException Deprecated.Get a page of leader messages.- Parameters:
portletId_
- the ID of the portlet whose leader messages are to be retrieved.startPosition_
- the 0-based index into the collection of total results at which to start. Negative numbers are treated as zerosbatchSize_
- the number of results to return. UseConstants.COUNT_ALL
will result in the entire collection being returned, but this is STRONGLY discouraged.- Returns:
- a
ResultPage
containing a list ofLeaderMessage
objects - Throws:
InvalidPortletException
- if no portlet exists with the given IDServiceException
- if any system-level error occurs
-
moveLeaderMessage
void moveLeaderMessage(Long leaderMessageId_, int newPosition_) throws InvalidLeaderMessageException Deprecated.Move a leader message within the total list of messages for a portlet This method takes an absolute position.- Parameters:
leaderMessageId_
- the ID of the leader message to move.newPosition_
- the leader message's new position. Position is 0-based. If the position index is equal to or greater than the number of leader messages the message is moved to the end.- Throws:
InvalidLeaderMessageException
- if the ID does not correspond to a valid leader messageServiceException
- if any system-level error occurs
-
shiftLeaderMessage
Deprecated.Shift a leader message to a new specified position within the list of messages for a portlet. The position shifted is relative.- Parameters:
leaderMessageId_
- the ID of the leader message to move.numShift_
- the number of spaces to shift the leadership message. If the number is equal to or greater than the number of leader messages the message is moved to the end.- Throws:
InvalidLeaderMessageException
- if the ID does not correspond to a valid leader messageServiceException
- if any system-level error occurs
-
findLeaderMessagesPaging
Deprecated.Searches through names of leader messages that the current user can see. The search bean contains nulls for match-all wildcards.java.lang.String
items are matched using regular expressions (e.g., "ab*" matches those items beginning with "ab")- Parameters:
message_
- theLeaderMessage
used in the search. Ifnull
,null
will be returned.index_
- the index of the firstLeaderMessage
that will be returnedcount_
- the number of leader messages to be returned in theResultPage
- Returns:
- a
ResultPage
containing the list ofLeaderMessage
objects matching the search terms - Throws:
ServiceException
- if any system-level error occurs
-
findLeaderMessagesInPortletPaging
ResultPage findLeaderMessagesInPortletPaging(LeaderMessage message_, Long portletId_, int index_, int count_) Deprecated.Searches through names of the leader messages the user can see, for a given portlet. The search bean contains nulls for match-all wildcards.java.lang.String
items are matched using regular expressions (e.g., "ab*" matches those items beginning with "ab")- Parameters:
message_
- theLeaderMessage
used in the search. Ifnull
,null
will be returned.portletId_
- the ID of the portlet in which to searchindex_
- the index of the firstLeaderMessage
that will be returnedcount_
- the number of leader messages to be returned in theResultPage
- Returns:
- a
ResultPage
containing the list ofLeaderMessage
objects matching the search terms - Throws:
ServiceException
- if any system-level error occurs
-
getApplicationName
String getApplicationName()Deprecated.Gets the name of the application on which this service is running.- Returns:
- The name of the application
- Throws:
ServiceException
- if any system-level error occurs
-
getWorkspace
String[] getWorkspace()Deprecated.Gets the current memory profile for the workspace.- Returns:
- array of Strings of length 4 describing memory usage:
- [0]Used - Memory Used by the Server so far for storage
- [1]Allocated - Memory allocated for use. Often if a large data item was allocated by a server and subsequently freed, this value will be large compared to "Used". If nearly all memory allocated is in use, this value will be close to (but always higher than) "Used"
- [2]Mapped - is the space used by memory-mapped files
- [3]Available - is the total available memory for the Server process
- Throws:
ServiceException
- if any system-level error occurs
-