Package ch.entwine.weblounge.common.impl.util.doc

Examples of ch.entwine.weblounge.common.impl.util.doc.EndpointDocumentation.addEndpoint()


    unlockPageEndpoint.addStatus(methodNotAllowed("the site or its content repository is read-only"));
    unlockPageEndpoint.addStatus(serviceUnavailable("the site or its content repository is temporarily offline"));
    unlockPageEndpoint.addPathParameter(new Parameter("page", Parameter.Type.String, "The page identifier"));
    unlockPageEndpoint.addOptionalParameter(new Parameter("asynchronous", Parameter.Type.Boolean, "Whether the call is non-blocking", "false"));
    unlockPageEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.WRITE, unlockPageEndpoint);

    // PUT /{page}/publish
    Endpoint publishPageEndpoint = new Endpoint("/{page}/publish", Method.PUT, "publishpage");
    publishPageEndpoint.setDescription("Publishes the specified page. If the client supplies an If-Match header, the publish is processed only if the header value matches the page's ETag");
    publishPageEndpoint.addFormat(Format.xml());
View Full Code Here


    publishPageEndpoint.addOptionalParameter(new Parameter("startdate", Parameter.Type.String, "The start of the publishing period"));
    publishPageEndpoint.addOptionalParameter(new Parameter("enddate", Parameter.Type.String, "The end of the publishing period"));
    publishPageEndpoint.addOptionalParameter(new Parameter("asynchronous", Parameter.Type.Boolean, "Whether the call is non-blocking", "false"));
    publishPageEndpoint.addOptionalParameter(new Parameter("modified", Parameter.Type.Boolean, "Whether the modification date should be set to match the publishing date", "false"));
    publishPageEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.WRITE, publishPageEndpoint);

    // DELETE /{page}/publish
    Endpoint unpublishPageEndpoint = new Endpoint("/{page}/publish", Method.DELETE, "unpublishpage");
    unpublishPageEndpoint.setDescription("Unpublishs the specified page. If the client supplies an If-Match header, the unpublish is processed only if the header value matches the page's ETag");
    unpublishPageEndpoint.addFormat(Format.xml());
View Full Code Here

    unpublishPageEndpoint.addStatus(methodNotAllowed("the site or its content repository is read-only"));
    unpublishPageEndpoint.addStatus(serviceUnavailable("the site or its content repository is temporarily offline"));
    unpublishPageEndpoint.addPathParameter(new Parameter("page", Parameter.Type.String, "The page identifier"));
    unpublishPageEndpoint.addOptionalParameter(new Parameter("asynchronous", Parameter.Type.Boolean, "Whether the call is non-blocking", "false"));
    unpublishPageEndpoint.setTestForm(new TestForm());
    docs.addEndpoint(Endpoint.Type.WRITE, unpublishPageEndpoint);

    return EndpointDocumentationGenerator.generate(docs);
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.