|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.issue.search.parameters.lucene.UsersGroupParameter
public class UsersGroupParameter
This is a parameter that is used with searching with user groups such as when selecting a user group for reporter or assignee.
Constructor Summary | |
---|---|
UsersGroupParameter()
This constructor is used when parsing from XML. |
|
UsersGroupParameter(String name,
String userLuceneFieldName,
String groupName)
Constructs a new instance, sets name , userLuceneFieldName and a groupName . |
Method Summary | |
---|---|
void |
addValue(Object value)
Does nothing. |
String |
getName()
Returns the name of this parameter |
org.apache.lucene.search.Query |
getQuery(org.ofbiz.core.entity.GenericValue project,
User searcher)
Creates and returns a BooleanQuery that ORs terms where userLuceneFieldName is equal to user name for
all users that are in the group found by groupName . |
String |
getQueryString()
Creates and returns a query string. |
List |
getValues()
Returns a list that contains only one element - name . |
electric.xml.Element |
getXml()
Creates and returns a new XML element set with userLuceneFieldName and groupName attributes. |
boolean |
isValid()
Returns true only if both userLuceneFieldName and groupName are not null, false otherwise. |
void |
setName(String fieldname)
This method does nothing. |
void |
setXml(electric.xml.Element el)
Sets the name to the name of the given element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UsersGroupParameter()
public UsersGroupParameter(String name, String userLuceneFieldName, String groupName)
name
, userLuceneFieldName
and a groupName
.
name
- nameuserLuceneFieldName
- user lucene field namegroupName
- group nameMethod Detail |
---|
public void addValue(Object value)
addValue
in interface SearchParameter
value
- this value is not usedpublic List getValues()
name
.
getValues
in interface SearchParameter
public String getName()
getName
in interface SearchParameter
public void setName(String fieldname)
setName
in interface SearchParameter
fieldname
- not usedpublic electric.xml.Element getXml()
userLuceneFieldName
and groupName
attributes.
The name of the XML element is the value returned by getName()
.
getXml
in interface SearchParameter
public void setXml(electric.xml.Element el)
name
to the name of the given element. Sets the userLuceneFieldName
field to the value
of "userLuceneFieldName" attribute if not null. Sets the groupName
field to the value of "groupName"
attribute if not null.
setXml
in interface SearchParameter
el
- XML elementpublic boolean isValid()
isValid
in interface SearchParameter
public String getQueryString()
If the name
is equal to DocumentConstants.ISSUE_ASSIGNEE_GROUP
, the following query string will
be returned "&assigneeSelect=specificgroup&assignee=groupName
".
If the name
is equal to DocumentConstants.ISSUE_AUTHOR_GROUP
, the following query string will
be returned "&reporterSelect=specificgroup&reporter=groupName
".
Else following query string will be returned
"&userLuceneFieldName
Select=specificgroup&userLuceneFieldName
=groupName
".
getQueryString
in interface SearchParameter
public org.apache.lucene.search.Query getQuery(org.ofbiz.core.entity.GenericValue project, User searcher) throws org.apache.lucene.queryParser.ParseException
userLuceneFieldName
is equal to user name for
all users that are in the group found by groupName
.
getQuery
in interface LuceneParameter
project
- not usedsearcher
- not used
org.apache.lucene.queryParser.ParseException
- never thrown from this method
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |