public abstract class SandboxSessionSupport
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MODE_EDIT
Returned by
getMode() to indicate that the session intends to
customize the metadata if the application context allows. |
static java.lang.String |
PROPERTY_VB_FEATURE
The session property "oracle.adf.share.sandbox.vb.feature" that indicates
the ID of the
SandboxedFeature for Visual Builder. |
static java.lang.String |
SB_NOT_SET
Deprecated.
|
Constructor and Description |
---|
SandboxSessionSupport() |
Modifier and Type | Method and Description |
---|---|
void |
adfSessionOptionsSettingsRejected(ADFSOSeed rejectedSettings,
java.lang.Throwable reason)
Deprecated.
Subclasses should not override this method. The code that
handles syncWith failures is now internal. This method is
no longer invoked by the framework.
Invoked when the settings returned by
newADFSessionOptionsSettings is rejected by
the current ADFSessionOptions object in the session. |
void |
afterDelete()
Deprecated.
See #getSandboxListenerSupport
|
void |
afterPublish()
Deprecated.
See #getSandboxListenerSupport
|
void |
afterRefresh()
Deprecated.
See #getSandboxListenerSupport
|
void |
beforeDelete()
Deprecated.
See #getSandboxListenerSupport
|
void |
beforePublish()
Deprecated.
See #getSandboxListenerSupport
|
void |
beforeRefresh()
Deprecated.
See #getSandboxListenerSupport
|
int |
checkCurrentCustomizationContext(SandboxConstraints constraints)
Checks the current customization context to see if it satisfies the given
sandbox constraints.
|
void |
deleteSandbox(java.lang.String userSandboxId)
Deprecated.
See #getSandboxListenerSupport
|
abstract void |
enterSandboxSession(java.lang.String userSandboxId)
Associates a sandbox ID with a session.
|
abstract void |
exitSandboxSession()
Dis-associates a sandbox ID with a session if a sandbox ID is
associated with the sandbox.
|
static java.lang.String |
getCurrentSandboxId()
Deprecated.
|
protected oracle.mds.config.CustConfig |
getCustomCustConfig()
Returns a custom
CustConfig object for the current
ADFSessionOptions if necessary. |
protected oracle.mds.cust.CustomizationPolicy |
getCustomizationPolicy()
Returns a
CustomizationPolicy object for the current
ADFSessionOptions if applicable. |
java.lang.String |
getHomePageURL() |
java.util.Map<java.lang.String,java.lang.String> |
getInitialAdfmdeParameters()
Returns the initial parameters as the base context for
MetadataEnvironmentFactory . |
static SandboxSessionSupport |
getInstance()
Gets the system default instance of this class.
|
java.lang.Integer |
getMaximumNumberOfOpenSandboxes()
Returns the maximum number of open sandboxes allowed in the system.
|
abstract java.lang.String |
getMode()
Returns mode of the sandbox.
|
SandboxedFeatures |
getSandboxedFeatures()
Returns the available features in the system.
|
SandboxListenerSupport |
getSandboxListenerSupport()
Returns a dispatcher for sandbox framework events that are delivered
to listeners outside the sandbox framework.
|
abstract java.util.Map<java.lang.String,java.lang.Object> |
getSandboxTaskParams()
Any parameters required to perform initialization of a sandbox task can be
supplied to sandbox task thread through this method.
|
java.lang.String |
getSessionMetadataRevisionId()
Returns the ID of the metadata revision in the current user session.
|
java.lang.String |
getSessionProperty(java.lang.String key)
Returns the value of a property.
|
abstract java.lang.String |
getSessionSandboxId()
Returns sandbox ID from session object
|
java.lang.String |
getUserName()
Returns the user name from the session object
|
java.lang.String |
getVisualBuilderSandboxedFeatureId()
Returns the ID of the sandboxed feature for Visual Builder.
|
boolean |
isEditSupported()
Deprecated.
Use checkCurrentCustomizationContext(SandboxConstraints) instead.
Returns true if the current application runtime supportes edit.
Edit mode is supported if
the layer pinned to sandbox is available in the current application
the pinned layer returns the value pinned to sandbox.
all the dynamic layers pinned to sandbox are in the same order and return the value pinned to the layer.
|
boolean |
isHomePageRedirectionEnabled() |
static java.lang.Boolean |
isRequestForRefresh()
Deprecated.
|
boolean |
isUnified()
Returns true if the sandbox returned by this object is a unified sandbox.
|
ADFSOSeed |
newADFSessionOptionsSettings(MetadataEnvironment env)
Deprecated.
Subclasses should not override this method. The code that
creates an ADFSOSeed from a MetadataEnvironment is now
internal. This method is no longer invoked by the framework.
Returns the settings for ADF session options based on the information from
a metadata environment.
|
protected ADFSOSeed |
newADFSessionOptionsSettingsRT(MetadataEnvironment env)
Deprecated.
Subclasses should not override this method. The code that
creates an ADFSOSeed from a MetadataEnvironment is now
internal. This method is no longer invoked by the framework.
Returns the settings that put the ADF session outside a sandbox.
|
MetadataEnvironmentThread.Resources |
newThreadResources()
Acquires session related resources to be used in a new thread.
|
static void |
notify(java.lang.String type,
SandboxFrameworkEvent e)
A convenience method delegated to method
notify of the
SandboxListenerSupport instance returned by
getSandboxListenerSupport if not null. |
void |
publishSandbox(java.lang.String userSandboxId)
Deprecated.
See #getSandboxListenerSupport
|
static void |
setCurrentSandboxId(java.lang.String id)
Deprecated.
|
abstract void |
setMode(java.lang.String mode)
Sets mode of the sandbox.
|
static void |
setRequestForRefresh(java.lang.Boolean refreshRequest)
Deprecated.
|
abstract void |
setSandboxTaskParams(java.util.Map<java.lang.String,java.lang.Object> params)
This method will be invoked before the task starts from the thread that
performs the sandbox tasks.
|
java.lang.String |
updateSessionMetadataRevision()
Updates the metadata revision in the current user session to the latest.
|
public static final java.lang.String MODE_EDIT
getMode()
to indicate that the session intends to
customize the metadata if the application context allows.public static final java.lang.String PROPERTY_VB_FEATURE
SandboxedFeature
for Visual Builder.@Deprecated public static final java.lang.String SB_NOT_SET
public static SandboxSessionSupport getInstance()
public java.lang.String getUserName()
public SandboxedFeatures getSandboxedFeatures()
null
if all features in the class path are availablepublic abstract java.lang.String getSessionSandboxId()
public boolean isUnified()
getSessionSandboxId()
public java.lang.String getSessionMetadataRevisionId()
null
if the metadata should be read from mainline
tip or if such information is not availablepublic java.lang.String updateSessionMetadataRevision()
public MetadataEnvironmentThread.Resources newThreadResources()
null
if no resources are available or
the resources can be obtained in the new thread without
being propagated from the current threadpublic abstract void enterSandboxSession(java.lang.String userSandboxId)
userSandboxId
- the sandbox IDpublic abstract void exitSandboxSession()
@Deprecated public void publishSandbox(java.lang.String userSandboxId)
userSandboxId
- the ID of sandbox that is published.@Deprecated public void deleteSandbox(java.lang.String userSandboxId)
userSandboxId
- the ID of sandbox that is deleted.public abstract java.lang.String getMode()
setMode(java.lang.String)
@Deprecated public boolean isEditSupported()
public int checkCurrentCustomizationContext(SandboxConstraints constraints)
ADF.hasCurrent()
returns false.ADFContext.getCurrent().getMDSInstanceAsObject()
returns null.MDSInstance.getMDSConfig()
returns null.MDSConfig.getCustConfig()
returns null.CustConfig.getMappings()
returns null or an empty array.CustListMapping
for namespace "/".constraints
- the sandbox constraints that must be satisfiedpublic abstract void setMode(java.lang.String mode)
mode
- of the sandbox which can be Edit or Read Only.@Deprecated public void beforePublish()
@Deprecated public void afterPublish()
@Deprecated public void beforeRefresh()
@Deprecated public void afterRefresh()
@Deprecated public void beforeDelete()
@Deprecated public void afterDelete()
public abstract java.util.Map<java.lang.String,java.lang.Object> getSandboxTaskParams()
public abstract void setSandboxTaskParams(java.util.Map<java.lang.String,java.lang.Object> params)
@Deprecated public static final java.lang.String getCurrentSandboxId()
@Deprecated public static final void setCurrentSandboxId(java.lang.String id)
@Deprecated public static final java.lang.Boolean isRequestForRefresh()
@Deprecated public static final void setRequestForRefresh(java.lang.Boolean refreshRequest)
public java.lang.String getHomePageURL()
public boolean isHomePageRedirectionEnabled()
@Deprecated public ADFSOSeed newADFSessionOptionsSettings(MetadataEnvironment env)
env
- the metadata environment that provides the information about
how application metadata should be accessedjava.lang.IllegalArgumentException
- if the given metadata environment is
nulljava.lang.UnsupportedOperationException
- if configuring ADF session
options is not supported, or the given metadata environment
is not recognized@Deprecated public void adfSessionOptionsSettingsRejected(ADFSOSeed rejectedSettings, java.lang.Throwable reason)
newADFSessionOptionsSettings
is rejected by
the current ADFSessionOptions
object in the session.rejectedSettings
- the settings that are rejected; null
if newADFSessionOptionsSettings
returns nullreason
- the reason why the current ADFSessionOptions
does not accept the new settingsnewADFSessionOptionsSettings(oracle.adf.share.MetadataEnvironment)
@Deprecated protected ADFSOSeed newADFSessionOptionsSettingsRT(MetadataEnvironment env)
env
- the metadata environment that provides runtime informationprotected oracle.mds.config.CustConfig getCustomCustConfig()
CustConfig
object for the current
ADFSessionOptions
if necessary. Normally the
CustConfig
comes from the adf-config.xml of the current
application (or the classpath). This method is only called
when a custom CustConfig
is applicable, such as when the
current ADFSessionOptions
is to be configured for
"object merge" during the "refresh" operation of a sandbox.CustConfig
object for the current
ADFSessionOptions
; null
if the
CustConfig
should come from adf-config.xml like it
normally doesprotected oracle.mds.cust.CustomizationPolicy getCustomizationPolicy()
CustomizationPolicy
object for the current
ADFSessionOptions
if applicable.CustomizationPolicy
object for the current
ADFSessionOptions
if applicablepublic java.lang.String getSessionProperty(java.lang.String key)
java.lang.System
if ADFContext is not initialized,
oracle.adf.share.props.ConfigPropertyManager
otherwise.key
- the property keynull
if the property value
is null or the property does not existpublic java.util.Map<java.lang.String,java.lang.String> getInitialAdfmdeParameters()
MetadataEnvironmentFactory
. An initial parameter may be
overwritten if a different value is given later by the actual
context such as an HTTP request parameter.MetadataEnvironmentFactory
MetadataEnvironmentFactory.getContextParameter(String)
public java.lang.Integer getMaximumNumberOfOpenSandboxes()
null
if unlimited number of open sandboxes is
allowedpublic java.lang.String getVisualBuilderSandboxedFeatureId()
getSessionProperty(PROPERTY_VB_FEATURE)
.
If the ID is fixed, subclasses may override this method to return the
fixed ID to improve performance.public SandboxListenerSupport getSandboxListenerSupport()
null
if not
availablepublic static final void notify(java.lang.String type, SandboxFrameworkEvent e)
notify
of the
SandboxListenerSupport
instance returned by
getSandboxListenerSupport
if not null. This method returns
immediately if getSandboxListenerSupport
returns null.type
- the type of the evente
- the eventjava.lang.IllegalArgumentException
- if the type or event is nullgetSandboxListenerSupport()