Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.6.0)
E15995-04


oracle.webcenter.spaces.context
Class SpacesContext

java.lang.Object
  extended by oracle.webcenter.spaces.context.SpacesContext


public abstract class SpacesContext
extends java.lang.Object

This abstract class is responsible for managing the context of Spaces.


Field Summary
protected  java.lang.String spaceName
           

 

Constructor Summary
SpacesContext(java.lang.String spaceName)
           

 

Method Summary
static SpacesContext getCurrentInstance()
          Return the SpacesContext instance for the request that is being processed by the current thread, if any.
abstract  Space getCurrentSpace()
          Returns the Space object that the user is currently in.
abstract  java.lang.String getCurrentSpaceGUID()
          Get the GUID of the current space application
abstract  java.lang.String getCurrentSpaceName()
          Gets the name of the Space associated with the current web request.
abstract  SpacesManager getSpacesManager()
          Gets the SpacesManager instance associated with this web application.
static void releaseCachedContext()
          Release all the cached thread local instance.
static void setCurrentInstance(SpacesContext context)
          Set the SpacesContext instance for the request that is being processed by the current thread.

 

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

 

Field Detail

spaceName

protected java.lang.String spaceName

Constructor Detail

SpacesContext

public SpacesContext(java.lang.String spaceName)

Method Detail

getSpacesManager

public abstract SpacesManager getSpacesManager()
                                        throws SpacesException
Gets the SpacesManager instance associated with this web application.
Returns:
Returns the SpacesManager instance associated with the current web application
Throws:
SpacesException - if Spaces Manager instance can not be created in the given context

getCurrentSpace

public abstract Space getCurrentSpace()
Returns the Space object that the user is currently in.

EL: #{spaceContext.currentSpace}
#{spaceContext.space[spaceName]}

Second EL above returns the Space object of spaceName

Example: #{spaceContext.space['FinanceProject']} returns the Space object for the group space called FinanceProject.


To use the SpacesUtils.getDistributionList(), use the following EL:

EL: #{spacesContext.currentSpace.distributionList}

#{spacesContext.space[spaceName].distributionList}</>
Returns:
The Space object that the user is currently in, or null if the user is currently in the context of Personal WebCenter.

getCurrentSpaceName

public abstract java.lang.String getCurrentSpaceName()
Gets the name of the Space associated with the current web request.

EL:#{spaceContext.currentSpaceName}

Returns:
Returns the name of the Space associated with the current web request

getCurrentSpaceGUID

public abstract java.lang.String getCurrentSpaceGUID()
Get the GUID of the current space application
Returns:
GUID of the current space App.

getCurrentInstance

public static SpacesContext getCurrentInstance()
Return the SpacesContext instance for the request that is being processed by the current thread, if any.

EL:#{spaceContext}

Returns:
Returns the SpacesContext instance associated with the current web request

releaseCachedContext

public static void releaseCachedContext()
Release all the cached thread local instance.

setCurrentInstance

public static void setCurrentInstance(SpacesContext context)
Set the SpacesContext instance for the request that is being processed by the current thread.
Parameters:
context - The SpacesContext instance for the current thread, or null if this thread no longer has a SpacesContext instance.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.6.0)
E15995-04


Copyright © 2009, 2011, Oracle and/or its affiliates. All rights reserved.