Skip navigation links

Oracle&reg Fusion Middleware Java API Reference for Oracle Metadata Service (MDS)
11g Release 2 (11.1.2.3.0)
E17496-04


oracle.mds.core
Class SessionOptions

java.lang.Object
  extended by oracle.mds.core.SessionOptions


public class SessionOptions
extends java.lang.Object

This class is used to specify session options when creating a new MDS session using the createSession method on the MDSInstance. Each instance of this class is immutable and serializable, so a given set of options can be saved to a file or other output stream then read in and reused later on to create multiple sessions using the same options.

For configuring session options for use with a sandbox use SandboxHelper.createSandboxVersionContextto create a version context.


Constructor Summary
SessionOptions(oracle.mds.core.IsolationLevel isolationLevel, java.util.Locale locale, CustConfig custConfig)
          Constructor without version context.
SessionOptions(oracle.mds.core.IsolationLevel isolationLevel, java.util.Locale locale, CustConfig custConfig, oracle.mds.cust.CustomizationPolicy custPolicy)
          Constructor without version context.
SessionOptions(oracle.mds.core.IsolationLevel isolationLevel, java.util.Locale locale, CustConfig custConfig, oracle.mds.versioning.VersionContext versionContext, java.lang.String versionCreatorName)
          Constructor for use with versioning.
SessionOptions(oracle.mds.core.IsolationLevel isolationLevel, java.util.Locale locale, CustConfig custConfig, oracle.mds.versioning.VersionContext versionContext, java.lang.String versionCreatorName, oracle.mds.cust.CustomizationPolicy custPolicy)
          Constructor with version context.
SessionOptions(oracle.mds.core.IsolationLevel isolationLevel, java.util.Locale locale, CustConfig custConfig, oracle.mds.versioning.VersionContext versionContext, java.lang.String versionCreatorName, oracle.mds.cust.CustomizationPolicy custPolicy, java.lang.Object servletContext)
          Constructor.

 

Method Summary
 CustConfig getCustConfig()
          Gets the CustConfig set on this SessionOptions object.
 oracle.mds.cust.CustomizationPolicy getCustomizationPolicy()
          Returns the customization policy from this SessionOptions object.
 oracle.mds.core.IsolationLevel getIsolationLevel()
          Gets the IsolationLevel set in these SessionOptions.
 java.util.Locale getLocale()
          Gets the Locale set in these SessionOptions.
 java.lang.Object getServletContextAsObject()
          Gets the servlet context set on this SessionOptions object.
 oracle.mds.versioning.VersionContext getVersionContext()
          Gets the VersionContext set on this SessionOptions object.
 java.lang.String getVersionCreatorName()
          Gets the version creator name set on this SessionOptions object.
 void setServletContextAsObject(java.lang.Object servletContext)
          Deprecated. Set up the ServletContext using the constructor.

 

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

 

Constructor Detail

SessionOptions

public SessionOptions(oracle.mds.core.IsolationLevel isolationLevel,
                      java.util.Locale locale,
                      CustConfig custConfig)
Constructor without version context.
Parameters:
isolationLevel - Transactional isolation level for the session. Available levels are defined as constants in the IsolationLevel class. Currently, the only supported level is:
in IsolationLevel.READ_COMMITTED. If null, READ_COMMITTED is assumed.
locale - Locale object specifying the language and territory the user wants to work in, so that MDS can return appropriate translations of translatable metadata attributes. If null, no translations are applied.
custConfig - CustConfig object specifying overrides to the customization configuration of the MDSInstance (determines the list of customization classes to apply to a MetadataObject based on its name). If null, the configuration set on the MDSInstance will be used.

SessionOptions

public SessionOptions(oracle.mds.core.IsolationLevel isolationLevel,
                      java.util.Locale locale,
                      CustConfig custConfig,
                      oracle.mds.cust.CustomizationPolicy custPolicy)
Constructor without version context.
Parameters:
isolationLevel - Transactional isolation level for the session. Available levels are defined as constants in the IsolationLevel class. Currently, the only supported level is:
in IsolationLevel.READ_COMMITTED. If null, READ_COMMITTED is assumed.
locale - Locale object specifying the language and territory the user wants to work in, so that MDS can return appropriate translations of translatable metadata attributes. If null, no translations are applied.
custConfig - CustConfig object specifying overrides to the customization configuration of the MDSInstance (determines the list of customization classes to apply to a MetadataObject based on its name). If null, the configuration set on the MDSInstance will be used.
custPolicy - The customizationPolicy to be used.

SessionOptions

public SessionOptions(oracle.mds.core.IsolationLevel isolationLevel,
                      java.util.Locale locale,
                      CustConfig custConfig,
                      oracle.mds.versioning.VersionContext versionContext,
                      java.lang.String versionCreatorName)
Constructor for use with versioning.
Parameters:
isolationLevel - Transactional isolation level for the session. Available levels are defined as constants in the IsolationLevel class. Currently, the only supported level is:
IsolationLevel.READ_COMMITTED. If null, READ_COMMITTED is assumed.
locale - Locale object specifying the language and territory the user wants to work in, so that MDS can return appropriate translations of translatable metadata attributes. If null, no translations are applied.
custConfig - CustConfig object specifying overrides to the customization configuration of the MDSInstance (determines the list of customization classes to apply to a MetadataObject based on its name). If null, the configuration set on the MDSInstance will be used.
versionContext - Contains label names and other information to determine which versions of objects are read. If null, then, if any version selectors are set in the configuration file, a version context will be implictly created using those selectors and set on the session when an MDSSession is created using these SessionOptions. However, the getVersionContext() method on these SessionOptions will continue always to return null.
versionCreatorName - Specifies a name to be marked on all new document versions created as a result of the changes made on the MDS session, to indicate who or what made the change. If null, not such indication will be provided.

SessionOptions

public SessionOptions(oracle.mds.core.IsolationLevel isolationLevel,
                      java.util.Locale locale,
                      CustConfig custConfig,
                      oracle.mds.versioning.VersionContext versionContext,
                      java.lang.String versionCreatorName,
                      oracle.mds.cust.CustomizationPolicy custPolicy)
Constructor with version context.
Parameters:
isolationLevel - Transactional isolation level for the session. Available levels are defined as constants in the IsolationLevel class. Currently, the only supported level is:
IsolationLevel.READ_COMMITTED. If null, READ_COMMITTED is assumed.
locale - Locale object specifying the language and territory the user wants to work in, so that MDS can return appropriate translations of translatable metadata attributes. If null, no translations are applied.
custConfig - CustConfig object specifying overrides to the customization configuration of the MDSInstance (determines the list of customization classes to apply to a MetadataObject based on its name). If null, the configuration set on the MDSInstance will be used.
versionContext - Contains label names and other information to determine which versions of objects are read. If null, then, if any version selectors are set in the configuration file, a version context will be implictly created using those selectors and set on the session when an MDSSession is created using these SessionOptions. However, the getVersionContext() method on these SessionOptions will continue always to return null.
versionCreatorName - Specifies a name to be marked on all new document versions created as a result of the changes made on the MDS session, to indicate who or what made the change. If null, not such indication will be provided.
custPolicy - The customizationPolicy to be used.

SessionOptions

public SessionOptions(oracle.mds.core.IsolationLevel isolationLevel,
                      java.util.Locale locale,
                      CustConfig custConfig,
                      oracle.mds.versioning.VersionContext versionContext,
                      java.lang.String versionCreatorName,
                      oracle.mds.cust.CustomizationPolicy custPolicy,
                      java.lang.Object servletContext)
Constructor.
Parameters:
isolationLevel - Transactional isolation level for the session. Available levels are defined as constants in the IsolationLevel class. Currently, the only supported level is:
IsolationLevel.READ_COMMITTED. If null, READ_COMMITTED is assumed.
locale - Locale object specifying the language and territory the user wants to work in, so that MDS can return appropriate translations of translatable metadata attributes. If null, no translations are applied.
custConfig - CustConfig object specifying overrides to the customization configuration of the MDSInstance (determines the list of customization classes to apply to a MetadataObject based on its name). If null, the configuration set on the MDSInstance will be used.
versionContext - Contains label names and other information to determine which versions of objects are read. If null, then, if any version selectors are set in the configuration file, a version context will be implictly created using those selectors and set on the session when an MDSSession is created using these SessionOptions. However, the getVersionContext() method on these SessionOptions will continue always to return null.
versionCreatorName - Specifies a name to be marked on all new document versions created as a result of the changes made on the MDS session, to indicate who or what made the change. If null, not such indication will be provided.
custPolicy - The customizationPolicy to be used.
servletContext - Instance of javax.servlet.ServletContext. This cannot be null.

Method Detail

getCustConfig

public CustConfig getCustConfig()
Gets the CustConfig set on this SessionOptions object.
Returns:
CustConfig The custconfig set on this object.

getCustomizationPolicy

public oracle.mds.cust.CustomizationPolicy getCustomizationPolicy()
Returns the customization policy from this SessionOptions object. This method never returns a null.
Returns:
mCustPolicy the CustomizationPolicy that was set SessionOptions was created or a new CustomizationPolicy object with no policies defined on it.

getIsolationLevel

public oracle.mds.core.IsolationLevel getIsolationLevel()
Gets the IsolationLevel set in these SessionOptions.
Returns:
IsolationLevel The IsolationLevel set on this object.

getLocale

public java.util.Locale getLocale()
Gets the Locale set in these SessionOptions.
Returns:
Locale The Locale set on this object.

getVersionContext

public oracle.mds.versioning.VersionContext getVersionContext()
Gets the VersionContext set on this SessionOptions object.
Returns:
VersionContext The version context set on this object.

getVersionCreatorName

public java.lang.String getVersionCreatorName()
Gets the version creator name set on this SessionOptions object.
Returns:
String The version creator name set on this object.

setServletContextAsObject

public void setServletContextAsObject(java.lang.Object servletContext)
Deprecated. Set up the ServletContext using the constructor.
Sets the servlet context to used.

The ServletContext set in the SessionOptions would be associated with the ServletContextMetadataStore. If the servlet context store is mapped to a namespace, when any MO belonging to that namespace is requested, the ServletContext would be used by the store to load data from the archive files.
Parameters:
servletContext - ServletContext

getServletContextAsObject

public java.lang.Object getServletContextAsObject()
Gets the servlet context set on this SessionOptions object.
Returns:
ServletContext as an Object. Callers should typecast this into a ServletContext object.

Skip navigation links

Oracle&reg Fusion Middleware Java API Reference for Oracle Metadata Service (MDS)
11g Release 2 (11.1.2.3.0)
E17496-04


Copyright © 2012, Oracle. All rights reserved.