|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface for constructing "principals" from a string representation. This interface is necessary because principals are represented differently in the client and the server.
Principal
,
AgiAdmGroup
,
AgiAdmUser
,
AgiAdmServer
Method Summary | |
Principal |
getCurrentPrincipal()
Return the Principal corresponding to the "current" user. |
Principal |
getWorldPrincipal()
Return a principal representing "world" -- a distinguished identity that every other principal group belongs to. |
boolean |
isWorldPrincipal(Principal principal)
Return true if this principal is the principal representing "world". |
Group |
parseGroup(String groupName)
Create a Principal for the specified group name. |
Principal |
parseUser(String userName)
Create a Principal for the specified user name. |
Method Detail |
public Principal parseUser(String userName) throws AgoBadPrincipalException
userName
- the user nameReturns Principal representing the user. Exception AgoBadPrincipalException is thrown if the user name can't be parsed or doesn't exist.
// Get an AgiAdmServer. AgiAdmServer server = AgAdmin.getServer("server1", -1); // Given a user name, get a Principal for it. Principal pr = server.parseUser( "LDAP\\ldapserver\\cn=JBrown,cn=Administrators,ou=Corp_HQ,o=Meridian.com"); // The principal may be treated as an AgiAdmUser. if (pr instanceof AgiAdmUser) AgiAdmUser agUser = (AgiAdmUser)pr;
public Group parseGroup(String groupName) throws AgoBadPrincipalException
userName
- the group nameReturns Principal representing the group. Exception AgoBadPrincipalException is thrown if the group name can't be parsed or doesn't exist.
// Get an AgiAdmServer. AgiAdmServer server = AgAdmin.getServer("server1", -1); // Given the name of a group, get a Group for it. Group group = server.parseGroup("brilliant\\Domain Admins") // The Group may be treated as an AgiAdmGroup. if (group instanceof AgiAdmGroup) AgiAdmGroup agGroup = (AgiAdmGroup)group;
public Principal getWorldPrincipal()
// Get an AgiAdmServer. AgiAdmServer server = AgAdmin.getServer("server1", -1); // Get the "World" Principal. Principal pr = server.getWorldPrincipal();
public boolean isWorldPrincipal(Principal principal)
// Get an AgiAdmServer. AgiAdmServer server = AgAdmin.getServer("server1", -1); // Get a Principal (may be an AgiAdmUser or AgiAdmGroup) Principal pr = ... // See if the specified Principal is the "World" Principal. boolean isWorld = server.isWorldPrincipal(pr);
public Principal getCurrentPrincipal()
// Get an AgiAdmServer. AgiAdmServer server = AgAdmin.getServer("server1", -1); // Get the current Principal. Principal pr = server.getCurrentPrincipal();
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |