public interface IViewableContainerPolicy extends IViewablePolicy
Policy used to view (viewable) container resources.
Policy commands are always invoked with a IContext
object.
The IContext
object contains information about the user on whose
behalf the command is invoked, as well as access, event, and workflow states.
These states, which can be toggled on and off, are known as traits,
and are encapsulated by the ITraits
object.
By default, all policy commands will check access, fire events, and initiate workflow
as appropriate for the command.
Modifier and Type | Method and Description |
---|---|
IPagingCookie |
getPagingCookie(IContext context,
IURI itemId,
String view)
Returns the paging cookie for the view of the specified item, or null if none exsits.
|
IPagingCookie |
getPagingCookie(IContext context,
IURI itemId,
String view,
int start,
int pageSize,
String sort,
String order,
boolean reset)
Returns the paging cookie for the view of the specified item,
initialized with the specified default values, or null if none exsits.
|
void |
pageBackward(IContext context,
IURI itemId,
String view)
Pages backward the cookie for the view of the item.
|
void |
pageForeward(IContext context,
IURI itemId,
String view)
Pages forward the cookie for the view of the item.
|
void |
setPagingCookie(IContext context,
IURI itemId,
String view,
int start,
int pageSize,
String sort,
String order)
Sets the modifiable properties of the paging cookie for the specified item.
|
getIcon, view
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
init, shutdown
IPagingCookie getPagingCookie(IContext context, IURI itemId, String view) throws BizException
getPagingCookie
in interface IViewablePolicy
context
- Context state information (current user, etc.).itemId
- Item for which to get the paging cookie.view
- Name of the view (ie 'versions'). Null for default view.BizException
- if command fails because access was denied or a datasource error occured.IPagingCookie getPagingCookie(IContext context, IURI itemId, String view, int start, int pageSize, String sort, String order, boolean reset) throws BizException
getPagingCookie
in interface IViewablePolicy
context
- Context state information (current user, etc.).itemId
- Item for which to get the paging cookie.view
- Name of the view (ie 'versions'). Null for default view.start
- Default starting index. The first index is one, not zero.pageSize
- Default items per page.
If zero, will default to the user's preferred page size.sort
- Default sort key (ie 'name').order
- Default sort order. Either IPagingCookie.ASCENDING
or IPagingCookie.DESCENDING
.reset
- True to always acquire a new paging cookie.BizException
- if command fails because access was denied or a datasource error occured.void setPagingCookie(IContext context, IURI itemId, String view, int start, int pageSize, String sort, String order) throws BizException
setPagingCookie
in interface IViewablePolicy
context
- Context state information (current user, etc.).itemId
- Item to for which to set the paging cookie.view
- Name of the view (ie 'versions'). Null for default view.start
- New starting index. The first index is one, not zero.pageSize
- New page size.
If zero, will default to the user's preferred page size.sort
- New sort key (ie 'name').order
- New sort order. Either IPagingCookie.ASCENDING
or IPagingCookie.DESCENDING
.BizException
- if command fails because access was denied or a datasource error occured.void pageBackward(IContext context, IURI itemId, String view) throws BizException
pageBackward
in interface IViewablePolicy
context
- Context state information (current user, etc.).itemId
- Item for which to page the paging cookie.view
- Name of the view (ie 'versions'). Null for default view.BizException
- if command fails because access was denied or a datasource error occured.void pageForeward(IContext context, IURI itemId, String view) throws BizException
pageForeward
in interface IViewablePolicy
context
- Context state information (current user, etc.).itemId
- Item for which to page the paging cookie.view
- Name of the view (ie 'versions'). Null for default view.BizException
- if command fails because access was denied or a datasource error occured.