com.bea.p13n.security.management.credentials
Class Scope

java.lang.Object
  extended by com.bea.p13n.security.management.credentials.Scope

public class Scope
extends Object

This class identify scope of credential entry

Credential entry can be scoped to webapp, enterprise application or domain(global).
The scope determine the visibility and name space of credential entry: webapp scoped entries are only visible to specific webapp. Entries with same name but scoped to different webapp are considered to be different entries.
Enterprise application scoped entries are visible to all webapps of an enterprise application.
Domain (Global) scoped entries are visible to all webapps of all enterprise applications within the domain.


Constructor Summary
Scope(String entAppName, String webAppName)
          Constructor
 
Method Summary
 boolean equals(Object o)
           
 String getApplicationName()
          Get the enterprise application name of the scope
static Scope getApplicationScope()
          Get enterprise application scope
static Scope getDomainScope()
          Get domain scope
static Scope getWebApplicationScope(javax.servlet.http.HttpServletRequest request)
          Get web application scope
 String getWebAppName()
          Get the web application name of the scope
 int hashCode()
           
 boolean isGlobal()
          Test where the scope is domain/global
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Scope

public Scope(String entAppName,
             String webAppName)
Constructor

Parameters
entAppName - The enterprise application name of the scope
webAppName - The web application name of the scope
Method Detail

getApplicationName

public String getApplicationName()
Get the enterprise application name of the scope

Returns
the name of the enterprise application scoped to

getWebAppName

public String getWebAppName()
Get the web application name of the scope

Returns
the name of the web application scoped to

isGlobal

public boolean isGlobal()
Test where the scope is domain/global

Returns
true if the scope is domain

getDomainScope

public static Scope getDomainScope()
Get domain scope

Returns
a Scope object represent domain/global scope

getApplicationScope

public static Scope getApplicationScope()
Get enterprise application scope

Returns
a Scope object represent enterprise application scope

getWebApplicationScope

public static Scope getWebApplicationScope(javax.servlet.http.HttpServletRequest request)
Get web application scope

Parameters
request - HttpRequest from web application
Returns
a Scope object represent web application scope

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.