Class AbstractYamlService
- java.lang.Object
-
- de.iip_ecosphere.platform.services.environment.AbstractYamlService
-
- Direct Known Subclasses:
YamlService
public abstract class AbstractYamlService extends java.lang.ObjectBasic 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 Modifier and Type Field Description private java.lang.StringapplicationIdprivate booleandeployableprivate java.lang.Stringdescriptionprivate java.lang.Stringidprivate ServiceKindkindprivate java.lang.Stringnameprivate java.lang.StringnetMgtKeyprivate booleantopLevelprivate java.lang.StringtransportChannelprivate de.iip_ecosphere.platform.support.iip_aas.Versionversion
-
Constructor Summary
Constructors Constructor Description AbstractYamlService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetApplicationId()Returns the application id this service is assigned to (withoutapplication instance id).java.lang.StringgetApplicationInstanceId()Returns the application instance id this service is running within.java.lang.StringgetDescription()Returns the description of the service.java.lang.StringgetId()Returns the unique id of the service.ServiceKindgetKind()Sets the service kind.java.lang.StringgetName()Returns the name of the service.java.lang.StringgetNetMgtKey()Returns the network management key of a service instance this service is relying on.java.lang.StringgetServiceId()Returns the service id of the service, i.e.java.lang.StringgetTransportChannel()Returns the transport channel to utilize viagetNetMgtKey().de.iip_ecosphere.platform.support.iip_aas.VersiongetVersion()Returns the version of the service.booleanisDeployable()Returns whether this service is decentrally deployable.booleanisTopLevel()Returns whether this service is top-level.voidsetApplicationId(java.lang.String applicationId)Defines the application id this service is assigned to.voidsetDeployable(boolean deployable)Sets whether this service is decentrally deployable.voidsetDescription(java.lang.String description)Defines the description of the service.voidsetId(java.lang.String id)Defines the id of the service.voidsetKind(ServiceKind kind)Sets the service kind.voidsetName(java.lang.String name)Defines the name of the service.voidsetNetMgtKey(java.lang.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(java.lang.String transportChannel)Defines the transport channel to utilize viagetNetMgtKey().voidsetVersion(de.iip_ecosphere.platform.support.iip_aas.Version version)Defines the version of the service.
-
-
-
Field Detail
-
id
private java.lang.String id
-
applicationId
private java.lang.String applicationId
-
name
private java.lang.String name
-
version
private de.iip_ecosphere.platform.support.iip_aas.Version version
-
description
private java.lang.String description
-
kind
private ServiceKind kind
-
deployable
private boolean deployable
-
topLevel
private boolean topLevel
-
netMgtKey
private java.lang.String netMgtKey
-
transportChannel
private java.lang.String transportChannel
-
-
Method Detail
-
getId
public java.lang.String getId()
Returns the unique id of the service.- Returns:
- the id (may contain the
application idand theapplication instance idif specified)
-
getApplicationId
public java.lang.String getApplicationId()
Returns the application id this service is assigned to (withoutapplication instance id).- Returns:
- the application id
-
getServiceId
public java.lang.String getServiceId()
Returns the service id of the service, i.e.getId()withoutgetApplicationId()andgetApplicationInstanceId().- Returns:
- the id
-
getApplicationInstanceId
public java.lang.String 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
public java.lang.String 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
public java.lang.String 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
public java.lang.String getName()
Returns the name of the service.- Returns:
- the name
-
getVersion
public de.iip_ecosphere.platform.support.iip_aas.Version getVersion()
Returns the version of the service.- Returns:
- the version
-
getDescription
public java.lang.String getDescription()
Returns the description of the service.- Returns:
- the description
-
getKind
public ServiceKind 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
public void setId(java.lang.String id)
Defines the id of the service. [required by SnakeYaml]- Parameters:
id- the id (may contain theapplication idif specified)
-
setName
public void setName(java.lang.String name)
Defines the name of the service. [required by SnakeYaml]- Parameters:
name- the name
-
setApplicationId
public void setApplicationId(java.lang.String applicationId)
Defines the application id this service is assigned to. [required by SnakeYaml]- Parameters:
applicationId- the application id
-
setNetMgtKey
public void setNetMgtKey(java.lang.String netMgtKey)
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
public void setTransportChannel(java.lang.String transportChannel)
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.iip_aas.Version version)
Defines the version of the service. [required by SnakeYaml]- Parameters:
version- the version
-
setDescription
public void setDescription(java.lang.String description)
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
public void setKind(ServiceKind kind)
Sets the service kind. [required by SnakeYaml]- Parameters:
kind- the service kind
-
-