org.eclipse.higgins.idas.spi
Class BasicContext

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

public class BasicContext
extends BasicAttributeSet
implements org.eclipse.higgins.idas.api.IContext, IEntityContainer, IAttributeContainer

Basic implementation of IContext. The intent of this class is to be used by Context Provider writers as a superclass for IContext instances. The benefits of using this class are that you will pick up any convenience methods as well as have the latest methods stubbed out such that when new methods are added to IContext and implemented here, the subclass will still compile.


Constructor Summary
BasicContext()
           
 
Method Summary
 org.eclipse.higgins.idas.api.IEntity addEntity(org.eclipse.higgins.idas.api.IEntity copyFrom)
           
 org.eclipse.higgins.idas.api.IEntity addEntity(URI type, String entityID)
           
 void applyUpdates()
           
 org.eclipse.higgins.idas.api.IAttribute buildAttribute(URI attrID)
           
 org.eclipse.higgins.idas.api.IFilterAttributeAssertion buildAttributeAssertion()
           
 org.eclipse.higgins.idas.api.IAuthNAttributesMaterials buildAuthNAttributesMaterials()
           
 org.eclipse.higgins.idas.api.IComplexAttrValue buildComplexAttrValue(URI type)
           
 org.eclipse.higgins.idas.api.IFilterEntityIDAssertion buildEntityIDAssertion()
           
 org.eclipse.higgins.idas.api.IFilterEntityTypeAssertion buildEntityTypeAssertion()
           
 org.eclipse.higgins.idas.api.IFilter buildFilter()
           
 org.eclipse.higgins.idas.api.ISimpleAttrValue buildSimpleAttrValue(URI type, Object data)
           
 void cancelUpdates()
           
 void close()
           
static org.eclipse.higgins.idas.api.ISimpleAttrValue createSimpleValue(URI type, Object data, IAttributeValueContainer container)
           
 String exportData(String filter, String representationFormat)
           
 URI getContextID()
           
 org.eclipse.higgins.idas.api.model.IContextModel getContextModel()
           
 Iterator getEntities(org.eclipse.higgins.idas.api.IFilter filter)
           
 Iterator getEntities(org.eclipse.higgins.idas.api.IFilter filter, Iterator attrs)
           
 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 filter, String representationFormat)
           
 boolean isOpen(Object identity)
           
 String open(Object authentication)
           
 void setSchema(String schema)
           
 void updateNotification(EntityNotification entityNotif)
           
 boolean verifyEntityAttributes(String entityID, Iterator attributes)
           
 
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

BasicContext

public BasicContext()
             throws org.eclipse.higgins.idas.api.IdASException
Method Detail

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

exportData

public String exportData(String filter,
                         String representationFormat)
                  throws org.eclipse.higgins.idas.api.IdASException
Specified by:
exportData in interface org.eclipse.higgins.idas.api.IContext
Throws:
org.eclipse.higgins.idas.api.IdASException

getContextModel

public org.eclipse.higgins.idas.api.model.IContextModel getContextModel()
                                                                 throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getContextModel in interface org.eclipse.higgins.idas.api.IContext
Throws:
org.eclipse.higgins.idas.api.IdASException

getContextID

public URI getContextID()
                 throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getContextID 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

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 attrs)
                     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

importData

public void importData(String filter,
                       String representationFormat)
                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

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

open

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

setSchema

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

verifyEntityAttributes

public boolean verifyEntityAttributes(String entityID,
                                      Iterator attributes)
                               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

buildAttributeAssertion

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

buildEntityIDAssertion

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

buildFilter

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

buildEntityTypeAssertion

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

buildSimpleAttrValue

public org.eclipse.higgins.idas.api.ISimpleAttrValue buildSimpleAttrValue(URI type,
                                                                          Object data)
                                                                   throws org.eclipse.higgins.idas.api.IdASException
Specified by:
buildSimpleAttrValue in interface org.eclipse.higgins.idas.api.IContext
Throws:
org.eclipse.higgins.idas.api.IdASException

createSimpleValue

public static org.eclipse.higgins.idas.api.ISimpleAttrValue createSimpleValue(URI type,
                                                                              Object data,
                                                                              IAttributeValueContainer container)
                                                                       throws org.eclipse.higgins.idas.api.IdASException
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

buildComplexAttrValue

public org.eclipse.higgins.idas.api.IComplexAttrValue buildComplexAttrValue(URI type)
                                                                     throws org.eclipse.higgins.idas.api.IdASException,
                                                                            org.eclipse.higgins.idas.api.InvalidTypeException
Specified by:
buildComplexAttrValue in interface org.eclipse.higgins.idas.api.IContext
Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.InvalidTypeException

addEntity

public org.eclipse.higgins.idas.api.IEntity addEntity(org.eclipse.higgins.idas.api.IEntity copyFrom)
                                               throws org.eclipse.higgins.idas.api.IdASException,
                                                      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.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

cancelUpdates

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

buildAuthNAttributesMaterials

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

buildAttribute

public org.eclipse.higgins.idas.api.IAttribute buildAttribute(URI attrID)
                                                       throws org.eclipse.higgins.idas.api.IdASException
Specified by:
buildAttribute in interface org.eclipse.higgins.idas.api.IContext
Throws:
org.eclipse.higgins.idas.api.IdASException

updateNotification

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