Package mks.ci.server.engine
Class LocalTriggerManager.ScriptTypeBean
- java.lang.Object
-
- mks.frame.triggers.ScriptExposableBaseBean
-
- mks.frame.triggers.beans.ScriptBaseBean
-
- mks.ci.server.engine.LocalTriggerManager.ScriptIMBaseBean
-
- mks.ci.server.engine.LocalTriggerManager.ScriptIdentifiedBean
-
- mks.ci.server.engine.LocalTriggerManager.ScriptAdminBean
-
- mks.ci.server.engine.LocalTriggerManager.ScriptTypeBean
-
- All Implemented Interfaces:
mks.frame.triggers.ScriptExposableBean
- Enclosing class:
- LocalTriggerManager
public static class LocalTriggerManager.ScriptTypeBean extends LocalTriggerManager.ScriptAdminBean implements mks.frame.triggers.ScriptExposableBean
The Type Bean. Only limited interface is provided, e.g. for type property access.This bean may be obtained from the server bean, via the
getTypeBean
call.This bean is read only.
-
-
Constructor Summary
Constructors Constructor Description ScriptTypeBean(mks.ci.server.engine.Type type, int userId, java.sql.Connection c)
Create a new ScriptTypeBean
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocalTriggerManager.ScriptFieldBean[]
getAdditionalLockFieldBeans()
Only excluded because it is used with the PREEvision integration if needed in the future remove the @exclude annotationLocalTriggerManager.ScriptFieldBean[]
getAllVisibleFieldBeans()
Returns the set of fields visible on this type to any user.LocalTriggerManager.ScriptFieldBean[]
getAllVisibleTraceFieldBeans()
Returns the set of trace fields visible on this type to any user.java.lang.String
getAssociatedCommentingType()
In the commenting model, a Segment type is associated with a Review Session type.LocalTriggerManager.ScriptFieldBean
getAssociatedLockPolicyFieldBean()
Returns the field bean for the user or group field when the document lock policy is set to a user or group fieldjava.lang.String
getAssociatedType()
In the document model, a Segment Type is associated with a Node type.java.lang.String
getDisplayName()
Get the display name for the type.java.lang.String
getExposedName()
Returns the name of this bean that is exposed to the scripting language.LocalTriggerManager.ScriptPrincipalBean[]
getLockPolicyGroupBeans()
Returns an array of ScriptPrincipalBeans consisting of ScriptGroupBeans and ScriptDynamicGroupBeans that represent those groups specified when the document lock policy is set to groupsjava.lang.String
getLockPolicyType()
Returns the document lock policy in string formjava.lang.String
getName()
Returns the name of the type.LocalTriggerManager.ScriptFieldBean
getPhaseFieldBean()
Returns the field bean for the phase field if a phase field has been attributed to this type.java.lang.String
getPropertyDesc(java.lang.String tpName)
Returns the description of the type property based on the name.java.lang.String[]
getPropertyNames()
Returns a string array of all property names of this type.java.lang.String
getPropertyValue(java.lang.String tpName)
Returns the value of the type property based on the name.LocalTriggerManager.ScriptRequirementsBean
getRequirementsBean()
Fetch the Requirements Solutions Bean.LocalTriggerManager.ScriptFieldBean[]
getSignificantFieldBeans()
Only excluded because it is used with the PREEvision integration if needed in the future remove the @exclude annotationjava.util.Map<java.lang.String,java.lang.String>
getSolutionPropertiesStartingWith(java.lang.String solutionName, java.lang.String key)
Returns a Map of solution properties defined on the solution type and the type associated with this bean.java.lang.String
getSolutionPropertyValue(java.lang.String solutionName, java.lang.String key)
Get the property value defined for a solution.java.lang.String
getSolutionPropertyValueUndefinedAllowed(java.lang.String solutionName, java.lang.String key)
Get the property value defined for a solution.boolean
isCommentingModelComment()
Is this type a Comment in the Commenting Model?boolean
isCommentingModelItem()
Is this type part of the Commenting Model?boolean
isCommentingModelReviewSession()
Is this type a ReviewSession in the Commenting Model?boolean
isDefaultReferenceModeShare()
In the document model, when a node or group of nodes are copied, the new nodes may either have a Reference Mode of Reuse or Share.boolean
isDocumentItem()
Is this type part of the Document Model?boolean
isDocumentLockingEnabled()
Has this type been enabled for locking documents?boolean
isDocumentNode()
Is this type a Node in the Document Model?boolean
isDocumentSegment()
Is this type a Segment in the Document Model?boolean
isDocumentSharedItem()
Is this type a Shared Item in the Document Model?boolean
isFieldVisibleToAnyone(java.lang.String fieldName)
Is this field visible on the type?boolean
isGroupDocument()
If this is a Segment in the document model, then does this document represent a grouping document?boolean
isProjectBacking()
Returns true if this Type can back Projects.boolean
isRevisionEnabled()
Has this type been enabled for Revisioning?boolean
isTestCase()
Is this type a Test Case in the Test model?boolean
isTestItem()
Is this type part of the Test model?boolean
isTestSession()
Is this type a Test Session in the Test model?boolean
isTestStep()
Is this type a Test Step in the Test model?java.lang.String
toString()
Returns a summary of this object.-
Methods inherited from class mks.ci.server.engine.LocalTriggerManager.ScriptAdminBean
getDescription
-
Methods inherited from class mks.ci.server.engine.LocalTriggerManager.ScriptIdentifiedBean
getCreatedDate, getCreatedUser, getInternalID, getModifiedDate, getModifiedUser
-
Methods inherited from class mks.ci.server.engine.LocalTriggerManager.ScriptIMBaseBean
getCurrentDatabaseTime, getCurrentDatabaseTime, getCurrentUser, getServerBean, getUserID, isParallelProcessingEnabled
-
Methods inherited from class mks.frame.triggers.beans.ScriptBaseBean
getEnvironmentBean, setEnvironmentBean
-
-
-
-
Method Detail
-
toString
public java.lang.String toString()
Returns a summary of this object.- Overrides:
toString
in classjava.lang.Object
-
getExposedName
public java.lang.String getExposedName()
Returns the name of this bean that is exposed to the scripting language.- Specified by:
getExposedName
in interfacemks.frame.triggers.ScriptExposableBean
- Specified by:
getExposedName
in classScriptBaseBean
- Returns:
- the bean name:
imTypeBean
.
-
getName
public java.lang.String getName()
Returns the name of the type. Note that there is no special Display Name for a type.- Overrides:
getName
in classLocalTriggerManager.ScriptAdminBean
- Returns:
- the name of the type
-
getDisplayName
public java.lang.String getDisplayName()
Get the display name for the type.- Returns:
- The display name for the type.
- See Also:
to get the real name of the type. Most trigger beans operate using the real name.
-
getPropertyValue
public java.lang.String getPropertyValue(java.lang.String tpName)
Returns the value of the type property based on the name. Type properties are used by solutions for configuration and the actual values are defined by the solution. They are maintained as part of type management.- Parameters:
tpName
- the name of the type property- Returns:
- the value of the type property; null if the property does not exist.
-
getPropertyDesc
public java.lang.String getPropertyDesc(java.lang.String tpName)
Returns the description of the type property based on the name. Type properties are used by solutions for configuration and the actual values are defined by the solution. They are maintained as part of type management.- Parameters:
tpName
- the name of the type property- Returns:
- the description of the type property; null if the property does not exist.
-
getPropertyNames
public java.lang.String[] getPropertyNames()
Returns a string array of all property names of this type. Type properties are used by solutions for configuration and the actual values are defined by the solution. They are maintained as part of type management.- Returns:
- the string array containing the names of all properties of this type; an array of length 0 will be returned if there is no property defined for the type.
-
getSolutionPropertyValue
public java.lang.String getSolutionPropertyValue(java.lang.String solutionName, java.lang.String key) throws mks.frame.triggers.TriggerException
Get the property value defined for a solution. The properties of the type associated with this bean is checked first. If not found, the properties defined in the solution type is checked. If not found, an ApplicationError is thrown that describes in detail how to resolve the problem. If you expect that the property might not be found, use getSolutionPropertyValueUndefinedAllowed() instead of this method.- Parameters:
solutionName
- the name of the solution; if null or empty, property value of null will be returnedkey
- the key for locating the property; it is without prefix- Returns:
- the property value
- Throws:
mks.frame.triggers.TriggerException
mks.frame.exception.ApplicationError
- if lookup fails.
-
getSolutionPropertyValueUndefinedAllowed
public java.lang.String getSolutionPropertyValueUndefinedAllowed(java.lang.String solutionName, java.lang.String key) throws mks.frame.triggers.TriggerException
Get the property value defined for a solution. The properties of the type associated with this bean is checked first. If not found, the properties defined in the solution type is checked. If not found, returns null. If you require that the property be found, use getSolutionPropertyValue() instead of this method.- Parameters:
solutionName
- the name of the solution; if null or empty, null is returnedkey
- the key for locating the property without prefix- Returns:
- the property value
- Throws:
mks.frame.triggers.TriggerException
-
getSolutionPropertiesStartingWith
public java.util.Map<java.lang.String,java.lang.String> getSolutionPropertiesStartingWith(java.lang.String solutionName, java.lang.String key) throws mks.frame.triggers.TriggerException
Returns a Map of solution properties defined on the solution type and the type associated with this bean. If a property is overridden on this type then that one is returned, not the one defined on the solution type. If no property starts with the requested sequence this method returns null.- Parameters:
solutionName
- the name of the solution; if null or empty, null is returnedkey
- the beginning of the key for locating the property without prefix- Returns:
- Map<String, String> containing the properties, null if none is found.
- Throws:
mks.frame.triggers.TriggerException
-
getRequirementsBean
public LocalTriggerManager.ScriptRequirementsBean getRequirementsBean() throws mks.frame.triggers.TriggerException
Fetch the Requirements Solutions Bean. Not intended for customer use.- Throws:
mks.frame.triggers.TriggerException
-
isDocumentItem
public boolean isDocumentItem()
Is this type part of the Document Model? In other words, is it a Segment, Node, or Shared Item?
-
isDocumentSegment
public boolean isDocumentSegment()
Is this type a Segment in the Document Model?
-
isDocumentNode
public boolean isDocumentNode()
Is this type a Node in the Document Model?
-
isDocumentSharedItem
public boolean isDocumentSharedItem()
Is this type a Shared Item in the Document Model?
-
isCommentingModelItem
public boolean isCommentingModelItem()
Is this type part of the Commenting Model?
-
isCommentingModelComment
public boolean isCommentingModelComment()
Is this type a Comment in the Commenting Model?
-
isCommentingModelReviewSession
public boolean isCommentingModelReviewSession()
Is this type a ReviewSession in the Commenting Model?
-
isGroupDocument
public boolean isGroupDocument()
If this is a Segment in the document model, then does this document represent a grouping document?- Returns:
- false if not a grouping document. The return value is undefined if this is not a Segment.
-
isProjectBacking
public boolean isProjectBacking() throws mks.frame.triggers.TriggerException
Returns true if this Type can back Projects.- Returns:
- true if this Type can back Projects.
- Throws:
mks.frame.triggers.TriggerException
-
isRevisionEnabled
public boolean isRevisionEnabled() throws mks.frame.triggers.TriggerException
Has this type been enabled for Revisioning?- Returns:
- false, if it is not enabled.
- Throws:
mks.frame.triggers.TriggerException
-
isDocumentLockingEnabled
public boolean isDocumentLockingEnabled() throws mks.frame.triggers.TriggerException
Has this type been enabled for locking documents?- Returns:
- false, if it is not enabled
- Throws:
mks.frame.triggers.TriggerException
-
getLockPolicyType
public java.lang.String getLockPolicyType() throws mks.frame.triggers.TriggerException
Returns the document lock policy in string form- Returns:
- Possible returned strings are:
- anyone
- userField
- groupField
- groups
- Throws:
mks.frame.triggers.TriggerException
-
getAssociatedLockPolicyFieldBean
public LocalTriggerManager.ScriptFieldBean getAssociatedLockPolicyFieldBean() throws mks.frame.triggers.TriggerException
Returns the field bean for the user or group field when the document lock policy is set to a user or group field- Returns:
- A field bean for the user or group field. If document locking is not enabled or the lock policy is not set to a user or group field, then this returns null.
- Throws:
mks.frame.triggers.TriggerException
-
getLockPolicyGroupBeans
public LocalTriggerManager.ScriptPrincipalBean[] getLockPolicyGroupBeans() throws mks.frame.triggers.TriggerException
Returns an array of ScriptPrincipalBeans consisting of ScriptGroupBeans and ScriptDynamicGroupBeans that represent those groups specified when the document lock policy is set to groups- Returns:
- An array of ScriptPrincipalBeans. If document locking is not enabled or the lock policy is not set to groups, then this returns null.
- Throws:
mks.frame.triggers.TriggerException
-
getAssociatedType
public java.lang.String getAssociatedType() throws mks.frame.triggers.TriggerException
In the document model, a Segment Type is associated with a Node type. A Node Type is associated with its Shared Item type.- Returns:
- the name of the associated type. null is returned if there is no association. The result is undefined if isDocumentSegment() and isDocumentNode() are both false.
- Throws:
mks.frame.triggers.TriggerException
-
getAssociatedCommentingType
public java.lang.String getAssociatedCommentingType() throws mks.frame.triggers.TriggerException
In the commenting model, a Segment type is associated with a Review Session type. A Review Session type is associated with a Comment type.- Returns:
- the name of the associated type, or null if there is no association. The result is undefined if isDocumentSegment() and isCommentingModelReviewSession() are both false.
- Throws:
mks.frame.triggers.TriggerException
-
isDefaultReferenceModeShare
public boolean isDefaultReferenceModeShare() throws mks.frame.triggers.TriggerException
In the document model, when a node or group of nodes are copied, the new nodes may either have a Reference Mode of Reuse or Share. The segment root Type determines what the default reference mode will be.- Returns:
- true if the reference mode will be Share; false if the reference mode will be Reuse.
- Throws:
mks.frame.triggers.TriggerException
- if this is not a segment type.
-
isTestItem
public boolean isTestItem()
Is this type part of the Test model? In other words, is it a Test Case, Test Step or Test Session?
-
isTestCase
public boolean isTestCase()
Is this type a Test Case in the Test model?
-
isTestStep
public boolean isTestStep()
Is this type a Test Step in the Test model?
-
isTestSession
public boolean isTestSession()
Is this type a Test Session in the Test model?
-
getPhaseFieldBean
public LocalTriggerManager.ScriptFieldBean getPhaseFieldBean() throws mks.frame.triggers.TriggerException
Returns the field bean for the phase field if a phase field has been attributed to this type.- Throws:
mks.frame.triggers.TriggerException
-
isFieldVisibleToAnyone
public boolean isFieldVisibleToAnyone(java.lang.String fieldName) throws mks.frame.triggers.TriggerException
Is this field visible on the type? Does not determine whether the field is in fact visible to the user making the request.- Parameters:
fieldName
- the name of any field in the system (item or test result)- Throws:
mks.frame.triggers.TriggerException
-
getAllVisibleFieldBeans
public LocalTriggerManager.ScriptFieldBean[] getAllVisibleFieldBeans() throws mks.frame.triggers.TriggerException
Returns the set of fields visible on this type to any user. Used to reduce the overhead associated with looping over fields.- Returns:
- Array of ScriptFieldBeans visible on this Type to any user.
- Throws:
mks.frame.triggers.TriggerException
-
getSignificantFieldBeans
public LocalTriggerManager.ScriptFieldBean[] getSignificantFieldBeans() throws mks.frame.triggers.TriggerException
Only excluded because it is used with the PREEvision integration if needed in the future remove the @exclude annotation- Throws:
mks.frame.triggers.TriggerException
-
getAdditionalLockFieldBeans
public LocalTriggerManager.ScriptFieldBean[] getAdditionalLockFieldBeans() throws mks.frame.triggers.TriggerException
Only excluded because it is used with the PREEvision integration if needed in the future remove the @exclude annotation- Throws:
mks.frame.triggers.TriggerException
-
getAllVisibleTraceFieldBeans
public LocalTriggerManager.ScriptFieldBean[] getAllVisibleTraceFieldBeans() throws mks.frame.triggers.TriggerException
Returns the set of trace fields visible on this type to any user.- Returns:
- Array of ScriptFieldBeans visible on this Type to any user Returns null if there are none.
- Throws:
mks.frame.triggers.TriggerException
-
-