Package org.ivoa.dm.executionbroker
Class S3DataResource
java.lang.Object
org.ivoa.dm.executionbroker.AbstractComponent
org.ivoa.dm.executionbroker.LifecycleComponent
org.ivoa.dm.executionbroker.AbstractDataResource
org.ivoa.dm.executionbroker.S3DataResource
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="execbroker:S3DataResource",
role=objectType)
public class S3DataResource
extends AbstractDataResource
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A data resource in a S3 storage system.
objectType: S3DataResource
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for S3DataResource, mainly for use in the functional builder pattern. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe target bucket name.protected StringThe endpoint address of the S3 service.protected StringThe target object name.protected StringThe URL template for the S3 service.Fields inherited from class org.ivoa.dm.executionbroker.LifecycleComponent
phase, scheduleFields inherited from class org.ivoa.dm.executionbroker.AbstractComponent
_id, kind, meta -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new S3DataResourceS3DataResource(String endpoint, String template, String bucket, String object, LifecyclePhase phase, LifecycleSchedule schedule, String kind, ComponentMetadata meta) full parameter constructor.S3DataResource(AbstractDataResource superinstance, String endpoint, String template, String bucket, String object) Constructor from supertype instance.S3DataResource(S3DataResource other) Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncopyMe()make a clone of the object taking into account current polymorhic type.static S3DataResourcecreate a S3DataResource in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidReturns bucket Attribute.Returns endpoint Attribute.Returns object Attribute.Returns template Attribute.voidSet bucket Attribute.voidsetEndpoint(String pEndpoint) Set endpoint Attribute.voidSet object Attribute.voidsetTemplate(String pTemplate) Set template Attribute.voidupdateUsing(S3DataResource other) Update this object with the content of the given object.withBucket(String pBucket) fluent setter for bucket Attribute.withEndpoint(String pEndpoint) fluent setter for endpoint Attribute.withObject(String pObject) fluent setter for object Attribute.withTemplate(String pTemplate) fluent setter for template Attribute.Methods inherited from class org.ivoa.dm.executionbroker.AbstractDataResource
updateUsingMethods inherited from class org.ivoa.dm.executionbroker.LifecycleComponent
getPhase, getSchedule, setPhase, setSchedule, updateUsing, withPhase, withScheduleMethods inherited from class org.ivoa.dm.executionbroker.AbstractComponent
getId, getKind, getMeta, setKind, setMeta, updateUsing, withKind, withMetaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType
getId
-
Field Details
-
endpoint
@VoDml(id="execbroker:S3DataResource.endpoint", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String endpointThe endpoint address of the S3 service. : Attribute endpoint : multiplicity 1 -
template
@VoDml(id="execbroker:S3DataResource.template", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String templateThe URL template for the S3 service. : Attribute template : multiplicity 1 -
bucket
@VoDml(id="execbroker:S3DataResource.bucket", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String bucketThe target bucket name. : Attribute bucket : multiplicity 1 -
object
@VoDml(id="execbroker:S3DataResource.object", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String objectThe target object name. Leaving this blank will mount the whole bucket as a directory. : Attribute object : multiplicity 1
-
-
Constructor Details
-
S3DataResource
public S3DataResource()Creates a new S3DataResource -
S3DataResource
public S3DataResource(String endpoint, String template, String bucket, String object, LifecyclePhase phase, LifecycleSchedule schedule, String kind, ComponentMetadata meta) full parameter constructor.- Parameters:
endpoint- The endpoint address of the S3 service.template- The URL template for the S3 service.bucket- The target bucket name.object- The target object name. Leaving this blank will mount the whole bucket as a directory.phase- The lifecycle phase.schedule- The lifecycle schedule.kind- The component type identifier.meta- The component metadata.
-
S3DataResource
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
S3DataResource
public S3DataResource(AbstractDataResource superinstance, String endpoint, String template, String bucket, String object) Constructor from supertype instance.- Parameters:
superinstance- The supertype.endpoint- The endpoint address of the S3 service.template- The URL template for the S3 service.bucket- The target bucket name.object- The target object name. Leaving this blank will mount the whole bucket as a directory.
-
-
Method Details
-
copyMe
make a clone of the object taking into account current polymorhic type.- Specified by:
copyMein classAbstractDataResource- Returns:
- the cloned object.
-
updateUsing
Update this object with the content of the given object. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
getEndpoint
Returns endpoint Attribute.- Returns:
- endpoint Attribute
-
setEndpoint
Set endpoint Attribute.- Parameters:
pEndpoint- value to set
-
withEndpoint
fluent setter for endpoint Attribute.- Parameters:
pEndpoint- value to set- Returns:
- S3DataResource
-
getTemplate
Returns template Attribute.- Returns:
- template Attribute
-
setTemplate
Set template Attribute.- Parameters:
pTemplate- value to set
-
withTemplate
fluent setter for template Attribute.- Parameters:
pTemplate- value to set- Returns:
- S3DataResource
-
getBucket
Returns bucket Attribute.- Returns:
- bucket Attribute
-
setBucket
Set bucket Attribute.- Parameters:
pBucket- value to set
-
withBucket
fluent setter for bucket Attribute.- Parameters:
pBucket- value to set- Returns:
- S3DataResource
-
getObject
Returns object Attribute.- Returns:
- object Attribute
-
setObject
Set object Attribute.- Parameters:
pObject- value to set
-
withObject
fluent setter for object Attribute.- Parameters:
pObject- value to set- Returns:
- S3DataResource
-
createS3DataResource
create a S3DataResource in functional builder style.- Parameters:
f- the functional builder.- Returns:
- an object initialized from the builder.
-
forceLoad
public void forceLoad()- Specified by:
forceLoadin interfaceorg.ivoa.vodml.jpa.JPAManipulations- Overrides:
forceLoadin classAbstractDataResource
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
-