Class ADModelHelper


  • public abstract class ADModelHelper
    extends java.lang.Object
    Represents a common model.
    See Also:
    ADModel
    • Method Detail

      • getFirstCreationDate

        public static ARG_CreationDate getFirstCreationDate​(SrvContext srvCtx,
                                                            java.util.List<? extends ELContainerAble> seqRoot,
                                                            java.util.List<? extends ELElement> seqFlat)
                                                     throws InoNetException,
                                                            SrvErrorException
        examines the transitive content of the elements in seqRoot and returns the oldest creation date of these elements.
        Parameters:
        srvCtx - The context of the related innovator server.
        seqRoot - consider this element and all transitivly owned elements
        seqFlat - consider only this elements but omit transitifly owned elements
        Throws:
        InoNetException
        SrvErrorException
      • createBranch

        public static ARG_CreateRepository createBranch​(SrvContext srvCtx,
                                                        ADModel adModel,
                                                        java.lang.String branchName,
                                                        java.lang.String note,
                                                        boolean asSubBranch,
                                                        boolean withCS)
                                                 throws InoNetException,
                                                        SrvErrorException
        Creates a branch. The branch holds a copy of the current model. The branch is a either a sub branch of the current branch or a sibling branch of the current branch.
        Parameters:
        srvCtx - The context of the related innovator server.
        adModel - create branch for this model
        branchName - name of the new branch
        note - note of the new branch
        asSubBranch - if true create as a sub brunch of the current branch
        withCS - extract with change set
        Throws:
        InoNetException
        SrvErrorException
      • createByFile

        public static ARG_ADModelInfo createByFile​(SrvContext srvCtx,
                                                   ADLogin login,
                                                   byte[] file,
                                                   java.lang.String nameModel,
                                                   java.lang.String password,
                                                   java.lang.String passCopy)
                                            throws InoNetException,
                                                   SrvErrorException
        Creates a new model using the given version file. The name of the model from inside the file is used made unique if necessary.
        Parameters:
        srvCtx - The context of the related innovator server.
        login - repository administrator login
        file - file to import
        nameModel - name of the new model. If not set the name of the copied one will be used
        password - password of the new model. If not set the password of the copied one will be used
        passCopy - password of the copied model. Must be set if a new password should be set
        Throws:
        InoNetException
        SrvErrorException
      • createModelVersion

        public static ARG_CreateRepository createModelVersion​(SrvContext srvCtx,
                                                              ADModel adModel,
                                                              java.lang.String branchName,
                                                              java.lang.String note,
                                                              java.lang.String adModelUUID,
                                                              java.lang.String parentBranchUUID,
                                                              java.lang.String adModelName)
                                                       throws InoNetException,
                                                              SrvErrorException
        Creates a new model version. The repository contains a copy of the current model.
        Parameters:
        srvCtx - The context of the related innovator server.
        adModel - create a version for this model
        branchName - name of the new branch
        note - note of the new branch
        adModelUUID - uuid of the model. If null a new UUID is assigned to the model.
        parentBranchUUID - uuid of the new parent branch. If not null an adModelUUID is required. If null this version is root version
        adModelName - name of the model of the newly created branch
        Throws:
        InoNetException
        SrvErrorException
      • modifyBranchProperties

        public static void modifyBranchProperties​(SrvContext srvCtx,
                                                  ADModel adModel,
                                                  java.lang.String name,
                                                  java.lang.String note)
                                           throws InoNetException,
                                                  SrvErrorException
        Updates the properties of this branch.
        Parameters:
        srvCtx - The context of the related innovator server.
        adModel - modify the properties of the current branch of this model
        name - name of the version
        note - updates description of this branch
        Throws:
        InoNetException
        SrvErrorException
      • nameConstraintsUpdate

        public static void nameConstraintsUpdate​(SrvContext srvCtx,
                                                 ADModel adModel,
                                                 java.lang.String expressionForVersionName,
                                                 java.lang.String expressionForBackupName)
                                          throws InoNetException,
                                                 SrvErrorException
        Updates the regular expressions constraining the name of a model version and a model backup.
        Parameters:
        srvCtx - The context of the related innovator server.
        adModel - update the name constraints of this model
        expressionForVersionName - constraint for version names
        expressionForBackupName - constraint for backup names
        Throws:
        InoNetException
        SrvErrorException
      • reassignBranch

        public static void reassignBranch​(SrvContext srvCtx,
                                          ADModel adModel,
                                          java.lang.String parentBranchUUID)
                                   throws InoNetException,
                                          SrvErrorException
        assigns this branch to a new parent branch.
        Parameters:
        srvCtx - The context of the related innovator server.
        adModel - reassign the current branch of this model
        parentBranchUUID - uuid of the new parrnet branch
        Throws:
        InoNetException
        SrvErrorException