org.modelbus.core.lib
Interface IServicesHelper
- All Superinterfaces:
- IModelBusHelper
public interface IServicesHelper
- extends IModelBusHelper
The interface IServicesHelper provides an API to work with services related to the ModelBus. To instantiate the helper class, you call
ModelBusCoreLib.getServicesHelper()
:
{
@code
IServicesHelper helper = ModelBusCoreLib.getServicesHelper();
}
To work with the repository, you have to declare a session:
Session session = new Session();
session.setId("abcdefghijklmno123456789");
Property propertyUserName = new Property();
propertyUserName.setKey("username");
propertyUserName.setValue("Admin");
Property propertyPassword = new Property();
propertyPassword.setKey("password");
propertyPassword.setValue("ModelBus");
session.getProperties().add(propertyUserName);
session.getProperties().add(propertyPassword);
getStatus
Status getStatus(Session session,
boolean includeServices)
throws RepositoryAuthentificationException
- Parameters:
session
- the current session for authenticationincludeServices
- flag whether the state of services registered to the ModelBus should be included
- Returns:
- Model representing the current ModelBus state
- Throws:
RepositoryAuthentificationException
publishService
boolean publishService(Session session,
ModelBusServiceConfiguration configuration)
throws RepositoryAuthentificationException,
InvalidServiceDescriptionException
- Parameters:
session
- The current user sessionconfiguration
- the configuration of a particular service
- Returns:
- flag indicating whether the service has been published successfully
- Throws:
RepositoryAuthentificationException
InvalidServiceDescriptionException
unpublishService
boolean unpublishService(Session session,
ModelBusServiceConfiguration configuration)
throws RepositoryAuthentificationException,
RepositoryRuntimeException,
InvalidServiceDescriptionException
- Parameters:
session
- The current user sessionconfiguration
- the configuration of a particular service
- Returns:
- flag indicating whether the service has been unpublished successfully
- Throws:
RepositoryAuthentificationException
InvalidServiceDescriptionException
RepositoryRuntimeException