|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.uql.XPrincipal
inetsoft.sree.security.SRPrincipal
public class SRPrincipal
This class implements java.security.Principal to represent
any entity, such as an individual, a corporation, and a login id. It
wraps the user id and a secure id, which is a secure random number
| Field Summary |
|---|
| Fields inherited from class inetsoft.uql.XPrincipal |
|---|
ADMIN, ADMINISTRATOR, ADMINISTRATOR_R, ALIAS, ANONYMOUS, EVERYONE, groups, LOCALE, name, params, prop, roles, sessionID |
| Constructor Summary | |
|---|---|
SRPrincipal()
Construct a SRPrincipal |
|
SRPrincipal(ClientInfo client,
String[] roles,
long secureID)
Construct a SRPrincipal |
|
SRPrincipal(ClientInfo client,
String[] roles,
String[] groups,
long secureID)
Construct a SRPrincipal |
|
SRPrincipal(ClientInfo client,
String[] roles,
String[] groups,
long secureID,
String alias)
Construct a SRPrincipal |
|
SRPrincipal(String user)
Construct a SRPrincipal |
|
SRPrincipal(String user,
String[] roles,
long secureID)
Construct a SRPrincipal |
|
SRPrincipal(String user,
String[] roles,
String[] groups,
long secureID)
Construct a SRPrincipal |
|
| Method Summary | |
|---|---|
Object |
clone()
Clone the object. |
static SRPrincipal |
createFromID(String id)
Create the principal for the given identifier. |
boolean |
equals(Object another)
Compares this principal to the specified object. |
long |
getAge()
Return the age in milliseconds since January 1, 1970, 00:00:00 GMT of the SRPrincipal object |
String |
getClientUserName()
Return the login name of this principal. |
String |
getFullName()
Get the full identifier of this specified user (ip, session, etc.) |
long |
getLastAccess()
Return the last access time in milliseconds since January 1, 1970, 00:00:00 GMT of the SRPrincipal object |
Locale |
getLocale()
Get the locale. |
String |
getName()
Returns the name of this principal. |
static String |
getNameFromID(String id)
Get the principal name for the given identifier. |
long |
getSecureID()
Return the secureID of this SRPrincipal |
Object |
getSession()
Get the session object. |
ClientInfo |
getUser()
Returns the client info. |
int |
hashCode()
Returns a hashcode for this SRPrincipal. |
boolean |
isValid()
Check if this principal is valid. |
protected void |
parseRolesXML(Element elem)
Parses the user's roles from an XML representation. |
void |
parseXML(Element elem)
Parse xml element representation. |
void |
setLastAccess(long accessed)
Set last access time. |
void |
setLocale(Locale locale)
Set the locale. |
void |
setSession(Object session)
Set the session object. |
String |
toString()
Returns a string representation of this SRPrincipal. |
void |
writeXML(PrintWriter writer)
Write xml element representation to a print writer. |
| Methods inherited from class inetsoft.uql.XPrincipal |
|---|
addr, copyRoleGroups, getAlias, getGroups, getProperty, getPropertyNames, getRoles, getSessionID, isAdmin, isAdmin, isIgnoreLogin, setAdmin, setAlias, setGroups, setIgnoreLogin, setProperty, setRoles, toView |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SRPrincipal()
SRPrincipal instance
public SRPrincipal(String user)
SRPrincipal instance
- Parameters:
user - the client information of the user.
public SRPrincipal(String user,
String[] roles,
long secureID)
SRPrincipal instance
- Parameters:
user - the client information of the user.roles - roles assigned to the user.secureID - a secure random number.
public SRPrincipal(String user,
String[] roles,
String[] groups,
long secureID)
SRPrincipal instance
- Parameters:
user - the client information of the user.roles - roles assigned to the user.groups - groups the user belongs to.secureID - a secure random number.
public SRPrincipal(ClientInfo client,
String[] roles,
long secureID)
SRPrincipal instance
- Parameters:
client - the client information of the user.roles - roles assigned to the user.secureID - a secure random number.
public SRPrincipal(ClientInfo client,
String[] roles,
String[] groups,
long secureID)
SRPrincipal instance
- Parameters:
client - the client information of the user.roles - roles assigned to the user.groups - groups the user belongs to.secureID - a secure random number.
public SRPrincipal(ClientInfo client,
String[] roles,
String[] groups,
long secureID,
String alias)
SRPrincipal instance
- Parameters:
client - the client information of the user.roles - roles assigned to the user.groups - groups the user belongs to.secureID - a secure random number.
| Method Detail |
|---|
public static String getNameFromID(String id)
public static SRPrincipal createFromID(String id)
public boolean equals(Object another)
equals in interface Principalequals in class XPrincipalanother - principal to compare with.
SRPrincipal, and false otherwise.public int hashCode()
SRPrincipal.
hashCode in interface PrincipalhashCode in class XPrincipalSRPrincipal.public String getName()
getName in interface PrincipalgetName in class XPrincipalpublic String getClientUserName()
getClientUserName in interface inetsoft.util.LogPrincipalpublic ClientInfo getUser()
public long getSecureID()
SRPrincipal
SRPrincipalpublic long getAge()
SRPrincipal object
SRPrincipal objectpublic void setLastAccess(long accessed)
accessed - the specified last access time.public long getLastAccess()
SRPrincipal object
SRPrincipal objectpublic String toString()
SRPrincipal.
toString in interface PrincipaltoString in class XPrincipalpublic String getFullName()
getFullName in class XPrincipalpublic Object clone()
clone in class XPrincipalpublic void writeXML(PrintWriter writer)
writeXML in class XPrincipalwriter - the specified print writer
public void parseXML(Element elem)
throws Exception
parseXML in class XPrincipalelem - the specified xml element representation
Exception
protected void parseRolesXML(Element elem)
throws Exception
elem - the DOM element representing the user's roles.
Exception - if the DOM element could not be parsed.public Locale getLocale()
public void setLocale(Locale locale)
public void setSession(Object session)
public Object getSession()
public boolean isValid()
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||