Class ADModelHelper
java.lang.Object
de.mid.innovator.srv2api.icw2meta.ADModelHelper
Represents a common model.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic ARG_CreateRepositorycreateBranch(SrvContext srvCtx, ADModel adModel, String branchName, String note, boolean asSubBranch, boolean withCS, boolean withUN, String variableModelName) Creates a branch.static ARG_CreateRepositorycreateBranchBackup(SrvContext srvCtx, ADModel adModel, String backupName, String note) Creates a backup of the current branch.createBranchFromLatestUpdate(SrvContext srvCtx, ADModel adModel) Creates a branch from the latest update of this modelstatic ARG_ADModelInfocreateByFile(SrvContext srvCtx, ADLogin login, Path file, String nameModel, String password, String passCopy) Creates a new model using the given version file.static ARG_CreateRepositorycreateModelVersion(SrvContext srvCtx, ADModel adModel, String branchName, String note, String adModelUUID, String parentBranchUUID, String adModelName, String variableModelName) Creates a new model version.static ELElementgetFindElementById(SrvContext srvCtx, Class<? extends ELObject> kVOcl, int id) If it exists, returns the model element described by the ARG_FindElementByIdOclReq structure.static ARG_CreationDategetFirstCreationDate(SrvContext srvCtx, List<? extends ELContainerAble> seqRoot, List<? extends ELElement> seqFlat) examines the transitive content of the elements in seqRoot and returns the oldest creation date of these elements.static ARG_ADListLoginOutgetListLogin(SrvContext srvCtx, String nameModel, K_ADMODEL methModel, String patternUser) Returns information about the login user list.static ARG_ADModelConfiggetListModelConfig(SrvContext srvCtx, K_ADMODEL item) Returns the names of available model configurations.static ARG_ADUserConfiggetListUserConfig(SrvContext srvCtx) Returns the names of available user configurations.static PathgetVersionFile(SrvContext srvCtx, ADLogin login, K_ADMODEL method, String name) Returns the complete version ASCII representation of the model.static voidguestAllow(SrvContext srvCtx, ADModel model, boolean allowLogin, String text) Allow and forbid for the guest logins.static voidmodelNameUpdate(SrvContext srvCtx, ADModel adModel, String modelName) renames this model.static voidmodifyBranchProperties(SrvContext srvCtx, ADModel adModel, String name, String note) Updates the properties of this branch.static voidmodifyVersionAlias(SrvContext srvCtx, ADModel adModel, List<ARG_Alias> seqAlias) Replaces the model versions alias list.static voidnameConstraintsUpdate(SrvContext srvCtx, ADModel adModel, String expressionForVersionName, String expressionForBackupName) Updates the regular expressions constraining the name of a model version and a model backup.static voidreassignBranch(SrvContext srvCtx, ADModel adModel, String parentBranchUUID) assigns this branch to a new parent branch.
-
Method Details
-
getFindElementById
public static ELElement getFindElementById(SrvContext srvCtx, Class<? extends ELObject> kVOcl, int id) throws InoNetException, SrvErrorException If it exists, returns the model element described by the ARG_FindElementByIdOclReq structure.- Parameters:
srvCtx- The context of the related innovator server.kVOcl- VOCL of elementid- Id of element- Throws:
InoNetExceptionSrvErrorException
-
getFirstCreationDate
public static ARG_CreationDate getFirstCreationDate(SrvContext srvCtx, List<? extends ELContainerAble> seqRoot, 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 elementsseqFlat- consider only this elements but omit transitifly owned elements- Throws:
InoNetExceptionSrvErrorException
-
getListLogin
public static ARG_ADListLoginOut getListLogin(SrvContext srvCtx, String nameModel, K_ADMODEL methModel, String patternUser) throws InoNetException, SrvErrorException Returns information about the login user list.- Parameters:
srvCtx- The context of the related innovator server.nameModel- name of the modelmethModel- method of the modelpatternUser- pattern for the user name- Throws:
InoNetExceptionSrvErrorException
-
getListModelConfig
public static ARG_ADModelConfig getListModelConfig(SrvContext srvCtx, K_ADMODEL item) throws InoNetException, SrvErrorException Returns the names of available model configurations.- Parameters:
srvCtx- The context of the related innovator server.item-- Throws:
InoNetExceptionSrvErrorException
-
getListUserConfig
public static ARG_ADUserConfig getListUserConfig(SrvContext srvCtx) throws InoNetException, SrvErrorException Returns the names of available user configurations.- Parameters:
srvCtx- The context of the related innovator server.- Throws:
InoNetExceptionSrvErrorException
-
getVersionFile
public static Path getVersionFile(SrvContext srvCtx, ADLogin login, K_ADMODEL method, String name) throws InoNetException, SrvErrorException Returns the complete version ASCII representation of the model.- Parameters:
srvCtx- The context of the related innovator server.login- administrator loginmethod- model typename- model name- Throws:
InoNetExceptionSrvErrorException
-
createBranchBackup
public static ARG_CreateRepository createBranchBackup(SrvContext srvCtx, ADModel adModel, String backupName, String note) throws InoNetException, SrvErrorException Creates a backup of the current branch.- Parameters:
srvCtx- The context of the related innovator server.adModel- take the current branch of this modelbackupName- name of the backup branchnote- note of the new branch- Throws:
InoNetExceptionSrvErrorException
-
createBranchFromLatestUpdate
public static ARG_CreateBranchFromLatestUpdate createBranchFromLatestUpdate(SrvContext srvCtx, ADModel adModel) throws InoNetException, SrvErrorException Creates a branch from the latest update of this model- Parameters:
srvCtx- The context of the related innovator server.adModel- create branch for this model- Throws:
InoNetExceptionSrvErrorException
-
createBranch
public static ARG_CreateRepository createBranch(SrvContext srvCtx, ADModel adModel, String branchName, String note, boolean asSubBranch, boolean withCS, boolean withUN, String variableModelName) 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 modelbranchName- name of the new branchnote- note of the new branchasSubBranch- if true create as a sub brunch of the current branchwithCS- extract with change setwithUN- extract with user notificationvariableModelName- value of property 'VariableModelName'- Throws:
InoNetExceptionSrvErrorException
-
createByFile
public static ARG_ADModelInfo createByFile(SrvContext srvCtx, ADLogin login, Path file, String nameModel, String password, 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 and made unique if necessary.- Parameters:
srvCtx- The context of the related innovator server.login- repository administrator loginfile- file to importnameModel- name of the new model. If not set the name of the copied one will be usedpassword- password of the new model. If not set the password of the copied one will be usedpassCopy- password of the copied model. Must be set if a new password should be set- Throws:
InoNetExceptionSrvErrorException
-
createModelVersion
public static ARG_CreateRepository createModelVersion(SrvContext srvCtx, ADModel adModel, String branchName, String note, String adModelUUID, String parentBranchUUID, String adModelName, String variableModelName) 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 modelbranchName- name of the new branchnote- note of the new branchadModelUUID- 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 versionadModelName- name of the model of the newly created branchvariableModelName- value of property 'VariableModelName'- Throws:
InoNetExceptionSrvErrorException
-
guestAllow
public static void guestAllow(SrvContext srvCtx, ADModel model, boolean allowLogin, String text) throws InoNetException, SrvErrorException Allow and forbid for the guest logins.- Parameters:
srvCtx- The context of the related innovator server.model- model idallowLogin- flag if login is allowedtext- lock text- Throws:
InoNetExceptionSrvErrorException
-
modelNameUpdate
public static void modelNameUpdate(SrvContext srvCtx, ADModel adModel, String modelName) throws InoNetException, SrvErrorException renames this model.- Parameters:
srvCtx- The context of the related innovator server.adModel- rename this modelmodelName- new model name- Throws:
InoNetExceptionSrvErrorException
-
modifyBranchProperties
public static void modifyBranchProperties(SrvContext srvCtx, ADModel adModel, String name, 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 modelname- name of the versionnote- updates description of this branch- Throws:
InoNetExceptionSrvErrorException
-
modifyVersionAlias
public static void modifyVersionAlias(SrvContext srvCtx, ADModel adModel, List<ARG_Alias> seqAlias) throws InoNetException, SrvErrorException Replaces the model versions alias list.- Parameters:
srvCtx- The context of the related innovator server.adModel- modify the version aliases of this modelseqAlias- list of aliases- Throws:
InoNetExceptionSrvErrorException
-
nameConstraintsUpdate
public static void nameConstraintsUpdate(SrvContext srvCtx, ADModel adModel, String expressionForVersionName, 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 modelexpressionForVersionName- constraint for version namesexpressionForBackupName- constraint for backup names- Throws:
InoNetExceptionSrvErrorException
-
reassignBranch
public static void reassignBranch(SrvContext srvCtx, ADModel adModel, 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 modelparentBranchUUID- uuid of the new parrnet branch- Throws:
InoNetExceptionSrvErrorException
-