com.ibm.wps.outbound.config
Class VPScope

java.lang.Object
  extended by com.ibm.wps.outbound.config.VPScope
All Implemented Interfaces:
VirtualPortalScope

public class VPScope
extends java.lang.Object
implements VirtualPortalScope

This convenience class implements the VirtualPortalScope interface for users of the
OutboundConnectionModelProvider method. The VirtualPortalScope interface is required to
instantiate an outbound HTTP connection model for a certain virtual portal.

Code example:

javax.naming.Context ctx = new javax.naming.InitialContext();
VirtualPortalScope vp = VPScope.byContextPath("myvirtual");
OutboundConnectionModelHome home = (OutboundConnectionModelHome) ctx.lookup("portal:service/model/OutboundConnectionModel");
OutboundConnectionModel model = home.getOutboundConnectionModelProvider().getOutboundConnectionModel(vp);

Since:
8.5.0
See Also:
CreationContext, OutboundConnectionModelController

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.ibm.portal.outbound.config.VirtualPortalScope
VirtualPortalScope.AnyVirtualPortalScope
 
Field Summary
static VirtualPortalScope ANY
          This special VirtualPortalScope object defines a scope for any virtual portal that is defined in the system.
static VirtualPortalScope ROOT
          VirtualPortalScope object for the root portal.
 
Method Summary
static VirtualPortalScope byContextAndHostName(java.lang.String context, java.lang.String hostname)
          return an VirtualPortalScope object that identifies the root Virtual portal which is mapped to the specified virtual portal hostname.
static VirtualPortalScope byContextPath(java.lang.String context)
          return an VirtualPortalScope object that identifies the root Virtual portal which is mapped to the specified context path.
static VirtualPortalScope byHostName(java.lang.String hostname)
          return an VirtualPortalScope object that identifies the root Virtual portal which is mapped to the specified virtual portal hostname.
 java.lang.String getVirtualPortalContextPath()
          Return the context path that identifies the virtual portal
 java.lang.String getVirtualPortalHostname()
          Return the host name that identifies the virtual portal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANY

public static final VirtualPortalScope ANY
This special VirtualPortalScope object defines a scope for any virtual portal that is defined in the system.


ROOT

public static final VirtualPortalScope ROOT
VirtualPortalScope object for the root portal.

Method Detail

byContextPath

public static VirtualPortalScope byContextPath(java.lang.String context)
return an VirtualPortalScope object that identifies the root Virtual portal which is mapped to the specified context path.

Returns:
VirtualPortalScope the requested VirtualPortalScope object.

byHostName

public static VirtualPortalScope byHostName(java.lang.String hostname)
return an VirtualPortalScope object that identifies the root Virtual portal which is mapped to the specified virtual portal hostname.

Returns:
VirtualPortalScope the requested VirtualPortalScope object.

byContextAndHostName

public static VirtualPortalScope byContextAndHostName(java.lang.String context,
                                                      java.lang.String hostname)
return an VirtualPortalScope object that identifies the root Virtual portal which is mapped to the specified virtual portal hostname.

Returns:
VirtualPortalScope the requested VirtualPortalScope object.

getVirtualPortalContextPath

public java.lang.String getVirtualPortalContextPath()
Description copied from interface: VirtualPortalScope
Return the context path that identifies the virtual portal

Specified by:
getVirtualPortalContextPath in interface VirtualPortalScope
Returns:
The context path of the virtual portal, The method returns null if either
  • the scope identifies the root virtual portal, or
  • the virtual portal is identified by host name

getVirtualPortalHostname

public java.lang.String getVirtualPortalHostname()
Description copied from interface: VirtualPortalScope
Return the host name that identifies the virtual portal

Specified by:
getVirtualPortalHostname in interface VirtualPortalScope
Returns:
The host name of the virtual portal, The method returns null if either
  • the scope identifies the root virtual portal, or
  • the virtual portal is identified by a context path