Package com.webmethods.portal.mech.dir
Interface IPrincipalAttributeMechanics
- All Superinterfaces:
IComponent
,IInitializable
,IMechanics
,ISystemHandler
,IViewableMechanics
Date: Sep 7, 2004
-
Field Summary
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
canModifyPrincipal
(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID) Determines if the given user has rights to modify the specified principalvoid
checkAccess
(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID) whether this user can access this principalvoid
checkModifyPrincipal
(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID) Determines if the given user has rights to modify the specified principalvoid
deletePrincipal
(IURI principalURI) Deletes the attribute storage object for a given principal and attribute providerdefault void
fireModifyPrincipalEvent
(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID, DifferenceMap differenceMap) Fire an event containing the difference map of the changed principal attributesvoid
fireModifyPrincipalEvent
(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID, String propName, Object propValue) Fire an event that the principal has been modified.default void
fireModifyPrincipalEvent
(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID, String propName, Object propValue, Object oldValue) getAllAttributes
(IURI principalURI) Get all of the available attributes from all of the principal attribute providersgetAttribute
(IURI principalURI, IThingID principalAttributeProviderID, String attrName) Retrieves an attributegetAttributeNames
(IURI principalURI, IThingID principalAttributeProviderID) The attribute namesgetAttributes
(IURI principalURI, IThingID principalAttributeProviderID) Get all of the attributes managed by this principal providergetAttributeTitles
(IURI principalURI, IThingID principalAttributeProviderID, Locale currentLocale) The attribute titlesgetTypedAttribute
(IURI principalURI, IThingID principalAttributeProviderID, String attrName) Retrieves an attributegetTypedAttributes
(IURI principalURI, IThingID principalAttributeProviderID) Get all of the attributes managed by this principal provider as TypedAttribute objectsboolean
whether this user can access this principalvoid
modifyPrincipal
(IURI principalURI, String attrName, Object attrValue, IThingID principalAttributeProviderID) Modifies an attribute managed by the principal attribute providervoid
modifyPrincipalEx
(IURI principalURI, Map<String, ?> attrMap, IThingID principalAttributeProviderID) Modifies a set of attributes managed by the principal attribute providerMethods 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.view.IViewableMechanics
canView, checkView, createPagingCookie, fireViewEvent, getCss, getCss, getDefaultLinkType, getFormattedProperty, getHierachicalUri, getIcon, getIcon, getLink, getLink, getListProperty, getListPropertyHTML, getListPropertyJS, isEnabled, view, view
-
Method Details
-
getAllAttributes
Get all of the available attributes from all of the principal attribute providers- Parameters:
principalURI
-- Returns:
- a map of name-value string-object pairs
- Throws:
PortalException
-
getAttributes
Map<String,Object> getAttributes(IURI principalURI, IThingID principalAttributeProviderID) throws PortalException Get all of the attributes managed by this principal provider- Parameters:
principalURI
-principalAttributeProviderID
- (null means the default for the service)- Returns:
- a map of name-value string-object pairs
- Throws:
PortalException
-
getAttribute
Object getAttribute(IURI principalURI, IThingID principalAttributeProviderID, String attrName) throws PortalException Retrieves an attribute- Parameters:
principalURI
-principalAttributeProviderID
- (null means the default for the service)attrName
-- Throws:
PortalException
-
getTypedAttributes
Map<String,TypedAttribute> getTypedAttributes(IURI principalURI, IThingID principalAttributeProviderID) throws PortalException Get all of the attributes managed by this principal provider as TypedAttribute objects- Parameters:
principalURI
-principalAttributeProviderID
- (null means the default for the service)- Returns:
- a map of name/TypedAttribute pairs
- Throws:
PortalException
-
getTypedAttribute
Object getTypedAttribute(IURI principalURI, IThingID principalAttributeProviderID, String attrName) throws PortalException Retrieves an attribute- Parameters:
principalURI
-principalAttributeProviderID
- (null means the default for the service)attrName
-- Returns:
- a TypedAttribute object for the given attribute name
- Throws:
PortalException
-
getAttributeNames
List<String> getAttributeNames(IURI principalURI, IThingID principalAttributeProviderID) throws PortalException The attribute names- Parameters:
principalURI
-principalAttributeProviderID
- (null means the default for the service)- Returns:
- a list of strings
- Throws:
PortalException
-
getAttributeTitles
List<String> getAttributeTitles(IURI principalURI, IThingID principalAttributeProviderID, Locale currentLocale) throws PortalException The attribute titles- Parameters:
principalURI
-principalAttributeProviderID
- (null means the default for the service)currentLocale
- (not currently used)- Returns:
- a list of titles
- Throws:
PortalException
-
canModifyPrincipal
boolean canModifyPrincipal(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID) throws PortalException, PortalAccessException Determines if the given user has rights to modify the specified principal- Parameters:
userID
- the user permissions to checkprincipalURI
- the URI to the principal object that is to be modifiedprincipalAttributeProviderID
- (null means the default for the service)- Throws:
PortalException
PortalAccessException
- if the user does not have access
-
checkModifyPrincipal
void checkModifyPrincipal(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID) throws PortalException, PortalAccessException Determines if the given user has rights to modify the specified principal- Parameters:
userID
- the user permissions to checkprincipalURI
- the URI to the principal object that is to be modifiedprincipalAttributeProviderID
- (null means the default for the service)- Throws:
PortalException
PortalAccessException
- if the user does not have access
-
modifyPrincipal
void modifyPrincipal(IURI principalURI, String attrName, Object attrValue, IThingID principalAttributeProviderID) throws PortalException Modifies an attribute managed by the principal attribute provider- Parameters:
principalURI
-attrName
-attrValue
-principalAttributeProviderID
- the principal's attribute provider (null means the default for the service)- Throws:
PortalException
-
modifyPrincipalEx
void modifyPrincipalEx(IURI principalURI, Map<String, ?> attrMap, IThingID principalAttributeProviderID) throws PortalExceptionModifies a set of attributes managed by the principal attribute provider- Parameters:
principalURI
-attrMap
- a Map of key/value pairs representing attributesprincipalAttributeProviderID
- the principal's attribute provider (null means the default for the service)- Throws:
PortalException
-
fireModifyPrincipalEvent
void fireModifyPrincipalEvent(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID, String propName, Object propValue) throws PortalException Fire an event that the principal has been modified.- Parameters:
userID
- the current user IDprincipalURI
- the principal that was modifiedprincipalAttributeProviderID
- (null means the default for the service)- Throws:
PortalException
-
fireModifyPrincipalEvent
default void fireModifyPrincipalEvent(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID, String propName, Object propValue, Object oldValue) throws PortalException - Throws:
PortalException
-
fireModifyPrincipalEvent
default void fireModifyPrincipalEvent(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID, DifferenceMap differenceMap) throws PortalException Fire an event containing the difference map of the changed principal attributes- Parameters:
userID
- the current user IDprincipalURI
- the principal that was modifiedprincipalAttributeProviderID
- the principal's attribute provider (null means the default for the service)differenceMap
- difference map of the attributes that have been changed- Throws:
PortalException
-
hasAccess
boolean hasAccess(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID) throws PortalException whether this user can access this principal- Parameters:
userID
-principalURI
-- Returns:
- whether this user has access to modify a user
- Throws:
PortalAccessException
PortalException
-
checkAccess
void checkAccess(IThingID userID, IURI principalURI, IThingID principalAttributeProviderID) throws PortalException, PortalAccessException whether this user can access this principal- Parameters:
userID
-principalURI
-- Throws:
PortalAccessException
PortalException
-
deletePrincipal
Deletes the attribute storage object for a given principal and attribute provider- Parameters:
principalURI
-- Throws:
PortalException
-