org.openanzo.serialization
Interface IRepositoryHandler

All Known Subinterfaces:
INotificationListener
All Known Implementing Classes:
AtomCacheEventListener, CacheEventListener, ClientHandler, ClientUpdatesHandler, HandlerAdapter, IndexUpdateHandler.IndexerUpdateHandler, NotificationListener, NotificationListenerAdapter, RevisionHandler, ServerUpdatesProcessor, ServerWriter, XMLNodeWriter

public interface IRepositoryHandler

IRepositoryHandler is the main interface used throughout Anzo for handling messages between the client and server.

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Method Summary
 boolean handleAci(boolean addition, org.openrdf.model.URI namedGraph, org.openrdf.model.URI acl, org.openrdf.model.URI role, java.lang.Boolean canRead, java.lang.Boolean canAdd, java.lang.Boolean canRemove, java.lang.Boolean canInsertNamedGraph, java.lang.Boolean canRemoveNamedGraph, java.lang.Boolean canChangeAcl)
          Handle ACI message
 boolean handleAcl(boolean addition, org.openrdf.model.URI acl, boolean isTemplate)
          Handle ACL message
 boolean handleCommandEnd()
          Handle end of command message
 boolean handleCommandStart(java.lang.Long commandId, java.lang.String commandType, java.lang.String commadPrecondition)
          Handle start of command message
 boolean handleEndDocument()
          Handle end of document message
 boolean handleError(int errorNumber, int errorSubCode, java.lang.String... errorMessageArgs)
          Handle an error message
 boolean handleNamedGraph(boolean addition, org.openrdf.model.URI graph, org.openrdf.model.URI metaGraph, java.lang.Long revision, org.openrdf.model.URI aclTemplate, org.openrdf.model.URI createdBy, java.lang.Long modified, org.openrdf.model.URI lastModifiedBy)
          Handle NamedGraph message
 boolean handleNode(java.lang.Long id, org.openrdf.model.Value node)
          Handle Node message
 boolean handleReset()
          Handle reset message
 boolean handleRole(boolean addition, org.openrdf.model.URI role)
          Handle role message
 boolean handleStartDocument()
          Handle start of document message
 boolean handleStatement(boolean addition, org.openrdf.model.URI graphId, org.openrdf.model.Resource subj, org.openrdf.model.URI prop, org.openrdf.model.Value obj)
          Handle statement message
 boolean handleSubRoleOf(boolean addition, org.openrdf.model.URI role, org.openrdf.model.URI parentRole)
          Handle Role subrole of another role message
 boolean handleTransactionEnd()
          Handle end of transaction message
 boolean handleTransactionStart(java.lang.Long transactionId, java.lang.Long committedTimestamp)
          Handle start of transaction message
 boolean handleUser(boolean addition, org.openrdf.model.URI user, org.openrdf.model.URI defaultRole, org.openrdf.model.URI defaultAclTemplate, java.lang.String userId, java.lang.String password)
          Handle user message
 boolean handleUserInRole(boolean addition, org.openrdf.model.URI user, org.openrdf.model.URI role)
          Handle User in Role message
 

Method Detail

handleReset

boolean handleReset()
                    throws AnzoException
Handle reset message

Returns:
Message handled successfully
Throws:
AnzoException

handleStartDocument

boolean handleStartDocument()
                            throws AnzoException
Handle start of document message

Returns:
Message handled successfully
Throws:
AnzoException

handleEndDocument

boolean handleEndDocument()
                          throws AnzoException
Handle end of document message

Returns:
Message handled successfully
Throws:
AnzoException

handleTransactionStart

boolean handleTransactionStart(java.lang.Long transactionId,
                               java.lang.Long committedTimestamp)
                               throws AnzoException
Handle start of transaction message

Parameters:
transactionId - Id of transaction
committedTimestamp - timestamp when transaction was committed
Returns:
Message handled successfully
Throws:
AnzoException

handleTransactionEnd

boolean handleTransactionEnd()
                             throws AnzoException
Handle end of transaction message

Returns:
Message handled successfully
Throws:
AnzoException

handleCommandStart

boolean handleCommandStart(java.lang.Long commandId,
                           java.lang.String commandType,
                           java.lang.String commadPrecondition)
                           throws AnzoException
Handle start of command message

Parameters:
commandId - Id of command
commandType - Type of command
commadPrecondition - Serialized graph representation of precondition for command
Returns:
Message handled successfully
Throws:
AnzoException

handleCommandEnd

boolean handleCommandEnd()
                         throws AnzoException
Handle end of command message

Returns:
Message handled successfully
Throws:
AnzoException

handleNode

boolean handleNode(java.lang.Long id,
                   org.openrdf.model.Value node)
                   throws AnzoException
Handle Node message

Parameters:
id - ID of node
node - Value of node
Returns:
Message handled successfully
Throws:
AnzoException

handleStatement

boolean handleStatement(boolean addition,
                        org.openrdf.model.URI graphId,
                        org.openrdf.model.Resource subj,
                        org.openrdf.model.URI prop,
                        org.openrdf.model.Value obj)
                        throws AnzoException
Handle statement message

Parameters:
addition - Is this a statement addition or deletion
graphId - URI of NamedGraph that statement belongs to
subj - Subject value
prop - Predicate value
obj - Object value
Returns:
Message handled successfully
Throws:
AnzoException

handleUser

boolean handleUser(boolean addition,
                   org.openrdf.model.URI user,
                   org.openrdf.model.URI defaultRole,
                   org.openrdf.model.URI defaultAclTemplate,
                   java.lang.String userId,
                   java.lang.String password)
                   throws AnzoException
Handle user message

Parameters:
addition - Is this message an addition or deletion
user - User value
defaultRole - Default role for this user
defaultAclTemplate - URI for the default ACL template for this user
userId - UserId for this user
password - Password for this user
Returns:
Message handled successfully
Throws:
AnzoException

handleUserInRole

boolean handleUserInRole(boolean addition,
                         org.openrdf.model.URI user,
                         org.openrdf.model.URI role)
                         throws AnzoException
Handle User in Role message

Parameters:
addition - Is this message an addition or deletion
user - User value
role - Role user is being added to or deleted from
Returns:
Message handled successfully
Throws:
AnzoException

handleRole

boolean handleRole(boolean addition,
                   org.openrdf.model.URI role)
                   throws AnzoException
Handle role message

Parameters:
addition - Is this message an addition or deletion
role - Role added or deleted
Returns:
Message handled successfully
Throws:
AnzoException

handleSubRoleOf

boolean handleSubRoleOf(boolean addition,
                        org.openrdf.model.URI role,
                        org.openrdf.model.URI parentRole)
                        throws AnzoException
Handle Role subrole of another role message

Parameters:
addition - Is this message an addition or deletion
role - Role value
parentRole - Parent role to which role is a subrole
Returns:
Message handled successfully
Throws:
AnzoException

handleNamedGraph

boolean handleNamedGraph(boolean addition,
                         org.openrdf.model.URI graph,
                         org.openrdf.model.URI metaGraph,
                         java.lang.Long revision,
                         org.openrdf.model.URI aclTemplate,
                         org.openrdf.model.URI createdBy,
                         java.lang.Long modified,
                         org.openrdf.model.URI lastModifiedBy)
                         throws AnzoException
Handle NamedGraph message

Parameters:
addition - Is this message an addition or deletion
graph - URI of NamedGraph
metaGraph - URI of NamedGraph's metadata graph
revision - Revision value of NamedGraph
aclTemplate - URI of ACL that this NamedGraph uses
createdBy - User that created the NamedGraph
modified - When graph was last modified
lastModifiedBy - Who last modified graph
Returns:
Message handled successfully
Throws:
AnzoException

handleAcl

boolean handleAcl(boolean addition,
                  org.openrdf.model.URI acl,
                  boolean isTemplate)
                  throws AnzoException
Handle ACL message

Parameters:
addition - Is this message an addition or deletion
acl - URI of ACL
isTemplate - Is this acl a template
Returns:
Message handled successfully
Throws:
AnzoException

handleAci

boolean handleAci(boolean addition,
                  org.openrdf.model.URI namedGraph,
                  org.openrdf.model.URI acl,
                  org.openrdf.model.URI role,
                  java.lang.Boolean canRead,
                  java.lang.Boolean canAdd,
                  java.lang.Boolean canRemove,
                  java.lang.Boolean canInsertNamedGraph,
                  java.lang.Boolean canRemoveNamedGraph,
                  java.lang.Boolean canChangeAcl)
                  throws AnzoException
Handle ACI message

Parameters:
addition - Is this message an addition or deletion
namedGraph - URI of NamedGraph that this ACI belongs
acl - URI of ACL
role - Role that this ACI affects
canRead - Can this role read the graph
canAdd - Can this role add to the graph
canRemove - Can this role remove from the graph
canInsertNamedGraph - Can this role insert a new NamedGraph
canRemoveNamedGraph - Can this role remove a NamedGraph
canChangeAcl - Can this role change the ACL properties
Returns:
Message handled successfully
Throws:
AnzoException

handleError

boolean handleError(int errorNumber,
                    int errorSubCode,
                    java.lang.String... errorMessageArgs)
                    throws AnzoException
Handle an error message

Parameters:
errorNumber - Major error code
errorSubCode - Minor error code
errorMessageArgs - Arguments to error message
Returns:
Message handled successfully
Throws:
AnzoException


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.