Package mks.si.brain.triggers.beans
Class ScriptSubprojectBean
- java.lang.Object
-
- mks.frame.triggers.ScriptExposableBaseBean
-
- mks.frame.triggers.beans.ScriptBaseBean
-
- mks.si.brain.triggers.beans.ScriptBaseBean
-
- mks.si.brain.triggers.beans.ScriptProjectBean
-
- mks.si.brain.triggers.beans.ScriptSubprojectBean
-
- All Implemented Interfaces:
mks.frame.triggers.ScriptExposableBean
public class ScriptSubprojectBean extends ScriptProjectBean implements mks.frame.triggers.ScriptExposableBean
This class encapsulates a server-side subproject object.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class mks.si.brain.triggers.beans.ScriptProjectBean
ScriptProjectBean.Visitor
-
-
Constructor Summary
Constructors Constructor Description ScriptSubprojectBean(mks.si.brain.api.LocalProject localProject, mks.si.api.SubprojectID subprojectID)
Constructs a ScriptSubprojectBean from a LocalProject and a subproject ID.ScriptSubprojectBean(mks.si.brain.api.LocalSubproject localSubproject)
Construct a ScriptSubprojectBean.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getBuildSubprojectRevision()
If the subproject is a build project , return the revision id of the build project.java.lang.String
getConfigPath()
Returns the configuration path for this subproject.java.lang.String
getDisplayName()
Returns a string-based representation of this object, the format is meant for human reading.java.lang.String
getExposedName()
Returns the name of this bean that is exposed to the scripting language.ScriptProjectBean
getParentProjectBean()
Returns the parent project of this subproject bean.ScriptUserBean
getPendingAuthor()
Returns the user who initiated a pending operation.ScriptSubprojectBean
getPendingNewSubproject()
Returns the new pending subproject if there is a pending rename from this subproject.ScriptSubprojectBean
getPendingOldSubproject()
Returns the new subproject if there is a pending rename from this subproject.java.lang.String
getSharedSubprojectPath()
Returns the server side path of the subproject from where it was shared from.java.lang.String
getSubprojectDevPath()
If the subproject is a variant, return the name of the development path.java.lang.String
getSubprojectPath()
Returns the fully qualified server side path to the project that is the target of this configured subproject.int
hashCode()
boolean
isPending()
Returns true if the subproject has not been added to the project yet since it exists due to a pending add, pending import or pending rename to operation.boolean
isPendingAdd()
boolean
isPendingAddShared()
boolean
isPendingConfigure()
boolean
isPendingCreate()
boolean
isPendingDrop()
boolean
isPendingMoveFrom()
boolean
isPendingMoveTo()
boolean
isShared()
Returns whether or not the subproject is a shared subproject.-
Methods inherited from class mks.si.brain.triggers.beans.ScriptProjectBean
activateVariant, checkpoint, deactivateVariant, deleteVariant, dropMember, dropProjectAttribute, dropSubproject, freshenSavedMemberRevisions, getAbsolutePath, getActiveVariants, getArchiveBean, getAssociatedIssueIDs, getBuildProjectBean, getBuildRevisionBean, getCurrentProjectsWhereUsed, getInactiveVariants, getMemberBean, getMemberBeans, getMemberCount, getMetrics, getProjectAnnotation, getProjectAttributeKeys, getProjectAttributeValue, getProjectDescription, getProjectRevisionBean, getProjectRevisionID, getPromotionStates, getRestrictionExceptionToPermittedGroups, getRestrictionExceptionToPermittedUsers, getRestrictionPermittedGroups, getRestrictionPermittedUsers, getSubprojectCount, getSubprojects, getType, getUserWhoRestrictedProject, getVariantName, getVariants, hasMember, hasProjectAttribute, isArchived, isBuild, isNormal, isPromotionEnabled, isRestricted, isSub, isVariant, setMetric, setMetric, setMetric, setMetrics, setProjectAttribute, walk
-
Methods inherited from class mks.frame.triggers.beans.ScriptBaseBean
getEnvironmentBean, setEnvironmentBean
-
-
-
-
Constructor Detail
-
ScriptSubprojectBean
public ScriptSubprojectBean(mks.si.brain.api.LocalSubproject localSubproject)
Construct a ScriptSubprojectBean.- Parameters:
localSubproject
- The server-side subproject object we will wrap.
-
ScriptSubprojectBean
public ScriptSubprojectBean(mks.si.brain.api.LocalProject localProject, mks.si.api.SubprojectID subprojectID)
Constructs a ScriptSubprojectBean from a LocalProject and a subproject ID.- Parameters:
localProject
- the project that this project is a subproject of.subprojectID
- the identifier of the subproject.
-
-
Method Detail
-
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
- Overrides:
getExposedName
in classScriptProjectBean
- Returns:
- the bean name:
siSubprojectBean
.
-
getDisplayName
public java.lang.String getDisplayName() throws mks.frame.triggers.TriggerException
Returns a string-based representation of this object, the format is meant for human reading.- Overrides:
getDisplayName
in classScriptProjectBean
- Returns:
- A String object containing the display name of this object.
- Throws:
mks.frame.triggers.TriggerException
-
getConfigPath
public java.lang.String getConfigPath() throws mks.frame.triggers.TriggerException
Returns the configuration path for this subproject.- Overrides:
getConfigPath
in classScriptProjectBean
- Returns:
- A String object containing a configuration path.
- Throws:
mks.frame.triggers.TriggerException
-
getParentProjectBean
public ScriptProjectBean getParentProjectBean() throws mks.frame.triggers.TriggerException
Returns the parent project of this subproject bean.- Overrides:
getParentProjectBean
in classScriptProjectBean
- Returns:
- A ScriptProjectBean of the parent project of this subproject, or null if this "subproject" does not have a parent (or there was an error).
- Throws:
mks.frame.triggers.TriggerException
-
getSubprojectPath
public java.lang.String getSubprojectPath()
Returns the fully qualified server side path to the project that is the target of this configured subproject. The subproject can be a normal, variant, or build.- Returns:
- String containing the subproject's path.
-
getSharedSubprojectPath
public java.lang.String getSharedSubprojectPath() throws mks.frame.triggers.TriggerException
Returns the server side path of the subproject from where it was shared from.- Returns:
- String the path from where the subproject was shared from. Returns null if the subproject is not a shared subproject.
- Throws:
mks.frame.triggers.TriggerException
-
getSubprojectDevPath
public java.lang.String getSubprojectDevPath() throws mks.frame.triggers.TriggerException
If the subproject is a variant, return the name of the development path.- Returns:
- String containing the name of the development path. Returns null if the subproject is not a variant, that is if normal or build.
- Throws:
mks.frame.triggers.TriggerException
-
getBuildSubprojectRevision
public java.lang.String getBuildSubprojectRevision() throws mks.frame.triggers.TriggerException
If the subproject is a build project , return the revision id of the build project.- Returns:
- String containing the build project revision id. Returns null if the subproject is not a build project.
- Throws:
mks.frame.triggers.TriggerException
-
isShared
public boolean isShared() throws mks.frame.triggers.TriggerException
Returns whether or not the subproject is a shared subproject.- Returns:
- true if subproject is a shared subproject, false otherwise.
- Throws:
mks.frame.triggers.TriggerException
-
getPendingAuthor
public ScriptUserBean getPendingAuthor() throws mks.frame.triggers.TriggerException
Returns the user who initiated a pending operation.- Returns:
- A ScriptUserBean for the user who initiated a pending operation or null if there is no pending operation on this member or an error occurred retrieving the information.
- Throws:
mks.frame.triggers.TriggerException
-
isPending
public boolean isPending() throws mks.frame.triggers.TriggerException
Returns true if the subproject has not been added to the project yet since it exists due to a pending add, pending import or pending rename to operation.- Returns:
- true if this is a pending subproject as opposed to a current subproject, false otherwise.
- Throws:
mks.frame.triggers.TriggerException
-
isPendingCreate
public boolean isPendingCreate() throws mks.frame.triggers.TriggerException
- Returns:
- true if the addition of this sub to the project is pending (due to a create), otherwise false
- Throws:
mks.frame.triggers.TriggerException
-
isPendingAdd
public boolean isPendingAdd() throws mks.frame.triggers.TriggerException
- Returns:
- true if the addition of this sub to the project is pending (due to an add), otherwise false
- Throws:
mks.frame.triggers.TriggerException
-
isPendingAddShared
public boolean isPendingAddShared() throws mks.frame.triggers.TriggerException
- Returns:
- true if the addition of this sub to the project is pending (due to an add shared), otherwise false
- Throws:
mks.frame.triggers.TriggerException
-
isPendingDrop
public boolean isPendingDrop() throws mks.frame.triggers.TriggerException
- Returns:
- true if the drop of this sub to the project is pending (due to a drop), otherwise false
- Throws:
mks.frame.triggers.TriggerException
-
isPendingConfigure
public boolean isPendingConfigure() throws mks.frame.triggers.TriggerException
- Returns:
- true if the reconfiguration of this sub is pending otherwise false
- Throws:
mks.frame.triggers.TriggerException
-
isPendingMoveFrom
public boolean isPendingMoveFrom() throws mks.frame.triggers.TriggerException
- Returns:
- true if the drop of this sub to the project is pending (due to a move), otherwise false
- Throws:
mks.frame.triggers.TriggerException
-
isPendingMoveTo
public boolean isPendingMoveTo() throws mks.frame.triggers.TriggerException
- Returns:
- true if the addition of this sub to the project is pending (due to a move), otherwise false
- Throws:
mks.frame.triggers.TriggerException
-
getPendingOldSubproject
public ScriptSubprojectBean getPendingOldSubproject() throws mks.frame.triggers.TriggerException
Returns the new subproject if there is a pending rename from this subproject.- Returns:
- a ScriptSubprojectBean for the new subproject if there is a pending rename from this subproject or null if there is no pending rename from this subproject or an error occurred retrieving the information.
- Throws:
mks.frame.triggers.TriggerException
-
getPendingNewSubproject
public ScriptSubprojectBean getPendingNewSubproject() throws mks.frame.triggers.TriggerException
Returns the new pending subproject if there is a pending rename from this subproject.- Returns:
- a ScriptSubprojectBean for the new subproject if there is a pending rename from this subproject or null if there is no pending rename from this subproject or an error occurred retrieving the information.
- Throws:
mks.frame.triggers.TriggerException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-