com.webmethods.portal.bizPolicy.biz.dir
Interface IDirServiceBizPolicy


public interface IDirServiceBizPolicy

Provides service level biz policies (commands) for the directory system


Method Summary
 void addPrincipalToGroup(IContext context, IURI principalURI, IURI groupURI)
          Adds a principal to a group.
 void addPrincipalToRole(IContext context, IURI principalURI, IURI roleURI)
          Adds a principal to a role.
 IDirPrincipal createPrincipal(IContext context, IThingID dirServiceID, int type, String uid, Map properties)
          Creates a new principal associated with this Directory Service
 void deletePrincipal(IContext context, IURI principalURI)
          Deletes a principal
 IThingID initializePrincipal(IContext context, IURI principalURI)
          Initializes a principal (user/group/role).
 IDirPrincipalList listPrincipals(IContext context, IThingID dirServiceID, int type, int start, int end)
          List the registered principals, either users or roles
 IDirPrincipalList listPrincipalsEx(IContext context, IThingID dirServiceID, int type, IPagingCookie pagingCookie)
           
 void removePrincipalFromGroup(IContext context, IURI principalURI, IURI groupURI)
          Removes a principal from a group.
 void removePrincipalFromRole(IContext context, IURI principalURI, IURI roleURI)
          Removes a principal from a role.
 IDirPrincipalList searchDirectory(IContext context, IThingID dirServiceID, int type, String queryString)
          This isn't an LDAP query, but merely a wildcard query, such as 'bob' that searches for ids
 IDirPrincipalList searchDirectory(IContext context, IThingID dirServiceID, int type, String queryString, IPagingCookie pagingCookie)
          This isn't an LDAP query, but merely a wildcard query, such as 'bob' that searches for ids
 IDirPrincipalList searchDirectoryRefined(IContext context, IThingID dirServiceID, int type, ISearchQuery searchQuery)
          Query for principals using an ISearchQuery object rather than a single keyword
 IDirPrincipalList searchDirectoryRefined(IContext context, IThingID dirServiceID, int type, ISearchQuery searchQuery, IPagingCookie pagingCookie)
          Query for principals using an ISearchQuery object rather than a single keyword
 

Method Detail

listPrincipals

IDirPrincipalList listPrincipals(IContext context,
                                 IThingID dirServiceID,
                                 int type,
                                 int start,
                                 int end)
                                 throws BizException
List the registered principals, either users or roles

Parameters:
context -
dirServiceID - the thingid of the directory service
type - either com.webmethods.portal.service.dir.IDirSystem#TYPE_USER or com.webmethods.portal.service.dir.IDirSystem#TYPE_GROUP
start - 0 is the first possible entry
end - must be greater then start or -1 for all
Returns:
the IDirPrincipalList
Throws:
BizException

listPrincipalsEx

IDirPrincipalList listPrincipalsEx(IContext context,
                                   IThingID dirServiceID,
                                   int type,
                                   IPagingCookie pagingCookie)
                                   throws BizException
Parameters:
context -
dirServiceID - the thingid of the directory service
type - either com.webmethods.portal.service.dir.IDirSystem#TYPE_USER or com.webmethods.portal.service.dir.IDirSystem#TYPE_GROUP
pagingCookie - com.webmethods.portal.service.view.IPagingCookie
Returns:
the IDirPrincipalList
Throws:
BizException
See Also:
IDirServiceBizPolicy.listPrincipals(com.webmethods.portal.bizPolicy.IContext, com.webmethods.portal.service.meta2.thing.IThingID, int, int, int), IViewablePolicy.getPagingCookie(com.webmethods.portal.bizPolicy.IContext, com.webmethods.portal.system.IURI, String)

searchDirectory

IDirPrincipalList searchDirectory(IContext context,
                                  IThingID dirServiceID,
                                  int type,
                                  String queryString)
                                  throws BizException
This isn't an LDAP query, but merely a wildcard query, such as 'bob' that searches for ids

Parameters:
context -
dirServiceID - the thingid of the directory service
type - either com.webmethods.portal.service.dir.IDirSystem#TYPE_USER or com.webmethods.portal.service.dir.IDirSystem#TYPE_GROUP
queryString -
Returns:
the IDirPrincipalList
Throws:
BizException

searchDirectory

IDirPrincipalList searchDirectory(IContext context,
                                  IThingID dirServiceID,
                                  int type,
                                  String queryString,
                                  IPagingCookie pagingCookie)
                                  throws BizException
This isn't an LDAP query, but merely a wildcard query, such as 'bob' that searches for ids

Parameters:
context -
dirServiceID - the thingid of the directory service
type - either com.webmethods.portal.service.dir.IDirSystem#TYPE_USER or com.webmethods.portal.service.dir.IDirSystem#TYPE_GROUP
queryString -
pagingCookie -
Returns:
the IDirPrincipalList
Throws:
BizException

searchDirectoryRefined

IDirPrincipalList searchDirectoryRefined(IContext context,
                                         IThingID dirServiceID,
                                         int type,
                                         ISearchQuery searchQuery)
                                         throws BizException
Query for principals using an ISearchQuery object rather than a single keyword

Parameters:
context -
dirServiceID - the thingid of the directory service
type - either com.webmethods.portal.service.dir.IDirSystem#TYPE_USER or com.webmethods.portal.service.dir.IDirSystem#TYPE_GROUP
searchQuery -
pagingCookie -
Returns:
the IDirPrincipalList
Throws:
BizException

searchDirectoryRefined

IDirPrincipalList searchDirectoryRefined(IContext context,
                                         IThingID dirServiceID,
                                         int type,
                                         ISearchQuery searchQuery,
                                         IPagingCookie pagingCookie)
                                         throws BizException
Query for principals using an ISearchQuery object rather than a single keyword

Parameters:
context -
dirServiceID - the thingid of the directory service
type - either com.webmethods.portal.service.dir.IDirSystem#TYPE_USER or com.webmethods.portal.service.dir.IDirSystem#TYPE_GROUP
searchQuery -
pagingCookie -
Returns:
the IDirPrincipalList
Throws:
BizException

initializePrincipal

IThingID initializePrincipal(IContext context,
                             IURI principalURI)
                             throws BizException
Initializes a principal (user/group/role). This implies registration with the portal's internal data store

Parameters:
context -
principalURI -
Throws:
BizException

createPrincipal

IDirPrincipal createPrincipal(IContext context,
                              IThingID dirServiceID,
                              int type,
                              String uid,
                              Map properties)
                              throws BizException
Creates a new principal associated with this Directory Service

Parameters:
type - either com.webmethods.portal.service.dir.IDirSystem#TYPE_USER or com.webmethods.portal.service.dir.IDirSystem#TYPE_GROUP
uid -
properties - name-value pairs
Returns:
a new IDirPrincipal
Throws:
BizException

deletePrincipal

void deletePrincipal(IContext context,
                     IURI principalURI)
                     throws BizException
Deletes a principal

Parameters:
principalURI -
Throws:
BizException

addPrincipalToGroup

void addPrincipalToGroup(IContext context,
                         IURI principalURI,
                         IURI groupURI)
                         throws BizException
Adds a principal to a group. Note, both the principal and the group must belong to the same com.webmethods.portal.service.dir.IDirService

Parameters:
principalURI -
groupURI -
Throws:
BizException

addPrincipalToRole

void addPrincipalToRole(IContext context,
                        IURI principalURI,
                        IURI roleURI)
                        throws BizException
Adds a principal to a role. Note, not all roles can be modified

Parameters:
principalURI -
roleURI -
Throws:
BizException

removePrincipalFromGroup

void removePrincipalFromGroup(IContext context,
                              IURI principalURI,
                              IURI groupURI)
                              throws BizException
Removes a principal from a group. Note, both the principal and the group must belong to the same com.webmethods.portal.service.dir.IDirService

Parameters:
principalURI -
groupURI -
Throws:
BizException

removePrincipalFromRole

void removePrincipalFromRole(IContext context,
                             IURI principalURI,
                             IURI roleURI)
                             throws BizException
Removes a principal from a role. Note, not all roles can be modified

Parameters:
principalURI -
roleURI -
Throws:
BizException