Package com.webmethods.portal.mech.view
Interface IViewableMechanics
- All Superinterfaces:
IComponent
,IInitializable
,IMechanics
,ISystemHandler
- All Known Subinterfaces:
IBasicMechanics
,IClipboardMechanics
,IContainerContentConstraintMechanics
,IContainerMechanics
,IContentMechanics
,IContextMechanics
,IDirServiceMechanics
,IDirSystemMechanics
,IFolderMechanics
,IGroupMechanics
,ILinkMechanics
,ILocalePortletMechanics
,IPortalRulesMechanics
,IPortletMechanics
,IPrincipalAttributeMechanics
,IPrincipalMechanics
,IRoleMechanics
,IRuleMechanics
,IScheduleMechanics
,ISecurityServiceMechanics
,ISkinMechanics
,ISubscribableMechanics
,ITaskMechanics
,ITaskScheduleMechanics
,ITemplateMechanics
,ITopicMechanics
,IUserMechanics
,IVersionableMechanics
,IViewableContainerMechanics
,IXTypeMechanics
Mechanics for a viewable resource. All viewable resources have at least one
IView
associated with them.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Deprecated.use #LINK_TYPE_COMMENTSstatic final String
Deprecated.use #LINK_TYPE_CONTENTstatic final String
Default display order.static final int
Default page size.static final String
Default sort key.static final String
Deprecated.use #LINK_TYPE_DETAILSstatic final String
Large icon type.static final String
static final String
Comments/notes about item.static final String
External content (external website -- http://www.google.com/ -- or external application -- document.pdf).static final String
Extra/advanced details (ex: details folder listing).static final String
Item's editable custom properties (ex: edit portal page).static final String
Item-specific help.static final String
Item-specific help in a maximized statestatic final String
Maximized view of item.static final String
Minimized (aka collapsed) view of item.static final String
Item's permissions settings.static final String
Inline portal content: content rendered within portal page.static final String
Standalone view of the portletstatic final String
Item's portal metadata.static final String
Restored (aka normal or expanded) view of item.static final String
Subscriptions to item.static final String
Thumbnail(s) of content.static final String
Item's version history.static final String
Deprecated.use #LINK_TYPE_PERMISSIONSstatic final String
Deprecated.use #LINK_TYPE_PORTAL_CONTENTstatic final String
Deprecated.use #LINK_TYPE_PROPERTIESstatic final String
Link target property, e.g.static final String
Owner name property of an objectstatic final String
Parent name property of an objectstatic final String
Tooltip property ([name]: [description]).static final String
Reference icon type.static final String
Deprecated.use #LINK_TYPE_SUBSCRIPTIONSstatic final String
Thumbnail icon type.static final String
Deprecated.use #LINK_TYPE_THUMBNAILSstatic final String
Deprecated.use #LINK_TYPE_VERSIONS -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the specified user can view the specified item.void
Throws aPortalAccessException
if the specified user cannot view the specified item.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.Gets the css style content for the specified item.Gets the css style content for the specified item.getDefaultLinkType
(IURI itemId) Returns the default link type for the specified item.Returns a formatted display for the value of the view's specified property.getHierachicalUri
(IURI itemId) Returns natural hierarchical URI for the given item.Gets the web path, relative to the web server root, to the default icon representing this resource.Gets the web path, relative to the web server root, to the specified type of icon representing this resource.Gets the web path, relative to the web server root, to the default view of the resource.Gets the web path, relative to the web server root, to the specified view of the resource.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
True if the specified view represents an active, enabled, and addressable resource.Returns the standard view of the specified item.Returns the view of the specified item, filtered for the specified user.Methods inherited from interface com.webmethods.portal.system.IComponent
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
Methods inherited from interface com.webmethods.portal.system.init.IInitializable
init, shutdown
-
Field Details
-
PROPERTY_TOOLTIP
Tooltip property ([name]: [description]).- See Also:
-
PROPERTY_LINK_TARGET
Link target property, e.g. _self, _parent, _blank- See Also:
-
PROPERTY_OWNER_NAME
Owner name property of an object- See Also:
-
PROPERTY_PARENT_NAME
Parent name property of an object- See Also:
-
LINK_TYPE_COMMENTS
Comments/notes about item.- See Also:
-
LINK_TYPE_CONTENT
External content (external website -- http://www.google.com/ -- or external application -- document.pdf).- See Also:
-
LINK_TYPE_DETAILS
Extra/advanced details (ex: details folder listing).- See Also:
-
LINK_TYPE_EDIT
Item's editable custom properties (ex: edit portal page).- See Also:
-
LINK_TYPE_HELP
Item-specific help.- See Also:
-
LINK_TYPE_HELP_MAXIMIZED
Item-specific help in a maximized state- See Also:
-
LINK_TYPE_MAXIMIZED
Maximized view of item.- See Also:
-
LINK_TYPE_RESTORED
Restored (aka normal or expanded) view of item.- See Also:
-
LINK_TYPE_MINIMIZED
Minimized (aka collapsed) view of item.- See Also:
-
LINK_TYPE_PORTLET_STANDALONE
Standalone view of the portlet- See Also:
-
LINK_TYPE_PERMISSIONS
Item's permissions settings.- See Also:
-
LINK_TYPE_PORTAL_CONTENT
Inline portal content: content rendered within portal page.- See Also:
-
LINK_TYPE_PROPERTIES
Item's portal metadata.- See Also:
-
LINK_TYPE_SUBSCRIPTIONS
Subscriptions to item.- See Also:
-
LINK_TYPE_THUMBNAILS
Thumbnail(s) of content.- See Also:
-
LINK_TYPE_VERSIONS
Item's version history.- See Also:
-
DEFAULT_PAGE_SIZE
static final int DEFAULT_PAGE_SIZEDefault page size.- See Also:
-
DEFAULT_SORT
Default sort key.- See Also:
-
DEFAULT_ORDER
Default display order.- See Also:
-
REFERENCE_ICON_TYPE
Reference icon type.- See Also:
-
LARGE_ICON_TYPE
Large icon type.- See Also:
-
THUMBNAIL_ICON_TYPE
Thumbnail icon type.- See Also:
-
LINK_TYPE
- See Also:
-
CONTENT_LINK_TYPE
Deprecated.use #LINK_TYPE_CONTENT- See Also:
-
PORTAL_CONTENT_LINK_TYPE
Deprecated.use #LINK_TYPE_PORTAL_CONTENT- See Also:
-
PROPERTIES_LINK_TYPE
Deprecated.use #LINK_TYPE_PROPERTIES- See Also:
-
PERMISSIONS_LINK_TYPE
Deprecated.use #LINK_TYPE_PERMISSIONS- See Also:
-
COMMENTS_LINK_TYPE
Deprecated.use #LINK_TYPE_COMMENTS- See Also:
-
SUBSCRIPTIONS_LINK_TYPE
Deprecated.use #LINK_TYPE_SUBSCRIPTIONS- See Also:
-
VERSIONS_LINK_TYPE
Deprecated.use #LINK_TYPE_VERSIONS- See Also:
-
DETAILS_LINK_TYPE
Deprecated.use #LINK_TYPE_DETAILS- See Also:
-
THUMBNAILS_LINK_TYPE
Deprecated.use #LINK_TYPE_THUMBNAILS- See Also:
-
-
Method Details
-
canView
Returns true if the specified user can view the specified item.- Parameters:
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 theIContext.SCOPE_REQUEST
attributes on the user'sIContext
.- Returns:
- True if user can view the item, false if they can't.
- Throws:
PortalException
- if the userId is invalid.
-
checkView
void checkView(IURI itemId, IThingID userId, Map<?, ?> capabilities) throws PortalException, PortalAccessExceptionThrows aPortalAccessException
if the specified user cannot view the specified item.- Parameters:
itemId
- Item to view.userId
- User whose access to test.capabilities
- User's capabilities. Null for default.- Throws:
PortalAccessException
- if the specified user cannot view the specified item.PortalException
- if an error occurred checking access.
-
fireViewEvent
Fires a view properties event.- Parameters:
itemId
- Item whose properties were viewed.userId
- User who viewed the properties.status
- Status of the event (successful, denied, error).- Throws:
PortalException
- if an error occurs raising the event.
-
view
Returns the standard view of the specified item.- Parameters:
itemId
- Item to view.- Returns:
- View of item or null.
- Throws:
PortalException
- if an error occurs.
-
view
Returns the view of the specified item, filtered for the specified user.- Parameters:
itemId
- Item to view.userId
- User for which to filter the view.- Returns:
- View of item or null.
- Throws:
PortalException
- if an error occurs.
-
getIcon
Gets the web path, relative to the web server root, to the default icon representing this resource.- Parameters:
itemId
- Item for which to get the icon.- Returns:
- Icon path (such as '/server/ui/images/icon_basic.gif').
- Throws:
PortalException
- if an error occurs.
-
getIcon
Gets the web path, relative to the web server root, to the specified type of icon representing this resource.- Parameters:
itemId
- Item for which to get the icon.type
- Icon type (ie 'reference'). Null for default icon.- Returns:
- Icon path (such as '/server/ui/images/icon_basic.gif').
- Throws:
PortalException
- if an error occurs.
-
getLink
Gets the web path, relative to the web server root, to the default view of the resource.- Parameters:
itemId
- Item for which to get the link.- Returns:
- Link path (such as '/server/nis/home').
- Throws:
PortalException
- if an error occurs.
-
getHierachicalUri
Returns natural hierarchical URI for the given item. May return null if uri may not be produced- Parameters:
itemId
-- Returns:
- Throws:
PortalException
-
getLink
Gets the web path, relative to the web server root, to the specified view of the resource.- Parameters:
itemId
- Item for which to get the link.type
- View type (ie 'content' or 'properties'). Null for default view.- Returns:
- Link path (such as '/server/nis/home').
- Throws:
PortalException
- if an error occurs.
-
getDefaultLinkType
Returns the default link type for the specified item. If the default link to the item will return a properties page, the type should bePROPERTIES_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 beCONTENT_LINK_TYPE
.- Parameters:
itemId
- Item of interest.- Returns:
- Default link type.
-
getCss
Gets the css style content for the specified item. A sample style follows:
table.random908983274 { padding: 2px; } td.random908983274 { color: pink; }
- Parameters:
itemId
- Item for which to get the css.- Returns:
- Css style content.
- Throws:
PortalException
- if an error occurs.
-
getCss
Gets the css style content for the specified item. A sample style follows:
table.random908983274 { padding: 2px; } td.random908983274 { color: pink; }
- Parameters:
itemId
- Item for which to get the css.type
- Context type (ie 'leftnav'). Null for default css.- Returns:
- Css style content.
- Throws:
PortalException
- if an error occurs.
-
getListProperty
Returns a condensed display string, appropriate for a table listing display, representing the value of the view's specified property.- Parameters:
view
- View whose property to get.property
- Property to display.- Returns:
- List property text.
- Throws:
PortalException
- if an error occurs.
-
getListPropertyJS
Same as getListProperty, but the result is JS encoded suitable for use in scripting.- Throws:
PortalException
-
getListPropertyHTML
Same as getListProperty, but the result is HTML encoded for direct display in browser.- Throws:
PortalException
-
getFormattedProperty
String getFormattedProperty(IView view, String property, Map<String, Object> formatInfo) throws PortalExceptionReturns a formatted display for the value of the view's specified property.- Parameters:
view
- View whose property to get.property
- Property to display.formatInfo
- Formatting information.- Returns:
- Formatted property content.
- Throws:
PortalException
- if an error occurs.
-
isEnabled
True if the specified view represents an active, enabled, and addressable resource.- Parameters:
view
- View to test.- Returns:
- True if the specified view represents an active, enable, and addressable resource.
- Throws:
PortalException
- if an error occurs.
-
createPagingCookie
IPagingCookie createPagingCookie(IURI itemId, IThingID userId, String view, int start, int pageSize, String sort, String order) throws PortalException 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.- Parameters:
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.- Returns:
- Paging cookie or null.
- Throws:
PortalException
- if an error occurs.
-