|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Represents a user session, either a HTTP session or a "programmatic" session.
When running in EBX.Manager, HTTP session is obtained by calling methods:
Outside EBX.Manager, a session is obtained by calling methods:
Repository.createSessionFromLoginPassword(String, String),Repository.createSessionFromHttpRequest(HttpServletRequest).Repository.createSessionFromArray(Object[]).
| Method Summary | |
Object |
getAttribute(String aName)
Returns the object bound with the specified name in this session, or null if no object is bound under the name. |
Set |
getAttributeNames()
Returns a Set of String objects
containing the names of all the objects bound to this session. |
String |
getHttpSessionId()
If known, returns a string containing the unique identifier assigned to the current HTTP session. |
String |
getIpAddress()
If known, returns the Internet Protocol (IP) address of the client that sent the request. |
Locale |
getLocale()
Returns the session's current locale. |
Locale |
getLocaleForSchemaNode(SchemaNode schemaNode)
Returns the user's preferred locale associated with the underlying schema of the specified node. |
SessionPermissions |
getPermissions()
Returns the current user's permissions facade. |
String |
getTrackingInfo()
If specified, returns tracking information. |
String |
getUserEmail()
Returns the user email address. |
String |
getUserLogin()
Deprecated. Replaced by getUserReference(). |
UserReference |
getUserReference()
Returns the user reference in the directory. |
boolean |
isUserInRole(Profile aProfile)
Returns true if this user or the session has the specified profile.
|
boolean |
isUserOwner(Adaptation anAdaptation)
Returns true if this user is an owner of the adaptation specified.
|
void |
setAttribute(String aName,
Object aValue)
Binds an object to this session, using the name specified. |
| Method Detail |
public String getIpAddress()
REMOTE_ADDR.
public String getHttpSessionId()
public Locale getLocale()
It is searched in the following order:
getLocaleForSchemaNode(SchemaNode)public Locale getLocaleForSchemaNode(SchemaNode schemaNode)
It returns either:
getLocale(), otherwise.For more information on where additional locales are declared, read Module Declaration.
public String getTrackingInfo()
Tracking info is logged into EBX.Platform 'history' logs. It may also be used for any other purpose like access control or additional export information.
Note: there are three ways to specify tracking info:
UIHttpManagerComponent.setTrackingInfo(String).ProgrammaticService.setSessionTrackingInfo(String).
ProcedureContext.setExecutionInformation(String)public String getUserLogin()
getUserReference().
public UserReference getUserReference()
public String getUserEmail()
public SessionPermissions getPermissions()
Returns the current user's permissions facade. It allows to ckeck user's permissions on branches, adaptations and nodes (tables, ...).
public boolean isUserInRole(Profile aProfile)
true if this user or the session has the specified profile.
If the specified profile is a role, this means that the user is in the
specified role. If it is a UserReference, this means that
the current session user has this reference.
public boolean isUserOwner(Adaptation anAdaptation)
true if this user is an owner of the adaptation specified.
Unless specified otherwise in a permission rule, a user that owns an adaptation has no access restrictions onto it.
public Object getAttribute(String aName)
null if no object is bound under the name.
aName - a string specifying the name of the object
public Set getAttributeNames()
Set of String objects
containing the names of all the objects bound to this session.
Set of String
objects specifying the names of all the objects bound to
this session
public void setAttribute(String aName,
Object aValue)
If the value passed in is null, this removes the object bound.
aName - the name to which the object is boundaValue - the object to be bound
IllegalArgumentException - if aName is null
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
(report a bug)
EBX.Platform 4.8.4 [0722]
Copyright Orchestra Networks 2000-2010. All rights reserved.