Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter
11g Release 1 (11.1.1.3.0)
E15995-02


oracle.webcenter.spaces
Interface SpacesManager


public interface SpacesManager

Spaces Manager Class is a manager class responsible for managing all Space objects. It also acts as a frontend for all the external applications which try to get access to Space. All the access to the Space class should be made through getSpace() method of this class. Spaces can be created/deleted/modified using the APIs provided by this class. It also provides different sorts of querying mechanism for calling APIs to get the appropriate list of Space objects. One should always get the SpacesManager from SpacesManagerFactory.

The following code snippet depicts how one can get hold of SpacesManager:
SpacesManagerFactory fact = FactoryFinder.getFactory(SpacesManagerFactory.class.getCanonicalName());
SpacesManager manager = fact.getSpacesManager();


Nested Class Summary
static class SpacesManager.UpdateType
          In the refresh API we can use this to either update METADATA, security or both metadata and security

 

Method Summary
 Space createGroupSpace(java.lang.String spaceName, SpaceTemplate baseTemplate, java.util.Map<java.lang.String,java.lang.String> customAttributes, java.lang.String description)
          Create API creates a new Space object from an existing Space template.
 Space deleteGroupSpace(Space space)
          This API deletes the given Spaces metadata from MDS.
 java.util.List<java.lang.String> getPublicSpacesNamesList(java.lang.String namePattern)
          get a list of all public space names.
 Space getSpace(oracle.mds.core.MDSSession session, java.lang.String name)
          Deprecated. use getSpace(name)
 Space getSpace(java.lang.String name)
          This API returns Space class object for a given name of the Space.
 Space getSpaceByScopeGUID(java.lang.String GUID)
          This API returns the Space object given its GUID
 Space getSpaceFromDisplayName(java.lang.String displayName)
          This API returns the Space object given its displayName
 java.util.List<Space> getSpaces(oracle.mds.query.Condition queryCondition, boolean subscribedOnly)
          This method returns the names of spaces matching the specified search pattern, searching among the spaces that are 'visible' to the specified user.
 java.util.List<Space> getSpaces(oracle.mds.core.MDSSession session, oracle.mds.query.Condition queryCondition, boolean subscribedOnly)
          Deprecated. use getSpaces(queryCondition, subscribedOnly)
 java.util.List<GSMetadata> getSpaces(SpacesQueryOptions sqo, java.lang.String searchPattern, int startIndex, int batchSize)
          get a list of space metadata base on the jpa implementation.
 java.util.List<Space> getSpacesList(java.lang.String namePattern)
          get the list of spaces on which the user has access.
 java.util.List<java.lang.String> getUserSpacesNamesList(java.lang.String namePattern)
          get the list of space names on which the user has access.
 Future refreshGroupSpaceCache(java.util.List<java.lang.String> spaceNames, SpacesManager.UpdateType updateType, boolean syncMode, boolean cleanGSTableCache)
          This API refreshes the group space table.
 void renameGroupSpace(java.lang.String oldSpaceName, java.lang.String newSpaceName)
          This API changes the name of the existing space to a new name

 

Method Detail

getSpace

Space getSpace(java.lang.String name)
               throws SpacesException
This API returns Space class object for a given name of the Space. It also validates whether the Space of given name exists in the metadata or not. It throws the Exception otherwise.
Parameters:
session - MDSSession
name - : name of the Space
Returns:
Returns the space object
Throws:
SpacesException - Throws SpacesException if @[link Space} with given name is not found

getSpace

Space getSpace(oracle.mds.core.MDSSession session,
               java.lang.String name)
               throws SpacesException
Deprecated. use getSpace(name)
This API returns Space class object for a given name of the Space. It also validates whether the Space of given name exists in the metadata or not. It throws the Exception otherwise.
Parameters:
session - MDSSession
name - : name of the Space
Returns:
Returns the space object
Throws:
SpacesException - Throws SpacesException if @[link Space} with given name is not found

createGroupSpace

Space createGroupSpace(java.lang.String spaceName,
                       SpaceTemplate baseTemplate,
                       java.util.Map<java.lang.String,java.lang.String> customAttributes,
                       java.lang.String description)
                       throws SpacesException
Create API creates a new Space object from an existing Space template. It calls the template's clone method to get the clone of the template and then constructs the Space Object out of it. It automatcally creates the MDS location for given Space name.
Parameters:
spaceName - The Name of the new Group Space
baseTemplate - Template on which the space should be based upon
customAttributes - Attribute map for custom attributes (name,value) pairs
Returns:
Space class for a newly created Space
Throws:
SpacesException - Throws Exception if the API can not create a new Space based on given Space Template, or SpaceTemplate is not found

deleteGroupSpace

Space deleteGroupSpace(Space space)
                       throws SpacesException
This API deletes the given Spaces metadata from MDS. It also removes entries for space object metadata customizations, preferences, security metatadata etc.
Parameters:
space - Space object to be deleted
Returns:
Space object that got deleted
Throws:
SpacesException - Throws Exception if given Space object is not found or it does not exist

getSpaces

java.util.List<Space> getSpaces(oracle.mds.core.MDSSession session,
                                oracle.mds.query.Condition queryCondition,
                                boolean subscribedOnly)
                                throws SpacesException
Deprecated. use getSpaces(queryCondition, subscribedOnly)
This method returns the names of spaces matching the specified search pattern, searching among the spaces that are 'visible' to the specified user.
Parameters:
session - MDS session based on which to retrieve the data.
subscribedOnly - true if only the spaces that the user is member of are to be returned, false if the union of spaces the user is member of and the set of discoverable spaces are to be returned.
queryCondition - Search pattern that would match the names of the spaces that are to be returned by this method. null or empty string if this method should not perform any search but simply return the 'visible' spaces.
Returns:
list of spaces that are 'visible' to the specified user and which match the specified search pattern if any.
Throws:
SpacesException - If there is a problem fetching metadata.

getSpaces

java.util.List<Space> getSpaces(oracle.mds.query.Condition queryCondition,
                                boolean subscribedOnly)
                                throws SpacesException
This method returns the names of spaces matching the specified search pattern, searching among the spaces that are 'visible' to the specified user.

Here 'visible' would mean either just the spaces that the user is subscribed to, or the subscribed spaces together with the spaces that are discoverable, depending upon the argument subscribedOnly. If subscribedOnly is true this method will return just the spaces the user is subscribed to, otherwise it will return the union of these and the discoverable spaces metadata.

Thsi API determines the userName from the context. If userName is null this method would assume it to be referring to the anonymous user. For example, userName of null and subscribedOnly false would return the list of discoverable spaces (because anonymous user would not be a member of any Space)

Parameters:
subscribedOnly - true if only the spaces that the user is member of are to be returned, false if the union of spaces the user is member of and the set of discoverable spaces are to be returned.
queryCondition - Search pattern that would match the names of the spaces that are to be returned by this method. null or empty string if this method should not perform any search but simply return the 'visible' spaces.
Returns:
list of spaces that are 'visible' to the specified user and which match the specified search pattern if any.
Throws:
SpacesException - If there is a problem fetching metadata.

getSpacesList

java.util.List<Space> getSpacesList(java.lang.String namePattern)
                                    throws SpacesException
get the list of spaces on which the user has access.
Parameters:
namePattern - to filter on. if null everything is returned.
Returns:
List of Space objects on which the currrent user has access.
Throws:
SpacesException

getPublicSpacesNamesList

java.util.List<java.lang.String> getPublicSpacesNamesList(java.lang.String namePattern)
                                                          throws SpacesException
get a list of all public space names.
Parameters:
namePattern - to filter on. if null everything is returned.
Returns:
List of Space objects on which the currrent user has access.
Throws:
SpacesException

getUserSpacesNamesList

java.util.List<java.lang.String> getUserSpacesNamesList(java.lang.String namePattern)
                                                        throws SpacesException
get the list of space names on which the user has access.
Parameters:
namePattern - to filter on. if null everything is returned.
Returns:
List of Space objects on which the currrent user has access.
Throws:
SpacesException

renameGroupSpace

void renameGroupSpace(java.lang.String oldSpaceName,
                      java.lang.String newSpaceName)
                      throws SpacesException
This API changes the name of the existing space to a new name
Parameters:
oldSpaceName - Old Space Name
newSpaceName - New Space Name
Throws:
SpacesException

getSpaces

java.util.List<GSMetadata> getSpaces(SpacesQueryOptions sqo,
                                     java.lang.String searchPattern,
                                     int startIndex,
                                     int batchSize)
                                     throws SpacesException
get a list of space metadata base on the jpa implementation. this has pagination support with support for a startIndex and a batchSize.
Parameters:
sqo - space query object. results will be returned based on the space query object. this drives the where clause.
searchPattern - the search pattern, null or empty string can be passed in to skip the search pattern
startIndex -
batchSize -
Returns:
Throws:
SpacesException

getSpaceFromDisplayName

Space getSpaceFromDisplayName(java.lang.String displayName)
                              throws SpacesException
This API returns the Space object given its displayName
Parameters:
displayName - Gs displayName
Throws:
SpacesException

refreshGroupSpaceCache

Future refreshGroupSpaceCache(java.util.List<java.lang.String> spaceNames,
                              SpacesManager.UpdateType updateType,
                              boolean syncMode,
                              boolean cleanGSTableCache)
                              throws SpacesException
This API refreshes the group space table. This api keeps the MDS repository and the spaces and header table in sync.
Parameters:
spaceNames - is a list of group space names. An empty list or null indicates that we need to updated all the group space.
updateType - there are 3 options METADATA - updates only metadata, SECURITY - updates only security, ALL - updates both space and security.
syncMode - - true runs the project in synchronous mode. In async mode new thread will be spawned to run the update process.
cleanGSTableCache - - should be set to true only in case of app import This attribute will delete all those group spaces in the target instance which were not availiable in the source instance.
Throws:
SpacesException - when error occurs while updating the header and detail repository.

getSpaceByScopeGUID

Space getSpaceByScopeGUID(java.lang.String GUID)
                          throws SpacesException
This API returns the Space object given its GUID
Parameters:
displayName - GUID the GUID
Returns:
Space object
Throws:
SpacesException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter
11g Release 1 (11.1.1.3.0)
E15995-02


Copyright © 2009, 2010, Oracle. All rights reserved.