com.bea.content.cmis.rest.resources
Class BaseCMISResource
java.lang.Object
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("/");
}
}
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseCMISResource
public BaseCMISResource()
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()
Copyright © 2011, Oracle. All rights reserved.