public interface IViewableMechanics extends IMechanics
IView
associated with them.Modifier and Type | Field and Description |
---|---|
static String |
COMMENTS_LINK_TYPE
Deprecated.
use #LINK_TYPE_COMMENTS
|
static String |
CONTENT_LINK_TYPE
Deprecated.
use #LINK_TYPE_CONTENT
|
static String |
DEFAULT_ORDER
Default display order.
|
static int |
DEFAULT_PAGE_SIZE
Default page size.
|
static String |
DEFAULT_SORT
Default sort key.
|
static String |
DETAILS_LINK_TYPE
Deprecated.
use #LINK_TYPE_DETAILS
|
static String |
LARGE_ICON_TYPE
Large icon type.
|
static String |
LINK_TYPE |
static String |
LINK_TYPE_COMMENTS
Comments/notes about item.
|
static String |
LINK_TYPE_CONTENT
External content (external website -- http://www.google.com/ --
or external application -- document.pdf).
|
static String |
LINK_TYPE_DETAILS
Extra/advanced details (ex: details folder listing).
|
static String |
LINK_TYPE_EDIT
Item's editable custom properties (ex: edit portal page).
|
static String |
LINK_TYPE_HELP
Item-specific help.
|
static String |
LINK_TYPE_HELP_MAXIMIZED
Item-specific help in a maximized state
|
static String |
LINK_TYPE_MAXIMIZED
Maximized view of item.
|
static String |
LINK_TYPE_MINIMIZED
Minimized (aka collapsed) view of item.
|
static String |
LINK_TYPE_PERMISSIONS
Item's permissions settings.
|
static String |
LINK_TYPE_PORTAL_CONTENT
Inline portal content: content rendered within portal page.
|
static String |
LINK_TYPE_PORTLET_STANDALONE
Standalone view of the portlet
|
static String |
LINK_TYPE_PROPERTIES
Item's portal metadata.
|
static String |
LINK_TYPE_RESTORED
Restored (aka normal or expanded) view of item.
|
static String |
LINK_TYPE_SUBSCRIPTIONS
Subscriptions to item.
|
static String |
LINK_TYPE_THUMBNAILS
Thumbnail(s) of content.
|
static String |
LINK_TYPE_VERSIONS
Item's version history.
|
static String |
PERMISSIONS_LINK_TYPE
Deprecated.
use #LINK_TYPE_PERMISSIONS
|
static String |
PORTAL_CONTENT_LINK_TYPE
Deprecated.
use #LINK_TYPE_PORTAL_CONTENT
|
static String |
PROPERTIES_LINK_TYPE
Deprecated.
use #LINK_TYPE_PROPERTIES
|
static String |
PROPERTY_LINK_TARGET
Link target property, e.g.
|
static String |
PROPERTY_OWNER_NAME
Owner name property of an object
|
static String |
PROPERTY_PARENT_NAME
Parent name property of an object
|
static String |
PROPERTY_TOOLTIP
Tooltip property ([name]: [description]).
|
static String |
REFERENCE_ICON_TYPE
Reference icon type.
|
static String |
SUBSCRIPTIONS_LINK_TYPE
Deprecated.
use #LINK_TYPE_SUBSCRIPTIONS
|
static String |
THUMBNAIL_ICON_TYPE
Thumbnail icon type.
|
static String |
THUMBNAILS_LINK_TYPE
Deprecated.
use #LINK_TYPE_THUMBNAILS
|
static String |
VERSIONS_LINK_TYPE
Deprecated.
use #LINK_TYPE_VERSIONS
|
Modifier and Type | Method and Description |
---|---|
boolean |
canView(IURI itemId,
IThingID userId,
Map<?,?> capabilities)
Returns true if the specified user can view the specified item.
|
void |
checkView(IURI itemId,
IThingID userId,
Map<?,?> capabilities)
Throws a
PortalAccessException if the specified user cannot view the specified item. |
IPagingCookie |
createPagingCookie(IURI itemId,
IThingID userId,
String view,
int start,
int pageSize,
String sort,
String order)
Returns a new paging cookie for a list view of the specified resource,
initialized with the specified default values,
or null if the resource cannot produce a paging cookie.
|
void |
fireViewEvent(IURI itemId,
IThingID userId,
int status)
Fires a view properties event.
|
String |
getCss(IURI itemId)
Gets the css style content for the specified item.
|
String |
getCss(IURI itemId,
String type)
Gets the css style content for the specified item.
|
String |
getDefaultLinkType(IURI itemId)
Returns the default link type for the specified item.
|
String |
getFormattedProperty(IView view,
String property,
Map<String,Object> formatInfo)
Returns a formatted display for the value of the view's specified property.
|
String |
getHierachicalUri(IURI itemId)
Returns natural hierarchical URI for the given item.
|
String |
getIcon(IURI itemId)
Gets the web path, relative to the web server root,
to the default icon representing this resource.
|
String |
getIcon(IURI itemId,
String type)
Gets the web path, relative to the web server root,
to the specified type of icon representing this resource.
|
String |
getLink(IURI itemId)
Gets the web path, relative to the web server root,
to the default view of the resource.
|
String |
getLink(IURI itemId,
String type)
Gets the web path, relative to the web server root,
to the specified view of the resource.
|
String |
getListProperty(IView view,
String property)
Returns a condensed display string, appropriate for a table listing display,
representing the value of the view's specified property.
|
default String |
getListPropertyHTML(IView view,
String property)
Same as getListProperty, but the result is HTML encoded for direct display in browser.
|
default String |
getListPropertyJS(IView view,
String property)
Same as getListProperty, but the result is JS encoded suitable for use in scripting.
|
boolean |
isEnabled(IView view)
True if the specified view represents an active, enabled, and addressable resource.
|
IView |
view(IURI itemId)
Returns the standard view of the specified item.
|
IView |
view(IURI itemId,
IThingID userId)
Returns the view of the specified item, filtered for the specified user.
|
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
init, shutdown
static final String PROPERTY_TOOLTIP
static final String PROPERTY_LINK_TARGET
static final String PROPERTY_OWNER_NAME
static final String PROPERTY_PARENT_NAME
static final String LINK_TYPE_COMMENTS
static final String LINK_TYPE_CONTENT
static final String LINK_TYPE_DETAILS
static final String LINK_TYPE_EDIT
static final String LINK_TYPE_HELP
static final String LINK_TYPE_HELP_MAXIMIZED
static final String LINK_TYPE_MAXIMIZED
static final String LINK_TYPE_RESTORED
static final String LINK_TYPE_MINIMIZED
static final String LINK_TYPE_PORTLET_STANDALONE
static final String LINK_TYPE_PERMISSIONS
static final String LINK_TYPE_PORTAL_CONTENT
static final String LINK_TYPE_PROPERTIES
static final String LINK_TYPE_SUBSCRIPTIONS
static final String LINK_TYPE_THUMBNAILS
static final String LINK_TYPE_VERSIONS
static final int DEFAULT_PAGE_SIZE
static final String DEFAULT_SORT
static final String DEFAULT_ORDER
static final String REFERENCE_ICON_TYPE
static final String LARGE_ICON_TYPE
static final String THUMBNAIL_ICON_TYPE
static final String LINK_TYPE
@Deprecated static final String CONTENT_LINK_TYPE
@Deprecated static final String PORTAL_CONTENT_LINK_TYPE
@Deprecated static final String PROPERTIES_LINK_TYPE
@Deprecated static final String PERMISSIONS_LINK_TYPE
@Deprecated static final String COMMENTS_LINK_TYPE
@Deprecated static final String SUBSCRIPTIONS_LINK_TYPE
@Deprecated static final String VERSIONS_LINK_TYPE
@Deprecated static final String DETAILS_LINK_TYPE
@Deprecated static final String THUMBNAILS_LINK_TYPE
boolean canView(IURI itemId, IThingID userId, Map<?,?> capabilities) throws PortalException
itemId
- IURI
of itemuserId
- IThingID
of usercapabilities
- Known set of capabilities for this user.
May be null, in which case they'll be looked up from the
IContext.SCOPE_REQUEST
attributes on the user's IContext
.PortalException
- if the userId is invalid.void checkView(IURI itemId, IThingID userId, Map<?,?> capabilities) throws PortalException, PortalAccessException
PortalAccessException
if the specified user cannot view the specified item.itemId
- Item to view.userId
- User whose access to test.capabilities
- User's capabilities. Null for default.PortalAccessException
- if the specified user cannot view the specified item.PortalException
- if an error occurred checking access.void fireViewEvent(IURI itemId, IThingID userId, int status) throws PortalException
itemId
- Item whose properties were viewed.userId
- User who viewed the properties.status
- Status of the event (successful, denied, error).PortalException
- if an error occurs raising the event.IView view(IURI itemId) throws PortalException
itemId
- Item to view.PortalException
- if an error occurs.IView view(IURI itemId, IThingID userId) throws PortalException
itemId
- Item to view.userId
- User for which to filter the view.PortalException
- if an error occurs.String getIcon(IURI itemId) throws PortalException
itemId
- Item for which to get the icon.PortalException
- if an error occurs.String getIcon(IURI itemId, String type) throws PortalException
itemId
- Item for which to get the icon.type
- Icon type (ie 'reference'). Null for default icon.PortalException
- if an error occurs.String getLink(IURI itemId) throws PortalException
itemId
- Item for which to get the link.PortalException
- if an error occurs.String getHierachicalUri(IURI itemId) throws PortalException
itemId
- PortalException
String getLink(IURI itemId, String type) throws PortalException
itemId
- Item for which to get the link.type
- View type (ie 'content' or 'properties'). Null for default view.PortalException
- if an error occurs.String getDefaultLinkType(IURI itemId)
PROPERTIES_LINK_TYPE
.
If the default link will return return non-portal content
(such as a word document or an external web page)
the type should be CONTENT_LINK_TYPE
.itemId
- Item of interest.String getCss(IURI itemId) throws PortalException
Gets the css style content for the specified item. A sample style follows:
table.random908983274 { padding: 2px; } td.random908983274 { color: pink; }
itemId
- Item for which to get the css.PortalException
- if an error occurs.String getCss(IURI itemId, String type) throws PortalException
Gets the css style content for the specified item. A sample style follows:
table.random908983274 { padding: 2px; } td.random908983274 { color: pink; }
itemId
- Item for which to get the css.type
- Context type (ie 'leftnav'). Null for default css.PortalException
- if an error occurs.String getListProperty(IView view, String property) throws PortalException
view
- View whose property to get.property
- Property to display.PortalException
- if an error occurs.default String getListPropertyJS(IView view, String property) throws PortalException
PortalException
default String getListPropertyHTML(IView view, String property) throws PortalException
PortalException
String getFormattedProperty(IView view, String property, Map<String,Object> formatInfo) throws PortalException
view
- View whose property to get.property
- Property to display.formatInfo
- Formatting information.PortalException
- if an error occurs.boolean isEnabled(IView view) throws PortalException
view
- View to test.PortalException
- if an error occurs.IPagingCookie createPagingCookie(IURI itemId, IThingID userId, String view, int start, int pageSize, String sort, String order) throws PortalException
itemId
- Resource for which to get the paging cookie.userId
- User for which to get the paging cookie.view
- Name of the view (ie 'versions'). Null for default view.start
- Default starting index.pageSize
- Default items per page.sort
- Default sort key.order
- Default sort order.PortalException
- if an error occurs.