Class BaseSpace

java.lang.Object
oracle.webcenter.spaces.BaseSpace
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Space, SpaceTemplate

@Exported public abstract class BaseSpace extends Object implements Serializable
This class is a base class for all group spaces and all group space templates. It offers common framework for space/template and the methods that can be used across multiple extending classes
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    BaseSpace(String baseSpaceName)
    Constructs the BaseSpace with a space name.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract BaseSpace
    clone(oracle.mds.core.MDSSession session, String newSpaceName, String newSpaceGUID, String description, String displayName, String keywords, boolean closed)
    Deprecated.
    Use the new API clone(MDSSession session, String newSpaceName, SpaceCreationOptions option)
    abstract BaseSpace
    clone(oracle.mds.core.MDSSession session, SpaceCreationOptions option)
    Clone method for a Space.
    abstract void
    This method disables the service, i.e.
    abstract void
    enableService(String serviceID)
    This method enables the service, i.e.
    abstract boolean
    This method returns the closed status of the group space
    abstract String
    This method returns the description of the Group Space
    abstract String
    This method returns the displayName of the Group Space
    abstract GSMetadata
    This method returns the GSMetadata that contains limited details of the space object
    abstract String
    getGUID(oracle.mds.core.MDSSession session)
    This API gets the GUID [globally unique identifier] for a given Space.
    abstract String
    This method returns the keywords for the Group Space
    abstract oracle.webcenter.spaces.beans.SpaceMetadata
    getMetadata(oracle.mds.core.MDSSession session, boolean readOnly)
    This method is responsible for getting the mutable/immutable SpaceMetadata object for a given Space Object.
    abstract String
    This API returns the MetadataPath
    abstract String
    This API returns the metadataRootDir
    abstract String
    getName(oracle.mds.core.MDSSession session)
    This API gets the name of the Space object from MDS metadata
    abstract List<String>
    This API returns the list of optional services provisioned for that scope
    abstract oracle.webcenter.spaces.beans.SpacePreferencesMetadata
    getPreferenceMetadata(oracle.mds.core.MDSSession session, boolean readOnly)
    This method is responsible for getting the mutable SpacePreferencesMetadata object for a given Spaces.
    abstract List<oracle.webcenter.framework.service.Service>
    provision a particular service for the specified scope.
    protected static String
     
    abstract oracle.webcenter.webcenterapp.security.WCSecurityManager
    This API instantiates Security metadata for a given Space and returns the instance.
    abstract oracle.webcenter.webcenterapp.security.WCSecurityManager
    getSecurityManager(oracle.security.jps.service.policystore.PolicyStore policyStore)
    This API instantiates Security metadata for a given Space and returns the instance.
    abstract Boolean
    isEnabled(String serviceID)
    This method tells whether the Optional tools are enabled on a Portal/Portal-template.
    abstract void
    This method does the provisioning and role-mapping of the service.
    abstract void
    provisionService(oracle.webcenter.framework.service.Service service)
    provision a particular service for the specified scope.
    abstract void
    setClosed(boolean closed)
    This method sets whether the Group Space is closed
    abstract void
    setDescription(String description)
    This method returns the description of the Group Space
    abstract void
    setDisplayName(String displayName)
    This method sets the displayName of Group Space
    abstract void
    setKeywords(String keywords)
    This method sets the keywords for Group Space
    abstract void
    unProvisionService(oracle.webcenter.framework.service.Service service)
    Un-provision a particular service for the Space.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • baseSpaceName

      protected String baseSpaceName
  • Constructor Details

    • BaseSpace

      public BaseSpace(String baseSpaceName)
      Constructs the BaseSpace with a space name.
      Parameters:
      baseSpaceName - the space name
  • Method Details

    • getName

      public abstract String getName(oracle.mds.core.MDSSession session) throws SpacesException
      This API gets the name of the Space object from MDS metadata
      Parameters:
      session - MDSSession on which it should get the metadata
      Returns:
      String name of the Space
      Throws:
      SpacesException - Throws SpacesException if the metadata for given Space is not found
    • getGUID

      public abstract String getGUID(oracle.mds.core.MDSSession session) throws SpacesException
      This API gets the GUID [globally unique identifier] for a given Space. This metadata is maintained by MDS
      Parameters:
      session - MDSSession on which it should get the metadata
      Returns:
      String GUID of the Space
      Throws:
      SpacesException - Throws SpacesException if the GUID metadata for given Space is not found
    • getMetadata

      public abstract oracle.webcenter.spaces.beans.SpaceMetadata getMetadata(oracle.mds.core.MDSSession session, boolean readOnly) throws SpacesException
      This method is responsible for getting the mutable/immutable SpaceMetadata object for a given Space Object. Depending upon the requirement, this API either returns read only metadata or writable metadata.
      Parameters:
      session - MDSSession on which it should get the metadata
      readOnly - Returns readOnly metadata or writable metadata depending upon the flag value. When false, returns writable metadata
      Returns:
      SpaceMetadata Metadata for Space object. This metadata comes from MDS
      Throws:
      SpacesException - Throws SpacesException if the metadata for given Space is not found
    • getPreferenceMetadata

      public abstract oracle.webcenter.spaces.beans.SpacePreferencesMetadata getPreferenceMetadata(oracle.mds.core.MDSSession session, boolean readOnly) throws SpacesException
      This method is responsible for getting the mutable SpacePreferencesMetadata object for a given Spaces. Depending upon the requirement, this API either returns read only metadata or writable metadata.
      Parameters:
      session - MDSSession on which it should get the metadata
      readOnly - Returns readOnly metadata or writable metadata depending upon the flag value
      Returns:
      SpacesPreferencesMetadata Preferences Metadata for Space object. This metadata comes from MDS
      Throws:
      SpacesException - Throws SpacesException if the metadata for given Space is not found
    • getSecurityManager

      public abstract oracle.webcenter.webcenterapp.security.WCSecurityManager getSecurityManager(oracle.security.jps.service.policystore.PolicyStore policyStore) throws SpacesException, oracle.webcenter.webcenterapp.security.WCSecurityException
      This API instantiates Security metadata for a given Space and returns the instance. It instantiates the security manager with Space's default policy store i.e. WebCenter Application's policy store. One should use this API to get hold of Space's Security manager
      Parameters:
      policyStore - Policy Store instance
      Returns:
      Returns SecurityManager object that represents this Space
      Throws:
      SpacesException - if Security manager can not be instantiated for this Space
      oracle.webcenter.webcenterapp.security.WCSecurityException
    • getSecurityManager

      public abstract oracle.webcenter.webcenterapp.security.WCSecurityManager getSecurityManager() throws SpacesException, oracle.webcenter.webcenterapp.security.WCSecurityException
      This API instantiates Security metadata for a given Space and returns the instance. It instantiates the security manager with Space's default policy store i.e. WebCenter Application's policy store. One should use this API to get hold of Space's Security manager
      Returns:
      Returns SecurityManager object that represents this Space
      Throws:
      SpacesException - if Security manager can not be instantiated for this Space
      oracle.webcenter.webcenterapp.security.WCSecurityException
    • clone

      public abstract BaseSpace clone(oracle.mds.core.MDSSession session, String newSpaceName, String newSpaceGUID, String description, String displayName, String keywords, boolean closed) throws SpacesException
      Deprecated.
      Use the new API clone(MDSSession session, String newSpaceName, SpaceCreationOptions option)
      Clone method for a Space. This method creates a clone of an existing Space into a new location and returns it as an object
      Parameters:
      session - MDSSession on which clone should operate upon
      newSpaceName - Name of the new Space
      newSpaceGUID - GUID of the new Space
      description - The description of the Group Space
      displayName - The display name of the Group Space
      keywords - The keywords for the Group Space
      closed - status of the Group Space
      Returns:
      The Space class for newly cloned space
      Throws:
      SpacesException - Throws SpacesException if a clone for a given Space can not be created
    • clone

      public abstract BaseSpace clone(oracle.mds.core.MDSSession session, SpaceCreationOptions option) throws SpacesException
      Clone method for a Space. This method creates a clone of an existing Space into a new location and returns it as an object
      Parameters:
      session - MDSSession on which clone should operate upon
      option - The SpaceCreationOptions which contains space parameters used for creating space
      Returns:
      The Space class for newly cloned space
      Throws:
      SpacesException - Throws SpacesException if a clone for a given Space can not be created
    • getMetadataRootDir

      public abstract String getMetadataRootDir()
      This API returns the metadataRootDir
      Returns:
      String The root directory of the metadata path
    • getMetadataPath

      public abstract String getMetadataPath()
      This API returns the MetadataPath
      Returns:
      String The metadata path
    • setDisplayName

      public abstract void setDisplayName(String displayName)
      This method sets the displayName of Group Space
      Parameters:
      displayName -
    • getDisplayName

      public abstract String getDisplayName()
      This method returns the displayName of the Group Space
      Returns:
      displayName
    • setKeywords

      public abstract void setKeywords(String keywords)
      This method sets the keywords for Group Space
      Parameters:
      keywords -
    • getKeywords

      public abstract String getKeywords()
      This method returns the keywords for the Group Space
      Returns:
      keywords
    • setClosed

      public abstract void setClosed(boolean closed)
      This method sets whether the Group Space is closed
      Parameters:
      closed -
    • getClosed

      public abstract boolean getClosed()
      This method returns the closed status of the group space
      Returns:
      closed
    • setDescription

      public abstract void setDescription(String description)
      This method returns the description of the Group Space
      Parameters:
      description -
    • getDescription

      public abstract String getDescription()
      This method returns the description of the Group Space
      Returns:
      description
    • getOptionalProvisionedServices

      public abstract List<String> getOptionalProvisionedServices()
      This API returns the list of optional services provisioned for that scope
      Returns:
      description
    • getProvisionedServices

      public abstract List<oracle.webcenter.framework.service.Service> getProvisionedServices() throws SpacesException
      provision a particular service for the specified scope.
      Returns:
      List of Service which are provisioned for this Space
      Throws:
      SpacesException
    • getScopeMOPath

      protected static String getScopeMOPath(String scope)
    • getGSMetadata

      public abstract GSMetadata getGSMetadata() throws SpacesException
      This method returns the GSMetadata that contains limited details of the space object
      Returns:
      GSMetadata
      Throws:
      SpacesException
    • unProvisionService

      public abstract void unProvisionService(oracle.webcenter.framework.service.Service service) throws SpacesException
      Un-provision a particular service for the Space. Unprovisioning a service would remove the service from given Space
      Parameters:
      service - Service object to be removed from the Space
      Throws:
      oracle.webcenter.command.CommandException - Throws CommandException if service to be unprovisioned can't be unprovisioned
      SpacesException - when any unexpected error happens
    • provisionService

      public abstract void provisionService(oracle.webcenter.framework.service.Service service) throws SpacesException
      provision a particular service for the specified scope.
      Parameters:
      service -
      Throws:
      SpacesException
    • enableService

      public abstract void enableService(String serviceID) throws SpacesException
      This method enables the service, i.e. adds the metadata element in space.xml (or spaceteplate.xml) with the serviceID example - spaceObject.enableService("oracle.webcenter.doclib");
      Throws:
      SpacesException
    • disableService

      public abstract void disableService(String serviceID) throws SpacesException
      This method disables the service, i.e. removes the metadata element in space.xml (or spaceteplate.xml) corresponding to serviceID example - spaceObject.disableService("oracle.webcenter.doclib");
      Throws:
      SpacesException
    • isEnabled

      public abstract Boolean isEnabled(String serviceID)
      This method tells whether the Optional tools are enabled on a Portal/Portal-template. By enable, it means that the tool is required by the Portal/Portal-template but it is not provisioned yet. Based on this api, tools will be provisioned after Portal creation. example - Boolean isToolEnabled = spaceObject.isEnable("oracle.webcenter.doclib");
      Returns:
      Boolean - if the tool is enabled or not.
    • provisionEnabledService

      public abstract void provisionEnabledService(String serviceID) throws SpacesException
      This method does the provisioning and role-mapping of the service. This method is created so that services can call this to provision service on the fly, i.e. lazy provision the services
      Throws:
      SpacesException