Interface PageService
- All Superinterfaces:
com.appiancorp.services.ContextSensitiveService
,Service
Portal pages have a "zone count" attribute which specifies the number of zones the page has for placing portlets. The portlets contained in a portal page can be Deactivated or Deleted; deactivating a portlet just hides it from the page, while deleting a portlet removes it permanently along with all its content (for shared portlets, all instances of the portlet on other pages will also be removed).
Pages can be private or public. The security for private pages is defined as follows:
- a Portal Administrator can Delete, Edit, Approve, View, Target, Rename, Change Template, and Categorize the page (all the possible opertions)
- a Page Creator can Delete, Edit, View, Target, Rename, Change Template, and Categorize the page (same as Portal Administrator, but can't Approve)
- a Page Administrator can Delete, Edit, View, Target, Rename, Change Template, and Categorize the page (same as Page Creator)
- a Page Editor can View and Edit the page
- a Page Approver can View and Approve the page
- a Page Viewer can View the page
- an Anonymous User or Basic User with no explicit privileges (such as Page Admin/Editor/Approver/Viewer) cannot perform any operations
Portlets within portal pages have an additional separate security map defined as follows:
- a Portal Administrator, Portlet Creator, or Portlet Administrator can Delete, Edit, View, Rename, Change Container, and Target the portlet (all the possible opertions)
- a Portlet Editor can View and Edit the portlet
- a Portlet Viewer can View the portlet
- an Anonymous User or Basic User with no explicit privileges (such as Portlet Admin/Editor/Approver/Viewer) cannot perform any operations
When a user edits a page, the page is locked and a draft is created. Unless a user has the privileges to break the lock on the page, he/she will not be able to edit the page. If the page options are set such that modifications to the page require approval, the draft first has to be approved at which point it is published. Once a draft is published, it will be visible to page viewers.
Contributions are a way to log and keep track of all the content additions
made by users. When a user submits new/updated content, or removes content,
addContribution(com.appiancorp.suiteapi.portal.Contribution)
/updateContribution(com.appiancorp.suiteapi.portal.Contribution)
or
deleteContribution(com.appiancorp.suiteapi.portal.Contribution)
should be called to log the event. This should
be done for modifications of all content (not just pages but all Appian Type
objects such as forums, documents, etc). The
getContributionsForTypePaging(com.appiancorp.suiteapi.portal.Contribution, int, int, java.lang.Integer, java.lang.Integer)
method can then be used later to
retrieve the logged user content modifications.
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 Integer
Deprecated.A constant representing the deactivation of a portletstatic final Integer
Deprecated.A constant representing the deletion of a portletstatic 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.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 TypeMethodDescriptionvoid
addContribution
(Contribution contribution_) Deprecated.This functionality is no longer supported and will be removed in the next release.void
addPortlet
(Long pageId_, Long portletId_, Integer zone_, int index_) Deprecated.Attempts to lock the current draft of the specified page and add a portlet.void
addPortlets
(Long pageId_, Long[] portletIds_, Integer[] zones_, int[] indices_) Deprecated.Attempts to lock the current draft of the specified page and add portlets.void
approveDraft
(Long pageId_) Deprecated.Applies the changes made to the draft of the specified page, and clears the draft.void
changePageDescription
(Long pageId_, String newDescription_) Deprecated.Changes the description of the specified page.void
changePageTemplate
(Long pageId_, String newTemplateName_, int newZoneCount_) Deprecated.Attempts to lock the current draft for the specified page (i.e., put the page into draft state) and changes the template in the draft.createPage
(Page page_) Deprecated.Creates a page using the attributes specified in the passed object.Long[]
createPages
(Page[] pages_) Deprecated.Creates pages in bulk using the attributes specified in the passed objects.void
deleteContribution
(Contribution contribution_) Deprecated.This functionality is no longer supported and will be removed in the next release.void
deleteDraft
(Long pageId_) Deprecated.Cancels the changes made to the draft for the specified page, and clears the draft.void
deletePage
(Long pageId_) Deprecated.Deletes the specified page.int
getAccessLevelForPage
(Long pageId_) Deprecated.Gets the current user's access level for the given page.int[]
getAccessLevelForPages
(Long[] pageIds_) Deprecated.Gets the current user's access levels for the given pages.Deprecated.This functionality is no longer supported and will be removed in the next release.getContributionsForType
(Contribution contribution_) Deprecated.This functionality is no longer supported and will be removed in the next release.getContributionsForTypePaging
(Contribution contribution_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Deprecated.This functionality is no longer supported and will be removed in the next release.Deprecated.Retrieves the draft version of the specified page.int
Deprecated.This functionality is no longer supported and will be removed in the next release.Deprecated.Gets the specified portal page.Page[]
getPagesList
(Long[] pageIds_) Deprecated.Gets the specified portal pages, returning the valid results even if all the results cannot be retrieved (for instance, if some of the pages corresponding to the IDs no longer exist).getPagesPaging
(Long[] pageIds_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Deprecated.Gets the specified portal pages as an array ofPage
objects in aResultPage
.getRoleMapForPage
(Long pageId_) Deprecated.Get the role map of a page, specifiying the administrators, editors and viewers of the page.void
movePortlet
(Long pageId_, Long portletId_, Integer zone_, int index_) Deprecated.Attempts to lock the current draft of the specified page and move a portlet within the page.Deprecated.Retrieves the pending draft if present or the published page, without setting the draft owner.void
publishDraft
(Long pageId_) Deprecated.Submits the current draft of the specified page for publication, and releases any lock on the draft.void
publishDrafts
(Long[] pageIds_) Deprecated.Submits the current drafts of the specified pages for publication, and releases any lock on the drafts.void
removePortlet
(Long pageId_, Long portletId_, Integer action_) Deprecated.Attempts to lock the current draft of the specified page and remove a portlet.void
renamePage
(Long pageId_, String newName_) Deprecated.Renames the specified page to the specified name.void
returnDraft
(Long pageId_) Deprecated.Returns a submitted page back to a draft state (Page.STATE_NEW_DRAFT
orPage.STATE_DRAFT
).void
setIsPagePublic
(Long pageId_, boolean isPublic_) Deprecated.Changes whether the page is publicly viewable.void
setMaximumContributions
(int size_) Deprecated.This functionality is no longer supported and will be removed in the next release.void
setPageApproval
(Long pageId_, boolean approvalRequired_) Deprecated.Sets whether approval is required for page modifications.void
setPageCategory
(Long pageId_, Long categoryId_) Deprecated.Changes the category for the specified page.void
setPageDataContextType
(Long pageId, Long dataContextType) Deprecated.Sets the type of data that will be sent to the page when it is requested.void
setPageUrl
(Long pageId_, String url_) Deprecated.Changes the URL for the specified custom page.void
setRoleMapForPage
(Long pageId_, PageRoleMap map_) Deprecated.Set the role map for a pageDeprecated.Retrieves the draft version of the specified page and locks it for editing.void
unlockDraft
(Long pageId_) Deprecated.Releases the lock on the draft for the specified page, if the current user owns the draft.void
updateContribution
(Contribution contribution_) Deprecated.This functionality is no longer supported and will be removed in the next release.void
updatePage
(Page page_) Deprecated.Updates a page using the attributes specified in the passed object.void
updatePages
(Page[] pages_) Deprecated.Updates pages in bulk using the attributes specified in the passed objects.boolean
validateTypedValues
(TypedValue[] typedValues) Deprecated.Validates given TypedValues.Methods inherited from interface com.appiancorp.services.ContextSensitiveService
setServiceContext
-
Field Details
-
DELETE_PORTLET
Deprecated.A constant representing the deletion of a portlet -
DEACTIVATE_PORTLET
Deprecated.A constant representing the deactivation of a portlet -
getPage$UPDATES
static final boolean getPage$UPDATESDeprecated.- See Also:
-
getPages$UPDATES
static final boolean getPages$UPDATESDeprecated.- See Also:
-
createPage$UPDATES
static final boolean createPage$UPDATESDeprecated.- See Also:
-
createPages$UPDATES
static final boolean createPages$UPDATESDeprecated.- See Also:
-
updatePage$UPDATES
static final boolean updatePage$UPDATESDeprecated.- See Also:
-
updatePages$UPDATES
static final boolean updatePages$UPDATESDeprecated.- See Also:
-
deletePage$UPDATES
static final boolean deletePage$UPDATESDeprecated.- See Also:
-
getAccessLevelForPage$UPDATES
static final boolean getAccessLevelForPage$UPDATESDeprecated.- See Also:
-
renamePage$UPDATES
static final boolean renamePage$UPDATESDeprecated.- See Also:
-
changePageDescription$UPDATES
static final boolean changePageDescription$UPDATESDeprecated.- See Also:
-
getDraft$UPDATES
static final boolean getDraft$UPDATESDeprecated.- See Also:
-
peekDraft$UPDATES
static final boolean peekDraft$UPDATESDeprecated.- See Also:
-
takeDraft$UPDATES
static final boolean takeDraft$UPDATESDeprecated.- See Also:
-
approveDraft$UPDATES
static final boolean approveDraft$UPDATESDeprecated.- See Also:
-
deleteDraft$UPDATES
static final boolean deleteDraft$UPDATESDeprecated.- See Also:
-
publishDraft$UPDATES
static final boolean publishDraft$UPDATESDeprecated.- See Also:
-
publishDrafts$UPDATES
static final boolean publishDrafts$UPDATESDeprecated.- See Also:
-
returnDraft$UPDATES
static final boolean returnDraft$UPDATESDeprecated.- See Also:
-
unlockDraft$UPDATES
static final boolean unlockDraft$UPDATESDeprecated.- See Also:
-
changePageTemplate$UPDATES
static final boolean changePageTemplate$UPDATESDeprecated.- See Also:
-
setPageCategory$UPDATES
static final boolean setPageCategory$UPDATESDeprecated.- See Also:
-
setPageUrl$UPDATES
static final boolean setPageUrl$UPDATESDeprecated.- See Also:
-
setPageApproval$UPDATES
static final boolean setPageApproval$UPDATESDeprecated.- See Also:
-
setIsPagePublic$UPDATES
static final boolean setIsPagePublic$UPDATESDeprecated.- See Also:
-
addPortlet$UPDATES
static final boolean addPortlet$UPDATESDeprecated.- See Also:
-
removePortlet$UPDATES
static final boolean removePortlet$UPDATESDeprecated.- See Also:
-
movePortlet$UPDATES
static final boolean movePortlet$UPDATESDeprecated.- See Also:
-
getRoleMapForPage$UPDATES
static final boolean getRoleMapForPage$UPDATESDeprecated.- See Also:
-
setRoleMapForPage$UPDATES
static final boolean setRoleMapForPage$UPDATESDeprecated.- See Also:
-
addContribution$UPDATES
static final boolean addContribution$UPDATESDeprecated.- See Also:
-
updateContribution$UPDATES
static final boolean updateContribution$UPDATESDeprecated.- See Also:
-
deleteContribution$UPDATES
static final boolean deleteContribution$UPDATESDeprecated.- See Also:
-
getContributions$UPDATES
static final boolean getContributions$UPDATESDeprecated.- See Also:
-
getContributionsForType$UPDATES
static final boolean getContributionsForType$UPDATESDeprecated.- See Also:
-
getContributionsForTypePaging$UPDATES
static final boolean getContributionsForTypePaging$UPDATESDeprecated.- See Also:
-
setMaximumContributions$UPDATES
static final boolean setMaximumContributions$UPDATESDeprecated.- See Also:
-
getMaximumContributions$UPDATES
static final boolean getMaximumContributions$UPDATESDeprecated.- See Also:
-
getAccessLevelForPages$UPDATES
static final boolean getAccessLevelForPages$UPDATESDeprecated.- See Also:
-
addPortlets$UPDATES
static final boolean addPortlets$UPDATESDeprecated.- See Also:
-
getPagesPaging$UPDATES
static final boolean getPagesPaging$UPDATESDeprecated.- See Also:
-
getPagesList$UPDATES
static final boolean getPagesList$UPDATESDeprecated.- See Also:
-
validateTypedValues$UPDATES
static final boolean validateTypedValues$UPDATESDeprecated.- See Also:
-
setPageDataContextType$UPDATES
static final boolean setPageDataContextType$UPDATESDeprecated.- See Also:
-
-
Method Details
-
getPage
Page getPage(Long pageId_) throws PrivilegeException, InvalidPageException, InvalidAnonymousUserException, InvalidUserException Deprecated.Gets the specified portal page. If a published version does not exist for the page, the draft is returned. If a submitted draft exists for the page, the draft is returned with the state set asPage.STATE_DRAFT
. If a published version exists for the page, the published version is returned.- Parameters:
pageId_
- The ID of the page to retrieve.- Returns:
- the requested page.
- Throws:
PrivilegeException
- if the current user is not authorized to view the pageInvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalid; this exception is not thrown if the user is deactivated, so the caller should validate that the user is active before calling (known issue)InvalidPageException
- if the specified page does not existServiceException
- if any system-level error occurs
-
getPages
@Deprecated Page[] getPages(Long[] pageIds_) throws PrivilegeException, InvalidPageException, InvalidAnonymousUserException, InvalidUserException, NullPointerException Gets the specified portal pages.null
is returned for each page that does not exist, or that the user is not authorized to view. Also seegetPage(Long)
- Parameters:
pageIds_
- the IDs of the portal pages to retrieve.- Returns:
- the requested pages. An array item is set to
null
for each page that does not exist, or that the current user does not have permission to view. - Throws:
PrivilegeException
- if the current user is anonymous and tries to view pages that anonymous users have no permission to accessInvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidInvalidPageException
- if any of the specified pages do not existServiceException
- if any system-level error occursNullPointerException
- if the passedpageIds_
array or any of its elements isnull
-
createPage
Long createPage(Page page_) throws PrivilegeException, InvalidAnonymousUserException, InvalidUserException, InvalidCategoryException, DuplicateUuidException Deprecated.Creates a page using the attributes specified in the passed object. If agroup
attribute is specified, the current user must be an administrator of that group; creates the two way association between the group and the new page. The new page's state will bePage.STATE_NEW_DRAFT
; only the creator and a portal administrator will be able to view/modify the page. The user making this call becomes the creator of the page.- Parameters:
page_
- The page to create. The following fields are the minimum required attributes that must not benull
to successfully create the page:name
,template
(a tiles reference for the template JSP),zoneCount
(seePage.setZoneCount(int)
). The following attributes are optional:description
,category
,approvalRequired
,group
,public
,type
, andurl
(note: url is applicable only for page typePageInfo.TYPE_CUSTOM
). For the allowed values fortype
seePageInfo.TYPE_XXX
constants. All other attributes are ignored. This is the same whether or not the page is a custom page - attributes that don't make sense for a custom page (such aszoneCount
) should just be given valid dummy values.- Returns:
- The ID of the created page.
- Throws:
PrivilegeException
- if the current user is not allowed to create the specified pageInvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidIllegalArgumentException
- if an invalid name or template was specified; this exception is not thrown if an invalidzoneCount
is given, therefore the caller should validate thatzoneCount
> 0 and < 255InvalidCategoryException
- if the category ID was specified (is non-null
), but does not correspond to a valid categoryNullPointerException
- if the passedpage_
object isnull
ServiceException
- if any system-level error occursDuplicateUuidException
- if the UUID of the page already exists
-
createPages
Long[] createPages(Page[] pages_) throws PrivilegeException, InvalidAnonymousUserException, InvalidUserException, InvalidCategoryException, DuplicateUuidException Deprecated.Creates pages in bulk using the attributes specified in the passed objects. SeecreatePage(Page)
.- Parameters:
pages_
- List of the pages to create. SeecreatePage(Page)
- Returns:
- The IDs of the created pages.
- Throws:
InvalidAnonymousUserException
- If the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- If the user calling this method is invalidIllegalArgumentException
- if an invalid zone count, name or template was specified for any of the pagesPrivilegeException
- If the current user is not allowed to create any of the pagesInvalidCategoryException
- If the category ID was specified (is non-null
) for any of the pages, but does not correspond to a valid categoryNullPointerException
- If the passedpages_
array or any of its elements isnull
DuplicateUuidException
- if the UUID of any of the pages already exists or if the same UUID is passed in for several pagesServiceException
- If any system-level error occurs
-
updatePage
void updatePage(Page page_) throws InvalidAnonymousUserException, InvalidUserException, PrivilegeException, InvalidCategoryException, InvalidPageException Deprecated.Updates a page using the attributes specified in the passed object.
This method does not create a new draft. It requires the current user to be an administrator of the group, if a
group
attribute is specified. This creates a two way association between the group and the page. Anull
value for group dissociates an existing two way association.To update some of the ignored attributes of the page use the following:
url
- usesetPageUrl(Long, String)
instead.template
andzoneCount
- usechangePageTemplate(Long, String, int)
instead.rolemap
- usesetRoleMapForPage(Long, PageRoleMap)
instead.portlets
- useaddPortlets(Long, Long[], Integer[], int[])
andremovePortlet(Long, Long, Integer)
instead.
- Parameters:
page_
- the page to update. The following fields are the minimum required attributes that must not benull
to successfully update the page:id
,name
andtemplate
(a tiles reference for the template JSP, although it's ignored).
The following attributes are optional:description
,category
,group
,public
. All other attributes are ignored. This is the same whether or not the page is a custom page - attributes that don't make sense for a custom page (such aszoneCount
) should just be given valid dummy values.- Throws:
InvalidAnonymousUserException
- If an anonymousUser
attempts to make this call.InvalidUserException
- If the currentUser
does not exist.PrivilegeException
- If the currentUser
is not an administrator of theGroup
specified in thegroup
field of thePage
or if the current user does not have sufficient privileges to update thePage
.InvalidCategoryException
- not thrown, instead thecategory
is reset to null if an invalid category is given (known issue)NullPointerException
- If the givenpage_
is null.IllegalArgumentException
- if either thename
ortemplate
field is null.InvalidPageException
- If thePage
given by theid
field does not exist.
-
updatePages
void updatePages(Page[] pages_) throws InvalidAnonymousUserException, InvalidUserException, PrivilegeException, InvalidCategoryException, InvalidPageException Deprecated.Updates pages in bulk using the attributes specified in the passed objects. SeeupdatePage(Page)
.- Parameters:
pages_
- The attributes of each page to update. SeeupdatePage(Page)
- Throws:
InvalidAnonymousUserException
- If an anonymousUser
attempts to make this call.InvalidUserException
- If the currentUser
does not exist.PrivilegeException
- If the currentUser
is not an administrator of any one of theGroup
objects specified in thegroup
field of thePage
or if the current user does not have sufficient privileges to update any one of thePage
objects.InvalidCategoryException
- If at least one of the givencategory
fields is invalid.NullPointerException
- If any of thePage
objects is null.IllegalArgumentException
- If either thename
or template field in any of the givenPage
objects is null.InvalidPageException
- If any of thePage
objects given by theid
field does not exist.
-
deletePage
void deletePage(Long pageId_) throws InvalidAnonymousUserException, InvalidUserException, PrivilegeException, InvalidPageException Deprecated.Deletes the specified page.- Parameters:
pageId_
- the ID of the page to delete.- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalid; this exception is not thrown if a deactivated user is used to call this method, so the caller should validate that the user is not deactivated before calling (known issue)PrivilegeException
- if the current user is not allowed to delete the pageInvalidPageException
- if the page with the specified ID does not existServiceException
- if any system-level error occurs
-
getAccessLevelForPage
int getAccessLevelForPage(Long pageId_) throws InvalidAnonymousUserException, InvalidUserException, InvalidPageException Deprecated.Gets the current user's access level for the given page.- Parameters:
pageId_
- the ID of the page for which the user's access level is to be returned.- Returns:
- the access level of the current user for the specified page. This
is one of the
PAGE_ACCESS_LEVEL_XXX
constants inPageInfo
- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidInvalidPageException
- if the page with the specified ID does not existServiceException
- if any system-level error occurs
-
renamePage
void renamePage(Long pageId_, String newName_) throws InvalidAnonymousUserException, InvalidUserException, PrivilegeException, InvalidPageException Deprecated.Renames the specified page to the specified name.- Parameters:
pageId_
- the ID of the page to rename.newName_
- the new name of the page.- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not allowed to rename the pageInvalidPageException
- if the page with the specified ID does not existServiceException
- if any system-level error occurs
-
changePageDescription
void changePageDescription(Long pageId_, String newDescription_) throws InvalidAnonymousUserException, InvalidUserException, PrivilegeException, InvalidPageException Deprecated.Changes the description of the specified page.- Parameters:
pageId_
- the ID of the page whose description should be changed.newDescription_
- the new description for the page.- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not allowed to change the page descriptionInvalidPageException
- if the page with the specified ID does not existServiceException
- if any system-level error occurs
-
getDraft
Page getDraft(Long pageId_) throws PrivilegeException, InvalidPageException, InvalidAnonymousUserException, InvalidUserException Deprecated.Retrieves the draft version of the specified page.- If a draft does not exist for the page, the published version is returned and the page is locked by the current user (no draft is created).
- If a draft exists and it is not locked by another user, the current draft is returned and is locked by the current user.
- If a draft exists and it is locked by another user, the current draft is
returned but no changes will be allowed (the state will be
Page.STATE_LOCKED
).
- Parameters:
pageId_
- the ID of the page whose draft should be returned.- Returns:
- the requested page draft.
- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not allowed to view the page draftInvalidPageException
- if the page with the specified ID does not existServiceException
- if any system-level error occurs- See Also:
-
peekDraft
Page peekDraft(Long pageId_) throws PrivilegeException, InvalidPageException, InvalidAnonymousUserException, InvalidUserException Deprecated.Retrieves the pending draft if present or the published page, without setting the draft owner.- If a draft does not exist for the page, the published version is returned.
- If a draft exists and it is not locked by another user, the current draft is returned without setting the draft owner.
- If a draft exists and it is locked by another user, the current draft is
returned but no changes will be allowed (the state will be
Page.STATE_LOCKED
).
- Parameters:
pageId_
- the ID of the page whose draft should be returned.- Returns:
- the requested page draft.
- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not allowed to view the page draftInvalidPageException
- if the page with the specified ID does not exist
-
takeDraft
Page takeDraft(Long pageId_) throws PrivilegeException, InvalidPageException, InvalidAnonymousUserException, InvalidUserException Deprecated.Retrieves the draft version of the specified page and locks it for editing.- If a draft does not exist for the page, the published version is returned and the page is locked by the current user (no draft is created).
- If a draft exists and it is not locked by another user, the current draft is returned and the page is locked by the current user.
- If a draft exists and it is locked by another user, the current draft is returned and the lock is reassigned to the current user.
- Parameters:
pageId_
- the ID of the page whose draft should be returned.- Returns:
- the requested page draft.
- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not allowed to view and lock the draftInvalidPageException
- if the page with the specified ID does not existServiceException
- if any system-level error occurs- See Also:
-
approveDraft
void approveDraft(Long pageId_) throws InvalidAnonymousUserException, InvalidUserException, PrivilegeException, InvalidStateException, InvalidPageException Deprecated.Applies the changes made to the draft of the specified page, and clears the draft.- Parameters:
pageId_
- the ID of the page for which the draft should be approved.- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not allowed to approve the pageInvalidStateException
- if a draft does not exist for the specified pageInvalidPageException
- if the page with the specified ID does not existServiceException
- if any system-level error occurs
-
deleteDraft
void deleteDraft(Long pageId_) throws InvalidAnonymousUserException, InvalidUserException, PrivilegeException, LockException, InvalidPageException, NullPointerException, InvalidStateException Deprecated.Cancels the changes made to the draft for the specified page, and clears the draft. For new pages (never published), removes all portlets and puts the page into thePage.STATE_NEW_DRAFT
state. Only page admins and the user who originally created the draft can delete the draft.- Parameters:
pageId_
- the id of the page for which the draft should be deleted.- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not allowed to delete the draftLockException
- if the draft is locked by another userInvalidPageException
- if the page with the specified ID does not existInvalidStateException
- if the page has no draftNullPointerException
- if the argument isnull
ServiceException
- if any system-level error occurs
-
publishDraft
void publishDraft(Long pageId_) throws InvalidAnonymousUserException, InvalidUserException, InvalidStateException, PrivilegeException, InvalidPageException Deprecated.Submits the current draft of the specified page for publication, and releases any lock on the draft. If approval is required, the page will only be published afterapproveDraft(java.lang.Long)
is called, otherwise the page is published immediately. It associates the page with the group (group->page) if there was a group associated with the page (page->group).If a System Administrator user calls this method on a page that requires approval, the
Page
will enter thePage.STATE_PUBLISHED
state even if that user is not a member of Portal Administrators.- Parameters:
pageId_
- the ID of the page for which the draft should be published.- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidInvalidStateException
- if a draft does not exist for the specified pagePrivilegeException
- if the current user is not allowed to publish the pageInvalidPageException
- if the page with the specified ID does not existServiceException
- if any system-level error occurs
-
publishDrafts
void publishDrafts(Long[] pageIds_) throws InvalidAnonymousUserException, InvalidUserException, InvalidStateException, PrivilegeException, InvalidPageException Deprecated.Submits the current drafts of the specified pages for publication, and releases any lock on the drafts. SeeupdatePage(Page)
.- Parameters:
pageIds_
- the IDs of the pages for which the drafts should be published.- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidInvalidStateException
- if a draft does not exist for any of the specified pagesPrivilegeException
- if the current user is not allowed publish the pagesInvalidPageException
- if any of the IDs does not correspond to a valid pageServiceException
- if any system-level error occurs
-
returnDraft
void returnDraft(Long pageId_) throws InvalidAnonymousUserException, InvalidUserException, PrivilegeException, InvalidStateException, InvalidPageException, NullPointerException Deprecated.Returns a submitted page back to a draft state (Page.STATE_NEW_DRAFT
orPage.STATE_DRAFT
).- Parameters:
pageId_
- the id of the page which should be returned to a draft.- Throws:
InvalidStateException
- if the page state is notPage.STATE_NEW_SUBMITTED
orPage.STATE_SUBMITTED
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not an approver of the pageInvalidPageException
- if the page with the specified ID does not existServiceException
- if any system-level error occursNullPointerException
- if the passed page id isnull
-
unlockDraft
Deprecated.Releases the lock on the draft for the specified page, if the current user owns the draft.- Parameters:
pageId_
- the id of the page for which the draft lock should be released.- Throws:
LockException
- if the current user does not own the draftInvalidPageException
- if the page with the specified ID does not existServiceException
- if any system-level error occurs
-
changePageTemplate
void changePageTemplate(Long pageId_, String newTemplateName_, int newZoneCount_) throws InvalidAnonymousUserException, InvalidUserException, PrivilegeException, LockException, IllegalArgumentException, InvalidPageException, NullPointerException Deprecated.Attempts to lock the current draft for the specified page (i.e., put the page into draft state) and changes the template in the draft.- Parameters:
pageId_
- The ID of the page for which the template should be changed.newTemplateName_
- The name of the new template, which should be a tiles reference.newZoneCount_
- The number of zones that can contain portlets. SeePage.getZoneCount()
.- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- If the user calling this method is invalidPrivilegeException
- If the current user is not allowed to modify the pageLockException
- If the draft is locked and the current user does not own the draftIllegalArgumentException
- If an invalid zone count is usedInvalidPageException
- If the page with the specified ID does not existNullPointerException
- If any argument isnull
.ServiceException
- If any system-level error occurs- See Also:
-
setPageCategory
void setPageCategory(Long pageId_, Long categoryId_) throws InvalidAnonymousUserException, InvalidUserException, PrivilegeException, InvalidCategoryException, InvalidPageException Deprecated.Changes the category for the specified page.- Parameters:
pageId_
- the ID of the page for which the category should be set.categoryId_
- the ID of the category to which to add the page.- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not allowed to set the category for the pageInvalidPageException
- if the page with the specified ID does not existInvalidCategoryException
- if no category with the specified ID existsServiceException
- if any system-level error occurs
-
setPageUrl
void setPageUrl(Long pageId_, String url_) throws InvalidPageException, InvalidOperationException, PrivilegeException Deprecated.Changes the URL for the specified custom page. This does not change the state of the page.- Parameters:
pageId_
- the ID of the page for which the URL should be set.url_
- the new URL for the page.- Throws:
InvalidPageException
- if no page with the specified ID existsInvalidOperationException
- if the page is not a custom pagePrivilegeException
- if the current user is not allowed to change the URL for the page
-
setPageApproval
void setPageApproval(Long pageId_, boolean approvalRequired_) throws InvalidAnonymousUserException, InvalidUserException, PrivilegeException, InvalidPageException Deprecated.Sets whether approval is required for page modifications. Automatically approves any pending submissions if the approval is changed fromtrue
tofalse
.- Parameters:
pageId_
- the ID of the page for which the approval should be set.approvalRequired_
- specifies whether approval will be required for page modifications.- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not allowed to change the approval setting for the pageInvalidPageException
- if no page with the specified ID existsServiceException
- if any system-level error occurs
-
setIsPagePublic
void setIsPagePublic(Long pageId_, boolean isPublic_) throws InvalidAnonymousUserException, InvalidUserException, PrivilegeException, InvalidPageException Deprecated.Changes whether the page is publicly viewable.- Parameters:
pageId_
- the ID of the page for which the viewable setting should be changed.isPublic_
- specifies whether the page will be publicly viewable.- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not allowed to change the viewable setting for the pageInvalidPageException
- if no page with the specified ID existsServiceException
- if any system-level error occurs
-
addPortlet
void addPortlet(Long pageId_, Long portletId_, Integer zone_, int index_) throws InvalidAnonymousUserException, InvalidUserException, PrivilegeException, PortletSharingException, DuplicatePortletException, InvalidPageException, InvalidPortletException, InvalidZoneException, LockException, NullPointerException Deprecated.Attempts to lock the current draft of the specified page and add a portlet.- Parameters:
pageId_
- the ID of the page to which the portlet should be added.portletId_
- the ID of the portlet to add to the page.zone_
- Specifies which zone will contain the portlet. The zone identifies which column the portlet should be placed into, with the indexing starting at 0 (left-most column).index_
- Specifies the position of the portlet within the zone, with the indexing starting at 0 (top-most position).- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not allowed to modify the pagePortletSharingException
- if the specified portlet is non-shareable, and is already on another pageDuplicatePortletException
- if the specified portlet already exists on the draftInvalidPageException
- if no page with the specified ID existsInvalidPortletException
- if no portlet with the specified ID existsInvalidZoneException
- if the specified zone does not existLockException
- if the current user does not own the draftServiceException
- if any system-level error occursNullPointerException
- if any argument is null
-
removePortlet
void removePortlet(Long pageId_, Long portletId_, Integer action_) throws InvalidAnonymousUserException, InvalidUserException, PrivilegeException, LockException, InvalidPageException, InvalidPortletException Deprecated.Attempts to lock the current draft of the specified page and remove a portlet. If the portlet is not shareable and it is not on the published version (if any) of the page, the portlet itself is also deleted from the database. If the portlet is not shareable but is on the published version of the page, then the portlet itself will be deleted when the draft version of the page becomes the published version.- Parameters:
pageId_
- the ID of the page from which the portlet should be removed.portletId_
- the ID of the portlet to remove.action_
- The action to take (DELETE_PORTLET
orDEACTIVATE_PORTLET
).- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not allowed to remove the portletLockException
- if the current user does not own the page draftInvalidPageException
- if no page with the specified ID existsInvalidPortletException
- if no portlet with the specified ID existsServiceException
- if any system-level error occurs
-
movePortlet
void movePortlet(Long pageId_, Long portletId_, Integer zone_, int index_) throws InvalidAnonymousUserException, InvalidUserException, PrivilegeException, LockException, InvalidZoneException, InvalidPageException, InvalidPortletException, NullPointerException Deprecated.Attempts to lock the current draft of the specified page and move a portlet within the page.- Parameters:
pageId_
- the ID of the page in which the portlet should be moved.portletId_
- the ID of the portlet to move.zone_
- specifies the new zone that will contain the portlet. The zone identifies which column the portlet should be placed into, with the indexing starting at 0 (left-most column).index_
- specifies the position of the portlet within the zone, with the indexing starting at 0 (top-most position).- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not allowed to modify the pageLockException
- if the current user does not own the page draftInvalidZoneException
- if the specified zone does not existInvalidPageException
- if no page with the specified ID existsInvalidPortletException
- if no portlet with the specified ID existsServiceException
- if any system-level error occursNullPointerException
- if any argument is null
-
getRoleMapForPage
Deprecated.Get the role map of a page, specifiying the administrators, editors and viewers of the page.- Parameters:
pageId_
- the ID of the page.- Returns:
- the page rolemap.
- Throws:
PrivilegeException
- if the current user is not allowed to view the page rolemapInvalidPageException
- if no page with the specified ID existsServiceException
- if any system-level error occurs- See Also:
-
setRoleMapForPage
void setRoleMapForPage(Long pageId_, PageRoleMap map_) throws InvalidAnonymousUserException, InvalidUserException, PrivilegeException, InvalidPageException, NullPointerException Deprecated.Set the role map for a page- Parameters:
pageId_
- the ID of the page.map_
- the new rolemap of the page.- Throws:
InvalidAnonymousUserException
- if the current user is anonymous or the anonymous user is in the rolemap, but anonymous access has not been enabled.InvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not allowed to set the rolemap for the pageInvalidPageException
- if no page with the specified ID existsNullPointerException
- if any argument is nullServiceException
- if any system-level error occurs- See Also:
-
addContribution
Deprecated.This functionality is no longer supported and will be removed in the next release.Adds a new contribution. User contributions can be logged with this method for any Appian Object that is supported inLocalObject
. Currently contributions are logged when a user creates or edits a message, thread or page and when the user uploads a document.- Parameters:
contribution_
- the contribution to add. Thetype
,id
, andauthor
fields should be set. Thetimestamp
will be set by the system.- Throws:
ServiceException
- if any system-level error occursNullPointerException
- ifcontribution_
is null- See Also:
-
updateContribution
Deprecated.This functionality is no longer supported and will be removed in the next release.Updates a contribution. A user contribution can be logged with this method for any Appian Object that is supported inLocalObject
. Currently contributions are logged when a user creates or edits a message, thread or page and when the user uploads a document.- Parameters:
contribution_
- the contribution to update. Thetype
,id
, andauthor
fields should be set. Thetimestamp
will be set by the system.- Throws:
ServiceException
- if any system-level error occursNullPointerException
- ifcontribution_
is null- See Also:
-
deleteContribution
Deprecated.This functionality is no longer supported and will be removed in the next release.Deletes a contribution.- Parameters:
contribution_
- the contribution to delete. Thetype
andid
fields should be set.- Throws:
NullPointerException
- ifcontribution_
is nullServiceException
- if any system-level error occurs
-
getContributions
Deprecated.This functionality is no longer supported and will be removed in the next release.Gets the current user's contributions.- Returns:
- the contributions of the current user.
- Throws:
ServiceException
- if any system-level error occurs
-
getContributionsForType
Deprecated.This functionality is no longer supported and will be removed in the next release.Gets the current user's contributions of a certain type; the number of contributions returned is limited to a pre-defined maximum which can be retrieved usinggetMaximumContributions()
and set to a new value usingsetMaximumContributions(int)
. To retrieve the current user's authored threads set theauthor
field of the passedcontribution_
toContribution.AUTHOR_ON
. To retrieve the threads in which the current user has participated set theauthor
field of the passedcontribution_
toContribution.AUTHOR_OFF
. For contributions other than threads, theauthor
field reflects whether the user created (Contribution.AUTHOR_ON
) or updated (Contribution.AUTHOR_OFF
) the contribution.- Parameters:
contribution_
- aContribution
object whosetype
andauthor
should be set to determine the type and author of the retrieved contributions.- Returns:
- The current user's contributions of the passed type, sorted by timestamp from most recent to least recent.
- Throws:
ServiceException
- if any system-level error occurs
-
getContributionsForTypePaging
@Deprecated ResultPage getContributionsForTypePaging(Contribution contribution_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Deprecated.This functionality is no longer supported and will be removed in the next release.Gets the current user's contributions of a certain type. To retrieve the current user's authored threads set theauthor
field of the passedcontribution_
toContribution.AUTHOR_ON
. To retrive the threads in which the current user has participated set theauthor
field of the passedcontribution_
toContribution.AUTHOR_OFF
. For contributions other than threads, theauthor
field reflects whether the user created (Contribution.AUTHOR_ON
) or updated (Contribution.AUTHOR_OFF
) the contribution.- Parameters:
contribution_
- aContribution
object whosetype
andauthor
should be set to determine the type and author of the retrieved contributions.startIndex_
- 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. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.sortProperty_
- the property by which the results should be sorted. This should be one of theSORT_BY_XXX
constants defined inContribution
.sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.- Returns:
- a
ResultPage
containing a list ofContribution
objects of the passed type. - Throws:
NullPointerException
- ifcontribution_
is nullServiceException
- if any system-level error occurs
-
setMaximumContributions
Deprecated.This functionality is no longer supported and will be removed in the next release.Sets the maximum number of contributions to be returned bygetContributionsForType(Contribution)
.- Parameters:
size_
- The maximum number of contributions to be returned bygetContributionsForType(Contribution)
.- Throws:
ServiceException
- if any system-level error occurs- See Also:
-
getMaximumContributions
Deprecated.This functionality is no longer supported and will be removed in the next release.Gets the maximum number of contributions to be returned bygetContributionsForType(Contribution)
.- Returns:
- The maximum number of contributions to be returned by
getContributionsForType(Contribution)
. - Throws:
ServiceException
- if any system-level error occurs- See Also:
-
getAccessLevelForPages
int[] getAccessLevelForPages(Long[] pageIds_) throws InvalidAnonymousUserException, InvalidUserException, InvalidPageException, NullPointerException Deprecated.Gets the current user's access levels for the given pages.- Parameters:
pageIds_
- the IDs of the pages for which the user's access levels should be returned.- Returns:
- the access levels of the current user for the specified pages. Each
access level will be one of the
PAGE_ACCESS_LEVEL_XXX
constants inPageInfo
. - Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidInvalidPageException
- if any of the specified pages does not existNullPointerException
- ifpageIds_
is nullServiceException
- if any system-level error occurs
-
addPortlets
void addPortlets(Long pageId_, Long[] portletIds_, Integer[] zones_, int[] indices_) throws InvalidAnonymousUserException, InvalidUserException, PrivilegeException, PortletSharingException, DuplicatePortletException, InvalidPageException, InvalidPortletException, InvalidZoneException, LockException, NullPointerException Deprecated.Attempts to lock the current draft of the specified page and add portlets.- Parameters:
pageId_
- the ID of the page to which the portlets should be added.portletIds_
- the IDs of the portlets to add to the page.zones_
- specifies which zone will contain the portlet with the same array index. The zone identifies which column the portlet should be placed into, with the indexing starting at 0 (left-most column).indices_
- specifies the position within the zone of the portlet with the same array index. The position indexing starts at 0 (top-most position).- Throws:
InvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not allowed to modify the pagePortletSharingException
- if any portlet is non-shareable, and is already on another pageDuplicatePortletException
- if any specified portlet already exists on the draftInvalidPageException
- if no page with the specified ID existsInvalidPortletException
- if any of the portlet IDs does not correspond to a valid portletInvalidZoneException
- if any specified zone does not existLockException
- if the current user does not own the draftNullPointerException
- if any argument is nullServiceException
- if any system-level error occurs- See Also:
-
getPagesPaging
ResultPage getPagesPaging(Long[] pageIds_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws PrivilegeException, InvalidPageException, InvalidAnonymousUserException, InvalidUserException, NullPointerException Deprecated.Gets the specified portal pages as an array ofPage
objects in aResultPage
.null
is returned for each page that does not exist, or that the user is not allowed to view.- Parameters:
pageIds_
- the IDs of the portal pages to retrieve.startIndex_
- 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. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.sortProperty_
- the property by which the results should be sorted. This should be one of theSORT_BY_XXX
constants defined inPage
.sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.- Returns:
- a
ResultPage
containing an array ofPage
objects. The array may containnull
items if the current user does not have permission to view particular pages, or of particular pages do not exist - Throws:
PrivilegeException
- if the current user is anonymous and anonymous users cannot view any of the given pagesInvalidPageException
- if any of the IDs does not correspond to a valid pageInvalidAnonymousUserException
- if the current user is anonymous, but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidNullPointerException
- if the passedpageIds_
array or any of its elements isnull
ServiceException
- if any system-level error occurs- See Also:
-
getPagesList
Deprecated.Gets the specified portal pages, returning the valid results even if all the results cannot be retrieved (for instance, if some of the pages corresponding to the IDs no longer exist).- Parameters:
pageIds_
- the IDs of the pages that should be retrieved.- Returns:
- a
ResultList
containing pages and error codes. TheResult.getResults()
method should be used to get all the pages that were successfully retrieved. In addition,ResultList.getResultCodes()
can be used to get the list of result codes corresponding to each of the specified page IDs. Each code represents the successful retrieval of a page, or, if the page could not be retrieved, the reason for the failure; this is one of theCODE_XXX
orPORTAL_CODE_XXX
constants defined inResultList
. - Throws:
ServiceException
- if any system-level error occurs
-
validateTypedValues
Deprecated.Validates given TypedValues. This method is free to throw an exception or to return false if any TypedValue passed is invalid for this engine. This engine supports: AppianType.PAGE AppianType.PORTLET- Parameters:
typedValues
-- Returns:
- true if valid, false if invalid
-
setPageDataContextType
Deprecated.Sets the type of data that will be sent to the page when it is requested. Passing anull
clear its value.- Parameters:
pageId
- the ID of the page whose data context should be changed.dataContextType
- id of data context type;null
if clearing the context.
-