Package com.webmethods.portal.mech.dir
Interface IDirServiceMechanics
- All Superinterfaces:
IComponent
,IInitializable
,IMechanics
,ISystemHandler
,IViewableContainerMechanics
,IViewableMechanics
-
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
canCreatePrincipal
(IThingID userID, IThingID dirServiceID, String uid) Whether this user can create a principal in the directory serviceboolean
canDeletePrincipal
(IThingID userID, IURI principalURI) Whether this user can delete a principal in the directory serviceboolean
canDeletePrincipalInDirService
(IThingID userID, IThingID dirServiceID) Whether this user can delete aany principal in the directory serviceboolean
canModifyGroupMembers
(IThingID userID, IURI groupURI) Whether this user can change the membership of a groupboolean
canModifyPrincipalMembership
(IThingID userID, IURI userURI) Whether this user can change the groups that a user belongs toboolean
canModifyRoleMembers
(IThingID userID, IURI roleURI) Whether this user can change the membership of a rolevoid
checkAccess
(IThingID userID, IThingID dirServiceID) whether this user can access this directoryServicevoid
checkCreatePrincipal
(IThingID userID, IThingID dirServiceID, String uid) Whether this user can create a principal in the directory servicevoid
checkDeletePrincipal
(IThingID userID, IURI principalURI) Whether this user can delete a principal in the directory servicevoid
checkDeletePrincipalInDirService
(IThingID userID, IThingID dirServiceID) Whether this user can delete any principal in the directory servicevoid
checkModifyGroupMembers
(IThingID userID, IURI groupURI) Whether this user can change the membership of a groupvoid
checkModifyPrincipalMembership
(IThingID userID, IURI userURI) Whether this user can change the groups that a user belongs tovoid
checkModifyRoleMembers
(IThingID userID, IURI roleURI) Whether this user can change the membership of a rolecreatePrincipal
(IThingID userID, IThingID dirServiceID, int type, String uid, Map<String, ? extends Object> properties) Creates a new principal associated with this Directory Servicevoid
deletePrincipal
(IURI principalURI) deletes a principalvoid
fireCreatePrincipalEvent
(IDirPrincipal dirPrincipal) fires an event that a new principal was createddefault void
fireDeletePrincipalEvent
(IDirPrincipal principal, IDirPrincipalList membership, IDirPrincipalList members) fires an event that a principal was deletedvoid
fireDeletePrincipalEvent
(IURI principalURI, IThingID deletedThingID, IThingID deletedDirectoryPrincipalID, IDirPrincipalList membership, IDirPrincipalList members) Deprecated.void
fireInitializePrincipalEvent
(IThingID principalID) Fires the initialize principal eventvoid
fireModifyGroupMembershipEvent
(IURI groupURI, IURI principalURI, boolean add) fires an event that a group membership was modifiedvoid
fireModifyRoleMembershipEvent
(IURI roleURI, IURI principalURI, boolean add) fires an event that a role membership was modifiedvoid
firePreInitializePrincipalEvent
(IURI principalURI) Fires the pre-initialize principal eventboolean
whether this user can access this directoryServiceinitializePrincipal
(IURI principalURI) Initialize the principal in the storage service.listPrincipals
(IThingID dirServiceID, int type, int start, int end) List the registered principals, either users or roleslistPrincipalsEx
(IThingID dirServiceID, int type, IPagingCookie pagingCookie) void
modifyGroupMembership
(IURI groupURI, IURI principalURI, boolean add) modify the membership of a groupvoid
modifyRoleMembership
(IURI roleURI, IURI principalURI, boolean add) modify the membership of a rolesearch
(IThingID dirServiceID, int type, ISearchQuery searchQuery) Query based on the contents of an ISearchQuery objectsearch
(IThingID dirServiceID, int type, ISearchQuery searchQuery, IPagingCookie pagingCookie) Query based on the contents of an ISearchQuery objectThis isn't an LDAP query, but merely a wildcard query, such as 'bob*'search
(IThingID dirServiceID, int type, String queryString, IPagingCookie pagingCookie) This isn't an LDAP query, but merely a wildcard query, such as 'bob'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.view.IViewableContainerMechanics
createPagingCookie
Methods inherited from interface com.webmethods.portal.mech.view.IViewableMechanics
canView, checkView, fireViewEvent, getCss, getCss, getDefaultLinkType, getFormattedProperty, getHierachicalUri, getIcon, getIcon, getLink, getLink, getListProperty, getListPropertyHTML, getListPropertyJS, isEnabled, view, view
-
Method Details
-
initializePrincipal
Initialize the principal in the storage service. Loads the principals group memberships and obtains a database ID- Parameters:
principalURI
- the principal to initialize- Returns:
- the IThingID
- Throws:
PortalException
-
firePreInitializePrincipalEvent
Fires the pre-initialize principal event- Parameters:
principalURI
- the principalURI that is about to be initialized- Throws:
PortalException
-
fireInitializePrincipalEvent
Fires the initialize principal event- Parameters:
principalID
- the principalID the event corresponds to- Throws:
PortalException
-
hasAccess
whether this user can access this directoryService- Parameters:
userID
-dirServiceID
-- Returns:
- Throws:
PortalAccessException
PortalException
-
checkAccess
void checkAccess(IThingID userID, IThingID dirServiceID) throws PortalException, PortalAccessException whether this user can access this directoryService- Parameters:
userID
-dirServiceID
-- Throws:
PortalAccessException
PortalException
-
listPrincipals
IDirPrincipalList listPrincipals(IThingID dirServiceID, int type, int start, int end) throws PortalException List the registered principals, either users or roles- Parameters:
dirServiceID
- the thingid of the directory servicetype
- eitherIDirConstants.TYPE_USER
orIDirConstants.TYPE_GROUP
start
- 0 is the first possible entryend
- must be greater then start or -1 for all- Returns:
- the
IDirPrincipalList
- Throws:
PortalException
-
listPrincipalsEx
IDirPrincipalList listPrincipalsEx(IThingID dirServiceID, int type, IPagingCookie pagingCookie) throws PortalException - Parameters:
dirServiceID
- the thingid of the directory servicetype
- eitherIDirConstants.TYPE_USER
orIDirConstants.TYPE_GROUP
pagingCookie
-IPagingCookie
- Returns:
- the
IDirPrincipalList
- Throws:
PortalException
- See Also:
-
search
IDirPrincipalList search(IThingID dirServiceID, int type, String queryString) throws PortalException This isn't an LDAP query, but merely a wildcard query, such as 'bob*'- Parameters:
dirServiceID
- the thingid of the directory servicetype
- eitherIDirConstants.TYPE_USER
orIDirConstants.TYPE_GROUP
queryString
-- Returns:
- the
IDirPrincipalList
- Throws:
PortalException
-
search
IDirPrincipalList search(IThingID dirServiceID, int type, String queryString, IPagingCookie pagingCookie) throws PortalException This isn't an LDAP query, but merely a wildcard query, such as 'bob'- Parameters:
dirServiceID
- the thingid of the directory servicetype
- eitherIDirConstants.TYPE_USER
orIDirConstants.TYPE_GROUP
queryString
-pagingCookie
-- Returns:
- the
IDirPrincipalList
- Throws:
PortalException
-
search
IDirPrincipalList search(IThingID dirServiceID, int type, ISearchQuery searchQuery) throws PortalException Query based on the contents of an ISearchQuery object- Parameters:
dirServiceID
- the thingid of the directory servicetype
- eitherIDirConstants.TYPE_USER
orIDirConstants.TYPE_GROUP
searchQuery
-pagingCookie
-- Returns:
- the
IDirPrincipalList
- Throws:
PortalException
-
search
IDirPrincipalList search(IThingID dirServiceID, int type, ISearchQuery searchQuery, IPagingCookie pagingCookie) throws PortalException Query based on the contents of an ISearchQuery object- Parameters:
dirServiceID
- the thingid of the directory servicetype
- eitherIDirConstants.TYPE_USER
orIDirConstants.TYPE_GROUP
searchQuery
-pagingCookie
-- Returns:
- the
IDirPrincipalList
- Throws:
PortalException
-
canCreatePrincipal
boolean canCreatePrincipal(IThingID userID, IThingID dirServiceID, String uid) throws PortalException Whether this user can create a principal in the directory service- Parameters:
dirServiceID
-userID
-uid
-- Throws:
PortalAccessException
PortalException
-
checkCreatePrincipal
void checkCreatePrincipal(IThingID userID, IThingID dirServiceID, String uid) throws PortalAccessException, PortalException Whether this user can create a principal in the directory service- Parameters:
dirServiceID
-userID
-uid
-- Throws:
PortalAccessException
PortalException
-
createPrincipal
IDirPrincipal createPrincipal(IThingID userID, IThingID dirServiceID, int type, String uid, Map<String, ? extends Object> properties) throws PortalExceptionCreates a new principal associated with this Directory Service- Parameters:
type
- eitherIDirConstants.TYPE_USER
orIDirConstants.TYPE_GROUP
uid
-properties
- name-value pairs- Returns:
- a new IDirPrincipal
- Throws:
PortalException
-
fireCreatePrincipalEvent
fires an event that a new principal was created- Throws:
PortalException
-
canDeletePrincipal
Whether this user can delete a principal in the directory service- Parameters:
principalURI
-userID
-- Throws:
PortalAccessException
PortalException
-
checkDeletePrincipal
void checkDeletePrincipal(IThingID userID, IURI principalURI) throws PortalException, PortalAccessException Whether this user can delete a principal in the directory service- Parameters:
principalURI
-- Throws:
PortalAccessException
PortalException
-
canDeletePrincipalInDirService
boolean canDeletePrincipalInDirService(IThingID userID, IThingID dirServiceID) throws PortalException Whether this user can delete aany principal in the directory service- Parameters:
dirServiceID
-userID
-- Throws:
PortalAccessException
PortalException
-
checkDeletePrincipalInDirService
void checkDeletePrincipalInDirService(IThingID userID, IThingID dirServiceID) throws PortalException, PortalAccessException Whether this user can delete any principal in the directory service- Parameters:
dirServiceID
-- Throws:
PortalAccessException
PortalException
-
deletePrincipal
deletes a principal- Parameters:
principalURI
- the principal to delete- Throws:
PortalException
-
fireDeletePrincipalEvent
@Deprecated void fireDeletePrincipalEvent(IURI principalURI, IThingID deletedThingID, IThingID deletedDirectoryPrincipalID, IDirPrincipalList membership, IDirPrincipalList members) throws PortalException Deprecated.fires an event that a principal was deleted- Throws:
PortalException
-
fireDeletePrincipalEvent
default void fireDeletePrincipalEvent(IDirPrincipal principal, IDirPrincipalList membership, IDirPrincipalList members) throws PortalException fires an event that a principal was deleted- Throws:
PortalException
-
canModifyGroupMembers
Whether this user can change the membership of a group- Parameters:
groupURI
-userID
-- Throws:
PortalAccessException
PortalException
-
canModifyRoleMembers
Whether this user can change the membership of a role- Parameters:
roleURI
-userID
-- Throws:
PortalAccessException
PortalException
-
canModifyPrincipalMembership
Whether this user can change the groups that a user belongs to- Parameters:
userURI
-userID
-- Throws:
PortalAccessException
PortalException
-
checkModifyGroupMembers
void checkModifyGroupMembers(IThingID userID, IURI groupURI) throws PortalException, PortalAccessException Whether this user can change the membership of a group- Parameters:
groupURI
-- Throws:
PortalAccessException
PortalException
-
checkModifyRoleMembers
void checkModifyRoleMembers(IThingID userID, IURI roleURI) throws PortalException, PortalAccessException Whether this user can change the membership of a role- Parameters:
roleURI
-- Throws:
PortalAccessException
PortalException
-
checkModifyPrincipalMembership
Whether this user can change the groups that a user belongs to- Parameters:
userURI
-userID
-- Throws:
PortalAccessException
PortalException
-
modifyGroupMembership
modify the membership of a group- Parameters:
groupURI
- the group to modifyprincipalURI
- the principal to add or removeadd
- whether to add or remove the principal from the group- Throws:
PortalException
-
modifyRoleMembership
modify the membership of a role- Parameters:
roleURI
- the group to modifyprincipalURI
- the principal to add or removeadd
- whether to add or remove the principal from the group- Throws:
PortalException
-
fireModifyGroupMembershipEvent
void fireModifyGroupMembershipEvent(IURI groupURI, IURI principalURI, boolean add) throws PortalException fires an event that a group membership was modified- Parameters:
groupURI
- the group to modifyprincipalURI
- the principal to add or removeadd
- whether to add or remove the principal from the group- Throws:
PortalException
-
fireModifyRoleMembershipEvent
void fireModifyRoleMembershipEvent(IURI roleURI, IURI principalURI, boolean add) throws PortalException fires an event that a role membership was modified- Parameters:
roleURI
- the group to modifyprincipalURI
- the principal to add or removeadd
- whether to add or remove the principal from the group- Throws:
PortalException
-