com.ibm.portal.services.project
Interface ProjectIdentificationService

All Superinterfaces:
com.ibm.portal.project.ProjectContext

public interface ProjectIdentificationService
extends com.ibm.portal.project.ProjectContext

Interface to the service that identifies the currently selected project. Since projects are selected a per-thread basis, this service is independent of request and response.

Since:
8.0

Field Summary
static java.lang.String JNDI_NAME
          JNDI name of this service
 
Method Summary
 PocServerContext createServerContext(ObjectID aProjectID, PocServerContext aContext)
          Generates a ServerContext that represents the specified project.
 ServerContext createServerContext(ObjectID aProjectID, ServerContext aContext)
          Generates a ServerContext that represents the specified project.
 ObjectID getProjectID()
          Returns the ObjectID of the currently selected project
 java.lang.String getProjectUUID()
          Returns the UUID of the currently selected project
 

Field Detail

JNDI_NAME

static final java.lang.String JNDI_NAME
JNDI name of this service

See Also:
Constant Field Values
Method Detail

createServerContext

PocServerContext createServerContext(ObjectID aProjectID,
                                     PocServerContext aContext)
                                     throws SerializationException
Generates a ServerContext that represents the specified project. This context can be used to create URLs in project scope. If the input server context already contains a project ID, it will be replaced by the new project ID (to support project switching). If the selected project ID is null the project identifier will be removed from the context.

Parameters:
aProjectID - the project identifier, may be null
aContext - the base server context, not null
Returns:
the new server context
Throws:
SerializationException - if the project ID could not be serialized into the context
See Also:
PocService.getServerContext()

createServerContext

ServerContext createServerContext(ObjectID aProjectID,
                                  ServerContext aContext)
                                  throws SerializationException
Generates a ServerContext that represents the specified project. This context can be used to create URLs in project scope. If the input server context already contains a project ID, it will be replaced by the new project ID (to support project switching). If the selected project ID is null the project identifier will be removed from the context.

Parameters:
aProjectID - the project identifier, may be null
aContext - the base server context, not null
Returns:
the new server context
Throws:
SerializationException - if the project ID could not be serialized into the context
See Also:
StateManagerService.getServerContext()

getProjectID

ObjectID getProjectID()
Returns the ObjectID of the currently selected project

Specified by:
getProjectID in interface com.ibm.portal.project.ProjectContext
Returns:
the OID of the project or null

getProjectUUID

java.lang.String getProjectUUID()
Returns the UUID of the currently selected project

Returns:
the UUID of the project or null