Class 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.
    • 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 interface mks.frame.triggers.ScriptExposableBean
        Overrides:
        getExposedName in class ScriptProjectBean
        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 class ScriptProjectBean
        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 class ScriptProjectBean
        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 class ScriptProjectBean
        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 class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object