public class LspsRemote extends Object
| Modifier and Type | Field and Description |
|---|---|
static LspsRemote |
ADMIN
The admin/admin connection.
|
static String |
serverUrl |
static String |
urlWs |
static String |
urlWsHuman |
| Modifier | Constructor and Description |
|---|---|
protected |
LspsRemote(String login,
String password) |
| Modifier and Type | Method and Description |
|---|---|
static LspsRemote |
create(Person person,
String password)
Creates remote lsps controller for person and password.
|
static LspsRemote |
create(String username,
String password)
Creates LSPS remote with a given username, password.
|
boolean |
equals(Object obj) |
List<ModelInstance> |
findModelInstances(ModelInstanceCriteria criteria)
Finds model instances by given criteria.
|
List<Module> |
findModules(ModuleCriteria criteria)
Finds modules by given criteria.
|
Person |
findOrCreatePerson(String login)
Finds a person with a given login, if not found, it creates one.
|
Person |
findPersonByLogin(String login)
Finds a person with a given login.
|
Person |
getAdminPerson()
Returns the predefined person 'admin'.
|
GenericDocumentService |
getDocumentService()
Returns the document service for this user which retrieves documents available to this user.
|
List<String> |
getDocumentTitles()
Calls
GenericDocumentService.getAllDocuments() and retrieves document names. |
ErrorHandlingService |
getErrorHandlingService() |
Person |
getGuestPerson()
Returns the predefined person 'guest'.
|
Module |
getLatestModule(String name)
Returns the latest module with a given name or
null
if there is no module uploaded (unloaded modules are ignored). |
LogService |
getLogService() |
MigrationService |
getMigrationService() |
ModelInstance |
getModelInstance(long id)
Returns the model instance with a given id.
|
ModelManagementService |
getModelManagementService() |
Module |
getModule(long moduleId)
Returns the module with a given id, if not found, an exception is thrown.
|
Person |
getPerson(String personId)
Finds a person with a given id.
|
String |
getPersonId()
Returns the person id of the connected user.
|
PersonManagementService |
getPersonManagementService()
Provides methods for person management (creating, updating, removing
persons), person-role mapping and querying, and role querying.
|
ProcessService |
getProcessService() |
<T> T |
getService(Class<T> clazz)
Returns instance of service.
|
TestSupportService |
getTestSupportService()
Returns
TestSupportService. |
Todo |
getTodo(long todoId)
Returns the to-do with a given id, if not found, an exception is thrown.
|
TodoService |
getTodoService()
Service for accessing the functionality related to to-dos.
|
int |
hashCode() |
boolean |
isRunningOn(JEEServer server) |
String |
toString() |
void |
unloadAllModules()
Unloads all modules from the server.
|
Module |
uploadModule(String name,
String version,
File pathToProject)
Uploads a model to the server.
|
Module |
uploadModule(String name,
String version,
File pathToProject,
SchemaUpdateStrategy strategy)
Uploads a model to the server.
|
Module |
uploadModuleFromRepository(String name,
String version)
Uploads a model to the server.
|
Module |
uploadModuleFromRepository(String name,
String version,
SchemaUpdateStrategy strategy)
Uploads a model to the server.
|
public static final String serverUrl
public static final String urlWs
public static final String urlWsHuman
public static final LspsRemote ADMIN
public static LspsRemote create(Person person, String password)
person - password - public static LspsRemote create(String username, String password)
username - password - public String getPersonId()
public Module uploadModuleFromRepository(String name, String version)
name - the module name, not null.version - the version, not null. Just type "1.0" here.public Module uploadModuleFromRepository(String name, String version, SchemaUpdateStrategy strategy)
name - the module name, not null.version - the version, not null. Just type "1.0" here.strategy - the database update strategy to use, not null.public Module getLatestModule(String name)
null
if there is no module uploaded (unloaded modules are ignored).name - nullpublic Module uploadModule(String name, String version, File pathToProject)
pathToProject,
zips it and sends it to the server.
Uses the DROP-CREATE database update strategy.name - the module name, not null. The module must be present in the project denoted by pathToProject.version - the version, not null. Just type "1.0" here.pathToProject - the path to the folder containing the .project file and modules.public Module uploadModule(String name, String version, File pathToProject, SchemaUpdateStrategy strategy)
pathToProject,
zips it and sends it to the server.name - the module name, not null. The module must be present in the project denoted by pathToProject.version - the version, not null. Just type "1.0" here.pathToProject - the path to the folder containing the .project file and modules.strategy - the database update strategy to use, not null.public void unloadAllModules()
public <T> T getService(Class<T> clazz)
T - clazz - public TestSupportService getTestSupportService()
TestSupportService.public ProcessService getProcessService()
public ModelManagementService getModelManagementService()
public PersonManagementService getPersonManagementService()
public ErrorHandlingService getErrorHandlingService()
public TodoService getTodoService()
public LogService getLogService()
public MigrationService getMigrationService()
public GenericDocumentService getDocumentService()
public List<String> getDocumentTitles() throws ErrorException
GenericDocumentService.getAllDocuments() and retrieves document names.ErrorExceptionpublic boolean isRunningOn(JEEServer server)
server - public Person getAdminPerson()
public Person getGuestPerson()
public Person findOrCreatePerson(String login)
login - public Person findPersonByLogin(String login)
null if there is no person with a given login.login - nullpublic Person getPerson(String personId)
null if there is no person with a given id.personId - nullpublic Module getModule(long moduleId)
moduleId - public List<Module> findModules(ModuleCriteria criteria)
criteria - public ModelInstance getModelInstance(long id)
id - public List<ModelInstance> findModelInstances(ModelInstanceCriteria criteria)
criteria - public Todo getTodo(long todoId)
todoId - Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.