Class CreateRequest
Parameters for creating a resource via the ResourceFactory
-
Constructor Summary
ConstructorsConstructorDescriptionCreateRequest(URI container, String name, String contentType) CreateRequest(URI container, String name, String contentType, boolean replace) Creates a newCreateRequestinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanLocation for where the data will be stored, like a directory or an object storage container.Content type of the data to be stored in mime-type form, e.g.getName()A name for this resource within the container.inthashCode()booleanIf set to true and an existing resource exists in the container with the same name, then it will be replaced.toString()
-
Constructor Details
-
CreateRequest
-
CreateRequest
Creates a new
CreateRequestinstance.- Parameters:
container- 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 fromCreateHandle.store(nz.org.riskscape.engine.resource.CreateHandle.Callback)name- 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 ofCreateHandle.store(nz.org.riskscape.engine.resource.CreateHandle.Callback)for that.contentType- 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.replace- 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.
-
-
Method Details
-
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
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
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
-
canEqual
-
hashCode
public int hashCode() -
toString
-