public class LspsRemote
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static LspsRemote |
ADMIN
The admin/admin connection.
|
static java.lang.String |
serverUrl |
static java.lang.String |
urlWs |
static java.lang.String |
urlWsHuman |
Modifier | Constructor and Description |
---|---|
protected |
LspsRemote(java.lang.String login,
java.lang.String password) |
Modifier and Type | Method and Description |
---|---|
static LspsRemote |
create(Person person,
java.lang.String password)
Creates remote lsps controller for person and password.
|
static LspsRemote |
create(java.lang.String username,
java.lang.String password)
Creates LSPS remote with a given username, password.
|
boolean |
equals(java.lang.Object obj) |
java.util.List<ModelInstance> |
findModelInstances(ModelInstanceCriteria criteria)
Finds model instances by given criteria.
|
java.util.List<Module> |
findModules(ModuleCriteria criteria)
Finds modules by given criteria.
|
Person |
findOrCreatePerson(java.lang.String login)
Finds a person with a given login, if not found, it creates one.
|
Person |
findPersonByLogin(java.lang.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.
|
java.util.List<java.lang.String> |
getDocumentTitles()
Calls
GenericDocumentService.getAllDocuments() and retrieves document names. |
ErrorHandlingService |
getErrorHandlingService() |
Person |
getGuestPerson()
Returns the predefined person 'guest'.
|
Module |
getLatestModule(java.lang.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(java.lang.String personId)
Finds a person with a given id.
|
java.lang.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(java.lang.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) |
java.lang.String |
toString() |
void |
unloadAllModules()
Unloads all modules from the server.
|
Module |
uploadModule(java.lang.String name,
java.lang.String version,
java.io.File pathToProject)
Uploads a model to the server.
|
Module |
uploadModule(java.lang.String name,
java.lang.String version,
java.io.File pathToProject,
SchemaUpdateStrategy strategy)
Uploads a model to the server.
|
Module |
uploadModuleFromRepository(java.lang.String name,
java.lang.String version)
Uploads a model to the server.
|
Module |
uploadModuleFromRepository(java.lang.String name,
java.lang.String version,
SchemaUpdateStrategy strategy)
Uploads a model to the server.
|
public static final java.lang.String serverUrl
public static final java.lang.String urlWs
public static final java.lang.String urlWsHuman
public static final LspsRemote ADMIN
protected LspsRemote(java.lang.String login, java.lang.String password)
public static LspsRemote create(Person person, java.lang.String password)
person
- password
- public static LspsRemote create(java.lang.String username, java.lang.String password)
username
- password
- public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String getPersonId()
public Module uploadModuleFromRepository(java.lang.String name, java.lang.String version)
name
- the module name, not null.version
- the version, not null. Just type "1.0" here.public Module uploadModuleFromRepository(java.lang.String name, java.lang.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(java.lang.String name)
null
if there is no module uploaded (unloaded modules are ignored).name
- null
public Module uploadModule(java.lang.String name, java.lang.String version, java.io.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(java.lang.String name, java.lang.String version, java.io.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(java.lang.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 java.util.List<java.lang.String> getDocumentTitles() throws ErrorException
GenericDocumentService.getAllDocuments()
and retrieves document names.ErrorException
public boolean isRunningOn(JEEServer server)
server
- public Person getAdminPerson()
public Person getGuestPerson()
public Person findOrCreatePerson(java.lang.String login)
login
- public Person findPersonByLogin(java.lang.String login)
null
if there is no person with a given login.login
- null
public Person getPerson(java.lang.String personId)
null
if there is no person with a given id.personId
- null
public Module getModule(long moduleId)
moduleId
- public java.util.List<Module> findModules(ModuleCriteria criteria)
criteria
- public ModelInstance getModelInstance(long id)
id
- public java.util.List<ModelInstance> findModelInstances(ModelInstanceCriteria criteria)
criteria
- public Todo getTodo(long todoId)
todoId
- Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.