Interface MiniMetadataService
- All Superinterfaces:
com.appiancorp.services.ContextSensitiveService
,Service
When a user begins to edit a miniwebsite, a draft is created and all changes are made to that draft. When the user wants to make the draft public, he submits it for publishing.
When a miniwebsite is submitted for publishing, it may require the approval of the channel administrator. If it requires approval, then the administrator must approve the draft before the public can see it. If it does not require approval, the public can see it immediately, and it replaces the version that was previously available for the public to see.
All published drafts are kept as a history of the miniwebsite. Each published draft becomes a version in the history.
Note: This service does not write any data to disk. That must be done separately in order to use the service.
When a draft is created, the miniwebsite is locked and no other users may edit the miniwebsite or create a draft unless they break the lock (in which case the first user's draft is deleted). Locking prevents someone from accidentally overwriting someone else's draft.
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.
- See Also:
-
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.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.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 TypeMethodDescriptionDeprecated.Break the lock on a given miniwebsite portlet.void
changeAuthor
(Long portletId_, String oldAuthor_, String newAuthor_) Deprecated.Change the author of a draft/submission of a given miniwebsite portlet.void
changeMiniApproval
(Long portletId_, boolean approvalRequired_) Deprecated.Set whether or not changes to a given miniwebsite portlet will require approval by the channel administrator.void
changeMwsPath
(String substring_, String replacement_) Deprecated.Modify the path where mini website content is stored for existing mini websites.void
createMini
(Long portletId_, String template_, boolean isVersioned_, boolean requiresApproval_) Deprecated.Create a new miniwebsite portlet or a new version of an existing miniwebsite portlet.deleteDraftMini
(Long portletId_, String author_) Deprecated.Delete an author's current draft for a given miniwebsite portlet.Deprecated.Lock a given miniwebsite portlet in order to edit it.getAllMiniFilenamesPaging
(int startPosition_, int batchSize_) Deprecated.Gets the filename paths of all version (including prior) and drafts for all valid MiniWebSitesDeprecated.Gets the name of the application on which this service is running.boolean
getMiniApproval
(Long portletId_) Deprecated.Returns whether changes to a given miniwebsite portlet require approval by the channel administrator.getRevisionHistory
(Long portletId_) Deprecated.Get the revision history for a given miniwebsite portlet.String[]
Deprecated.Gets the current memory profile for the workspace.promoteToDraft
(Long portletId_, Integer versionId_, String author_) Deprecated.Use a version of a given miniwebsite portlet to create a draft for a new version of the miniwebsite.publishSubmitted
(Long portletId_, String author_) Deprecated.Publish an author's submitted draft for a given miniwebsite portlet.rejectSubmitted
(Long portletId_, String author_, String message_) Deprecated.Reject an author's miniwebsite draft submission.void
returnSubmitted
(Long portletId_, String author_, String message_) Deprecated.Return an author's miniwebsite draft submission for rework.Deprecated.Save an author's current draft for a given miniwebsite portlet.void
submitDraft
(Long portletId_, String author_) Deprecated.Submit an author's current miniwebsite draft for approval.void
uneditMini
(Long portletId_, String author_) Deprecated.Unlock a given miniwebsite portlet if it is currently locked by the passed author and the author has no drafts/submissions.void
Deprecated.Cancel the submission for approval of a miniwebsite draft.viewCurrentMini
(Long portletId_) Deprecated.Get information about the latest version of a given miniwebsite portlet.Deprecated.View a version of a given miniwebsite portlet.viewUnpublishedMinis
(Long portletId_) Deprecated.View the unpublished versions of a given miniwebsite portlet.Methods inherited from interface com.appiancorp.services.ContextSensitiveService
setServiceContext
-
Field Details
-
createMini$UPDATES
static final boolean createMini$UPDATESDeprecated.- See Also:
-
editMini$UPDATES
static final boolean editMini$UPDATESDeprecated.- See Also:
-
uneditMini$UPDATES
static final boolean uneditMini$UPDATESDeprecated.- See Also:
-
viewUnpublishedMinis$UPDATES
static final boolean viewUnpublishedMinis$UPDATESDeprecated.- See Also:
-
changeAuthor$UPDATES
static final boolean changeAuthor$UPDATESDeprecated.- See Also:
-
deleteDraftMini$UPDATES
static final boolean deleteDraftMini$UPDATESDeprecated.- See Also:
-
saveDraft$UPDATES
static final boolean saveDraft$UPDATESDeprecated.- See Also:
-
submitDraft$UPDATES
static final boolean submitDraft$UPDATESDeprecated.- See Also:
-
unsubmit$UPDATES
static final boolean unsubmit$UPDATESDeprecated.- See Also:
-
publishSubmitted$UPDATES
static final boolean publishSubmitted$UPDATESDeprecated.- See Also:
-
returnSubmitted$UPDATES
static final boolean returnSubmitted$UPDATESDeprecated.- See Also:
-
rejectSubmitted$UPDATES
static final boolean rejectSubmitted$UPDATESDeprecated.- See Also:
-
breakLock$UPDATES
static final boolean breakLock$UPDATESDeprecated.- See Also:
-
getRevisionHistory$UPDATES
static final boolean getRevisionHistory$UPDATESDeprecated.- See Also:
-
viewMini$UPDATES
static final boolean viewMini$UPDATESDeprecated.- See Also:
-
promoteToDraft$UPDATES
static final boolean promoteToDraft$UPDATESDeprecated.- See Also:
-
getMiniApproval$UPDATES
static final boolean getMiniApproval$UPDATESDeprecated.- See Also:
-
changeMiniApproval$UPDATES
static final boolean changeMiniApproval$UPDATESDeprecated.- See Also:
-
viewCurrentMini$UPDATES
static final boolean viewCurrentMini$UPDATESDeprecated.- See Also:
-
changeMwsPath$UPDATES
static final boolean changeMwsPath$UPDATESDeprecated.- See Also:
-
getApplicationName$UPDATES
static final boolean getApplicationName$UPDATESDeprecated.- See Also:
-
getWorkspace$UPDATES
static final boolean getWorkspace$UPDATESDeprecated.- See Also:
-
getAllMiniFilenamesPaging$UPDATES
static final boolean getAllMiniFilenamesPaging$UPDATESDeprecated.- See Also:
-
-
Method Details
-
createMini
void createMini(Long portletId_, String template_, boolean isVersioned_, boolean requiresApproval_) throws IllegalArgumentException, InvalidPortletException, InvalidPortletTypeException Deprecated.Create a new miniwebsite portlet or a new version of an existing miniwebsite portlet.- Parameters:
portletId_
- The ID of a miniwebsite portlet, if creating a new version of an existing portlettemplate_
- reserved for future use; should be set tonull
. Value is saved to the database but not used anywhere.isVersioned_
- Set totrue
to enable versioning for the miniwebsite (all revisions of the portlet will be saved). Set tofalse
if new versions of the portlet should replace any existing versions.requiresApproval_
- Sets whether the changes to this miniwebsite portlet will require approval by the channel administrators- Throws:
IllegalArgumentException
- if the portlet ID corresponds to a non-miniwebsite portletInvalidPortletException
- if the portlet ID is null or no portlet with the passed ID existsInvalidPortletTypeException
- if the miniwebsite portlet type does not exist (for example, if the type was never registered)ServiceException
- if any system-level error occurs
-
editMini
MiniMetadata editMini(Long portletId_, String author_) throws IllegalArgumentException, InvalidPortletException Deprecated.Lock a given miniwebsite portlet in order to edit it. No users other thanauthor_
will be able to edit the portlet while it is locked. If the miniwebsite is already locked, the MiniMetadata returned will show who locked the miniwebsite and the lock will not be broken.- Parameters:
portletId_
- The ID of the miniwebsite portlet that should be locked.author_
- The username of the author who will edit the portlet.- Returns:
MiniMetadata
object containing information about the miniwebsite portlet whose ID was passed or null if the portlet ID corresponds to a non-miniwebsite portlet- Throws:
InvalidPortletException
- if the portlet ID isnull
or no portlet with the passed ID existsServiceException
- if any system-level error occursIllegalArgumentException
-
uneditMini
void uneditMini(Long portletId_, String author_) throws IllegalArgumentException, InvalidPortletException, InvalidPortletTypeException Deprecated.Unlock a given miniwebsite portlet if it is currently locked by the passed author and the author has no drafts/submissions. If the miniwebsite is locked by a user who has drafts, it will not be unlocked.- Parameters:
portletId_
- The ID of the miniwebsite portlet that should be unlocked.author_
- The username of the author calling this function- Throws:
IllegalArgumentException
- if the portlet ID isnull
or corresponds to a non-miniwebsite portletInvalidPortletException
- if no portlet with the passed ID existsInvalidPortletTypeException
- if the miniwebsite portlet type does not exist (for example, if the type was never registered)ServiceException
- if any system-level error occurs
-
viewUnpublishedMinis
MiniMetadata[] viewUnpublishedMinis(Long portletId_) throws IllegalArgumentException, InvalidPortletException, InvalidPortletTypeException Deprecated.View the unpublished versions of a given miniwebsite portlet.- Parameters:
portletId_
- The ID of a miniwebsite portlet.- Returns:
MiniMetadata
objects containing information about each of the unpublished versions of the portlet.- Throws:
IllegalArgumentException
- if the portlet ID isnull
or corresponds to a non-miniwebsite portletInvalidPortletException
- if no portlet with the passed ID existsInvalidPortletTypeException
- if the miniwebsite portlet type does not exist (for example, if the type was never registered)ServiceException
- if any system-level error occurs
-
changeAuthor
void changeAuthor(Long portletId_, String oldAuthor_, String newAuthor_) throws IllegalArgumentException, InvalidPortletTypeException, InvalidPortletException Deprecated.Change the author of a draft/submission of a given miniwebsite portlet.- Parameters:
portletId_
- The ID of a miniwebsite portlet.oldAuthor_
- The username of the author of the miniwebsite draft/submission.newAuthor_
- The username of the person who should be set as the author of the minwebsite draft/submission.- Throws:
IllegalArgumentException
- if the portlet ID isnull
or corresponds to a non-miniwebsite portletInvalidPortletException
- if no portlet with the passed ID existsInvalidPortletTypeException
- if the miniwebsite portlet type does not exist (for example, if the type was never registered)ServiceException
- if any system-level error occurs
-
deleteDraftMini
String deleteDraftMini(Long portletId_, String author_) throws IllegalArgumentException, InvalidPortletTypeException, InvalidPortletException Deprecated.Delete an author's current draft for a given miniwebsite portlet.- Parameters:
portletId_
- The ID of a miniwebsite portlet.author_
- The username of the author whose draft should be deleted.- Returns:
- The local path to the file which contains the miniwebsite body.
- Throws:
IllegalArgumentException
- if the portlet ID isnull
or corresponds to a non-miniwebsite portletInvalidPortletException
- if no portlet with the passed ID existsInvalidPortletTypeException
- if the miniwebsite portlet type does not exist (for example, if the type was never registered)ServiceException
- if any system-level error occurs
-
saveDraft
String saveDraft(Long portletId_, String author_) throws IllegalArgumentException, InvalidPortletTypeException, InvalidPortletException Deprecated.Save an author's current draft for a given miniwebsite portlet.- Parameters:
portletId_
- The ID of a miniwebsite portlet.author_
- The username of the author whose draft should be saved.- Returns:
- The local path to the file which should store the miniwebsite draft body.
- Throws:
IllegalArgumentException
- if the portlet ID corresponds to a non-miniwebsite portletInvalidPortletException
- if portlet ID isnull
or no portlet with the passed ID existsInvalidPortletTypeException
- if the miniwebsite portlet type does not exist (for example, if the type was never registered)ServiceException
- if any system-level error occurs
-
submitDraft
void submitDraft(Long portletId_, String author_) throws IllegalArgumentException, InvalidPortletTypeException, InvalidPortletException Deprecated.Submit an author's current miniwebsite draft for approval.- Parameters:
portletId_
- The ID of a miniwebsite portlet.author_
- The username of the author submitting the draft.- Throws:
IllegalArgumentException
- if the portlet ID corresponds to a non-miniwebsite portletInvalidPortletException
- if the portlet ID isnull
or no portlet with the passed ID existsInvalidPortletTypeException
- if the miniwebsite portlet type does not exist (for example, if the type was never registered)ServiceException
- if any system-level error occurs
-
unsubmit
void unsubmit(Long portletId_, String author_) throws IllegalArgumentException, InvalidPortletTypeException, InvalidPortletException Deprecated.Cancel the submission for approval of a miniwebsite draft. The miniwebsite will not be unsubmitted if the draft is in the submitted state (i.e., has been submitted and has not been approved), or if the author provided as a parameter is not the draft author- Parameters:
portletId_
- The ID of a miniwebsite portlet.author_
- The username of the author of the submitted draft.- Throws:
IllegalArgumentException
- if the portlet ID isnull
or corresponds to a non-miniwebsite portletInvalidPortletException
- if no portlet with the passed ID existsInvalidPortletTypeException
- if the miniwebsite portlet type does not exist (for example, if the type was never registered)ServiceException
- if any system-level error occurs
-
publishSubmitted
FileChange publishSubmitted(Long portletId_, String author_) throws IllegalArgumentException, InvalidPortletTypeException, InvalidPortletException Deprecated.Publish an author's submitted draft for a given miniwebsite portlet.- Parameters:
portletId_
- The ID of a miniwebsite portlet.author_
- The username of the author who submitted the draft.- Returns:
FileChange
object containing: 1) the path to the file containing the submitted draft's body 2) the path to the file where the new version for the miniwebsite should be created. The body of the submitted draft should then be copied into the file for the new miniwebsite version, and the draft file should be deleted.- Throws:
IllegalArgumentException
- if the portlet ID isnull
or corresponds to a non-miniwebsite portletInvalidPortletException
- if no portlet with the passed ID existsInvalidPortletTypeException
- if the miniwebsite portlet type does not exist (for example, if the type was never registered)ServiceException
- if any system-level error occurs
-
returnSubmitted
void returnSubmitted(Long portletId_, String author_, String message_) throws IllegalArgumentException, InvalidPortletTypeException, InvalidPortletException Deprecated.Return an author's miniwebsite draft submission for rework.- Parameters:
portletId_
- The ID of a miniwebsite portlet.author_
- The username of the author of the submitted draft.message_
- Return message text. This parameter reserved for future use, and should be set tonull
.- Throws:
IllegalArgumentException
- if the portlet ID isnull
or corresponds to a non-miniwebsite portletInvalidPortletException
- if no portlet with the passed ID existsInvalidPortletTypeException
- if the miniwebsite portlet type does not exist (for example, if the type was never registered)ServiceException
- if any system-level error occurs
-
rejectSubmitted
String rejectSubmitted(Long portletId_, String author_, String message_) throws IllegalArgumentException, InvalidPortletTypeException, InvalidPortletException Deprecated.Reject an author's miniwebsite draft submission.- Parameters:
portletId_
- The ID of a miniwebsite portlet.author_
- The username of the author of the submitted draft.message_
- Rejection message text. This parameter is reserved for future use, and should be set tonull
.- Returns:
- The local path to the file which contains the submitted miniwebsite draft body. The caller then has the option of deleting this content.
- Throws:
IllegalArgumentException
- if the portlet ID isnull
or corresponds to a non-miniwebsite portletInvalidPortletException
- if no portlet with the passed ID existsInvalidPortletTypeException
- if the miniwebsite portlet type does not exist (for example, if the type was never registered)ServiceException
- if any system-level error occurs
-
breakLock
String breakLock(Long portletId_) throws IllegalArgumentException, InvalidPortletTypeException, InvalidPortletException Deprecated.Break the lock on a given miniwebsite portlet. This should be used to cancel/delete a draft for a miniwebsite.- Parameters:
portletId_
- The ID of a locked miniwebsite portlet.- Returns:
- The local path to the file which contains the body of the miniwebsite portlet whose ID was passed. The caller then has the option of deleting this content.
- Throws:
IllegalArgumentException
- if the portlet ID corresponds to a non-miniwebsite portletInvalidPortletException
- if portlet ID isnull
or no portlet with the passed ID existsInvalidPortletTypeException
- if the miniwebsite portlet type does not exist (for example, if the type was never registered)ServiceException
- if any system-level error occurs
-
getRevisionHistory
MiniMetadata[] getRevisionHistory(Long portletId_) throws IllegalArgumentException, InvalidPortletTypeException, InvalidPortletException Deprecated.Get the revision history for a given miniwebsite portlet.- Parameters:
portletId_
- The ID of a miniwebsite portlet.- Returns:
MiniMetadata
objects containing information about each of the revisions of the miniwebsite.- Throws:
IllegalArgumentException
- if the portlet ID isnull
or corresponds to a non-miniwebsite portletInvalidPortletException
- if no portlet with the passed ID existsInvalidPortletTypeException
- if the miniwebsite portlet type does not exist (for example, if the type was never registered)ServiceException
- if any system-level error occurs
-
viewMini
MiniMetadata viewMini(Long portletId_, Integer revisionId_) throws IllegalArgumentException, InvalidPortletTypeException, InvalidPortletException Deprecated.View a version of a given miniwebsite portlet.- Parameters:
portletId_
- The ID of a miniwebsite portlet.revisionId_
- The ID of the miniwebsite version to retrieve.- Returns:
MiniMetadata
object containing information about the requested miniwebsite version.- Throws:
IllegalArgumentException
- if the portlet ID isnull
or corresponds to a non-miniwebsite portletInvalidPortletException
- if no portlet with the passed ID existsInvalidPortletTypeException
- if the miniwebsite portlet type does not exist (for example, if the type was never registered)ServiceException
- if any system-level error occurs
-
promoteToDraft
FileChange promoteToDraft(Long portletId_, Integer versionId_, String author_) throws IllegalArgumentException, InvalidPortletTypeException, InvalidPortletException Deprecated.Use a version of a given miniwebsite portlet to create a draft for a new version of the miniwebsite. Get the local path to a version of a miniwebsite, as well as the path to where a new draft for the miniwebsite should be created from that version.- Parameters:
portletId_
- The ID of a miniwebsite portlet.versionId_
- The ID of the miniwebsite version to retrieve.author_
- The username of the author of that miniwebsite version.- Returns:
FileChange
object containing: 1) the path to the file containing the requested miniwebsite version's body 2) the path to the file where the body of the new draft for the miniwebsite should be created. The body of the retrieved miniwebsite version should then be copied into the file for the new draft.- Throws:
IllegalArgumentException
- if the portlet ID isnull
or corresponds to a non-miniwebsite portletInvalidPortletException
- if no portlet with the passed ID existsInvalidPortletTypeException
- if the miniwebsite portlet type does not exist (for example, if the type was never registered)ServiceException
- if any system-level error occurs
-
getMiniApproval
boolean getMiniApproval(Long portletId_) throws IllegalArgumentException, InvalidPortletTypeException, InvalidPortletException Deprecated.Returns whether changes to a given miniwebsite portlet require approval by the channel administrator.- Parameters:
portletId_
- The ID of a miniwebsite portlet.- Returns:
true
if changes to the miniwebsite require approval andfalse
otherwise.- Throws:
IllegalArgumentException
- if the portlet ID isnull
or corresponds to a non-miniwebsite portletInvalidPortletException
- if no portlet with the passed ID existsInvalidPortletTypeException
- if the miniwebsite portlet type does not exist (for example, if the type was never registered)ServiceException
- if any system-level error occurs
-
changeMiniApproval
void changeMiniApproval(Long portletId_, boolean approvalRequired_) throws IllegalArgumentException, InvalidPortletTypeException, InvalidPortletException Deprecated.Set whether or not changes to a given miniwebsite portlet will require approval by the channel administrator.- Parameters:
portletId_
- The ID of a miniwebsite portlet.approvalRequired_
- Set totrue
if changes to the miniwebsite should require approval andfalse
otherwise.- Throws:
IllegalArgumentException
- if the portlet ID isnull
or corresponds to a non-miniwebsite portletInvalidPortletException
- if no portlet with the passed ID existsInvalidPortletTypeException
- if the miniwebsite portlet type does not exist (for example, if the type was never registered)ServiceException
- if any system-level error occurs
-
viewCurrentMini
MiniMetadata viewCurrentMini(Long portletId_) throws IllegalArgumentException, InvalidPortletTypeException, InvalidPortletException Deprecated.Get information about the latest version of a given miniwebsite portlet.- Parameters:
portletId_
- The ID of a miniwebsite portlet.- Returns:
MiniMetadata
object containing information about the latest miniwebsite version.- Throws:
IllegalArgumentException
- if the portlet ID corresponds to a non-miniwebsite portletInvalidPortletException
- if portlet ID is null or no portlet with the passed ID existsInvalidPortletTypeException
- if the miniwebsite portlet type does not exist (for example, if the type was never registered)ServiceException
- if any system-level error occurs
-
changeMwsPath
Deprecated.Modify the path where mini website content is stored for existing mini websites. This call does a "replace all" on the MWS content path of current mini websites. Should be used for migration only: pass the existing directory path as thesubstring_
and the new directory path as thereplacement_
.- Parameters:
substring_
- A substring of the path, every occurence of which should be replaced.replacement_
- The string with which every occurence ofsubstring_
should be replaced for all existing mini websites.- 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
-
getAllMiniFilenamesPaging
Deprecated.Gets the filename paths of all version (including prior) and drafts for all valid MiniWebSites- Parameters:
startPosition_
- the index into the collection of total results at which to start. Negative numbers are treated as zeros.batchSize_
- the number of results to return. UseConstants.COUNT_ALL
to return the entire collection, but this is STRONGLY discouraged.- Returns:
- a ResultPage where the results field is a string array of the filename paths of all version (including prior) and drafts for all valid MiniWebSites.
- Throws:
PrivilegeException
- if user does not have permissions to make this callServiceException
- if any system-level error occurs
-