Package de.mid.innovator.srv.excellence
Class ExcellenceModel
java.lang.Object
de.mid.innovator.srv.Model
de.mid.innovator.srv.excellence.ExcellenceModel
- All Implemented Interfaces:
SrvContext
-
Method Summary
Modifier and TypeMethodDescriptionstatic Modelcreate(RepositoryServer rep, String name, K_ADMODEL modelType, ADModel mdlId) Create a handle to an existing Innovator model specified by repository, model name and model.voidDeletes a model from a repository server.The instance of ADModel is fetched from the server.getUserRoleList(InoUser inoUser) Fetch the possible rolesgetUsers()Gets the list of available users from model.booleanIs in the current model the use of the most recent changeset activated? If true, all modifications are done within the most recent changeset.voidLogin as model administrator for SSOvoidloginModelAdmin(String aUserName, String pwd) Login as model administrator with name and password.voidloginModelGuest(String pwd) Login as model guest with password.voidloginSuperUser(Boolean login, String pwd) Switch superuser mode for login.voidLogin as normal user with name and password.voidlogout()Logout any user from the model.voidsetUseRecentChangeset(boolean useRecentChangeset) Set the use of the most recent changeset.booleantryReLogin(K_LOGINKIND loginKind, String loginName) Checks if the given user has a login with the same display.booleantryReLogin(String aUserName) Checks if the given user has a login with the same display.booleanCheck for repository administrator role.Methods inherited from class de.mid.innovator.srv.Model
asExcellenceModel, beginCommandSequence, endCommandSequence, equals, getCommandSequenceId, getCommandSequenceName, getLogin, getModelName, getModelType, getRepositoryServer, getSrvConnection, getVersionName, hasLogin, isAdminLoginAllowed, isApiAdminLoginAllowed, isGuestLoginAllowed, isLoginAllowed, isNormalLoginAllowed, isVersion
-
Method Details
-
loginUser
public void loginUser(String aUserName, String aCleartextPassword, String role) throws InoNetException, SrvErrorException Login as normal user with name and password. If name is omitted (equal to "" or is null), the system user is used by callingSystemUtils.getSystemUser();- Specified by:
loginUserin classModel- Parameters:
aUserName- the user name or null. If no name is given, the system user name is used.aCleartextPassword- a clear text password for this user or null.role- the user's role or null. If no role is given, the role of the user's last successful login is used.- Throws:
InoNetExceptionSrvErrorException
-
tryReLogin
Checks if the given user has a login with the same display. If so, the login can be reused. In this case, the model stores the existing login and the ADModel instance and changes its state to "logged-in".- Specified by:
tryReLoginin classModel- Parameters:
aUserName- the user name to search for.- Returns:
- true if a re-login was performed, otherwise false (a login must then be carried out).
- Throws:
InoNetExceptionSrvErrorException
-
tryReLogin
public boolean tryReLogin(K_LOGINKIND loginKind, String loginName) throws InoNetException, SrvErrorException Checks if the given user has a login with the same display. If so, the login can be reused. In this case, the model stores the existing login and the ADModel instance and changes its state to "logged-in".- Specified by:
tryReLoginin classModel- Parameters:
loginKind- the kind of login.loginName- the user name to search for.- Returns:
- true if a re-login was performed, otherwise false (a login must then be carried out).
- Throws:
InoNetExceptionSrvErrorException
-
userHasAdminPrivileges
Check for repository administrator role.- Returns:
- true for non-SSO or if user has model admin privileges.
- Throws:
InoNetExceptionSrvErrorException
-
loginModelAdmin
Login as model administrator with name and password. If name is omitted (equal to "" or is null), the system user is used by callingSystemUtils.getSystemUser();- Specified by:
loginModelAdminin classModel- Parameters:
aUserName- a user name as string or nullpwd- the administrator's password- Throws:
InoNetExceptionSrvErrorException
-
loginModelAdmin
Login as model administrator for SSO- Specified by:
loginModelAdminin classModel- Throws:
InoNetExceptionSrvErrorException
-
loginSuperUser
Switch superuser mode for login.- Specified by:
loginSuperUserin classModel- Parameters:
login- flag for log-in/outpwd- the administrator's password- Throws:
InoNetExceptionSrvErrorException
-
loginModelGuest
Login as model guest with password.- Specified by:
loginModelGuestin classModel- Parameters:
pwd- the administrator's password- Throws:
InoNetExceptionSrvErrorException
-
logout
Logout any user from the model. This however means that the ADModel instance cannot be used in further calls. Only logout if there is no other application of the user on this machine is connected with the same model.- Specified by:
logoutin classModel- Throws:
InoNetExceptionSrvErrorException
-
getADModel
The instance of ADModel is fetched from the server. It can be used as an entry point for further model requests.- Returns:
- the model's ADModel instance.
-
create
Create a handle to an existing Innovator model specified by repository, model name and model.- Parameters:
rep-name-modelType-mdlId-- Returns:
-
delete
Description copied from class:ModelDeletes a model from a repository server. The corresponding server must be prepared for administration withRepositoryServer.repositoryAdminLogin(String)- Specified by:
deletein classModel- Parameters:
pwd- the model's administrator password- Throws:
InoNetExceptionSrvErrorException
-
getUsers
Description copied from class:ModelGets the list of available users from model.- Specified by:
getUsersin classModel- Returns:
- list of users
- Throws:
InoNetExceptionSrvErrorException
-
getUserRoleList
Description copied from class:ModelFetch the possible roles- Specified by:
getUserRoleListin classModel- Parameters:
inoUser- the Innovator user- Throws:
InoNetExceptionSrvErrorException
-
isUseRecentChangeset
public boolean isUseRecentChangeset()Is in the current model the use of the most recent changeset activated? If true, all modifications are done within the most recent changeset. If false, a new changeset is created each time, a new login is done. A relogin or reusing the login of the Innovator model editor does not create a new login. If the changeset is empty, it will be deleted at logout. Default is false.- Returns:
-
setUseRecentChangeset
public void setUseRecentChangeset(boolean useRecentChangeset) Set the use of the most recent changeset.- Parameters:
useRecentChangeset- true or false.
-