|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.buildforge.services.client.dbo.Filter
public class Filter
An object representing a filter set within the Build Forge system.
Filters sets contain a list of patterns that are matched against
the log lines
of step results
. When a
pattern matches, the engine will perform the action specified by
the filter pattern.
This class defines the filter set itself. The actual filters that
are applied are determined by the patterns
that belong to the filter set.
Field Summary | |
---|---|
static java.lang.Class<Filter> |
CLASS
|
Constructor Summary | |
---|---|
Filter(APIClientConnection conn)
Define a new filter set object. |
Method Summary | |
---|---|
void |
addPattern(FilterPattern pattern)
Adds a new pattern to this filter set at the end of the pattern list. |
void |
addPattern(FilterPattern pattern,
int index)
Adds a new pattern to this filter set at a specified index. |
Filter |
clone()
Clones this Filter, complete with related FilterPatterns (also cloned), but clears the filter id of the cloned object making it ready for a .create() call. |
FilterPattern |
copyPattern(int fromIndex)
Copies the specified property from a specified. |
Filter |
copyPattern(int fromIndex,
int toIndex)
Copies the specified property into a new position in the property list |
Filter |
create()
Creates a new filter set, as defined by this object. |
void |
delete()
Deletes this filter set and all of its patterns from the system. |
static java.util.List<Filter> |
findAll(APIClientConnection conn)
Finds all filter sets defined within the system to which the user has access. |
static Filter |
findById(APIClientConnection conn,
int filterId)
Retrieves a filter set by its ID. |
int |
getFilterId()
Returns the unique identifier for this Filter |
int |
getLevel()
Returns the access level assigned to this Filter |
java.lang.String |
getName()
Returns the pretty name for this Filter |
FilterPattern |
getPattern(int index)
Returns the FilterPattern from the specified index |
java.util.List<FilterPattern> |
getPatterns()
Returns a list of the related FilterPatterns for this Filter |
Filter |
movePattern(int fromIndex,
int toIndex)
Moves a pattern from one 0-based index to another. |
FilterPattern |
removePattern(FilterPattern pattern)
|
FilterPattern |
removePattern(int index)
Removes the FilterPattern at the specified, 0-based index from this Filter and the database if the Filter already exists in the database. |
void |
setLevel(int newLevel)
Sets the access level assigned to this Filter |
void |
setName(java.lang.String name)
Sets the pretty name of this Filter |
java.lang.String |
toString()
|
Filter |
update()
Updates this existing filter set to use the updated values in this object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Class<Filter> CLASS
Constructor Detail |
---|
public Filter(APIClientConnection conn)
create()
method.
conn
- the services layer connection that the filter set
object should use when submitting requestsMethod Detail |
---|
public static java.util.List<Filter> findAll(APIClientConnection conn) throws java.io.IOException, ServiceException
access group
. Filter sets are returned by this
method without their member patterns. To retrieve the patterns for
a filter set, use
findById(APIClientConnection conn, int filterId)
.
conn
- the connection to use for the request
java.io.IOException
ServiceException
public static Filter findById(APIClientConnection conn, int filterId) throws java.io.IOException, ServiceException
conn
- the connection to use for this requestfilterId
- the ID of the filter set to find
java.io.IOException
ServiceException
public Filter create() throws java.io.IOException, ServiceException
patterns
attached, then they are
created, as well.
Restrictions: Requires Permission.AddFilterSet
.
java.io.IOException
ServiceException
public Filter update() throws java.io.IOException, ServiceException
FilterPattern.update()
on each of them,
instead.
Restrictions: Requires Permission.AddFilterSet
and direct or
indirect membership in the access group
that is
assigned to the filter set.
java.io.IOException
ServiceException
public void delete() throws java.io.IOException, ServiceException
Restrictions: Requires Permission.DeleteFilterSet
and direct or
indirect membership in the access group
that is
assigned to the filter set.
java.io.IOException
ServiceException
public void addPattern(FilterPattern pattern) throws ServiceException, java.io.IOException
Restrictions: Requires Permission.AddFilterSetEntry
if the
filter set object is already live.
pattern
- the pattern to add to the filter set
ServiceException
java.io.IOException
public void addPattern(FilterPattern pattern, int index) throws ServiceException, java.io.IOException
Restrictions: Requires Permission.AddFilterSetEntry
if the
filter set object is already live.
pattern
- the pattern to add to the filter setindex
- the 0-based index at which to insert the
new pattern. If the specified value would place the new
pattern at or beyond the end of the list, then it is
placed at the end.
ServiceException
java.io.IOException
public FilterPattern removePattern(FilterPattern pattern) throws ServiceException, java.io.IOException
ServiceException
java.io.IOException
public FilterPattern removePattern(int index) throws ServiceException, java.io.IOException
index
-
ServiceException
java.io.IOException
public Filter movePattern(int fromIndex, int toIndex) throws java.io.IOException, ServiceException
fromIndex
- toIndex
-
java.io.IOException
ServiceException
public FilterPattern copyPattern(int fromIndex) throws ServiceException
fromIndex
-
ServiceException
public Filter copyPattern(int fromIndex, int toIndex) throws java.io.IOException, ServiceException
fromIndex
- toIndex
-
java.io.IOException
ServiceException
public java.lang.String toString()
toString
in class java.lang.Object
public Filter clone()
clone
in class java.lang.Object
public int getFilterId()
public java.lang.String getName()
public int getLevel()
public java.util.List<FilterPattern> getPatterns()
public FilterPattern getPattern(int index) throws APIException
index
-
java.lang.ArrayIndexOutOfBoundsException
- If the supplied index is < 0 or >= the size of the list of patterns
APIException
public void setName(java.lang.String name)
name
- public void setLevel(int newLevel)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |