Package org.restlet.engine.resource

Examples of org.restlet.engine.resource.AnnotationInfo


     *      href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.7"
     *      >HTTP DELETE method</a>
     */
    protected Representation delete() throws ResourceException {
        Representation result = null;
        AnnotationInfo annotationInfo = getAnnotation(Method.DELETE);

        if (annotationInfo != null) {
            result = doHandle(annotationInfo, null);
        } else {
            doError(Status.CLIENT_ERROR_METHOD_NOT_ALLOWED);
View Full Code Here


     * @return The response entity.
     * @throws ResourceException
     */
    private RepresentationInfo doGetInfo() throws ResourceException {
        RepresentationInfo result = null;
        AnnotationInfo annotationInfo = getAnnotation(Method.GET);

        if (annotationInfo != null) {
            result = doHandle(annotationInfo, null);
        } else {
            result = getInfo();
View Full Code Here

    private Representation doHandle(Method method, Representation entity) {
        Representation result = null;

        if (getAnnotation(method) != null) {
            // We know the method is supported, let's check the entity.
            AnnotationInfo annotationInfo = getAnnotation(method, entity);

            if (annotationInfo != null) {
                result = doHandle(annotationInfo, null);
            } else {
                // The request entity is not supported.
View Full Code Here

     *      href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3">HTTP
     *      GET method</a>
     */
    protected Representation get() throws ResourceException {
        Representation result = null;
        AnnotationInfo annotationInfo = getAnnotation(Method.GET);

        if (annotationInfo != null) {
            result = doHandle(annotationInfo, null);
        } else {
            doError(Status.CLIENT_ERROR_METHOD_NOT_ALLOWED);
View Full Code Here

     *
     * @return The optional response entity.
     */
    protected Representation options() throws ResourceException {
        Representation result = null;
        AnnotationInfo annotationInfo = getAnnotation(Method.OPTIONS);

        // Updates the list of allowed methods
        updateAllowedMethods();

        if (annotationInfo != null) {
View Full Code Here

TOP

Related Classes of org.restlet.engine.resource.AnnotationInfo

Copyright © 2018 www.massapicom. 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.