Package org.qi4j.library.rest.common

Examples of org.qi4j.library.rest.common.Resource.commands()


        {
            Resource resourceValue = (Resource) result;

            // Allowed methods
            response.getAllowedMethods().add( Method.GET );
            if( Iterables.matchesAny( LinksUtil.withRel( "delete" ), resourceValue.commands().get() ) )
            {
                response.getAllowedMethods().add( Method.DELETE );
            }
            if( Iterables.matchesAny( LinksUtil.withRel( "update" ), resourceValue.commands().get() ) )
            {
View Full Code Here


            response.getAllowedMethods().add( Method.GET );
            if( Iterables.matchesAny( LinksUtil.withRel( "delete" ), resourceValue.commands().get() ) )
            {
                response.getAllowedMethods().add( Method.DELETE );
            }
            if( Iterables.matchesAny( LinksUtil.withRel( "update" ), resourceValue.commands().get() ) )
            {
                response.getAllowedMethods().add( Method.PUT );
            }

            // Response according to what client accepts
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.