com.buildforge.services.client.dbo
Class FilterPattern

java.lang.Object
  extended by com.buildforge.services.client.dbo.FilterPattern

public class FilterPattern
extends java.lang.Object

FilterPatterns tie a specific regular expression pattern to an action (like warning or failing a Step) and a notification (like emailing the dev team if the pattern matches). These are child objects of Filters and do not have a proper life outside the scope of a containing parent object.


Field Summary
static java.lang.Class<FilterPattern> CLASS
           
 
Constructor Summary
FilterPattern(APIClientConnection conn, Filter newParent)
          Defines a new FilterPattern.
 
Method Summary
 FilterPattern clone()
           
 void delete()
          Removes this FilterPattern from both its parent Filter and from the database, if the parent Filter already exists in the database
 FilterPatternDBO.Action getAction()
          Returns the Action associated with this FilterPattern.
 int getFilterId()
          Returns the unique identifier of the parent Filter
 int getFilterOrdinal()
          Returns the ordinal of this FilterPattern
 int getNotificationLevel()
          Returns the access group to notify when this filter pattern is triggered.
 java.lang.String getPattern()
          Returns the pattern associated with this FilterPattern.
 void setAction(FilterPatternDBO.Action action)
          Sets the Action associated with this FilterPattern.
 void setNotificationLevel(int notificationLevel)
          Sets the access group to notify when this filter pattern is triggered.
 void setPattern(java.lang.String pattern)
          Sets the pattern associated with this FilterPattern.
 java.lang.String toString()
           
 FilterPattern update()
          Commits changes to this FilterPattern to the database
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS

public static final java.lang.Class<FilterPattern> CLASS
Constructor Detail

FilterPattern

public FilterPattern(APIClientConnection conn,
                     Filter newParent)
Defines a new FilterPattern. If the parent is 'live' (has already been created) then adding this FilterPattern to the Filter will create this FilterPattern. Otherwise, this FilterPattern will be created after the parent Filter's create method is invoked (and this FilterPattern has been added to that parent).

Parameters:
conn -
newParent -
Method Detail

update

public FilterPattern update()
                     throws java.io.IOException,
                            ServiceException
Commits changes to this FilterPattern to the database

Returns:
Throws:
java.io.IOException
ServiceException - If the FilterPattern does not already exist in the database

delete

public void delete()
            throws java.io.IOException,
                   ServiceException
Removes this FilterPattern from both its parent Filter and from the database, if the parent Filter already exists in the database

Throws:
java.io.IOException
ServiceException

getAction

public FilterPatternDBO.Action getAction()
Returns the Action associated with this FilterPattern. See FilterPatternDBO.Action for details.


getFilterId

public int getFilterId()
Returns the unique identifier of the parent Filter


getFilterOrdinal

public int getFilterOrdinal()
Returns the ordinal of this FilterPattern


getPattern

public java.lang.String getPattern()
Returns the pattern associated with this FilterPattern. The pattern to match against, or the name of the filter to include for A (include) actions.


getNotificationLevel

public int getNotificationLevel()
Returns the access group to notify when this filter pattern is triggered.


setAction

public void setAction(FilterPatternDBO.Action action)
Sets the Action associated with this FilterPattern. See FilterPatternDBO.Action for details.

Parameters:
action -

setPattern

public void setPattern(java.lang.String pattern)
Sets the pattern associated with this FilterPattern. The pattern to match against, or the name of the filter to include for A (include) actions.

Parameters:
pattern -

setNotificationLevel

public void setNotificationLevel(int notificationLevel)
Sets the access group to notify when this filter pattern is triggered.

Parameters:
notificationLevel -

toString

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

clone

public FilterPattern clone()
Overrides:
clone in class java.lang.Object