Class AbstractYamlService
java.lang.Object
de.iip_ecosphere.platform.services.environment.AbstractYamlService
- Direct Known Subclasses:
YamlService
Basic information about a service, abstract because template-based service objects do not
work with SnakeYaml. By default, reference types are created based on the attribute definition in the class. As
soon as mechanisms are available to handle this, these additional classes may collapse into a more simple hierarchy.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the application id this service is assigned to (withoutapplication instance id).Returns the application instance id this service is running within.Returns the description of the service.getId()Returns the unique id of the service.getKind()Sets the service kind.getName()Returns the name of the service.Returns the network management key of a service instance this service is relying on.Returns the service id of the service, i.e.Returns the transport channel to utilize viagetNetMgtKey().de.iip_ecosphere.platform.support.VersionReturns the version of the service.booleanReturns whether this service is decentrally deployable.booleanReturns whether this service is top-level.voidsetApplicationId(String applicationId) Defines the application id this service is assigned to.voidsetDeployable(boolean deployable) Sets whether this service is decentrally deployable.voidsetDescription(String description) Defines the description of the service.voidDefines the id of the service.voidsetKind(ServiceKind kind) Sets the service kind.voidDefines the name of the service.voidsetNetMgtKey(String netMgtKey) Defines the network management key of a service instance this service is relying on.voidsetTopLevel(boolean topLevel) Sets whether this service is a top-level service.voidsetTransportChannel(String transportChannel) Defines the transport channel to utilize viagetNetMgtKey().voidsetVersion(de.iip_ecosphere.platform.support.Version version) Defines the version of the service.
-
Field Details
-
id
-
applicationId
-
name
-
version
private de.iip_ecosphere.platform.support.Version version -
description
-
kind
-
deployable
private boolean deployable -
topLevel
private boolean topLevel -
netMgtKey
-
transportChannel
-
-
Constructor Details
-
AbstractYamlService
public AbstractYamlService()
-
-
Method Details
-
getId
Returns the unique id of the service.- Returns:
- the id (may contain the
application idand theapplication instance idif specified)
-
getApplicationId
Returns the application id this service is assigned to (withoutapplication instance id).- Returns:
- the application id
-
getServiceId
Returns the service id of the service, i.e.getId()withoutgetApplicationId()andgetApplicationInstanceId().- Returns:
- the id
-
getApplicationInstanceId
Returns the application instance id this service is running within. Usually, theapplication idshall be a prefix of this id.- Returns:
- the application instance id (may be empty for the default application instance)
-
getNetMgtKey
Returns the network management key of a service instance this service is relying on.- Returns:
- the network management key, may be empty or null for none
-
getTransportChannel
Returns the transport channel to utilize viagetNetMgtKey().- Returns:
- the transport channel, may be empty or null for none if the service uses an own
mechanism (discouraged if
getNetMgtKey()is given)
-
getName
Returns the name of the service.- Returns:
- the name
-
getVersion
public de.iip_ecosphere.platform.support.Version getVersion()Returns the version of the service.- Returns:
- the version
-
getDescription
Returns the description of the service.- Returns:
- the description
-
getKind
Sets the service kind.- Returns:
- the service kind
-
isDeployable
public boolean isDeployable()Returns whether this service is decentrally deployable.- Returns:
truefor deployable,falsefor not deployable
-
isTopLevel
public boolean isTopLevel()Returns whether this service is top-level.- Returns:
truefor top-level,falsefor nested
-
setId
Defines the id of the service. [required by SnakeYaml]- Parameters:
id- the id (may contain theapplication idif specified)
-
setName
Defines the name of the service. [required by SnakeYaml]- Parameters:
name- the name
-
setApplicationId
Defines the application id this service is assigned to. [required by SnakeYaml]- Parameters:
applicationId- the application id
-
setNetMgtKey
Defines the network management key of a service instance this service is relying on.- Parameters:
netMgtKey- the network management key, may be empty or null for none
-
setTransportChannel
Defines the transport channel to utilize viagetNetMgtKey().- Parameters:
transportChannel- the transport channel, may be empty or null for none if the service uses an own mechanism (discouraged ifgetNetMgtKey()is given)
-
setVersion
public void setVersion(de.iip_ecosphere.platform.support.Version version) Defines the version of the service. [required by SnakeYaml]- Parameters:
version- the version
-
setDescription
Defines the description of the service. [required by SnakeYaml]- Parameters:
description- the description (null is ignored, default is empty)
-
setDeployable
public void setDeployable(boolean deployable) Sets whether this service is decentrally deployable.- Parameters:
deployable-truefor deployable,falsefor not deployable
-
setTopLevel
public void setTopLevel(boolean topLevel) Sets whether this service is a top-level service.- Parameters:
topLevel-truefor topLevel,falsefor nested
-
setKind
Sets the service kind. [required by SnakeYaml]- Parameters:
kind- the service kind
-