com.atlassian.jira.issue.search.parameters
Class AbstractSearchParameter

java.lang.Object
  extended by com.atlassian.jira.issue.search.parameters.AbstractSearchParameter
All Implemented Interfaces:
SearchParameter
Direct Known Subclasses:
AbstractLuceneParameter, FilterParameter, OfbizParameter

public abstract class AbstractSearchParameter
extends Object
implements SearchParameter


Constructor Summary
AbstractSearchParameter()
          Default ctor.
AbstractSearchParameter(String name)
          named ctor
 
Method Summary
 void addValue(Object value)
          Adds a given value to the list of values
protected  void clearValues()
           
 boolean equals(Object o)
           
 String getName()
          Get issue field name.
 String getQueryString()
          Returns the query string
protected  String getQueryStringPrefix()
          Query parameter name, suitable for inclusion in URL.
 List getValues()
          Returns a list of values
abstract  electric.xml.Element getXml()
          Return an XML elemnt representation of this search parameter.
 int hashCode()
           
abstract  boolean isValid()
          Returns true if this parameter is valid, false otherwise.
 void setName(String name)
          Specify issue field name to limit search by.
 void setXml(electric.xml.Element el)
          Initialise this search parameter using an XML element.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractSearchParameter

public AbstractSearchParameter()
Default ctor.


AbstractSearchParameter

public AbstractSearchParameter(String name)
named ctor

Parameters:
name - name
Method Detail

getXml

public abstract electric.xml.Element getXml()
Description copied from interface: SearchParameter
Return an XML elemnt representation of this search parameter.

Specified by:
getXml in interface SearchParameter
Returns:
XML element

setXml

public void setXml(electric.xml.Element el)
Description copied from interface: SearchParameter
Initialise this search parameter using an XML element.

Usual process is:

    SearchParameter param = new MySearchParameter();
    param.setXml(element);
 

Specified by:
setXml in interface SearchParameter
Parameters:
el - XML element

isValid

public abstract boolean isValid()
Description copied from interface: SearchParameter
Returns true if this parameter is valid, false otherwise.

Specified by:
isValid in interface SearchParameter
Returns:
true if valid, false otherwise

getQueryString

public String getQueryString()
Description copied from interface: SearchParameter
Returns the query string

Specified by:
getQueryString in interface SearchParameter
Returns:
query string

getQueryStringPrefix

protected String getQueryStringPrefix()
Query parameter name, suitable for inclusion in URL. Note that implementations of this method should ensure that the values that they return are URLEncoded, perhaps using the URLEncoder.encode(String) method.

Returns:
nothing, always throws UnsupportedOperationException

addValue

public void addValue(Object value)
Description copied from interface: SearchParameter
Adds a given value to the list of values

Specified by:
addValue in interface SearchParameter
Parameters:
value - value to add

getValues

public List getValues()
Description copied from interface: SearchParameter
Returns a list of values

Specified by:
getValues in interface SearchParameter
Returns:
list of values

clearValues

protected void clearValues()

getName

public String getName()
Description copied from interface: SearchParameter
Get issue field name.

Specified by:
getName in interface SearchParameter
Returns:
issue field name

setName

public void setName(String name)
Description copied from interface: SearchParameter
Specify issue field name to limit search by. Either a predefined name (from IssueFieldConstants, or Field.getId().

Specified by:
setName in interface SearchParameter
Parameters:
name - field name

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2009 Atlassian. All Rights Reserved.