Skip to content

Nuxeo quick reference

mdutoo edited this page Dec 11, 2012 · 28 revisions

Nuxeo quick reference

FAQ

See also Developing on the service registry.

General FAQ

How can I reset all Nuxeo data?

Simply remove the nxserver/data folder from Nuxeo (in the EasySOA package, Nuxeo is filed under the serviceregistry folder).

Enabling remote debugging

Open bin/nuxeo.conf and uncomment the "DEBUGGING" options line:

        # Sample JPDA settings for remote socket debugging
        JAVA_OPTS=$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n

You can switch suspend=n to suspend=y if you want to monitor Nuxeo right from the start (Java will wait for you to connect with Eclipse before to start Nuxeo).

JSF FAQ

String concatenation in EL (Expression Language)

It is not done by "+" but by either by putting them along each other in an EL expression, [using <c:set var="s" value="${s1} ${s2}"/> beforehand] (http://stackoverflow.com/questions/296398/concatenate-strings-in-jsp-el), or defining a [custom concat() function] (http://stackoverflow.com/questions/2192759/concatenate-strings-in-jsf-jsp-el-and-javascript).

JAX RS

REST HOWTO

@GET
@Path("/getExchangeRecordStorelist")
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
public StoreCollection getExchangeRecordStorelist() { ...

@Produces to tell that the returned type can be a json string. The returned java object, here StoreCollection must have some annotations :

@XmlRootElement
public class StoreCollection {

    private Collection<ExchangeRecordStore> stores;
    ...
    @XmlElement(name="ExchangeRecordStore")
    @XmlElementWrapper(name="stores")
    public Collection<ExchangeRecordStore> getStores() {
        return stores;
    }
}
Clone this wiki locally