Class CreateRequest

java.lang.Object
nz.org.riskscape.engine.resource.CreateRequest

public class CreateRequest extends Object

Parameters for creating a resource via the ResourceFactory

  • Constructor Details

    • CreateRequest

      public CreateRequest(URI container, String name, String contentType)
    • CreateRequest

      public CreateRequest(URI container, String name, String contentType, boolean replace)
  • Method Details

    • getContainer

      public URI getContainer()

      Location for where the data will be stored, like a directory or an object storage container. Does not map to the URI where the data will be eventually accessed - this is returned from CreateHandle.store(nz.org.riskscape.engine.resource.CreateHandle.Callback)

    • getName

      public String getName()

      A name for this resource within the container. You will not be guaranteed to be able to use this name to look the resource up - use the result of CreateHandle.store(nz.org.riskscape.engine.resource.CreateHandle.Callback) for that.

    • getContentType

      public String getContentType()

      Content type of the data to be stored in mime-type form, e.g. text/plain, application/json. May or may not be used, depending on the backend.

    • isReplace

      public boolean isReplace()

      If set to true and an existing resource exists in the container with the same name, then it will be replaced. May be ignored in some backends.

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object