org.eclipse.higgins.idas.cp.inmem
Class InMemoryContext

java.lang.Object
  extended byorg.eclipse.higgins.idas.spi.BasicAttributeSet
      extended byorg.eclipse.higgins.idas.spi.BasicContext
          extended byorg.eclipse.higgins.idas.cp.inmem.InMemoryContext
All Implemented Interfaces:
org.eclipse.higgins.idas.spi.IAttributeContainer, org.eclipse.higgins.idas.api.IContext, org.eclipse.higgins.idas.spi.IEntityContainer, org.eclipse.higgins.idas.api.IHasAttributes

public class InMemoryContext
extends org.eclipse.higgins.idas.spi.BasicContext
implements org.eclipse.higgins.idas.spi.IEntityContainer

An implementation of a Higgins. Context Provider which is intended for use when Entities are being manufactored on the fly or need to be cached privatly. Please see the Samples section for one usage of creating Entities from SAML assertions, then allowing interfaces which require Entities to manipulate the InMemory Entity.

Author:
jimse@novell.com, tdoman@novell.com, dbuss@novell.com

Constructor Summary
InMemoryContext(org.eclipse.higgins.idas.api.IContextId contextID)
           
 
Method Summary
 org.eclipse.higgins.idas.api.IEntity addEntity(URI type, String entityID)
           
 void applyUpdates()
           
 void close()
           
 Iterator getEntities(org.eclipse.higgins.idas.api.IFilter filter)
           
 Iterator getEntities(org.eclipse.higgins.idas.api.IFilter filter, Iterator attrSelectionList)
           
 org.eclipse.higgins.idas.api.IEntity getEntity(String entityID)
           
 org.eclipse.higgins.idas.api.IEntity getEntity(String entityID, Iterator attrSelectionList)
           
 String getSchema()
           
 void importData(String arg0, String arg1)
           
 boolean isOpen(Object identity)
           
 String open(Object unknown)
           
 void updateNotification(org.eclipse.higgins.idas.spi.EntityNotification entityNotif)
           
 boolean verifyEntityAttributes(String arg0, Iterator arg1)
           
 
Methods inherited from class org.eclipse.higgins.idas.spi.BasicContext
addEntity, buildAttribute, buildAttributeAssertion, buildAuthNAttributesMaterials, buildComplexAttrValue, buildEntityIDAssertion, buildEntityTypeAssertion, buildFilter, buildSimpleAttrValue, cancelUpdates, createSimpleValue, exportData, getContextID, getContextModel, isSimpleType, open, setComponentSetting, setComponentSetting, setOpen, setSchema
 
Methods inherited from class org.eclipse.higgins.idas.spi.BasicAttributeSet
addAttribute, addAttribute, addUnnotifiedAttribute, addUnnotifiedAttribute, equals, getAttribute, getAttributes, getSingleValuedAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, updateNotification
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.higgins.idas.api.IHasAttributes
addAttribute, addAttribute, equals, getAttribute, getAttributes, getSingleValuedAttribute, removeAttribute, removeAttributeValue, removeAttributeValue
 
Methods inherited from interface org.eclipse.higgins.idas.spi.IAttributeContainer
updateNotification
 

Constructor Detail

InMemoryContext

public InMemoryContext(org.eclipse.higgins.idas.api.IContextId contextID)
                throws org.eclipse.higgins.idas.api.IdASException
Method Detail

open

public String open(Object unknown)
            throws org.eclipse.higgins.idas.api.IdASException
Specified by:
open in interface org.eclipse.higgins.idas.api.IContext
Throws:
org.eclipse.higgins.idas.api.IdASException

close

public void close()
           throws org.eclipse.higgins.idas.api.IdASException
Specified by:
close in interface org.eclipse.higgins.idas.api.IContext
Throws:
org.eclipse.higgins.idas.api.IdASException

isOpen

public boolean isOpen(Object identity)
               throws org.eclipse.higgins.idas.api.IdASException
Specified by:
isOpen in interface org.eclipse.higgins.idas.api.IContext
Throws:
org.eclipse.higgins.idas.api.IdASException

getSchema

public String getSchema()
                 throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getSchema in interface org.eclipse.higgins.idas.api.IContext
Throws:
org.eclipse.higgins.idas.api.IdASException

importData

public void importData(String arg0,
                       String arg1)
                throws org.eclipse.higgins.idas.api.IdASException
Specified by:
importData in interface org.eclipse.higgins.idas.api.IContext
Throws:
org.eclipse.higgins.idas.api.IdASException

getEntity

public org.eclipse.higgins.idas.api.IEntity getEntity(String entityID)
                                               throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getEntity in interface org.eclipse.higgins.idas.api.IContext
Throws:
org.eclipse.higgins.idas.api.IdASException

getEntity

public org.eclipse.higgins.idas.api.IEntity getEntity(String entityID,
                                                      Iterator attrSelectionList)
                                               throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getEntity in interface org.eclipse.higgins.idas.api.IContext
Throws:
org.eclipse.higgins.idas.api.IdASException

getEntities

public Iterator getEntities(org.eclipse.higgins.idas.api.IFilter filter)
                     throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getEntities in interface org.eclipse.higgins.idas.api.IContext
Throws:
org.eclipse.higgins.idas.api.IdASException

getEntities

public Iterator getEntities(org.eclipse.higgins.idas.api.IFilter filter,
                            Iterator attrSelectionList)
                     throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getEntities in interface org.eclipse.higgins.idas.api.IContext
Throws:
org.eclipse.higgins.idas.api.IdASException

addEntity

public org.eclipse.higgins.idas.api.IEntity addEntity(URI type,
                                                      String entityID)
                                               throws org.eclipse.higgins.idas.api.IdASException,
                                                      org.eclipse.higgins.idas.api.InvalidTypeException,
                                                      org.eclipse.higgins.idas.api.InvalidEntityIDException,
                                                      org.eclipse.higgins.idas.api.EntityExistsException
Specified by:
addEntity in interface org.eclipse.higgins.idas.api.IContext
Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.InvalidTypeException
org.eclipse.higgins.idas.api.InvalidEntityIDException
org.eclipse.higgins.idas.api.EntityExistsException

applyUpdates

public void applyUpdates()
                  throws org.eclipse.higgins.idas.api.IdASException
Specified by:
applyUpdates in interface org.eclipse.higgins.idas.api.IContext
Throws:
org.eclipse.higgins.idas.api.IdASException

verifyEntityAttributes

public boolean verifyEntityAttributes(String arg0,
                                      Iterator arg1)
                               throws org.eclipse.higgins.idas.api.IdASException
Specified by:
verifyEntityAttributes in interface org.eclipse.higgins.idas.api.IContext
Throws:
org.eclipse.higgins.idas.api.IdASException

updateNotification

public void updateNotification(org.eclipse.higgins.idas.spi.EntityNotification entityNotif)
                        throws org.eclipse.higgins.idas.api.IdASException
Specified by:
updateNotification in interface org.eclipse.higgins.idas.spi.IEntityContainer
Throws:
org.eclipse.higgins.idas.api.IdASException