Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.portal.provider.v1
Class ProviderUser

    java.lang.Object
      |
      +--oracle.portal.provider.v1.ProviderUser

Direct Known Subclasses:
  FileToDatabaseUser, ServletProviderUser

public abstract class ProviderUser
extends java.lang.Object

Represents the Portal user. Additionally provides the methods for establishing and reaquiring the user's session.

Some Providers have a distinct notion users. Providers are able to configure the Portal (using a login server) to map between the Portal user and the application (Provider) user. The ProviderUser interface provides access to both the Portal user information and this mapped information.

The portal runs in a default public mode. This occurs when a user accesses the portal without logging in. This is represented by a special ProviderUser whose portal user name is defined by the String ProviderUser.PUBLIC. The convenience method isPublicUser() is provided to simplify this check.

Field Summary
`static int` | `AUTH_LEVEL_NOT_SUPPORTED`
`static int` | `AUTH_NOT_DETERMINED`
`static int` | `NOT_AUTHENTICATED`
`static java.lang.String` | `PORTAL_PUBLIC`
`static java.lang.String` | `PUBLIC` Constant (string) representing the public user.
`static int` | `PUBLIC_STRONG_AUTH`
`static java.lang.String` | `PUBLIC_USERNAME`
`static int` | `PUBLIC_WEAK_AUTH`
`static int` | `USER_STRONG_AUTH`
`static int` | `USER_WEAK_AUTH`

Constructor Summary
`ProviderUser()`

Method Summary
`abstract int` | `getAuthenticationLevel()`
`abstract java.lang.String` | `getCompanyName()`
`abstract UserLocation` | `getLocation()`
`abstract java.util.Calendar` | `getLoginTime()`
`abstract java.lang.String` | `getMappedName()`
`abstract java.security.Principal` | `getMappedPrincipal()`
`abstract java.lang.String` | `getName()`
`abstract java.lang.String` | `getPortalSessionId()`
`abstract java.security.Principal` | `getPrincipal()`
`abstract java.lang.String` | `getQualifiedName()`
`abstract ProviderSession` | `getSession()` Used to create and/or reacquire the user session.
`abstract ProviderSession` | `getSession(boolean create)` Used to create and/or reacquire the user session.
`abstract java.lang.String` | `getSubscriberId()`
`abstract boolean` | `isLoggedOn()`
`abstract boolean` | `isPublicUser()` Tests whether we are running in public mode.
`abstract boolean` | `isWeaklyAuthenticated()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PUBLIC

    public static final java.lang.String PUBLIC

  Constant (string) representing the public user. That is the "user" when a request is made and the person hasn't logged in.

### PORTAL_PUBLIC

    public static final java.lang.String PORTAL_PUBLIC

### PUBLIC_USERNAME

    public static final java.lang.String PUBLIC_USERNAME

### AUTH_NOT_DETERMINED

    public static final int AUTH_NOT_DETERMINED

### AUTH_LEVEL_NOT_SUPPORTED

    public static final int AUTH_LEVEL_NOT_SUPPORTED

### NOT_AUTHENTICATED

    public static final int NOT_AUTHENTICATED

### PUBLIC_WEAK_AUTH

    public static final int PUBLIC_WEAK_AUTH

### USER_WEAK_AUTH

    public static final int USER_WEAK_AUTH

### PUBLIC_STRONG_AUTH

    public static final int PUBLIC_STRONG_AUTH

### USER_STRONG_AUTH

    public static final int USER_STRONG_AUTH

Constructor Detail

### ProviderUser

    public ProviderUser()

Method Detail

### getPrincipal

    public abstract java.security.Principal getPrincipal()

  Returns:
    the portal user.

### getMappedPrincipal

    public abstract java.security.Principal getMappedPrincipal()

  Returns:
    the mapped application user. null is there is no mapped user.

### getName

    public abstract java.lang.String getName()

  Returns:
    the portal username. Convenience method for getPrincipal().getName()

### getSubscriberId

    public abstract java.lang.String getSubscriberId()

  Returns:
    the subscriber id. Convenience method for getPrincipal().getSubscriberId()

### getCompanyName

    public abstract java.lang.String getCompanyName()

  Returns:
    the company name. Convenience method for getPrincipal().getCompanyName()

### getMappedName

    public abstract java.lang.String getMappedName()

  Returns:
    the mapped application username. Convenience method for getMappedPrincipal().getName()

### getQualifiedName

    public abstract java.lang.String getQualifiedName()

  Returns:
    the qulaified username, ie username appended with company name separator is "@@"

### getLoginTime

    public abstract java.util.Calendar getLoginTime()

  Returns:
    the time when this user logged into the Portal

### getLocation

    public abstract UserLocation getLocation()

  Returns:
    the user's location. Value is allowed to be `null`. This means the information is not available.

### getPortalSessionId

    public abstract java.lang.String getPortalSessionId()

  Returns:
    the Portal session ID for this user. Portlet developers can use this ID to map to their in memory "session" state vs. using a cookie based mechanism. The benefit is performance. If the provider doesn't use cookies the portal can communicate more efficiently with it.

### getAuthenticationLevel

    public abstract int getAuthenticationLevel()

  Returns:
    the authentication level for the user

### isLoggedOn

    public abstract boolean isLoggedOn()

  Returns:
    true if the user has logged onto the portal in the current session. A user who is weakly authentication has not logged on to the portal in the current session so this method will return false.

### isWeaklyAuthenticated

    public abstract boolean isWeaklyAuthenticated()

  Returns:
    true if the current user is at least weakly authenticated

### isPublicUser

    public abstract boolean isPublicUser()

  Tests whether we are running in public mode. ie the user has not logged in and is not weakly authenticated based on a prior login
  Returns:
    true if the user is accessing the portal in public mode.

### getSession

    public abstract ProviderSession getSession(boolean create)
                                        throws java.lang.IllegalStateException

  Used to create and/or reacquire the user session. If running as a HttpProvider (servlet) and sessions are maintained via cookies then the sessions must only be created in Provider.initSession(). Note: this method can throw an IllegalStateException. This occurs if the user object has become stale. I.e. no longer contains the state that it needs to acquire/create the session. As all Provider/Portlet APIs give you access to the User object per request you should not (need to) retain the user object via reference in cross-request object (like the session itself). This only leads to possibilities of memory leaks.
  Parameters:
    `create` - if true then a session is created for the user if it doesn't currently exist.
  Returns:
    the session object for this user. null if create is false and the session doesn't already exist.

### getSession

    public abstract ProviderSession getSession()
                                        throws java.lang.IllegalStateException

  Used to create and/or reacquire the user session. Always creates a session if it doesn't currently exist. The same as calling getSession(true). If running as a HttpProvider (servlet) and sessions are maintained via cookies then the sessions must only be created in Provider.initSession(). Note: this method can throw an IllegalStateException. This occurs if the user object has become stale. I.e. no longer contains the state that it needs to acquire/create the session. As all Provider/Portlet APIs give you access to the User object per request you should not (need to) retain the user object via reference in cross-request object (like the session itself). This only leads to possibilities of memory leaks.
  Returns:
    the session object for this user.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD