Package mks.ci.server.engine
Class LocalTriggerManager.ScriptRelationshipBean
- java.lang.Object
-
- mks.frame.triggers.ScriptExposableBaseBean
-
- mks.frame.triggers.beans.ScriptBaseBean
-
- mks.ci.server.engine.LocalTriggerManager.ScriptRelationshipBean
-
- All Implemented Interfaces:
mks.frame.triggers.ScriptExposableBean
- Enclosing class:
- LocalTriggerManager
public static class LocalTriggerManager.ScriptRelationshipBean extends ScriptBaseBean implements mks.frame.triggers.ScriptExposableBean
Bean which describes a single link from one issue to another. Each such link has a set of bit flags; and a created timestamp.These beans are returned by
getRelationshipFieldBeans
andgetNewRelationshipFieldBeans
When you call the set methods on this bean, you are only updating your copy, until you invoke a method to update a particular relationship field. Thus, for example, you might have code which updated all of a particular relationship field's link flags:var fieldName = "Child Requirements"; var issues = delta.getNewRelationshipFieldBeans(fieldName); for (var i = 0; i < issues.length; i++) issues[i].setFlag("suspect"); delta.setRelationshipFieldValue(fieldName, issues);
-
-
Constructor Summary
Constructors Constructor Description ScriptRelationshipBean(mks.ci.api.CIRelationship rv, mks.ci.server.engine.Field f)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearAllSuspectFlags()
Clear all of the flags on this link that qualify as "suspect"void
clearFlag(java.lang.String flagname)
Clear the flag named flagname on this link.java.util.Date
getCreatedDate()
Retrieve the date this link was createdjava.lang.String
getExposedName()
Get the name of this bean:imRelationshipBean
int
getIssue()
Return the issue id number of the target of this link.int
getLinkFlags()
Returns the integer mask for the link flags on the current relationship.boolean
isFlagSet(java.lang.String flagname)
Is the flag named flagname set on this link?boolean
isSuspect()
Returns true if at least one flag currently set on the relationship is a suspect flag.void
setFlag(java.lang.String flagname)
Set the flag named flagname on this link.java.lang.String
toString()
For debugging purposes-
Methods inherited from class mks.frame.triggers.beans.ScriptBaseBean
getEnvironmentBean, setEnvironmentBean
-
-
-
-
Method Detail
-
getIssue
public int getIssue()
Return the issue id number of the target of this link.
-
getLinkFlags
public int getLinkFlags() throws mks.frame.triggers.TriggerException
Returns the integer mask for the link flags on the current relationship.- Returns:
- int the bit mask
- Throws:
mks.frame.triggers.TriggerException
-
isSuspect
public boolean isSuspect() throws mks.frame.triggers.TriggerException
Returns true if at least one flag currently set on the relationship is a suspect flag.- Returns:
- True if any one of the flags on the relationship is suspect
- Throws:
mks.frame.triggers.TriggerException
-
isFlagSet
public boolean isFlagSet(java.lang.String flagname) throws mks.frame.triggers.TriggerException
Is the flag named flagname set on this link?- Throws:
mks.frame.triggers.TriggerException
- if the named link flag doesn't exist
-
setFlag
public void setFlag(java.lang.String flagname) throws mks.frame.triggers.TriggerException
Set the flag named flagname on this link.- Throws:
mks.frame.triggers.TriggerException
- if the named link flag doesn't exist
-
clearFlag
public void clearFlag(java.lang.String flagname) throws mks.frame.triggers.TriggerException
Clear the flag named flagname on this link.- Throws:
mks.frame.triggers.TriggerException
- if the named link flag doesn't exist
-
clearAllSuspectFlags
public void clearAllSuspectFlags() throws mks.frame.triggers.TriggerException
Clear all of the flags on this link that qualify as "suspect"- Throws:
mks.frame.triggers.TriggerException
- not thrown at this time, reserved for future use
-
getCreatedDate
public java.util.Date getCreatedDate()
Retrieve the date this link was created
-
getExposedName
public java.lang.String getExposedName()
Get the name of this bean:imRelationshipBean
- Specified by:
getExposedName
in interfacemks.frame.triggers.ScriptExposableBean
- Specified by:
getExposedName
in classScriptBaseBean
- Returns:
- the bean name:
imRelationshipBean
.
-
toString
public java.lang.String toString()
For debugging purposes- Overrides:
toString
in classjava.lang.Object
-
-