|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectde.mid.innovator.client.InoProgram
de.mid.innovator.srv.InoServerProgram
de.mid.innovator.srv.RepositoryServer
public class RepositoryServer
This class represents the Innovator repository server. A repository server
recognizes its own license server and keeps an up-to-date list of the models
contained in it. Note: an instance of this class is different from the server
proxy element of the ADRepository type. To obtain this instance, call
getADRepository() if connected to the server.
A repository server extends a general purpose server program class that provides different kinds of data through the license server requests. The implementation of the interface SrvContext is needed to realize a uniform way to call helper methods, either using a connected server instance or an object of the class model.
ADRepository| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class de.mid.innovator.client.InoProgram |
|---|
InoProgram.Type |
| Constructor Summary | |
|---|---|
RepositoryServer(LicenseServer aLicenseServer,
int pid,
int procStatus,
String vers,
String host,
String user,
LicSrvGetSrvPrjListReplyTelegram.SrvConData srvConData,
List<Model> modelLst)
|
|
| Method Summary | |
|---|---|
void |
connect()
Connects to a running Innovator repository server if not yet connected. |
Model |
createModel(String name,
K_ADMODEL modelType,
String newAdminPwd,
String userCfg,
String modelCfg,
List<String> addOnList)
Creates a new Model in the actual repository server and refreshes
the list of models. |
void |
disconnect()
Disconnects from the repository server. |
boolean |
equals(SrvContext obj)
Compares this server object to an SrvContext implementer. |
ADRepository |
getADRepository()
Gets the repository server proxy element. |
ExcellenceModel |
getExcellenceModel(String aModelName,
K_ADMODEL aModelType)
Gets a model with the given name and type from the list of currently known models. |
String |
getFullName()
Gets the name of the repository server (which is equal to the directory name where the server stores all data). |
LicenseServer |
getLicenseServer()
Gets the license server object which the repository server periodically contacts. |
SrvLogin |
getLogin()
Implements the method from SrvContext |
Model |
getModel(String aModelName,
K_ADMODEL aModelType)
Gets a model with the given name and type from the list of currently known models. |
List<Model> |
getModels()
Gets the complete list of known models. |
List<Model> |
getModels(K_ADMODEL aModelType)
Searches the list of currently known models in this server for models of the given type. |
String |
getName()
Gets the name of the repository server (which is equal to the directory name where the server stores all data). |
SrvConnection |
getSrvConnection()
Implements the method from SrvContext |
EnumSet<ServerStatus> |
getStatus()
|
boolean |
hasLogin()
Checks whether a previous successful administrator login was performed. |
void |
logout()
Logs out from the repository server if still logged-in, otherwise nothing will be done. |
void |
modifyPassword(String oldPass,
String newPass)
Modifies the repository server's administration password. |
void |
refresh()
Synchronizes this server object's model list with the actual state known by the license server. |
void |
repositoryAdminLogin(String pwd)
Authenticates the user credentials for administration purposes; this is carried out by the repository server. |
String |
toString()
|
boolean |
userHasAdminPrivileges()
|
| Methods inherited from class de.mid.innovator.srv.InoServerProgram |
|---|
getStatusFlags |
| Methods inherited from class de.mid.innovator.client.InoProgram |
|---|
getHost, getPid, getProgramType, getUser, getVers |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RepositoryServer(LicenseServer aLicenseServer,
int pid,
int procStatus,
String vers,
String host,
String user,
LicSrvGetSrvPrjListReplyTelegram.SrvConData srvConData,
List<Model> modelLst)
| Method Detail |
|---|
public void connect()
throws InoNetException
InoNetException - if a network error occurs.SrvConnection
public Model createModel(String name,
K_ADMODEL modelType,
String newAdminPwd,
String userCfg,
String modelCfg,
List<String> addOnList)
throws InoNetException,
SrvErrorException
Model in the actual repository server and refreshes
the list of models.
name - the name of the new modelmodelType - the kind of modelnewAdminPwd - the administrator's password for the new model or nulluserCfg - the name of a valid user configuration or nullmodelCfg - the name of a valid model configuration or nulladdOnList - a list of add-ons which need to be loaded or null
InoNetException - if a network error occurs.
SrvErrorException - if invalid data has been sent to this server.
IllegalArgumentException - if the given model type is different to K_ADMODEL.UML
public void disconnect()
throws InoNetException
connect(). This enables the repository
server to finish the corresponding connection.
InoNetException - if a network error occurs.public boolean equals(SrvContext obj)
This method implements SrvContext.equals(SrvContext)
equals in interface SrvContextSrvContext,
Model.equals(SrvContext)public ADRepository getADRepository()
public ExcellenceModel getExcellenceModel(String aModelName,
K_ADMODEL aModelType)
refresh() method to synchronize this
server object with the current state.
aModelName - the name of the Innovator eXcellence modelaModelType - the type of eXcellence model
public String getFullName()
public LicenseServer getLicenseServer()
public SrvLogin getLogin()
SrvContext
getLogin in interface SrvContext
public Model getModel(String aModelName,
K_ADMODEL aModelType)
refresh() method to synchronize this
server object with the current state.
aModelName - the name of the Innovator modelaModelType - the type of model
public List<Model> getModels()
refresh() to keep it up-to-date.
public List<Model> getModels(K_ADMODEL aModelType)
refresh() to keep it up-to-date.
aModelType - the type of model
getModel(String, K_ADMODEL)public String getName()
public SrvConnection getSrvConnection()
SrvContext
getSrvConnection in interface SrvContext
public EnumSet<ServerStatus> getStatus()
throws InoNetException
InoNetExceptionpublic boolean hasLogin()
getLogin(), otherwise false
public void logout()
throws InoNetException,
SrvErrorException
InoNetException - if a network error occurs.
SrvErrorException - if invalid data has been sent to this server.repositoryAdminLogin(String)
public void modifyPassword(String oldPass,
String newPass)
throws InoNetException,
SrvErrorException
oldPass - old password (plain text)newPass - new password (plain text)
InoNetException - if a network error occurs.
SrvErrorException - if invalid data has been sent to this server.
public void refresh()
throws InoNetException
InoNetException - if a network error occurs.
SrvErrorException
public void repositoryAdminLogin(String pwd)
throws InoNetException,
SrvErrorException
pwd - the repository server's administration password
InoNetException - if a network error occurs.
SrvErrorException - if invalid data has been sent to this server.logout()public String toString()
toString in class InoServerProgram
public boolean userHasAdminPrivileges()
throws InoNetException
InoNetException
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||