Class AbstractNonRdfSourceOperationBuilder
- java.lang.Object
-
- org.fcrepo.kernel.impl.operations.AbstractNonRdfSourceOperationBuilder
-
- All Implemented Interfaces:
NonRdfSourceOperationBuilder
,ResourceOperationBuilder
- Direct Known Subclasses:
CreateNonRdfSourceOperationBuilderImpl
,UpdateNonRdfSourceOperationBuilder
public abstract class AbstractNonRdfSourceOperationBuilder extends Object implements NonRdfSourceOperationBuilder
An abstract operation for interacting with a non-rdf source- Author:
- bbpennel
-
-
Field Summary
Fields Modifier and Type Field Description protected InputStream
content
protected long
contentSize
protected Collection<URI>
digests
protected String
externalType
protected URI
externalURI
protected String
filename
protected String
mimeType
protected FedoraId
resourceId
protected Transaction
transaction
protected String
userPrincipal
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractNonRdfSourceOperationBuilder(Transaction transaction, FedoraId rescId, InputStream stream)
Constructor for internal binary.protected
AbstractNonRdfSourceOperationBuilder(Transaction transaction, FedoraId rescId, String handling, URI externalUri)
Constructor for external binary.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NonRdfSourceOperationBuilder
contentDigests(Collection<URI> digests)
Collection of digests for content in this resourceNonRdfSourceOperationBuilder
contentSize(long size)
Set the number of bytes for the contentNonRdfSourceOperationBuilder
filename(String filename)
Set the filenameNonRdfSourceOperationBuilder
mimeType(String mimetype)
Set the mimetype for content in this resourceNonRdfSourceOperationBuilder
userPrincipal(String userPrincipal)
Set the principal for the user performing the operation-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.fcrepo.kernel.api.operations.NonRdfSourceOperationBuilder
build
-
-
-
-
Field Detail
-
resourceId
protected FedoraId resourceId
-
content
protected InputStream content
-
externalURI
protected URI externalURI
-
externalType
protected String externalType
-
digests
protected Collection<URI> digests
-
contentSize
protected long contentSize
-
userPrincipal
protected String userPrincipal
-
transaction
protected Transaction transaction
-
-
Constructor Detail
-
AbstractNonRdfSourceOperationBuilder
protected AbstractNonRdfSourceOperationBuilder(Transaction transaction, FedoraId rescId, String handling, URI externalUri)
Constructor for external binary.- Parameters:
transaction
- the transactionrescId
- the internal identifierhandling
- the external content handling type.externalUri
- the external content URI.
-
AbstractNonRdfSourceOperationBuilder
protected AbstractNonRdfSourceOperationBuilder(Transaction transaction, FedoraId rescId, InputStream stream)
Constructor for internal binary.- Parameters:
transaction
- the transactionrescId
- the internal identifier.stream
- the content stream.
-
-
Method Detail
-
mimeType
public NonRdfSourceOperationBuilder mimeType(String mimetype)
Description copied from interface:NonRdfSourceOperationBuilder
Set the mimetype for content in this resource- Specified by:
mimeType
in interfaceNonRdfSourceOperationBuilder
- Parameters:
mimetype
- the mime-type.- Returns:
- the builder.
-
filename
public NonRdfSourceOperationBuilder filename(String filename)
Description copied from interface:NonRdfSourceOperationBuilder
Set the filename- Specified by:
filename
in interfaceNonRdfSourceOperationBuilder
- Parameters:
filename
- name of the file.- Returns:
- the builder.
-
contentDigests
public NonRdfSourceOperationBuilder contentDigests(Collection<URI> digests)
Description copied from interface:NonRdfSourceOperationBuilder
Collection of digests for content in this resource- Specified by:
contentDigests
in interfaceNonRdfSourceOperationBuilder
- Parameters:
digests
- collection of digests- Returns:
- the builder.
-
contentSize
public NonRdfSourceOperationBuilder contentSize(long size)
Description copied from interface:NonRdfSourceOperationBuilder
Set the number of bytes for the content- Specified by:
contentSize
in interfaceNonRdfSourceOperationBuilder
- Parameters:
size
- size of the content in bytes- Returns:
- the builder
-
userPrincipal
public NonRdfSourceOperationBuilder userPrincipal(String userPrincipal)
Description copied from interface:ResourceOperationBuilder
Set the principal for the user performing the operation- Specified by:
userPrincipal
in interfaceNonRdfSourceOperationBuilder
- Specified by:
userPrincipal
in interfaceResourceOperationBuilder
- Parameters:
userPrincipal
- user principal- Returns:
- this builder
-
-