Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webengine.samples
Class SamplesRoot

java.lang.Object
  extended by org.nuxeo.ecm.webengine.model.impl.AbstractResource<ResourceTypeImpl>
      extended by org.nuxeo.ecm.webengine.model.impl.DefaultObject
          extended by org.nuxeo.ecm.webengine.model.impl.ModuleRoot
              extended by org.nuxeo.ecm.webengine.samples.SamplesRoot
All Implemented Interfaces:
ModuleResource, Resource, Adaptable
Direct Known Subclasses:
ExtendedSamplesRoot

public class SamplesRoot
extends ModuleRoot

Web Engine Samples Root

This demonstrates how to define the entry point for a WebEngine module.

The module entry points are regular JAX-RS resources with an additional @WebObject annotation. This annotation is mainly used to specify the resource name. A Web Module is declared in the MANIFEST.MF using the directive {code}NuxeoWebModule{/code}. You can also configure a Web Module using a module.xml file located in the module root directory. This file can be used to define: root resources (as we've seen in the previous example), links, media type IDs random extensions to other extension points;

Author:
Bogdan Stefanescu, Stephane Lacoin (aka matic)

Constructor Summary
SamplesRoot()
           
 
Method Summary
 Object doGet()
           
 Object doGetBrowser()
           
 Object doGetHello()
           
 Object doGetObjects()
           
 Object doGetTemplating()
           
 Object handleError(WebApplicationException e)
           
 
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.ModuleRoot
getLink, getSkinResource, setHttpHeaders, setHttpRequest, setUriInfo
 
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.DefaultObject
disptachAdapter, isAdapter
 
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.AbstractResource
checkGuard, dispose, getActiveAdapter, getAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.nuxeo.ecm.webengine.model.Resource
checkGuard, dispose, getActiveAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, isAdapter, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot
 
Methods inherited from interface org.nuxeo.runtime.model.Adaptable
getAdapter
 

Constructor Detail

SamplesRoot

public SamplesRoot()
Method Detail

doGet

public Object doGet()

doGetHello

public Object doGetHello()

doGetTemplating

public Object doGetTemplating()

doGetObjects

public Object doGetObjects()

doGetBrowser

public Object doGetBrowser()

handleError

public Object handleError(WebApplicationException e)
Specified by:
handleError in interface ModuleResource
Overrides:
handleError in class ModuleRoot

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.