WebLogic Process Integrator Version 1.1

com.bea.wlpi.server.principal
Interface WLPIPrincipal


public interface WLPIPrincipal
extends javax.ejb.EJBObject

Provides workflow participants based on security principals defined in an external security realm. The default implementation provides behavior, extended attributes and persistence using a database table.

See Also:
WLPIPrincipalHome

Method Summary
 void addOrganization(OrganizationInfo orgInfo)
          Create a new organization.
 void addRole(RoleInfo roleInfo)
          Create a new role.
 void addUserToOrganization(java.lang.String userId, java.lang.String orgId)
          Add a user to an organization.
 void addUserToRole(java.lang.String userId, java.lang.String orgId, java.lang.String roleId)
          Add a user to a role.
 java.security.Principal createWlpiUser(java.lang.String userId, java.lang.String pswd)
          Create a new user in the realm and add it to the wlpiUsers group.
 void deleteOrganization(java.lang.String orgId)
          Delete an organization.
 void deleteRole(java.lang.String orgId, java.lang.String roleId)
          Delete a role.
 java.util.List getAllOrganizations(boolean obtainAttributes)
          List all defined organizations.
 java.util.List getAllUsers(boolean obtainAttributes)
          List all defined users.
 OrganizationInfo getOrganizationInfo(java.lang.String orgId)
          Get further information about the specified organization.
 java.util.List getOrganizationsForUser(java.lang.String userId, boolean obtainAttributes)
          List the organizations to which the specified user belongs.
 RoleInfo getRoleInfo(java.lang.String roleId, java.lang.String orgId)
          Get further information about the specified role.
 java.util.List getRolesForUser(java.lang.String orgId, java.lang.String userId, boolean obtainAttributes)
          List the roles to which the specified user belongs.
 java.util.List getRolesInOrganization(java.lang.String orgId, boolean obtainAttributes)
          List the roles defined for an organization.
 java.lang.String getSecurityRealmClassName()
          Return the class name of the installed WebLogic security realm.
 UserInfo getUserInfo(java.lang.String userId)
          Get further information about the specified user.
 java.util.List getUsersInOrganization(java.lang.String orgId, boolean obtainAttributes)
          List the users in the specified organization.
 java.util.List getUsersInRole(java.lang.String roleId, java.lang.String orgId, boolean obtainAttributes)
          List the users in the specified role of the specified organization.
 boolean isManageableSecurityRealm()
          Check whether the realm in question is manageable.
 boolean isRoleInOrganization(java.lang.String roleId, java.lang.String orgId)
          Check whether a role is defined within a particular organization.
 boolean isUserInOrganization(java.lang.String userId, java.lang.String orgId)
          Check whether a user belongs to particular organization.
 void ping()
          A "dummy" method for the client to ping.
 void removeUserFromOrganization(java.lang.String userId, java.lang.String orgId)
          Remove a user from an organization.
 void removeUserFromRole(java.lang.String userId, java.lang.String orgId, java.lang.String roleId)
          Remove a user from a role.
 void setOrganizationInfo(OrganizationInfo orgInfo)
          Update the information about an organization.
 void setRoleInfo(RoleInfo roleInfo)
          Update the information about a role.
 void setUserInfo(UserInfo userInfo)
          Update the information about a user.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

addOrganization

public void addOrganization(OrganizationInfo orgInfo)
                     throws java.rmi.RemoteException,
                            WorkflowException
Create a new organization.
Parameters:
orgInfo - Values for the new organization to create.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not manageable, or if any exception occurred.

ping

public void ping()
          throws java.rmi.RemoteException
A "dummy" method for the client to ping. This is to avoid a WLS "feature" that dereferences a remote object that has not been referenced for a certain amound of time. This causes the client to die.
Throws:
java.rmi.RemoteException - if a communications error occurred.

addRole

public void addRole(RoleInfo roleInfo)
             throws java.rmi.RemoteException,
                    WorkflowException
Create a new role.
Parameters:
roleInfo - Values for the new role to create.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not manageable, or if any exception occurred.

addUserToOrganization

public void addUserToOrganization(java.lang.String userId,
                                  java.lang.String orgId)
                           throws java.rmi.RemoteException,
                                  WorkflowException
Add a user to an organization.
Parameters:
userId - The ID of the user to add.
orgId - The ID of the organization.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not manageable, or if any exception occurred.

addUserToRole

public void addUserToRole(java.lang.String userId,
                          java.lang.String orgId,
                          java.lang.String roleId)
                   throws java.rmi.RemoteException,
                          WorkflowException
Add a user to a role.
Parameters:
userId - The ID of the user to add.
orgId - The ID of the organization.
roleId - The ID of the role within organization orgId.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not manageable, or if any exception occurred.

deleteOrganization

public void deleteOrganization(java.lang.String orgId)
                        throws java.rmi.RemoteException,
                               WorkflowException
Delete an organization.
Parameters:
orgId - The ID of the organization to delete.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not manageable, or if any exception occurred.

deleteRole

public void deleteRole(java.lang.String orgId,
                       java.lang.String roleId)
                throws java.rmi.RemoteException,
                       WorkflowException
Delete a role.
Parameters:
orgId - The ID of the organization containing the role to delete.
roleId - The ID of the role to delete.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not manageable, or if any exception occurred.

getAllOrganizations

public java.util.List getAllOrganizations(boolean obtainAttributes)
                                   throws java.rmi.RemoteException,
                                          WorkflowException
List all defined organizations.
Parameters:
obtainAttributes - true to return all OrganizationInfo attributes, false for just the orgIds.
Returns:
A list of OrganizationInfo objects.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not listable, or if any exception occurred.

getAllUsers

public java.util.List getAllUsers(boolean obtainAttributes)
                           throws java.rmi.RemoteException,
                                  WorkflowException
List all defined users.
Parameters:
obtainAttributes - true to return all UserInfo attributes, false for just the userIds.
Returns:
A list of UserInfo objects.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not listable, or if any exception occurred.

getOrganizationInfo

public OrganizationInfo getOrganizationInfo(java.lang.String orgId)
                                     throws java.rmi.RemoteException,
                                            WorkflowException
Get further information about the specified organization.
Parameters:
orgId - The ID of the organization about which further information is required.
Returns:
Further information about the organization.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not listable, or if any exception occurred.

getRoleInfo

public RoleInfo getRoleInfo(java.lang.String roleId,
                            java.lang.String orgId)
                     throws java.rmi.RemoteException,
                            WorkflowException
Get further information about the specified role.
Parameters:
orgId - The ID of the organization containing the role.
roleId - The ID of the role about which further information is required.
Returns:
Further information about the role.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not listable, or if any exception occurred.

getUserInfo

public UserInfo getUserInfo(java.lang.String userId)
                     throws java.rmi.RemoteException,
                            WorkflowException
Get further information about the specified user.
Parameters:
userId - The ID of the user about whom further information is required.
Returns:
Further information about the user.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not listable, or if any exception occurred.

getOrganizationsForUser

public java.util.List getOrganizationsForUser(java.lang.String userId,
                                              boolean obtainAttributes)
                                       throws java.rmi.RemoteException,
                                              WorkflowException
List the organizations to which the specified user belongs.
Parameters:
userId - The ID of the user.
obtainAttributes - true to return all OrganizationInfo attributes, false for just the orgIds.
Returns:
A list of OrganizationInfo objects.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not listable, or if any exception occurred.

getRolesForUser

public java.util.List getRolesForUser(java.lang.String orgId,
                                      java.lang.String userId,
                                      boolean obtainAttributes)
                               throws java.rmi.RemoteException,
                                      WorkflowException
List the roles to which the specified user belongs.
Parameters:
orgId - The ID of the organization.
userId - The ID of the user.
obtainAttributes - true to return all RoleInfo attributes, false for just the roleIds.
Returns:
A list of RoleInfo objects.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not listable, or if any exception occurred.

getRolesInOrganization

public java.util.List getRolesInOrganization(java.lang.String orgId,
                                             boolean obtainAttributes)
                                      throws java.rmi.RemoteException,
                                             WorkflowException
List the roles defined for an organization.
Parameters:
orgId - The ID of the organization.
obtainAttributes - true to return all RoleInfo attributes, false for just the roleIds.
Returns:
A list of RoleInfo objects.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not listable, or if any exception occurred.

getUsersInOrganization

public java.util.List getUsersInOrganization(java.lang.String orgId,
                                             boolean obtainAttributes)
                                      throws java.rmi.RemoteException,
                                             WorkflowException
List the users in the specified organization.
Parameters:
orgId - The ID of the organization.
obtainAttributes - true to return all UserInfo attributes, false for just the userIds.
Returns:
A list of UserInfo objects.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not listable, or if any exception occurred.

getUsersInRole

public java.util.List getUsersInRole(java.lang.String roleId,
                                     java.lang.String orgId,
                                     boolean obtainAttributes)
                              throws java.rmi.RemoteException,
                                     WorkflowException
List the users in the specified role of the specified organization.
Parameters:
roleId - The ID of the role.
orgId - The ID of the organization.
obtainAttributes - true to return all UserInfo attributes, false for just the userIds.
Returns:
A list of UserInfo objects.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not listable, or if any exception occurred.

getSecurityRealmClassName

public java.lang.String getSecurityRealmClassName()
                                           throws java.rmi.RemoteException,
                                                  WorkflowException
Return the class name of the installed WebLogic security realm. This enables clients to check, for example, whether the default WebLogic realm (weblogic.security.acl.internal.WLPropertyRealm) is in use, and to adjust user interfaces to reflect the fact that this realm, although manageable, does not* persist updates into the weblogic.properties file.

*As at the time of writing (WebLogic Server 5.1 SP6).

Returns:
The fully qualified realm class name.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not listable, or if any exception occurred.
See Also:
isManageableSecurityRealm()

isManageableSecurityRealm

public boolean isManageableSecurityRealm()
                                  throws java.rmi.RemoteException,
                                         WorkflowException
Check whether the realm in question is manageable. This enables client programs to enable or disable user interface controls accordingly.
Returns:
true if the security realm implements the ManageableRealm interface.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not listable, or if any exception occurred.
See Also:
getSecurityRealmClassName()

isRoleInOrganization

public boolean isRoleInOrganization(java.lang.String roleId,
                                    java.lang.String orgId)
                             throws java.rmi.RemoteException,
                                    WorkflowException
Check whether a role is defined within a particular organization.
Parameters:
roleId - The ID of the role.
orgId - The ID of the organization.
Returns:
true if role defined within organization.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not listable, or if any exception occurred.

isUserInOrganization

public boolean isUserInOrganization(java.lang.String userId,
                                    java.lang.String orgId)
                             throws java.rmi.RemoteException,
                                    WorkflowException
Check whether a user belongs to particular organization.
Parameters:
userId - The ID of the user.
orgId - The ID of the organization.
Returns:
true if user belongs to organization.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not listable, or if any exception occurred.

removeUserFromOrganization

public void removeUserFromOrganization(java.lang.String userId,
                                       java.lang.String orgId)
                                throws java.rmi.RemoteException,
                                       WorkflowException
Remove a user from an organization.
Parameters:
userId - The ID of the user to remove.
orgId - The ID of the organization.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not manageable, or if any exception occurred.

removeUserFromRole

public void removeUserFromRole(java.lang.String userId,
                               java.lang.String orgId,
                               java.lang.String roleId)
                        throws java.rmi.RemoteException,
                               WorkflowException
Remove a user from a role.
Parameters:
userId - The ID of the user to remove.
orgId - The ID of the organization.
roleId - The ID of role within the organization orgId.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the security realm is not manageable, or if any exception occurred.

setOrganizationInfo

public void setOrganizationInfo(OrganizationInfo orgInfo)
                         throws java.rmi.RemoteException
Update the information about an organization. Callers should take care that orgInfo was retrieved with obtainAttributes=true (where applicable) to avoid inadvertently clearing the attributes.
Parameters:
orgInfo - Organization information to update.
Throws:
java.rmi.RemoteException - if a communications error occurred.

setRoleInfo

public void setRoleInfo(RoleInfo roleInfo)
                 throws java.rmi.RemoteException
Update the information about a role. Callers should take care that roleInfo was retrieved with obtainAttributes=true (where applicable) to avoid inadvertently clearing the attributes.
Parameters:
roleInfo - Role information to update.
Throws:
java.rmi.RemoteException - if a communications error occurred.

setUserInfo

public void setUserInfo(UserInfo userInfo)
                 throws java.rmi.RemoteException
Update the information about a user. Callers should take care that userInfo was retrieved with obtainAttributes=true (where applicable) to avoid inadvertently clearing the attributes.
Parameters:
userInfo - User information to update.
Throws:
java.rmi.RemoteException - if a communications error occurred.

createWlpiUser

public java.security.Principal createWlpiUser(java.lang.String userId,
                                              java.lang.String pswd)
                                       throws java.rmi.RemoteException,
                                              WorkflowException
Create a new user in the realm and add it to the wlpiUsers group.
Parameters:
userId - The name of the user to add.
pswd - The clear-text password for the user.
Throws:
java.rmi.RemoteException - if a communications error occurred.
WorkflowException - if the user could not be added (already exists, etc).

WebLogic Process Integrator Version 1.1

WebLogic and Process Integrator are trademarks of BEA Systems, Inc.
Copyright (c) 2000 BEA Systems, Inc., 8920 Woodbine Avenue, Suite 400,
Markham, Ontario L3R 9W9 Canada. All rights reserved.