com.softwareag.mdm.service
Interface Session


public interface Session

Represents a user session, either a HTTP session or a "programmatic" session.

When running in webMethods Master Data Manager, HTTP session is obtained by calling methods:

Outside webMethods Master Data Manager, a session is obtained by calling methods:


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 current locale of Manager session, or the user default locale, or the default locale.
 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 role specified.
 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

getIpAddress

public String getIpAddress()
If known, returns the Internet Protocol (IP) address of the client that sent the request. This is same as the value of the CGI variable REMOTE_ADDR.


getHttpSessionId

public String getHttpSessionId()
If known, returns a string containing the unique identifier assigned to the current HTTP session. The identifier is assigned by the servlet container and depends on its implementation.


getLocale

public Locale getLocale()
Returns the current locale of Manager session, or the user default locale, or the default locale.


getTrackingInfo

public String getTrackingInfo()
If specified, returns tracking information. It may be for example:

Tracking info is logged into webMethods MDM 'history' logs. It may also be used for any other purpose like access control or additional export information.

Note: there are two ways to specify tracking info:

See Also:
ProcedureContext.setExecutionInformation(String)

getUserLogin

public String getUserLogin()
Deprecated. Replaced by getUserReference().


getUserReference

public UserReference getUserReference()
Returns the user reference in the directory.


getUserEmail

public String getUserEmail()
Returns the user email address.


getPermissions

public SessionPermissions getPermissions()

Returns the current user's permissions facade. It allows to ckeck user's permissions on branches, adaptations and nodes (tables, ...).


isUserInRole

public boolean isUserInRole(Profile aProfile)
Returns true if this user or the session has the role specified.


isUserOwner

public boolean isUserOwner(Adaptation anAdaptation)
Returns 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.


getAttribute

public 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.

Parameters:
aName - a string specifying the name of the object
Returns:
the object with the specified name

getAttributeNames

public Set getAttributeNames()
Returns a Set of String objects containing the names of all the objects bound to this session.

Returns:
an unmodifiable Set of String objects specifying the names of all the objects bound to this session

setAttribute

public void setAttribute(String aName,
                         Object aValue)
Binds an object to this session, using the name specified. If an object of the same name is already bound to the session, the object is replaced.

If the value passed in is null, this removes the object bound.

Parameters:
aName - the name to which the object is bound
aValue - the object to be bound
Throws:
IllegalArgumentException - if aName is null


(report a bug)
webMethods MDM 4.2.8 [0558]
Copyright Software AG 2000-2007. All rights reserved.