diff options
author | Manuel Bentele | 2021-04-15 14:01:47 +0200 |
---|---|---|
committer | Manuel Bentele | 2021-04-15 14:01:47 +0200 |
commit | 90d94a479e5af0d884c63643f1266dc0a6596318 (patch) | |
tree | a84ee0f2c9bf1bce9abc43cfacdb87cd52592fcf /src/main/java/org/openslx/virtualization/configuration/transformation/TransformationSpecific.java | |
parent | Add representation of used virtualization systems (diff) | |
download | master-sync-shared-90d94a479e5af0d884c63643f1266dc0a6596318.tar.gz master-sync-shared-90d94a479e5af0d884c63643f1266dc0a6596318.tar.xz master-sync-shared-90d94a479e5af0d884c63643f1266dc0a6596318.zip |
Add generic transformation library to transform configs
Diffstat (limited to 'src/main/java/org/openslx/virtualization/configuration/transformation/TransformationSpecific.java')
-rw-r--r-- | src/main/java/org/openslx/virtualization/configuration/transformation/TransformationSpecific.java | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationSpecific.java b/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationSpecific.java new file mode 100644 index 0000000..5b13f45 --- /dev/null +++ b/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationSpecific.java @@ -0,0 +1,43 @@ +package org.openslx.virtualization.configuration.transformation; + +/** + * Represents a specific transformation that transforms (alters) a given configuration with + * specified input arguments. The specific transformation depends on external states of a + * specified virtualizer. + * + * @author Manuel Bentele + * @version 1.0 + * + * @param <T> type of the configuration which will be transformed. + * @param <R> type of input arguments for the transformation. + * @param <H> type of the external input source. + */ +public abstract class TransformationSpecific<T, R, H> extends Transformation<T, R> +{ + /** + * Reference to virtualizer to query external states. + */ + private final H virtualizer; + + /** + * Create a specific transformation. + * + * @param name comprehensible name for the transformation. + */ + public TransformationSpecific( String name, H virtualizer ) + { + super( name ); + + this.virtualizer = virtualizer; + } + + /** + * Returns the referenced virtualizer of the transformation. + * + * @return referenced virtualizer of the transformation. + */ + public H getVirtualizer() + { + return this.virtualizer; + } +} |