|
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
public class XPrincipal
A Principal implementation used to identify a user to the query engine.
| Field Summary | |
|---|---|
static String |
ADMIN
Property name for admin. |
static String |
ADMINISTRATOR
The built-in adminstator role. |
static String |
ADMINISTRATOR_R
The built-in adminstator role which is read-only. |
static String |
ALIAS
The property name for alias. |
static String |
ANONYMOUS
Anonymous user name. |
static String |
EVERYONE
The built-in everyone role. |
protected String[] |
groups
|
static String |
LOCALE
Property name for user locale. |
protected String |
name
|
protected Hashtable |
params
|
protected Properties |
prop
|
protected String[] |
roles
|
protected String |
sessionID
|
| Constructor Summary | |
|---|---|
XPrincipal(String name)
Creates a new instance of XPrincipal. |
|
XPrincipal(String name,
String[] roles,
String[] groups)
Creates a new instance of XPrincipal. |
|
| Method Summary | |
|---|---|
int |
addr()
Returns the original hashCode. |
Object |
clone()
Clone the object. |
void |
copyRoleGroups(XPrincipal others)
Copy role and groups from another principal. |
boolean |
equals(Object another)
Determines if this XPrincipal is equivelent to another object. |
String |
getAlias()
Get the alias of the specified user. |
String |
getFullName()
Get the full identifier of this specified user (ip, session, etc.) |
String[] |
getGroups()
Gets the groups assigned to the user. |
String |
getName()
Gets the name of the user. |
String |
getProperty(String name)
Get a property value. |
Enumeration |
getPropertyNames()
Get all attribute names. |
String[] |
getRoles()
Gets the roles assigned to the user. |
String |
getSessionID()
Get the session id. |
int |
hashCode()
Gets a hash code for this object. |
boolean |
isAdmin()
Check if is admin. |
static boolean |
isAdmin(String roleid)
Check if is admin. |
boolean |
isIgnoreLogin()
Check if should not check login status. |
void |
parseXML(Element elem)
Parse xml element representation. |
void |
setAdmin(boolean admin)
Set whether is admin. |
void |
setAlias(String alias)
Set the alias to this specified user. |
void |
setGroups(String[] groups)
Sets the groups assigned to the user. |
void |
setIgnoreLogin(boolean ignoreLogin)
Set ignore login status. |
void |
setProperty(String name,
String val)
Set a property. |
void |
setRoles(String[] roles)
Sets roles assigned to the user. |
String |
toString()
Gets a string representation of this object. |
String |
toView()
Get the view of this specified user (alias will be used if any). |
void |
writeXML(PrintWriter writer)
Write xml element representation to a print writer. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String LOCALE
XPrincipal can be localized for
US-English as follows:
setProperty(XPrincipal.LOCALE,"en_US").
public static final String ADMIN
public static final String ANONYMOUS
public static String ADMINISTRATOR
public static String ADMINISTRATOR_R
public static String EVERYONE
public static String ALIAS
protected String name
protected String[] roles
protected String[] groups
protected String sessionID
protected Properties prop
protected Hashtable params
| Constructor Detail |
|---|
public XPrincipal(String name)
name - the name of the user.
public XPrincipal(String name,
String[] roles,
String[] groups)
name - the name of the user.roles - the roles assigned to the user.| Method Detail |
|---|
public static boolean isAdmin(String roleid)
public String getName()
getName in interface Principalpublic void setRoles(String[] roles)
roles - an array of the names of the roles assigned to the user.public void setGroups(String[] groups)
groups - an array of the names of the groups assigned to the user.public String[] getRoles()
public String[] getGroups()
public String getSessionID()
public void setAdmin(boolean admin)
admin - true if is admin, false otherwise.public boolean isAdmin()
public void setProperty(String name,
String val)
name - property name.val - property value.public String getProperty(String name)
name - property name.
public Enumeration getPropertyNames()
public boolean equals(Object another)
equals in interface Principalequals in class Objectanother - the object to compare.
true if the objects are equivelent; false
otherwise.public int hashCode()
hashCode in interface PrincipalhashCode in class Objectpublic String toString()
toString in interface PrincipaltoString in class Objectpublic int addr()
public void writeXML(PrintWriter writer)
writer - the specified print writer
public void parseXML(Element elem)
throws Exception
elem - the specified xml element representation
Exceptionpublic Object clone()
clone in class Objectpublic void copyRoleGroups(XPrincipal others)
public void setIgnoreLogin(boolean ignoreLogin)
ignoreLogin - true if should not check login status of this
principal, false otherwise.public boolean isIgnoreLogin()
public void setAlias(String alias)
public String getAlias()
public String toView()
public String getFullName()
|
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 | ||||||||