Class ServiceDeployment

java.lang.Object
eu.cloudnetservice.driver.service.ServiceDeployment
All Implemented Interfaces:
DefaultedDocPropertyHolder, DocPropertyHolder, Cloneable

public class ServiceDeployment extends Object implements DefaultedDocPropertyHolder, Cloneable
A deployment for a service. A deployment can be added to any service and will copy the data from the currently running service into the given template, allowing for example cross copy of templates as there is no need for a service to be based on the given template to get copied to it.
Since:
4.0
  • Field Details

  • Constructor Details

  • Method Details

    • builder

      @NonNull public static @NonNull ServiceDeployment.Builder builder()
      Creates a new builder for a service deployment.
      Returns:
      a new service deployment builder.
    • builder

      Creates a new builder for a service deployment which has the same properties pre-set as the given deployment instance. Changes made to the given deployment will not reflect into the builder and vice-versa.

      When calling build directly after creating the builder with this method it will return a service deployment instance which is equal to the given one but not identical.

      Parameters:
      deployment - the deployment to copy the properties of.
      Returns:
      a new service builder.
      Throws:
      NullPointerException - if the given deployment is null.
    • template

      @NonNull public @NonNull ServiceTemplate template()
      Get the template to which this deployment (and therefore the service files) should get copied.
      Returns:
      the target template of this deployment.
    • excludes

      @NonNull public @NonNull Collection<Pattern> excludes()
      Get a collection of file names (in a regular expression format) which should get excluded from a deployment. Directories must be suffixed with a /.
      Returns:
      the regular expressions of file names which should get excluded from a deployment.
    • includes

      @NonNull public @NonNull Collection<Pattern> includes()
      Get a collection of file names (in a regular expression format) which should be included in a deployment. Directories must be suffixed with a /.
      Returns:
      the regular expressions of file names which should be included in a deployment.
    • clone

      Overrides:
      clone in class Object
    • propertyHolder

      @NonNull public @NonNull Document propertyHolder()
      Get the underlying document that all read and write operations are delegated to.
      Specified by:
      propertyHolder in interface DocPropertyHolder
      Returns:
      the underlying document.