|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.higgins.util.idas.cp.jscript.JScriptCPMetadataPDPs
Part of the JSPolicy Higgins Context provider. This implementation allows for javascript policy at critical points.
This module defines the PDP interfaces that are common to most property based Higgins objects.
| Field Summary | |
|---|---|
static String |
consumerIDParamName
Generic parameter name for for selected PDPs. |
static String |
consumerTypeParamName
Generic parameter name for for selected PDPs. |
static String |
genericParamName
Generic name which is used on many of the PDPs to pass a single parameter from java to the script. |
static String |
genericResultName
Generic name which is used on many of the PDPs to pass the result from JavaScript back to JAVA PDP code. |
static String |
providerIDParamName
Generic parameter name for for selected PDPs. |
static String |
providerTypeParamName
Generic parameter name for for selected PDPs. |
| Constructor Summary | |
|---|---|
JScriptCPMetadataPDPs(org.eclipse.higgins.util.jscript.JScriptExec consumerIDToProviderExec,
org.eclipse.higgins.util.jscript.JScriptExec providerIDToConsumerExec,
org.eclipse.higgins.util.jscript.JScriptExec consumerTypeToProviderExec,
org.eclipse.higgins.util.jscript.JScriptExec providerTypeToConsumerExec,
org.eclipse.higgins.util.jscript.JScriptExec consumerValueToProviderExec,
org.eclipse.higgins.util.jscript.JScriptExec providerValueToConsumerExec,
boolean allowAsymmetricPDP)
TODO: add logging if mismached configuration |
|
| Method Summary | |
|---|---|
URI |
consumerIDToProvider(URI consumerID)
TODO document this one |
Iterator |
consumerIDToProviders(URI consumerID)
PDP interface for converting from passed by consumer (presented) ID to what is correct for storage or relaying on to another Context Provider. |
URI |
consumerTypeToProvider(URI consumerID,
URI type)
PDP interface for converting from passed by consumer (presented) values to what is correct for storage or relaying on to another Context Provider. |
org.eclipse.higgins.idas.api.IAttributeValue |
consumerValueToProvider(URI consumerID,
URI consumerType,
URI providerID,
URI providerType,
org.eclipse.higgins.idas.api.IAttributeValue consumerValue)
When this PDP is invoked the consumer type, the provider type and the Metadata Value are all stored in an evaluation specific JavaScript scope using the names consumerTypeParamName,
providerTypeParamName, genericParamName respectively. |
URI |
providerIDToConsumer(URI providerID)
Helper PDP for converting from stored or child Context Provider to consumer presented ID. |
URI |
providerTypeToConsumer(URI providerID,
URI type)
For JavaScript PDPs this passes the type in the JavaScript var PARAM as a java URI and handles a string or URI back. |
org.eclipse.higgins.idas.api.IAttributeValue |
providerValueToConsumer(URI providerID,
URI providerType,
URI consumerID,
URI consumerType,
org.eclipse.higgins.idas.api.IAttributeValue providerValue)
When this PDP is invoked the consumer type, the provider type and the Metadata Value are all stored in an evaluation specific JavaScript scope using the names consumerTypeParamName,
providerTypeParamName, genericParamName respectively. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String genericParamName
public static final String genericResultName
public static final String consumerTypeParamName
public static final String providerTypeParamName
public static final String consumerIDParamName
public static final String providerIDParamName
| Constructor Detail |
public JScriptCPMetadataPDPs(org.eclipse.higgins.util.jscript.JScriptExec consumerIDToProviderExec,
org.eclipse.higgins.util.jscript.JScriptExec providerIDToConsumerExec,
org.eclipse.higgins.util.jscript.JScriptExec consumerTypeToProviderExec,
org.eclipse.higgins.util.jscript.JScriptExec providerTypeToConsumerExec,
org.eclipse.higgins.util.jscript.JScriptExec consumerValueToProviderExec,
org.eclipse.higgins.util.jscript.JScriptExec providerValueToConsumerExec,
boolean allowAsymmetricPDP)
consumerIDToProviderExec - consumerIDToProvider(java.net.URI)providerIDToConsumerExec - providerIDToConsumer(java.net.URI)consumerTypeToProviderExec - consumerTypeToProvider(java.net.URI, java.net.URI)providerTypeToConsumerExec - providerTypeToConsumer(java.net.URI, java.net.URI)consumerValueToProviderExec - consumerValueToProvider(java.net.URI, java.net.URI, java.net.URI, java.net.URI, org.eclipse.higgins.idas.api.IAttributeValue)providerValueToConsumerExec - providerValueToConsumer(java.net.URI, java.net.URI, java.net.URI, java.net.URI, org.eclipse.higgins.idas.api.IAttributeValue)| Method Detail |
public URI providerIDToConsumer(URI providerID)
throws org.eclipse.higgins.idas.api.IdASException
providerIDToConsumer in interface IAttributePDPsproviderID - The actual or provider ID of the metadata
org.eclipse.higgins.idas.api.IdASException
public Iterator consumerIDToProviders(URI consumerID)
throws org.eclipse.higgins.idas.api.IdASException
consumerIDToProviders in interface IAttributePDPsconsumerID - the consumer or unmapped ID of the metadata
org.eclipse.higgins.idas.api.IdASException
public URI consumerIDToProvider(URI consumerID)
throws org.eclipse.higgins.idas.api.IdASException
consumerIDToProvider in interface IAttributePDPsconsumerID - the consumer or unmapped ID of the attribute
org.eclipse.higgins.idas.api.IdASException
public URI consumerTypeToProvider(URI consumerID,
URI type)
throws org.eclipse.higgins.idas.api.IdASException
IAttributePDPs
consumerTypeToProvider in interface IAttributePDPsconsumerID - the consumer's version of the ID of the metadata, passed on
to the javascript pdp as consumerIDParamNametype - The consumer data type, passed on to the javascript pdp as
consumerTypeParamName
genericResultName is the new type.
To avoid problems it is recomended that the reverse mapping also be
defined using the id providerTypeToConsumer(java.net.URI, java.net.URI)
A simple nonsensical sample where the provider Entity Type mappings are stored in a globally scoped metadata multimap, and are referenced using JavaScript Associative Arrays.
<JSPolicyAction id="consumerEntityTypeToProvider" evalType="javascript"> RESULT = multimap.consumer[(PARAM.toString())]; </JSPolicyAction> <JSPolicyAction id="providerEntityTypeToConsumer" evalType="javascript"> RESULT = multimap.provider[String(PARAM.toString())]; </JSPolicyAction>
org.eclipse.higgins.idas.api.IdASException
public URI providerTypeToConsumer(URI providerID,
URI type)
throws org.eclipse.higgins.idas.api.IdASException
providerTypeToConsumer in interface IAttributePDPsproviderID - type - The consumer type
org.eclipse.higgins.idas.api.IdASExceptionIPropertyPDP.providerTypeToConsumer(URI
type)
public org.eclipse.higgins.idas.api.IAttributeValue consumerValueToProvider(URI consumerID,
URI consumerType,
URI providerID,
URI providerType,
org.eclipse.higgins.idas.api.IAttributeValue consumerValue)
throws org.eclipse.higgins.idas.api.IdASException
consumerTypeParamName,
providerTypeParamName, genericParamName respectively. It is
consumer that either the result of the script or a JavaScript
variable with the name genericResultName is the new value
To avoid problems it is recommended that the reverse mapping also be defined.
consumerValueToProvider in interface IAttributePDPsconsumerType - The consumer or mapped type of the attribute valueproviderType - The actual or provider type of the attribute valueconsumerValue - The data comprising the consumer view of the value
org.eclipse.higgins.idas.api.IdASException
public org.eclipse.higgins.idas.api.IAttributeValue providerValueToConsumer(URI providerID,
URI providerType,
URI consumerID,
URI consumerType,
org.eclipse.higgins.idas.api.IAttributeValue providerValue)
throws org.eclipse.higgins.idas.api.IdASException
consumerTypeParamName,
providerTypeParamName, genericParamName respectively. It is
consumer that either the result of the script or a JavaScript
variable with the name genericResultName is the new value
To avoid problems it is recommended that the reverse mapping also be defined
providerValueToConsumer in interface IAttributePDPsproviderType - The actual or provider type of the attribute valueconsumerType - The consumer or mapped type of the attribute valueproviderValue - The data stored or child Context Provider view of the value
org.eclipse.higgins.idas.api.IdASException
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||