org.trialox.jaxrs.util
Class SortableMethod

java.lang.Object
  extended by org.trialox.jaxrs.util.SortableMethod
All Implemented Interfaces:
java.lang.Comparable

public class SortableMethod
extends java.lang.Object
implements java.lang.Comparable

utility class to make a method sortable

Author:
szalay

Constructor Summary
SortableMethod(WebRequest request, java.lang.reflect.Method m, javax.ws.rs.Path p, java.lang.String pav, java.lang.String sp)
          constructor
 
Method Summary
 int compareTo(java.lang.Object o)
          make a method comparable Compares this object with the specified object for order.
 QualityMediaType getMediaType()
          get media type for this request
 java.lang.reflect.Method getMethod()
          getter
 javax.ws.rs.Path getPathAnnotation()
           
 java.lang.String getPathAnnotationValue()
           
 java.lang.String getSubPath()
           
protected  int matchingMediaType(java.lang.String consumeMimeValue, QualityMediaType first, QualityMediaType second)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SortableMethod

public SortableMethod(WebRequest request,
                      java.lang.reflect.Method m,
                      javax.ws.rs.Path p,
                      java.lang.String pav,
                      java.lang.String sp)
constructor

Method Detail

getMediaType

public QualityMediaType getMediaType()
                              throws org.wymiwyg.wrhapi.HandlerException,
                                     java.text.ParseException
get media type for this request

Returns:
Throws:
org.wymiwyg.wrhapi.HandlerException
java.text.ParseException

matchingMediaType

protected int matchingMediaType(java.lang.String consumeMimeValue,
                                QualityMediaType first,
                                QualityMediaType second)

compareTo

public int compareTo(java.lang.Object o)
make a method comparable Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Specified by:
compareTo in interface java.lang.Comparable

getMethod

public java.lang.reflect.Method getMethod()
getter

Returns:

getPathAnnotation

public javax.ws.rs.Path getPathAnnotation()

getPathAnnotationValue

public java.lang.String getPathAnnotationValue()

getSubPath

public java.lang.String getSubPath()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2008. All Rights Reserved.