|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.higgins.idas.cp.jspolicy.JSPolicyEntity
A Higgins Entity implementation allowing for javascript policy at critical points. Utilizing Mozilla's Rhino project, this code currently supports JavaScript PDPs at the following points:
getEntityID()
Entity IDs may be mapped from stored (real) values to
what is presented by consumers of this Context Provider.getEntityType()
Entity types may be mapped from stored
(real) values to what is presented by consumers of this Context Provider.JSPolicyContext
,
JSPolicyEntity
, and
TODO add doc
Method Summary | |
---|---|
org.eclipse.higgins.idas.api.IAttribute |
addAttribute(org.eclipse.higgins.idas.api.IAttribute copyFrom)
TODO there are three cases we have to deal with 1 - The attribute is a generic IAttribute created from some other iContext 2 - The attribute was returned from this Policy Context and the values are already mapped 3 - The attribute was created using addAttribute and values need to be mapped. |
org.eclipse.higgins.idas.api.IAttribute |
addAttribute(URI type)
|
boolean |
equals(org.eclipse.higgins.idas.api.IHasAttributes attributes)
|
org.eclipse.higgins.idas.api.IAttribute |
getAttribute(URI attributeID)
This Context Provider allows Attribute types to be mapped from stored (real) values to what is presented by consumers of this Context Provider by inserting JavaScript into the configuration file. |
Iterator |
getAttributes()
(non-Javadoc) |
org.eclipse.higgins.idas.api.IContext |
getContext()
|
String |
getEntityID()
Returns the Subject ID of this Entity. |
URI |
getEntityType()
Returns the type of this Entity. |
org.eclipse.higgins.idas.api.model.IEntityModel |
getModel()
TODO: implement this |
org.eclipse.higgins.idas.api.ISingleValuedAttribute |
getSingleValuedAttribute(URI attrType)
|
void |
remove()
|
void |
removeAttribute(URI attrType)
|
void |
removeAttributeValue(org.eclipse.higgins.idas.api.IAttribute attr)
|
void |
removeAttributeValue(URI attrType,
Object value)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public org.eclipse.higgins.idas.api.IContext getContext() throws org.eclipse.higgins.idas.api.IdASException
getContext
in interface org.eclipse.higgins.idas.api.IEntity
org.eclipse.higgins.idas.api.IdASException
public String getEntityID() throws org.eclipse.higgins.idas.api.IdASException
Please see
JSPolicyContext.consumerEntityIDToProvider
for usage and examples.
getEntityID
in interface org.eclipse.higgins.idas.api.IEntity
org.eclipse.higgins.idas.api.IdASException
IEntity.getEntityID()
public URI getEntityType() throws org.eclipse.higgins.idas.api.IdASException
Please see
JSPolicyContext.consumerEntityIDToProvider
getEntityType
in interface org.eclipse.higgins.idas.api.IEntity
org.eclipse.higgins.idas.api.IdASException
public Iterator getAttributes() throws org.eclipse.higgins.idas.api.IdASException
getAttributes
in interface org.eclipse.higgins.idas.api.IHasAttributes
org.eclipse.higgins.idas.api.IdASException
IHasAttributes.getAttributes()
public org.eclipse.higgins.idas.api.IAttribute getAttribute(URI attributeID) throws org.eclipse.higgins.idas.api.IdASException
JSPolicyContext.consumerATypeToProvider
contains the type mappings.
TODO: Should we have a PDP just for this function which controls the behavior of error handling and type mapping?
getAttribute
in interface org.eclipse.higgins.idas.api.IHasAttributes
org.eclipse.higgins.idas.api.IdASException
IHasAttributes.getAttribute(java.net.URI)
public org.eclipse.higgins.idas.api.ISingleValuedAttribute getSingleValuedAttribute(URI attrType) throws org.eclipse.higgins.idas.api.IdASException, org.eclipse.higgins.idas.api.NotSingleValuedAttributeException
getSingleValuedAttribute
in interface org.eclipse.higgins.idas.api.IHasAttributes
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.NotSingleValuedAttributeException
public org.eclipse.higgins.idas.api.model.IEntityModel getModel() throws org.eclipse.higgins.idas.api.IdASException
getModel
in interface org.eclipse.higgins.idas.api.IBlankEntity
org.eclipse.higgins.idas.api.IdASException
public void remove() throws org.eclipse.higgins.idas.api.IdASException
remove
in interface org.eclipse.higgins.idas.api.IEntity
org.eclipse.higgins.idas.api.IdASException
public org.eclipse.higgins.idas.api.IAttribute addAttribute(URI type) throws org.eclipse.higgins.idas.api.IdASException, org.eclipse.higgins.idas.api.InvalidTypeException
addAttribute
in interface org.eclipse.higgins.idas.api.IHasAttributes
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.InvalidTypeException
public org.eclipse.higgins.idas.api.IAttribute addAttribute(org.eclipse.higgins.idas.api.IAttribute copyFrom) throws org.eclipse.higgins.idas.api.IdASException
addAttribute
in interface org.eclipse.higgins.idas.api.IHasAttributes
org.eclipse.higgins.idas.api.IdASException
IHasAttributes.addAttribute(org.eclipse.higgins.idas.api.IAttribute)
public boolean equals(org.eclipse.higgins.idas.api.IHasAttributes attributes) throws org.eclipse.higgins.idas.api.IdASException
equals
in interface org.eclipse.higgins.idas.api.IHasAttributes
org.eclipse.higgins.idas.api.IdASException
public void removeAttribute(URI attrType) throws org.eclipse.higgins.idas.api.IdASException
removeAttribute
in interface org.eclipse.higgins.idas.api.IHasAttributes
org.eclipse.higgins.idas.api.IdASException
public void removeAttributeValue(URI attrType, Object value) throws org.eclipse.higgins.idas.api.IdASException
removeAttributeValue
in interface org.eclipse.higgins.idas.api.IHasAttributes
org.eclipse.higgins.idas.api.IdASException
public void removeAttributeValue(org.eclipse.higgins.idas.api.IAttribute attr) throws org.eclipse.higgins.idas.api.IdASException
removeAttributeValue
in interface org.eclipse.higgins.idas.api.IHasAttributes
org.eclipse.higgins.idas.api.IdASException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |