Skip navigation links


com.bea.content.cmis.rest.resources
Class BaseCMISResource

java.lang.Object
  extended by com.bea.content.cmis.rest.resources.BaseCMISResource

Direct Known Subclasses:
AllowableActions, com.bea.content.cmis.rest.resources.ChildrenBase, ContentStream, NestedProperties, NestedProperty, NodeBase, ObjectByPath, Parents, Query, Query.ViaGet, RepositoryInfo, TypeDefinition, TypesChildren, TypesDescendants

public abstract class BaseCMISResource
extends Object

A resource can be accessed via a JSR311 server via it's @Resource and @Path annotations.
A resource that extends BaseCMISResource can also be instantiated and called directly, using a custom UriService.

   E.g.
      TypeDefinition tdResource = new TypeDefinition();
      tdResource.setHttpRequest(request);
      tdResource.setUriService(new MockUriService());
      EntryType entry = tdResource.getTypeDefinition(repoName, typeId);
 

A simple implementation of MockUriService might be:

      class MockUriService extends oracle.webcenter.jaxrs.framework.uri.UriService
      {
          @Override
          public UriBuilder getAbsolutePathUriBuilder() throws IllegalStateException
          {
              return UriBuilder.fromUri("/"); 
          }

          @Override
          public UriBuilder getBaseUriBuilder() throws IllegalStateException
          {
              return UriBuilder.fromUri("/");
          }

          @Override
          public UriBuilder getRequestUriBuilder() throws IllegalStateException
          {
              return UriBuilder.fromUri("/");
          }
      }
 

Constructor Summary
BaseCMISResource()
           

 

Method Summary
 ContentContext getContentContext()
           
 javax.servlet.http.HttpServletRequest getHttpRequest()
           
 oracle.webcenter.jaxrs.framework.uri.UriService getUriService()
           
 void setHttpRequest(javax.servlet.http.HttpServletRequest httpRequest)
           
 void setUriService(oracle.webcenter.jaxrs.framework.uri.UriService uriService)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

BaseCMISResource

public BaseCMISResource()

Method Detail

setUriService

public void setUriService(oracle.webcenter.jaxrs.framework.uri.UriService uriService)

setHttpRequest

@Context
public void setHttpRequest(javax.servlet.http.HttpServletRequest httpRequest)

getHttpRequest

public javax.servlet.http.HttpServletRequest getHttpRequest()

getContentContext

public ContentContext getContentContext()
                                 throws RepositoryException
Throws
RepositoryException

getUriService

public oracle.webcenter.jaxrs.framework.uri.UriService getUriService()

Skip navigation links


Copyright © 2010, Oracle. All rights reserved.