net.cnri.dobj
Interface DOOperationContext


public interface DOOperationContext

Objects implementing DOOperationContext provide access to the "system" so that operators can perform their jobs.


Method Summary
 boolean authenticateCaller()
          Requests verification of the callers identity.
 boolean authenticateCredential(java.lang.String credentialID)
          Verify that this client has been granted a credential by the identified entity.
 java.lang.String getCallerID()
          Returns the identity of the caller.
 java.lang.Object getConnectionMapping(java.lang.Object mappingKey)
          Returns the object from the connection-level information table that had previously been used as the mappingData parameter for a call to setConnectionMapping with the given mappingKey on the same connection.
 java.lang.String[] getCredentialIDs()
          Returns a list of unverified IDs that the client claims as credentials.
 HeaderSet getOperationHeaders()
          Returns the set of headers that were included with the operation request
 java.lang.String getOperationID()
          Returns the operation that the caller attempted to invoke.
 java.lang.String getServerID()
          Returns the identity of this repository service
 StorageProxy getStorage()
          Returns on object that allows operators to access the storage system for the current object.
 java.lang.String getTargetObjectID()
          Returns the object on which the caller is invoke the operation.
 void performOperation(java.lang.String serverID, java.lang.String objectID, java.lang.String operationID, HeaderSet params, java.io.InputStream input, java.io.OutputStream output)
          Performs the specified operation with the identity of the caller, or as the container repository if the forwarding operations are configured to use the repository's own identity for forwarded operations.
 void setConnectionMapping(java.lang.Object mappingKey, java.lang.Object mappingData)
          Inserts an object into the connection-level information table.
 

Method Detail

authenticateCaller

boolean authenticateCaller()
Requests verification of the callers identity. Returns true iff the caller's identity has been verified.


getCredentialIDs

java.lang.String[] getCredentialIDs()
Returns a list of unverified IDs that the client claims as credentials. Note: These IDs are not yet verified and the caller should call authenticateCredential() with any credential IDs for whom they assign any meaning. Note2: This should only be called after authenticateClient returns.


authenticateCredential

boolean authenticateCredential(java.lang.String credentialID)
Verify that this client has been granted a credential by the identified entity. The given credentialID is expected to have come from the list returned by getCredentialIDs(). Returns true iff a verified credential from credentialID was granted to this client.


getCallerID

java.lang.String getCallerID()
Returns the identity of the caller.


getOperationID

java.lang.String getOperationID()
Returns the operation that the caller attempted to invoke.


getTargetObjectID

java.lang.String getTargetObjectID()
Returns the object on which the caller is invoke the operation.


getServerID

java.lang.String getServerID()
Returns the identity of this repository service


getOperationHeaders

HeaderSet getOperationHeaders()
Returns the set of headers that were included with the operation request


getStorage

StorageProxy getStorage()
Returns on object that allows operators to access the storage system for the current object.


setConnectionMapping

void setConnectionMapping(java.lang.Object mappingKey,
                          java.lang.Object mappingData)
Inserts an object into the connection-level information table. This causes subsequent calls to getConnectionMapping() on the same connection (but not necessarily the same operation) with the same key to return the given data value.


getConnectionMapping

java.lang.Object getConnectionMapping(java.lang.Object mappingKey)
Returns the object from the connection-level information table that had previously been used as the mappingData parameter for a call to setConnectionMapping with the given mappingKey on the same connection. If no such object had been inserted into the table then this will return null.


performOperation

void performOperation(java.lang.String serverID,
                      java.lang.String objectID,
                      java.lang.String operationID,
                      HeaderSet params,
                      java.io.InputStream input,
                      java.io.OutputStream output)
                      throws DOException
Performs the specified operation with the identity of the caller, or as the container repository if the forwarding operations are configured to use the repository's own identity for forwarded operations. If the serverID is null then the DO client that performs this request will resolve the objectID to find the server.

Throws:
DOException