net.sourceforge.stripes.controller
Class UrlBinding

java.lang.Object
  extended by net.sourceforge.stripes.controller.UrlBinding

public class UrlBinding
extends Object

Represents a URL binding as declared by a UrlBinding annotation on an ActionBean class.

Since:
Stripes 1.5
Author:
Ben Gunter

Field Summary
protected  Class<? extends ActionBean> beanType
           
protected  List<Object> components
           
protected  List<UrlBindingParameter> parameters
           
protected  String path
           
protected  String suffix
           
 
Constructor Summary
UrlBinding(Class<? extends ActionBean> beanType, String path)
          Create a new instance that takes no parameters.
UrlBinding(Class<? extends ActionBean> beanType, String path, List<Object> components)
          Create a new instance with all its members.
 
Method Summary
 boolean equals(Object obj)
           
 Class<? extends ActionBean> getBeanType()
          Get the ActionBean class to which this binding applies.
 List<Object> getComponents()
          Get the list of components that comprise this binding.
 List<UrlBindingParameter> getParameters()
          Get the list of parameters for this binding.
 String getPath()
          Get the path for this binding.
 String getSuffix()
          If this binding includes one or more parameters and the last component is a String, then this method will return that last component.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

beanType

protected Class<? extends ActionBean> beanType

path

protected String path

suffix

protected String suffix

components

protected List<Object> components

parameters

protected List<UrlBindingParameter> parameters
Constructor Detail

UrlBinding

public UrlBinding(Class<? extends ActionBean> beanType,
                  String path,
                  List<Object> components)
Create a new instance with all its members. Collections passed in will be made immutable.

Parameters:
beanType - the ActionBean class to which this binding applies
path - the path to which the action is mapped
components - list of literal strings that separate the parameters

UrlBinding

public UrlBinding(Class<? extends ActionBean> beanType,
                  String path)
Create a new instance that takes no parameters.

Parameters:
beanType -
path -
Method Detail

getBeanType

public Class<? extends ActionBean> getBeanType()
Get the ActionBean class to which this binding applies.


getComponents

public List<Object> getComponents()
Get the list of components that comprise this binding. The components are returned in the order in which they appear in the binding definition.


getParameters

public List<UrlBindingParameter> getParameters()
Get the list of parameters for this binding.


getPath

public String getPath()
Get the path for this binding. The path is the string of literal characters in the pattern up to the first parameter definition.


getSuffix

public String getSuffix()
If this binding includes one or more parameters and the last component is a String, then this method will return that last component. Otherwise, it returns null.


equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


? Copyright 2005-2006, Stripes Development Team.