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
public class ExcellenceModel extends Model
-
-
Field Summary
-
Fields inherited from class de.mid.innovator.srv.Model
fLogin, fModelName, fModelType, fRepositoryServer, versionName
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Modelcreate(RepositoryServer rep, java.lang.String name, K_ADMODEL modelType, ADModel mdlId)voiddelete(java.lang.String pwd)Deletes a model from a repository server.ADModelgetADModel()The instance of ADModel is fetched from the server.java.util.List<java.lang.String>getUserRoleList(InoUser inoUser)Fetch the possible rolesjava.util.List<InoUser>getUsers()Gets the list of available users.voidloginModelAdmin()Login as model administrator for SSOvoidloginModelAdmin(java.lang.String aUserName, java.lang.String pwd)Login as model administrator with name and password.voidloginModelGuest(java.lang.String pwd)Login as model guest with password.voidloginSuperUser(java.lang.Boolean login, java.lang.String pwd)Switch superuser mode for login.voidloginUser(java.lang.String aUserName, java.lang.String aCleartextPassword, java.lang.String role)Login as normal user with name and password.voidlogout()Logout any user from the model.booleantryReLogin(K_LOGINKIND loginKind, java.lang.String loginName)Checks if the given user has a login with the same display.booleantryReLogin(java.lang.String aUserName)Checks if the given user has a login with the same display.booleanuserHasAdminPrivileges()-
Methods inherited from class de.mid.innovator.srv.Model
asExcellenceModel, beginCommandSequence, endCommandSequence, equals, getCommandSequenceId, getCommandSequenceName, getLicUserRoleList, getLogin, getModelName, getModelType, getRepositoryServer, getSrvConnection, getSSOUserCookie, getSSOUsers, getVersionName, hasLogin, isSingleSignOn, isVersion, registerModelAtLicServer, unregisterModelAtLicServer
-
-
-
-
Method Detail
-
loginUser
public void loginUser(java.lang.String aUserName, java.lang.String aCleartextPassword, java.lang.String role) throws InoNetException, SrvErrorExceptionLogin 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
public boolean tryReLogin(java.lang.String aUserName) throws InoNetException, SrvErrorExceptionChecks 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, java.lang.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
public boolean userHasAdminPrivileges() throws InoNetException, SrvErrorException- Throws:
InoNetExceptionSrvErrorException
-
loginModelAdmin
public void loginModelAdmin(java.lang.String aUserName, java.lang.String pwd) throws InoNetException, SrvErrorExceptionLogin 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
public void loginModelAdmin() throws InoNetException, SrvErrorExceptionLogin as model administrator for SSO- Specified by:
loginModelAdminin classModel- Throws:
InoNetExceptionSrvErrorException
-
loginSuperUser
public void loginSuperUser(java.lang.Boolean login, java.lang.String pwd) throws InoNetException, SrvErrorExceptionSwitch superuser mode for login.- Specified by:
loginSuperUserin classModel- Parameters:
login- flag for log-in/outpwd- the administrator's password- Throws:
InoNetExceptionSrvErrorException
-
loginModelGuest
public void loginModelGuest(java.lang.String pwd) throws InoNetException, SrvErrorExceptionLogin as model guest with password.- Specified by:
loginModelGuestin classModel- Parameters:
pwd- the administrator's password- Throws:
InoNetExceptionSrvErrorException
-
logout
public void logout() throws InoNetException, SrvErrorExceptionLogout 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
public ADModel 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
public static Model create(RepositoryServer rep, java.lang.String name, K_ADMODEL modelType, ADModel mdlId)
-
delete
public void delete(java.lang.String pwd) throws InoNetException, SrvErrorExceptionDescription 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
public java.util.List<InoUser> getUsers() throws InoNetException, SrvErrorException
Description copied from class:ModelGets the list of available users.- Specified by:
getUsersin classModel- Returns:
- list of users
- Throws:
InoNetExceptionSrvErrorException
-
getUserRoleList
public java.util.List<java.lang.String> getUserRoleList(InoUser inoUser) throws InoNetException, SrvErrorException
Description copied from class:ModelFetch the possible roles- Specified by:
getUserRoleListin classModel- Parameters:
inoUser- the Innovator user- Throws:
InoNetExceptionSrvErrorException
-
-