org.openrdf.http.object.model
Class ResourceOperation

java.lang.Object
  extended by org.openrdf.http.object.model.EditableHttpEntityEnclosingRequest
      extended by org.openrdf.http.object.model.Request
          extended by org.openrdf.http.object.model.ResourceRequest
              extended by org.openrdf.http.object.model.ResourceOperation
All Implemented Interfaces:
Cloneable, org.apache.http.HttpEntityEnclosingRequest, org.apache.http.HttpMessage, org.apache.http.HttpRequest

public class ResourceOperation
extends ResourceRequest

Utility class for HttpServletRequest.

Author:
James Leigh

Constructor Summary
ResourceOperation(File dataDir, Request request, ObjectRepository repository)
           
 
Method Summary
 Set<String> getAllowedMethods()
           
 Method getAlternativeMethod(String rel)
           
 String getEntityTag(String contentType)
           
 Class<?> getEntityType()
           
 Method getJavaMethod()
           
 long getLastModified()
           
 Map<String,List<Method>> getOperationMethods(String method, Boolean isRespBody)
           
 Object[] getParameters(Method method, Entity input)
           
 List<Realm> getRealms()
           
 String getResponseCacheControl()
           
 String getResponseContentEncoding()
           
 String getResponseContentType()
           
 void init()
           
 ResponseEntity invoke(Method method, Object[] args, boolean follow)
           
 boolean isAuthenticating()
           
 boolean isMustReevaluate()
           
 boolean isRequestBody(Method method)
           
 
Methods inherited from class org.openrdf.http.object.model.ResourceRequest
close, commit, createResultEntity, createURI, flush, getAcceptable, getBody, getContentType, getFile, getHeader, getObjectConnection, getOperation, getParameter, getQueryString, getRequestedResource, getRevision, getVary, getVaryHeader, getVaryHeaders, isAcceptable, isAcceptable, isAcceptable, isQueryStringPresent, revisionTag, rollback, variantTag
 
Methods inherited from class org.openrdf.http.object.model.Request
clone, getAuthority, getDateHeader, getHeader, getHeaderEnumeration, getHeaderValues, getIRI, getMaxAge, getMaxStale, getMethod, getMinFresh, getQueryString, getReceivedOn, getRemoteAddr, getRequestTarget, getRequestURI, getRequestURL, getResolvedHeader, getURIFromRequestTarget, getX509Certificate, invalidatesCache, isMessageBody, isNoCache, isOnlyIfCache, isSafe, isStorable, parseURI, resolve, setIRI, setReceivedOn, toString
 
Methods inherited from class org.openrdf.http.object.model.EditableHttpEntityEnclosingRequest
addHeader, addHeader, containsHeader, expectContinue, getAllHeaders, getEnclosingRequest, getEntity, getFirstHeader, getHeaders, getLastHeader, getParams, getProtocolVersion, getRequestLine, headerIterator, headerIterator, removeHeader, removeHeaders, setEntity, setHeader, setHeader, setHeaders, setParams, setRequestLine
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceOperation

public ResourceOperation(File dataDir,
                         Request request,
                         ObjectRepository repository)
                  throws QueryEvaluationException,
                         RepositoryException,
                         MimeTypeParseException
Throws:
QueryEvaluationException
RepositoryException
MimeTypeParseException
Method Detail

init

public void init()
          throws MimeTypeParseException,
                 RepositoryException,
                 QueryEvaluationException
Overrides:
init in class ResourceRequest
Throws:
MimeTypeParseException
RepositoryException
QueryEvaluationException

getResponseContentType

public String getResponseContentType()
                              throws MimeTypeParseException
Throws:
MimeTypeParseException

getResponseContentEncoding

public String getResponseContentEncoding()

getEntityTag

public String getEntityTag(String contentType)
                    throws MimeTypeParseException,
                           RepositoryException
Throws:
MimeTypeParseException
RepositoryException

getEntityType

public Class<?> getEntityType()
                       throws MimeTypeParseException
Throws:
MimeTypeParseException

isMustReevaluate

public boolean isMustReevaluate()

getLastModified

public long getLastModified()
                     throws MimeTypeParseException
Throws:
MimeTypeParseException

getResponseCacheControl

public String getResponseCacheControl()
                               throws QueryEvaluationException,
                                      RepositoryException
Throws:
QueryEvaluationException
RepositoryException

isAuthenticating

public boolean isAuthenticating()
                         throws QueryEvaluationException,
                                RepositoryException
Throws:
QueryEvaluationException
RepositoryException

getRealms

public List<Realm> getRealms()
                      throws QueryEvaluationException,
                             RepositoryException
Throws:
QueryEvaluationException
RepositoryException

getAllowedMethods

public Set<String> getAllowedMethods()
                              throws RepositoryException
Throws:
RepositoryException

getJavaMethod

public Method getJavaMethod()

getAlternativeMethod

public Method getAlternativeMethod(String rel)
                            throws MimeTypeParseException
Throws:
MimeTypeParseException

getOperationMethods

public Map<String,List<Method>> getOperationMethods(String method,
                                                    Boolean isRespBody)

getParameters

public Object[] getParameters(Method method,
                              Entity input)
                       throws Exception
Throws:
Exception

invoke

public ResponseEntity invoke(Method method,
                             Object[] args,
                             boolean follow)
                      throws Exception
Throws:
Exception

isRequestBody

public boolean isRequestBody(Method method)


Copyright © 2004-2010 James Leigh Services Inc.. All Rights Reserved.