Interface IPortletMechanics
- All Superinterfaces:
IAccessMechanics
,IBasicMechanics
,IClipboardMechanics
,IComponent
,IInitializable
,IMechanics
,ISubscribableMechanics
,ISystemHandler
,IViewableMechanics
- All Known Subinterfaces:
ILocalePortletMechanics
,IXTypeMechanics
Base mechanics for for portlet instances, i.e. things with
IThingIDBase.getTypeID()
equal to
IThingType.PORTLET
.-
Field Summary
Fields inherited from interface com.webmethods.portal.mech.access.IAccessMechanics
ACCESS_DENIED, ACCESS_GRANTED, ACCESS_RIGHT_ID, ACCESS_RIGHT_LONG_NAME, ACCESS_RIGHT_SHORT_NAME, ACCESS_RIGHTS_CONTAINER, ACCESS_UNSPECIFIED, AUTH_LEVEL_ANONYMOUS, AUTH_LEVEL_BASIC, AUTH_LEVEL_DEFAULT, AUTH_LEVEL_FULL_ACCESS, AUTH_LEVEL_KERBEROS, AUTH_LEVEL_NTLM, AUTH_LEVEL_PROPERTY
Fields inherited from interface com.webmethods.portal.mech.storage.IBasicMechanics
PROP_CUSTOM_FILE_ENCODING, PROP_FILE_ENCODING, TITLEBAR_ACTION_SHOW_ADD_TO_HOME, TITLEBAR_ACTION_SHOW_DISPLAY_OPTIONS, TITLEBAR_ACTION_SHOW_MAXIMIZED, TITLEBAR_ACTION_SHOW_MINIMIZED, TITLEBAR_ACTION_SHOW_NORMAL
Fields inherited from interface com.webmethods.portal.mech.subscription.ISubscribableMechanics
CONTENT_FORMAT_EMAIL, CONTENT_FORMAT_EMAIL_DIGEST, CONTENT_FORMAT_PORTAL_INBOX, CONTENT_FORMAT_PORTAL_INBOX_DIGEST, HEADER_FROM, HEADER_SUBJECT, HEADER_TO
Fields inherited from interface com.webmethods.portal.mech.view.IViewableMechanics
COMMENTS_LINK_TYPE, CONTENT_LINK_TYPE, DEFAULT_ORDER, DEFAULT_PAGE_SIZE, DEFAULT_SORT, DETAILS_LINK_TYPE, LARGE_ICON_TYPE, LINK_TYPE, LINK_TYPE_COMMENTS, LINK_TYPE_CONTENT, LINK_TYPE_DETAILS, LINK_TYPE_EDIT, LINK_TYPE_HELP, LINK_TYPE_HELP_MAXIMIZED, LINK_TYPE_MAXIMIZED, LINK_TYPE_MINIMIZED, LINK_TYPE_PERMISSIONS, LINK_TYPE_PORTAL_CONTENT, LINK_TYPE_PORTLET_STANDALONE, LINK_TYPE_PROPERTIES, LINK_TYPE_RESTORED, LINK_TYPE_SUBSCRIPTIONS, LINK_TYPE_THUMBNAILS, LINK_TYPE_VERSIONS, PERMISSIONS_LINK_TYPE, PORTAL_CONTENT_LINK_TYPE, PROPERTIES_LINK_TYPE, PROPERTY_LINK_TARGET, PROPERTY_OWNER_NAME, PROPERTY_PARENT_NAME, PROPERTY_TOOLTIP, REFERENCE_ICON_TYPE, SUBSCRIPTIONS_LINK_TYPE, THUMBNAIL_ICON_TYPE, THUMBNAILS_LINK_TYPE, VERSIONS_LINK_TYPE
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canUpdateUserProperties
(IThingID itemID, IThingID userID) Returns whether a given user has permissions to modify user type portlet properties.executePortletMethod
(IPortletBean portletBean, IContext context, String method) Executes portlet method on a given portletBean.void
fireExecuteMethodEvent
(IThingID itemId, IThingID userId, String method, int status) Fires an event when portlet method is executed.getAllWiredProperties
(IContext context, IPortletBean portletBean) Returns a map of all the portlet properties that contain wiring information.getPortletApplicationName
(IURI portletUri) Returns portlet application name.getPortletBean
(IURI portletUri, IThingID userID) Returns initializedIPortletBean
instance for the given portletUri and userID.getPortletContent
(IPortletBean portletBean, IContext context) Takes portletBean instance and executesIContentProvider.getContent()
method.getPortletController
(IContext context, IURI portletUri) Returns existing or creates new portlet controller beangetPortletInfo
(IURI portletUri) ReturnsIPortletInfo
for this portletgetPortletName
(IURI portletUri) Returns portlet name within portlet application.getWiredProperty
(IContext context, IPortletBean portletBean, String name) Returns the wiring information portlet property value.makePortletTypeName
(String portletAppName, String portletName) Makes composite portlet type name out of portlet application name and portlet namevoid
resolveWiring
(IContext context, IPortletBean portletBean) Resolves all the wiring properties for the portlet.void
resolveWiring
(IContext context, IPortletBean portletBean, PortletHelper portletHelper, PortletData portletData, List<PortletData> circularWiringStack) Resolves all the wiring properties for the portlet.Methods inherited from interface com.webmethods.portal.mech.access.IAccessMechanics
canRemoveSecurityRealm, canSetSecurityRealm, checkAccess, checkAccessEx, checkRemoveSecurityRealm, checkSetSecurityRealm, cloneAces, fireRemoveAcccesEvent, fireRemoveSecurityRealmEvent, fireSetAccessEvent, fireSetAuthenticationEvent, fireSetOwnerEvent, fireSetSecurityRealmEvent, getAccessEx, getAccessList, getAccessListEx, getAclView, getAuthLevelForAuthScheme, getAuthScheme, getAuthSchemeForAuthLevel, getAuthSchemeForResource, getAvailableAuthSchemes, getDefaultAuthScheme, getRightNameForValue, getRightsForType, getRightValueForName, getSecurityRealm, invalidateAcesForThing, invalidateAcesForUser, listSecurityRealmObjects, removeAces, removeSecurityRealm, setAces, setAcesEx, setSecurityRealm, setSecurityRealm
Methods inherited from interface com.webmethods.portal.mech.storage.IBasicMechanics
addNote, addReference, addRelation, canAddNote, canCloneRemote, canCreate, canDelete, canDestroy, canDoTitlebarAction, canListAccess, canListContainers, canListNotes, canRemoveAccess, canRemoveNote, canSetAccess, canSetAuthentication, canSetOwner, canUninstall, canUpdateContent, canUpdateProperties, canVerb, canViewAuthentication, canViewContent, checkAddNote, checkCloneRemote, checkCreate, checkDelete, checkDestroy, checkListAccess, checkListContainers, checkListNotes, checkRemoveAccess, checkRemoveNote, checkSetAccess, checkSetAuthentication, checkSetOwner, checkUninstall, checkUpdateContent, checkUpdateProperties, checkViewAuthentication, checkViewContent, cloneRemote, copy, create, create, delete, destroy, doAfterInstall, doAfterUpgrade, doBeforeUninstall, doBeforeUpgrade, fireAddNoteEvent, fireCacheInvalidateEvent, fireDeleteEvent, fireInsoEvent, fireListAccessEvent, fireListContainersEvent, fireListNotesEvent, firePurgeEvent, fireRemoveAcccesEvent, fireRemoveNoteEvent, fireSetAccessEvent, fireSetAuthenticationEvent, fireSetOwnerEvent, fireUpdateContentEvent, fireUpdatePropertiesEvent, fireViewAuthenticationEvent, fireViewContentEvent, getAccess, getAncestors, getAuthentication, getContent, getContent, getContentStore, getContentStore, getDependencyList, getPrimaryRelatedChild, getPrimaryRelatedContainer, getTimeToLive, isAnonymous, isBaseType, isContainer, isNormal, isReference, isVersionable, isWorkflowEnabled, listAccess, listAccess, listContainers, listContainers, listDependants, listNotes, listRelatedChildren, listRelatedContainers, move, move, prepareForDeletion, removeNote, removeReference, removeRelation, restoreXTypeConfProps, saveXTypeConfProps, setAuthentication, setOwner, setTimeToLive, undeleteAllUndestroyed, updateContent, updateContent, updateProperties, updateProperties
Methods inherited from interface com.webmethods.portal.mech.clipboard.IClipboardMechanics
canCopyToClipboard, canCutToClipboard, checkCopyToClipboard, checkCutToClipboard, copyToClipboard, cutToClipboard, getClipboard, getClipboardInfo, newClipboardItem
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
Methods inherited from interface com.webmethods.portal.mech.subscription.ISubscribableMechanics
canDeliverToPrincipal, canEditSubscription, canListSubscriptions, canViewSubscription, checkEditSubscription, checkListSubscriptions, checkViewSubscription, checkViewSubscription, createAppCriteria, createAppCriteriaFolder, createPortletSubscription, createPortletSubscription, disable, disable, disableBySystem, disableBySystem, enable, enable, fireGetAppCriteriaEvent, fireGetSubscriptionEvent, fireSetSubscriptionEvent, fireUnsubscribeEvent, fireViewSubscriptionEvent, generateNotificationContent, generateNotificationHeaders, getAppCriteria, getGroupSubscription, getSubscription, listSubscriptions, listSubscriptions, setGroupSubscription, setGroupSubscription, setSubscription, setSubscription, unsubscribe, unsubscribe, viewSubscription
Methods inherited from interface com.webmethods.portal.mech.view.IViewableMechanics
canView, checkView, createPagingCookie, fireViewEvent, getCss, getCss, getDefaultLinkType, getFormattedProperty, getHierachicalUri, getIcon, getIcon, getLink, getLink, getListProperty, getListPropertyHTML, getListPropertyJS, isEnabled, view, view
-
Method Details
-
getPortletBean
Returns initializedIPortletBean
instance for the given portletUri and userID.- Parameters:
portletUri
- The portlet instance uri, can be NULL. If NULL then only default properties from the portlet type configuration are used.userID
- Current user id, can be NULL. If NULL then user type properties are loaded, i.e. defaults from the portlet type are used.- Returns:
- initialized portlet bean with all persisted properties loaded.
- Throws:
PortalException
- See Also:
-
getPortletContent
Takes portletBean instance and executesIContentProvider.getContent()
method. TheIContext
is used for settingIPortletBean.setPortletContext(com.webmethods.portal.bizPolicy.IContext)
.- Parameters:
portletBean
- Portlet bean instancecontext
- CurrentIContext
.- Returns:
Reader
object with the portlet's content, can be NULL, if the content is directly streamed back to the HTTP client.- Throws:
PortalException
- See Also:
-
executePortletMethod
Object executePortletMethod(IPortletBean portletBean, IContext context, String method) throws PortalException Executes portlet method on a given portletBean. The method must be defined in the portlet descriptor file as PCA method. SeeIPortletMethodInfo
. Default implementation assumes execution of the method using Java Reflection API.- Parameters:
portletBean
- Portlet bean instancecontext
- CurrentIContext
method
- Name of the method to execute- Returns:
- an object returned from the portlet's method
- Throws:
PortalException
-
fireExecuteMethodEvent
void fireExecuteMethodEvent(IThingID itemId, IThingID userId, String method, int status) throws PortalException Fires an event when portlet method is executed.- Parameters:
itemId
- The portlet instance uriuserId
- The current user idmethod
- The portlet method namestatus
- Event status, can beIPortalEvent.STATUS_SUCCESS
orIPortalEvent.STATUS_ERROR
- Throws:
PortalException
-
canUpdateUserProperties
Returns whether a given user has permissions to modify user type portlet properties.- Parameters:
itemID
- Portlet instance thing iduserID
- User thing id- Returns:
- true if the user can modify user properties
- Throws:
PortalException
- See Also:
-
getWiredProperty
WiredProperty getWiredProperty(IContext context, IPortletBean portletBean, String name) throws PortalException Returns the wiring information portlet property value.- Parameters:
portletBean
- Portlet bean instancename
- of the property- Returns:
- value of the properties wiring information or null if there is none
- Throws:
PortalException
- See Also:
-
getAllWiredProperties
Map<String,WiredProperty> getAllWiredProperties(IContext context, IPortletBean portletBean) throws PortalException Returns a map of all the portlet properties that contain wiring information.- Parameters:
portletBean
- Portlet bean instance- Returns:
- a map of all the wired properties. the key is the property name and the value is the wiring information
- Throws:
PortalException
-
resolveWiring
Resolves all the wiring properties for the portlet. The wiring resolution happens automatically when a portlet is rendering and when a portlet command executes.- Parameters:
portletBean
- Portlet bean instance- Throws:
PortalException
-
resolveWiring
void resolveWiring(IContext context, IPortletBean portletBean, PortletHelper portletHelper, PortletData portletData, List<PortletData> circularWiringStack) throws PortalException Resolves all the wiring properties for the portlet. The wiring resolution happens automatically when a portlet is rendering and when a portlet command executes.- Parameters:
portletBean
- Portlet bean instanceportletHelper
- the portlet helper instance for the page, pass null if not rendering a pageportletData
- the portlet data from the page, pass null if not rendering a pagecircularWiringStack
- stack used to detect circular wiring condition- Throws:
PortalException
-
getPortletApplicationName
Returns portlet application name. This is JSR 168 concept of portlets sharing the same deployment, classloader, security model, etc)- Parameters:
portletUri
- portlet uri- Returns:
- name of the portlet application, for legacy portlets it's typically the portlet name, for jsr168 portelts it's the name of the portlet web application
- Throws:
PortalException
-
getPortletName
Returns portlet name within portlet application. This is JSR 168 concept. For legacy portlets it's the portlet name itself. For JSR 168 portelts it's the name of the portlet- Parameters:
portletUri
- portle uri- Returns:
- portlet name
- Throws:
PortalException
-
makePortletTypeName
Makes composite portlet type name out of portlet application name and portlet name- Parameters:
portletAppName
- portlet application nameportletName
- portlet name- Returns:
- composite name unuqie across all portlets
-
getPortletController
Returns existing or creates new portlet controller bean- Parameters:
context
- current user contextportletUri
- portlet URI- Returns:
- instance of the controller bean, not null
- Throws:
PortalException
-
getPortletInfo
ReturnsIPortletInfo
for this portlet- Parameters:
portletUri
- portlet URI- Returns:
- IPortletInfo
- Throws:
PortalException
-