Interface MiniMetadataService

All Superinterfaces:
com.appiancorp.services.ContextSensitiveService, Service

@Deprecated public interface MiniMetadataService extends com.appiancorp.services.ContextSensitiveService
Deprecated.
The Portal functionality will be removed in a future release. Use the Tempo Interface for similar functionality.
Defines methods for manipulating miniwebsite portlets.

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 Details

    • createMini$UPDATES

      static final boolean createMini$UPDATES
      Deprecated.
      See Also:
    • editMini$UPDATES

      static final boolean editMini$UPDATES
      Deprecated.
      See Also:
    • uneditMini$UPDATES

      static final boolean uneditMini$UPDATES
      Deprecated.
      See Also:
    • viewUnpublishedMinis$UPDATES

      static final boolean viewUnpublishedMinis$UPDATES
      Deprecated.
      See Also:
    • changeAuthor$UPDATES

      static final boolean changeAuthor$UPDATES
      Deprecated.
      See Also:
    • deleteDraftMini$UPDATES

      static final boolean deleteDraftMini$UPDATES
      Deprecated.
      See Also:
    • saveDraft$UPDATES

      static final boolean saveDraft$UPDATES
      Deprecated.
      See Also:
    • submitDraft$UPDATES

      static final boolean submitDraft$UPDATES
      Deprecated.
      See Also:
    • unsubmit$UPDATES

      static final boolean unsubmit$UPDATES
      Deprecated.
      See Also:
    • publishSubmitted$UPDATES

      static final boolean publishSubmitted$UPDATES
      Deprecated.
      See Also:
    • returnSubmitted$UPDATES

      static final boolean returnSubmitted$UPDATES
      Deprecated.
      See Also:
    • rejectSubmitted$UPDATES

      static final boolean rejectSubmitted$UPDATES
      Deprecated.
      See Also:
    • breakLock$UPDATES

      static final boolean breakLock$UPDATES
      Deprecated.
      See Also:
    • getRevisionHistory$UPDATES

      static final boolean getRevisionHistory$UPDATES
      Deprecated.
      See Also:
    • viewMini$UPDATES

      static final boolean viewMini$UPDATES
      Deprecated.
      See Also:
    • promoteToDraft$UPDATES

      static final boolean promoteToDraft$UPDATES
      Deprecated.
      See Also:
    • getMiniApproval$UPDATES

      static final boolean getMiniApproval$UPDATES
      Deprecated.
      See Also:
    • changeMiniApproval$UPDATES

      static final boolean changeMiniApproval$UPDATES
      Deprecated.
      See Also:
    • viewCurrentMini$UPDATES

      static final boolean viewCurrentMini$UPDATES
      Deprecated.
      See Also:
    • changeMwsPath$UPDATES

      static final boolean changeMwsPath$UPDATES
      Deprecated.
      See Also:
    • getApplicationName$UPDATES

      static final boolean getApplicationName$UPDATES
      Deprecated.
      See Also:
    • getWorkspace$UPDATES

      static final boolean getWorkspace$UPDATES
      Deprecated.
      See Also:
    • getAllMiniFilenamesPaging$UPDATES

      static final boolean getAllMiniFilenamesPaging$UPDATES
      Deprecated.
      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 portlet
      template_ - reserved for future use; should be set to null. Value is saved to the database but not used anywhere.
      isVersioned_ - Set to true to enable versioning for the miniwebsite (all revisions of the portlet will be saved). Set to false 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 portlet
      InvalidPortletException - if the portlet ID is null or no portlet with the passed ID exists
      InvalidPortletTypeException - if the miniwebsite portlet type does not exist (for example, if the type was never registered)
      ServiceException - if any system-level error occurs
    • editMini

      Deprecated.
      Lock a given miniwebsite portlet in order to edit it. No users other than author_ 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 is null or no portlet with the passed ID exists
      ServiceException - if any system-level error occurs
      IllegalArgumentException
    • uneditMini

      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 is null or corresponds to a non-miniwebsite portlet
      InvalidPortletException - if no portlet with the passed ID exists
      InvalidPortletTypeException - if the miniwebsite portlet type does not exist (for example, if the type was never registered)
      ServiceException - if any system-level error occurs
    • viewUnpublishedMinis

      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 is null or corresponds to a non-miniwebsite portlet
      InvalidPortletException - if no portlet with the passed ID exists
      InvalidPortletTypeException - 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 is null or corresponds to a non-miniwebsite portlet
      InvalidPortletException - if no portlet with the passed ID exists
      InvalidPortletTypeException - if the miniwebsite portlet type does not exist (for example, if the type was never registered)
      ServiceException - if any system-level error occurs
    • deleteDraftMini

      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 is null or corresponds to a non-miniwebsite portlet
      InvalidPortletException - if no portlet with the passed ID exists
      InvalidPortletTypeException - if the miniwebsite portlet type does not exist (for example, if the type was never registered)
      ServiceException - if any system-level error occurs
    • saveDraft

      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 portlet
      InvalidPortletException - if portlet ID is null or no portlet with the passed ID exists
      InvalidPortletTypeException - if the miniwebsite portlet type does not exist (for example, if the type was never registered)
      ServiceException - if any system-level error occurs
    • submitDraft

      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 portlet
      InvalidPortletException - if the portlet ID is null or no portlet with the passed ID exists
      InvalidPortletTypeException - if the miniwebsite portlet type does not exist (for example, if the type was never registered)
      ServiceException - if any system-level error occurs
    • unsubmit

      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 is null or corresponds to a non-miniwebsite portlet
      InvalidPortletException - if no portlet with the passed ID exists
      InvalidPortletTypeException - if the miniwebsite portlet type does not exist (for example, if the type was never registered)
      ServiceException - if any system-level error occurs
    • publishSubmitted

      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 is null or corresponds to a non-miniwebsite portlet
      InvalidPortletException - if no portlet with the passed ID exists
      InvalidPortletTypeException - 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 to null.
      Throws:
      IllegalArgumentException - if the portlet ID is null or corresponds to a non-miniwebsite portlet
      InvalidPortletException - if no portlet with the passed ID exists
      InvalidPortletTypeException - 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 to null.
      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 is null or corresponds to a non-miniwebsite portlet
      InvalidPortletException - if no portlet with the passed ID exists
      InvalidPortletTypeException - if the miniwebsite portlet type does not exist (for example, if the type was never registered)
      ServiceException - if any system-level error occurs
    • breakLock

      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 portlet
      InvalidPortletException - if portlet ID is null or no portlet with the passed ID exists
      InvalidPortletTypeException - if the miniwebsite portlet type does not exist (for example, if the type was never registered)
      ServiceException - if any system-level error occurs
    • getRevisionHistory

      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 is null or corresponds to a non-miniwebsite portlet
      InvalidPortletException - if no portlet with the passed ID exists
      InvalidPortletTypeException - if the miniwebsite portlet type does not exist (for example, if the type was never registered)
      ServiceException - if any system-level error occurs
    • viewMini

      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 is null or corresponds to a non-miniwebsite portlet
      InvalidPortletException - if no portlet with the passed ID exists
      InvalidPortletTypeException - if the miniwebsite portlet type does not exist (for example, if the type was never registered)
      ServiceException - if any system-level error occurs
    • promoteToDraft

      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 is null or corresponds to a non-miniwebsite portlet
      InvalidPortletException - if no portlet with the passed ID exists
      InvalidPortletTypeException - if the miniwebsite portlet type does not exist (for example, if the type was never registered)
      ServiceException - if any system-level error occurs
    • getMiniApproval

      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 and false otherwise.
      Throws:
      IllegalArgumentException - if the portlet ID is null or corresponds to a non-miniwebsite portlet
      InvalidPortletException - if no portlet with the passed ID exists
      InvalidPortletTypeException - 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 to true if changes to the miniwebsite should require approval and false otherwise.
      Throws:
      IllegalArgumentException - if the portlet ID is null or corresponds to a non-miniwebsite portlet
      InvalidPortletException - if no portlet with the passed ID exists
      InvalidPortletTypeException - if the miniwebsite portlet type does not exist (for example, if the type was never registered)
      ServiceException - if any system-level error occurs
    • viewCurrentMini

      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 portlet
      InvalidPortletException - if portlet ID is null or no portlet with the passed ID exists
      InvalidPortletTypeException - if the miniwebsite portlet type does not exist (for example, if the type was never registered)
      ServiceException - if any system-level error occurs
    • changeMwsPath

      void changeMwsPath(String substring_, String replacement_)
      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 the substring_ and the new directory path as the replacement_.
      Parameters:
      substring_ - A substring of the path, every occurence of which should be replaced.
      replacement_ - The string with which every occurence of substring_ 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
      Note: All usage statistics are in Bytes.
      Throws:
      ServiceException - if any system-level error occurs
    • getAllMiniFilenamesPaging

      ResultPage getAllMiniFilenamesPaging(int startPosition_, int batchSize_) throws PrivilegeException
      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. Use Constants.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 call
      ServiceException - if any system-level error occurs