Skip navigation links

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


oracle.webcenter.spaces.template
Interface SpacesTemplateManager


public interface SpacesTemplateManager

Spaces Template Manager Class is a manager class responsible for managing all SpaceTemplate objects. It also acts as a frontend for all the external applications which try to get access to SpaceTemplate. All the access to the SpaceTemplate class should be made through getSpaceTemplate() method of this class. Space Templates 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 SpaceTemplate objects. One should always get the SpacesTemplateManager from SpacesTemplateManagerFactory.

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


Nested Class Summary
static class SpacesTemplateManager.UpdateType
          Deprecated. This enum might be changed in future release. The usage is discouraged.

 

Method Summary
 SpaceTemplate createTemplate(java.lang.String templateName, java.lang.String templateDescription, Space baseSpace)
          This API creates a new template from an existing Space object.
 SpaceTemplate createTemplate(java.lang.String templateName, java.lang.String templateDescription, Space baseSpace, java.util.Collection<java.lang.String> serviceCopyDataList)
          This API creates a new template from an existing Space object.
 SpaceTemplate deleteTemplate(SpaceTemplate template)
          This API deletes the given Space template metadata from MDS.
 SpaceTemplate getTemplate(oracle.mds.core.MDSSession session, java.lang.String name)
          Deprecated. use getTemplate(name)
 SpaceTemplate getTemplate(java.lang.String templateName)
           
 java.util.Collection<java.lang.String> getTemplateNamesList(java.lang.String namePattern)
          get the global list of template names.
 java.util.List<GSMetadata> getTemplates(SpacesQueryOptions options, java.lang.String searchPattern, int startIndex, int batchSize)
          get a list of template metadata based on the jpa implementation.
 Future refreshTemplateCache(java.util.List<java.lang.String> templateNames, SpacesTemplateManager.UpdateType updateType, boolean syncMode, boolean cleanGSTableCache)
          Deprecated.  

 

Method Detail

getTemplate

SpaceTemplate getTemplate(oracle.mds.core.MDSSession session,
                          java.lang.String name)
                          throws SpacesException
Deprecated. use getTemplate(name)
This method returns a SpaceTemplate class object for a given name.
Parameters:
session - MDSSession
name - Name of the template to be instantiated
Returns:
Returns the SpaceTemplate class for a given template name
Throws:
SpacesException

getTemplate

SpaceTemplate getTemplate(java.lang.String templateName)
                          throws SpacesException
Throws:
SpacesException

createTemplate

SpaceTemplate createTemplate(java.lang.String templateName,
                             java.lang.String templateDescription,
                             Space baseSpace)
                             throws SpacesException,
                                    oracle.webcenter.webcenterapp.security.WCSecurityException
This API creates a new template from an existing Space object. This class automatically creates the metadata for a Template, copies the Space metadata in it and returns the instance of it
Parameters:
templateName - Name of the template to be created
templateDescription - Description of the new template
baseSpace - Space on which the template would be based upon
Returns:
SpaceTemplate object for a new template created
Throws:
SpacesException
oracle.webcenter.webcenterapp.security.WCSecurityException

createTemplate

SpaceTemplate createTemplate(java.lang.String templateName,
                             java.lang.String templateDescription,
                             Space baseSpace,
                             java.util.Collection<java.lang.String> serviceCopyDataList)
                             throws SpacesException,
                                    oracle.webcenter.webcenterapp.security.WCSecurityException
This API creates a new template from an existing Space object. This class automatically creates the metadata for a Template, copies the Space metadata in it and returns the instance of it
Parameters:
templateName - Name of the template to be created
templateDescription - Description of the new template
baseSpace - Space on which the template would be based upon
serviceCopyDataList - List of services whose data has to be copied from base space to template
Returns:
SpaceTemplate object for a new template created
Throws:
SpacesException
oracle.webcenter.webcenterapp.security.WCSecurityException

deleteTemplate

SpaceTemplate deleteTemplate(SpaceTemplate template)
                             throws SpacesException,
                                    oracle.webcenter.webcenterapp.security.WCSecurityException
This API deletes the given Space template metadata from MDS. It also removes entries for Space template metadata customizations, preferences, security metatadata etc.
Parameters:
template - Space template to be deleted
Returns:
SpaceTemplate that is deleted
Throws:
SpacesException
oracle.webcenter.webcenterapp.security.WCSecurityException

getTemplateNamesList

java.util.Collection<java.lang.String> getTemplateNamesList(java.lang.String namePattern)
                                                            throws SpacesException
get the global list of template names. This is a place holder for now and is the first version of our move towards the new caching stratergy. This is not a supported API until this comment is taken off and we have implemented and tested this completly.
Parameters:
namePattern - to filter on. if null everything is returned.
Returns:
List of Space objects on which the currrent user has access.
Throws:
SpacesException

getTemplates

java.util.List<GSMetadata> getTemplates(SpacesQueryOptions options,
                                        java.lang.String searchPattern,
                                        int startIndex,
                                        int batchSize)
                                        throws SpacesException
get a list of template metadata based on the jpa implementation. this has pagination support with support for a startIndex and a batchSize.
Parameters:
searchPattern - the search pattern, null or empty string can be passed in to skip the search pattern
startIndex - the starting row index in the page containing the data.
batchSize - the number of results to be returned in a single page.
Returns:
List of GSMetadata
Throws:
SpacesException

refreshTemplateCache

Future refreshTemplateCache(java.util.List<java.lang.String> templateNames,
                            SpacesTemplateManager.UpdateType updateType,
                            boolean syncMode,
                            boolean cleanGSTableCache)
                            throws SpacesException
Deprecated. 
This API refreshes the group space header table. This api keeps the MDS repository and the spaces and header table in sync.
Parameters:
templateNames - is a list of template names. An empty list or null indicates that we need to updated all the template.
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 the templates in the target instance which were not availiable in the source instance.
Throws:
SpacesException - when error occurs while updating the header and detail repository.

Skip navigation links

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


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