@Deprecated
public interface PortletService
extends com.appiancorp.services.ContextSensitiveService
This interface defines methods for access to and modification of portlets.
Portlets may have their own security settings, or they may inherit the security settings of the page on which they exist. Portlets may also be shared, so that the same portlet can be placed on several different pages.
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.
Modifier and Type | Field and Description |
---|---|
static java.lang.Integer |
ACTIVE_AND_DEACTIVATED_PORTLET
Deprecated.
A constant used to indicate both activated and deactivated portlets will be
included from portlet searches
|
static java.lang.Integer |
ACTIVE_PORTLET
Deprecated.
A constant used to indicate only activated portlets will be
included from portlet searches
|
static boolean |
createPortlet$UPDATES
Deprecated.
|
static boolean |
createPortlets$UPDATES
Deprecated.
|
static java.lang.Integer |
DEACTIVATED_PORTLET
Deprecated.
A constant used to indicate only deactivated portlets will be
included from portlet searches
|
static boolean |
findPortlets$UPDATES
Deprecated.
|
static boolean |
findPortletsPaging$UPDATES
Deprecated.
|
static boolean |
getAccessLevelForPortlet$UPDATES
Deprecated.
|
static boolean |
getAccessLevelForPortlets$UPDATES
Deprecated.
|
static boolean |
getInheritedRoleMapForPortlet$UPDATES
Deprecated.
|
static boolean |
getPortlet$UPDATES
Deprecated.
|
static boolean |
getPortlets$UPDATES
Deprecated.
|
static boolean |
getPortletsList$UPDATES
Deprecated.
|
static boolean |
getPortletsPaging$UPDATES
Deprecated.
|
static boolean |
getRoleMapForPortlet$UPDATES
Deprecated.
|
static java.lang.Long |
NO_PAGE
Deprecated.
A constant used to indicate that no pages will be excluded from portlet
searches
|
static java.lang.Integer |
PORTLET_LIST_CODE_ADMIN
Deprecated.
A constant used to indicate that the user can administer the requested
portlet.
|
static java.lang.Integer |
PORTLET_LIST_CODE_EDITOR
Deprecated.
A constant used to indicate that the user can edit the requested portlet.
|
static java.lang.Integer |
PORTLET_LIST_CODE_INVALID
Deprecated.
A constant used to indicate that the requested portlet id was
not valid.
|
static java.lang.Integer |
PORTLET_LIST_CODE_NO_PERMISSIONS
Deprecated.
A constant used to indicate that the user does not have adequate
privileges to retrieve the requested portlet.
|
static java.lang.Integer |
PORTLET_LIST_CODE_VIEWER
Deprecated.
A constant used to indicate that the user can view the requested portlet.
|
static boolean |
setRoleMapForPortlet$UPDATES
Deprecated.
|
static java.lang.Integer |
SHARED_AND_UNSHARED_PORTLET
Deprecated.
A constant used to indicate both shared and unshared portlets will be
included from portlet searches
|
static java.lang.Integer |
SHARED_PORTLET
Deprecated.
A constant used to indicate only shared portlets will be
included from portlet searches
|
static java.lang.Integer |
UNSHARED_PORTLET
Deprecated.
A constant used to indicate only unshared portlets will be
included from portlet searches
|
static boolean |
unsharePortlet$UPDATES
Deprecated.
|
static boolean |
updatePortlet$UPDATES
Deprecated.
|
static boolean |
updatePortletParameters$UPDATES
Deprecated.
|
static boolean |
updatePortlets$UPDATES
Deprecated.
|
static boolean |
updatePortletsParameters$UPDATES
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Long |
createPortlet(Portlet p_)
Deprecated.
Creates a portlet.
|
java.lang.Long[] |
createPortlets(Portlet[] ps_)
Deprecated.
Creates portlets in bulk.
|
Portlet[] |
findPortlets(java.lang.String type_,
java.lang.String searchTerms_,
java.lang.Long p_,
java.lang.Integer sharedType_,
java.lang.Integer state_)
|
ResultPage |
findPortletsPaging(java.lang.String type_,
java.lang.String searchTerms_,
java.lang.Long p_,
java.lang.Integer sharedType_,
java.lang.Integer state_,
int startIndex_,
int batchSize_,
java.lang.Integer sortProperty_,
java.lang.Integer sortOrder_)
Deprecated.
Gets a ResultPage containing a list of portlets of the given type obtained
by searching for a string in name/description.
|
int |
getAccessLevelForPortlet(java.lang.Long portletId_)
Deprecated.
Gets the current user's access level for the specified portlet.
|
int[] |
getAccessLevelForPortlets(java.lang.Long[] portletIds_)
Deprecated.
Gets the current user's access level for the specified portlets.
|
PortalRoleMap |
getInheritedRoleMapForPortlet(java.lang.Long portletId_,
java.lang.Long pageId_)
Deprecated.
Returns the role map that the portlet inherits from its page.
|
Portlet |
getPortlet(java.lang.Long portletId_)
Deprecated.
Gets a portlet
|
Portlet[] |
getPortlets(java.lang.Long[] portletIds_)
Deprecated.
|
ResultList |
getPortletsList(java.lang.Long[] portletIds_)
Deprecated.
Returns a ResultList containing
Portlet
instances for valid ids and result codes for all ids. |
ResultPage |
getPortletsPaging(java.lang.Long[] portletIds_,
int startIndex_,
int batchSize_,
java.lang.Integer sortProperty_,
java.lang.Integer sortOrder_)
Deprecated.
Gets a ResultPage containing a list of portlets as
specified by the portlet ids
|
PortalRoleMap |
getRoleMapForPortlet(java.lang.Long portletId_)
Deprecated.
Get the role map for a portlet
NOTE: This should not be used to verify the access level that the current
user has on the portlet because the access level can depend on other
properties of the portlet such as
inheritsSecurity and
shareable . |
void |
setRoleMapForPortlet(java.lang.Long portletId_,
PortalRoleMap map_)
Deprecated.
Set the role map for a portlet
|
void |
unsharePortlet(java.lang.Long portletId_,
java.lang.Long pageId_,
boolean force_)
Deprecated.
Make a shared portlet non-shareable and clear it's uuid if it has one.
|
void |
updatePortlet(Portlet portlet_)
Deprecated.
Update a portlet
In order to update a portlet the fields following fields must be populated:
id ,
shareable ,
inheritsSecurity ,
portletType ,
name ,
frame ,
public . |
void |
updatePortletParameters(java.lang.Long portletId_,
java.util.Map parameterValueMap_)
Deprecated.
Update the portlet's name/value pairs of its parameters
|
void |
updatePortlets(Portlet[] portlets_)
Deprecated.
Update portlets in bulk.
|
void |
updatePortletsParameters(java.lang.Long[] portletIds_,
java.util.Map[] parameterValueMaps_)
Deprecated.
Update the portlets' name/value pairs of their parameters
|
static final java.lang.Long NO_PAGE
static final java.lang.Integer SHARED_AND_UNSHARED_PORTLET
static final java.lang.Integer SHARED_PORTLET
static final java.lang.Integer UNSHARED_PORTLET
static final java.lang.Integer ACTIVE_AND_DEACTIVATED_PORTLET
static final java.lang.Integer ACTIVE_PORTLET
static final java.lang.Integer DEACTIVATED_PORTLET
static final java.lang.Integer PORTLET_LIST_CODE_INVALID
static final java.lang.Integer PORTLET_LIST_CODE_NO_PERMISSIONS
static final java.lang.Integer PORTLET_LIST_CODE_VIEWER
static final java.lang.Integer PORTLET_LIST_CODE_EDITOR
static final java.lang.Integer PORTLET_LIST_CODE_ADMIN
static final boolean getAccessLevelForPortlet$UPDATES
static final boolean getAccessLevelForPortlets$UPDATES
static final boolean createPortlet$UPDATES
static final boolean createPortlets$UPDATES
static final boolean getPortlet$UPDATES
static final boolean getPortletsPaging$UPDATES
static final boolean getPortletsList$UPDATES
static final boolean getPortlets$UPDATES
static final boolean findPortletsPaging$UPDATES
static final boolean findPortlets$UPDATES
static final boolean updatePortlet$UPDATES
static final boolean updatePortlets$UPDATES
static final boolean updatePortletParameters$UPDATES
static final boolean updatePortletsParameters$UPDATES
static final boolean unsharePortlet$UPDATES
static final boolean getRoleMapForPortlet$UPDATES
static final boolean setRoleMapForPortlet$UPDATES
static final boolean getInheritedRoleMapForPortlet$UPDATES
int getAccessLevelForPortlet(java.lang.Long portletId_) throws InvalidAnonymousUserException, InvalidUserException, InvalidPortletException
portletId_
- The id of the portlet for which the user's access
level is to be determined.PORTLET_ACCESS_LEVEL_XXX
constants in Portlet
InvalidAnonymousUserException
- if the user is anonymous,
but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidInvalidPortletException
- if the specified portlet does not existServiceException
- if any system-level error occursint[] getAccessLevelForPortlets(java.lang.Long[] portletIds_) throws InvalidAnonymousUserException, InvalidUserException, InvalidPortletException
portletIds_
- The ids of the portlets for which the user's
access level is to be determined.PORTLET_ACCESS_LEVEL_XXX
constants in Portlet
InvalidAnonymousUserException
- if the user is anonymous,
but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidInvalidPortletException
- if any of the the specified
portlets do not existServiceException
- if any system-level error occursjava.lang.Long createPortlet(Portlet p_) throws java.lang.IllegalArgumentException, PortletSharingException, InvalidPortletTypeException, DuplicateUuidException
shareable
,
inheritsSecurity
,
portletType
,
name
,
frame
,
public
.
Portlet types can be retrieved from
AdministrationService.getPortletTypes()
p_
- the new portletPortletSharingException
- if portlet to be created
would be sharable and would also inherit securityInvalidPortletTypeException
- if the portlet type
specified is invalidjava.lang.IllegalArgumentException
- if the parameters
map
of the portlet is not null
, but does not meet the requirements
specified by Portlet.getParameters()
ServiceException
- if any system-level error occursDuplicateUuidException
- if the UUID of the portlet already existsjava.lang.Long[] createPortlets(Portlet[] ps_) throws java.lang.IllegalArgumentException, PortletSharingException, InvalidPortletTypeException, DuplicateUuidException
createPortlet(Portlet)
.ps_
- the new portletsPortletSharingException
- if any portlet to be created would be
sharable and would also inherit securityInvalidPortletTypeException
- if any portlet type specified
is invalidjava.lang.IllegalArgumentException
- if the parameters
map
of any of the portlets is not null
, but does not meet the
requirements specified by Portlet.getParameters()
DuplicateUuidException
- if the UUID of any of the portlets already
exists or if the same UUID is passed in for several portletsServiceException
- if any system-level error occursPortlet getPortlet(java.lang.Long portletId_) throws InvalidAnonymousUserException, InvalidUserException, InvalidPortletException, PrivilegeException
portletId_
- the id of the portletInvalidAnonymousUserException
- if the user is anonymous,
but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is anonymous, and portlets
of this portlet type are denied to anonymous users. The portlet types that
anonymous users cannot see are configurable. See application documentation
for further details.InvalidPortletException
- if the portlet is invalidServiceException
- if any system-level error occursResultPage getPortletsPaging(java.lang.Long[] portletIds_, int startIndex_, int batchSize_, java.lang.Integer sortProperty_, java.lang.Integer sortOrder_) throws InvalidAnonymousUserException, InvalidUserException, InvalidPortletException, PrivilegeException
portletIds_
- the list of portlet idsstartIndex_
- 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.sortProperty_
- the property by which the results will be sortedsortOrder_
- The order in which to sort the results. This is either
Constants.SORT_ORDER_ASCENDING
or
Constants.SORT_ORDER_DESCENDING
Portlet
objectsInvalidAnonymousUserException
- if the user is anonymous,
but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is anonymous, and any
of the portlets is of a type that is denied to anonymous users. The portlet
types that anonymous users cannot see are configurable. See application
documentation for further details.InvalidPortletException
- if the portlet is invalidServiceException
- if any system-level error occursResultList getPortletsList(java.lang.Long[] portletIds_)
Portlet
instances for valid ids and result codes for all ids. The result codes
will be one of the PORTLET_LIST_CODE_
constants on this
interface.portletIds_
- the ids of the portlets to retrieveResultList
containing Portlet
objectsServiceException
- if any system-level error occurs@Deprecated Portlet[] getPortlets(java.lang.Long[] portletIds_) throws InvalidAnonymousUserException, InvalidUserException, InvalidPortletException, PrivilegeException
getPortletsPaging(java.lang.Long[], int, int, java.lang.Integer, java.lang.Integer)
insteadportletIds_
- the list of portlet idsInvalidAnonymousUserException
- if the user is anonymous,
but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is anonymous, and any
of the portlets is of a type that is denied to anonymous users. The portlet
types that anonymous users cannot see are configurable. See application
documentation for further details.InvalidPortletException
- if any of the portlets is invalidServiceException
- if any system-level error occursResultPage findPortletsPaging(java.lang.String type_, java.lang.String searchTerms_, java.lang.Long p_, java.lang.Integer sharedType_, java.lang.Integer state_, int startIndex_, int batchSize_, java.lang.Integer sortProperty_, java.lang.Integer sortOrder_) throws InvalidAnonymousUserException, InvalidUserException, InvalidPageException, InvalidPortletTypeException
p_
are excluded from the results returned
(p_
can be used to
avoid returning portlets that could not be added to page p
-
since you can't put the same portlet on the same page twice).
If p_
is NO_PAGE
, results are not excluded.type_
- the type of the portletsearchTerms_
- the search stringp_
- exclude portlets that are on this page, unless the page is
NO_PAGE
sharedType_
- whether portlet is shared or not. Valid values are:
state_
- state of portlets being searched. Valid values are:
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 will be sorted. This
is one of the SORT_BY_XXX
constants in Portlet
sortOrder_
- The order in which to sort the results. This is either
Constants.SORT_ORDER_ASCENDING
or
Constants.SORT_ORDER_DESCENDING
Portlet
beansInvalidAnonymousUserException
- if the user is anonymous,
but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidInvalidPageException
- if page p_
does not exist and
p_
is not NO_PAGE
InvalidPortletTypeException
- if portlet type does not existServiceException
- if any system-level error occurs@Deprecated Portlet[] findPortlets(java.lang.String type_, java.lang.String searchTerms_, java.lang.Long p_, java.lang.Integer sharedType_, java.lang.Integer state_) throws InvalidAnonymousUserException, InvalidUserException, InvalidPageException, InvalidPortletTypeException
findPortletsPaging(java.lang.String, java.lang.String, java.lang.Long, java.lang.Integer, java.lang.Integer, int, int, java.lang.Integer, java.lang.Integer)
insteadp_
are excluded from the results returned
(p_
can be used to
avoid returning portlets that could not be added to page p
-
since you can't put the same portlet on the same page twice).
If p_
is NO_PAGE
, results are not excluded.type_
- the type of the portletsearchTerms_
- the search stringp_
- exclude portlets that are on this page, unless the page is
NO_PAGE
sharedType_
- whether portlet is shared or not. Valid values are:
state_
- state of portlets being searched. Valid values are:
InvalidAnonymousUserException
- if the user is anonymous,
but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidInvalidPageException
- if page p_
does not exist and
p_
is not NO_PAGE
InvalidPortletTypeException
- if portlet type does not existServiceException
- if any system-level error occursvoid updatePortlet(Portlet portlet_) throws java.lang.IllegalArgumentException, InvalidAnonymousUserException, InvalidUserException, PrivilegeException, PortletSharingException, InvalidPortletException, InvalidPortletTypeException
id
,
shareable
,
inheritsSecurity
,
portletType
,
name
,
frame
,
public
.
Portlet types can be retrieved from
AdministrationService.getPortletTypes()
portlet_
- the portlet to updateInvalidAnonymousUserException
- if the user is anonymous,
but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user does not have editor
privileges or greater for the portletPortletSharingException
- if portlet to be updated would
be sharable and would also inherit securityjava.lang.IllegalArgumentException
- if one attempts to unshare a
sharable portlet from this method (use unsharePortlet(java.lang.Long, java.lang.Long, boolean)
for this
purpose) or if the parameters
map
of the portlet is not null
, but does not meet the requirements
specified by Portlet.getParameters()
InvalidPortletException
- if the portlet is invalidInvalidPortletTypeException
- if the portlet type is invalidServiceException
- if any system-level error occursvoid updatePortlets(Portlet[] portlets_) throws java.lang.IllegalArgumentException, InvalidAnonymousUserException, InvalidUserException, PrivilegeException, PortletSharingException, InvalidPortletException, InvalidPortletTypeException
updatePortlet(Portlet)
portlets_
- the portlets to updateInvalidAnonymousUserException
- if the user is anonymous,
but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user does not have editor
privileges or greater for the portletPortletSharingException
- if any portlet to be updated would be
sharable and would also inherit securityjava.lang.IllegalArgumentException
- if one attempts to unshare a
sharable portlet from this method (use unsharePortlet(java.lang.Long, java.lang.Long, boolean)
for this
purpose) or if the parameters
map
of any portlet is not null
, but does not meet the requirements
specified by Portlet.getParameters()
InvalidPortletException
- if any portlet is invalidInvalidPortletTypeException
- if any portlet type is invalidServiceException
- if any system-level error occursvoid updatePortletParameters(java.lang.Long portletId_, java.util.Map parameterValueMap_) throws java.lang.IllegalArgumentException, InvalidUserException, PrivilegeException, InvalidPortletException
portletId_
- the id of the portletparameterValueMap_
- a map containing name/value pairs.
Names must be single words, starting with a letter and containing only _,
numbers and letters in the basic US character set.
Values should be of type String
, though future implementations (and
experimentally, the current one) may allow other datatypes.InvalidAnonymousUserException
- if the user is anonymous,
but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user does not have editor
privileges or greater for the portletInvalidPortletException
- if portlet does not existjava.lang.IllegalArgumentException
- if the parameters
map
of the portlet is not null
, but does not meet the requirements
specified by Portlet.getParameters()
ServiceException
- if any system-level error occursvoid updatePortletsParameters(java.lang.Long[] portletIds_, java.util.Map[] parameterValueMaps_) throws java.lang.IllegalArgumentException, InvalidUserException, PrivilegeException, InvalidPortletException
portletIds_
- the ids of the portletsparameterValueMaps_
- maps containing name/value pairs.
Names must be single words, starting with a letter and containing only _,
numbers and letters in the basic US character set.
Values should be of type String
, though future implementations (and
experimentally, the current one) may allow other datatypes.InvalidAnonymousUserException
- if the user is anonymous,
but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user does not have editor
privileges or greater for the portletInvalidPortletException
- if any portlet does not existjava.lang.IllegalArgumentException
- if the parameters
map
of any portlet is not null
, but does not meet the requirements
specified by Portlet.getParameters()
ServiceException
- if any system-level error occursvoid unsharePortlet(java.lang.Long portletId_, java.lang.Long pageId_, boolean force_) throws java.lang.IllegalArgumentException, InvalidAnonymousUserException, InvalidUserException, PrivilegeException, PortletSharingException, InvalidPortletException, InvalidPageException
portletId_
- the id of the portlet to unsharepageId_
- the id of the page to keep the portlet on
(null
means don't keep on any page)force_
- if true
, delete from all pages other than
pageId_
;
otherwise, throw PortletSharingException if portlet is on pages
other than pageId_
InvalidAnonymousUserException
- if the user is anonymous,
but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user does not have editor
privileges or greater for the portletjava.lang.IllegalArgumentException
- if pageId_
is not
null
, and the specified portlet is not on the specified pagePortletSharingException
- if force_
is
false
and the specified portlet is on pages other than the
specified pageInvalidPortletException
- if portlet does not existInvalidPageException
- if the page does not existServiceException
- if any system-level error occursPortalRoleMap getRoleMapForPortlet(java.lang.Long portletId_) throws InvalidPortletException
inheritsSecurity
and
shareable
.portletId_
- the id of the portletInvalidPortletException
- if portlet does not existServiceException
- if any system-level error occursvoid setRoleMapForPortlet(java.lang.Long portletId_, PortalRoleMap map_) throws InvalidAnonymousUserException, InvalidUserException, InvalidPortletException, PrivilegeException
portletId_
- the id of the portletmap_
- the new rolemap of the portletInvalidAnonymousUserException
- if the user is anonymous,
but anonymous access has not been enabledInvalidUserException
- if the user calling this method is invalid
privileges or greater for the portletInvalidPortletException
- if portlet does not existPrivilegeException
- if the current user does not have admin
privileges or greater for the portletServiceException
- if any system-level error occursPortalRoleMap getInheritedRoleMapForPortlet(java.lang.Long portletId_, java.lang.Long pageId_) throws InvalidPortletException
portletId_
- the id of the portletpageId_
- the id of the pageInvalidPortletException
- if portlet does not existServiceException
- if any system-level error occursCopyright © 2003-2024 Appian Corporation. All Rights Reserved.