Class CreateNonRdfSourceOperationBuilderImpl
- java.lang.Object
-
- org.fcrepo.kernel.impl.operations.AbstractNonRdfSourceOperationBuilder
-
- org.fcrepo.kernel.impl.operations.CreateNonRdfSourceOperationBuilderImpl
-
- All Implemented Interfaces:
CreateNonRdfSourceOperationBuilder
,NonRdfSourceOperationBuilder
,ResourceOperationBuilder
public class CreateNonRdfSourceOperationBuilderImpl extends AbstractNonRdfSourceOperationBuilder implements CreateNonRdfSourceOperationBuilder
Builder for operations to create new non-rdf sources- Author:
- bbpennel
-
-
Field Summary
-
Fields inherited from class org.fcrepo.kernel.impl.operations.AbstractNonRdfSourceOperationBuilder
content, contentSize, digests, externalType, externalURI, filename, mimeType, resourceId, transaction, userPrincipal
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CreateNonRdfSourceOperationBuilderImpl(Transaction transaction, FedoraId rescId, InputStream stream)
Constructor for internal binary.protected
CreateNonRdfSourceOperationBuilderImpl(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 CreateNonRdfSourceOperation
build()
Build the ResourceOperation constructed by this builderCreateNonRdfSourceOperationBuilder
contentDigests(Collection<URI> digests)
Collection of digests for content in this resourceCreateNonRdfSourceOperationBuilder
contentSize(long size)
Set the number of bytes for the contentCreateNonRdfSourceOperationBuilder
filename(String filename)
Set the filenameCreateNonRdfSourceOperationBuilder
mimeType(String mimeType)
Set the mimetype for content in this resourceCreateNonRdfSourceOperationBuilder
parentId(FedoraId parentId)
Set the parent identifier of the resourceCreateNonRdfSourceOperationBuilder
userPrincipal(String userPrincipal)
Set the principal for the user performing the operation
-
-
-
Constructor Detail
-
CreateNonRdfSourceOperationBuilderImpl
protected CreateNonRdfSourceOperationBuilderImpl(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.
-
CreateNonRdfSourceOperationBuilderImpl
protected CreateNonRdfSourceOperationBuilderImpl(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 CreateNonRdfSourceOperationBuilder mimeType(String mimeType)
Description copied from interface:NonRdfSourceOperationBuilder
Set the mimetype for content in this resource- Specified by:
mimeType
in interfaceCreateNonRdfSourceOperationBuilder
- Specified by:
mimeType
in interfaceNonRdfSourceOperationBuilder
- Overrides:
mimeType
in classAbstractNonRdfSourceOperationBuilder
- Parameters:
mimeType
- the mime-type.- Returns:
- the builder.
-
filename
public CreateNonRdfSourceOperationBuilder filename(String filename)
Description copied from interface:NonRdfSourceOperationBuilder
Set the filename- Specified by:
filename
in interfaceCreateNonRdfSourceOperationBuilder
- Specified by:
filename
in interfaceNonRdfSourceOperationBuilder
- Overrides:
filename
in classAbstractNonRdfSourceOperationBuilder
- Parameters:
filename
- name of the file.- Returns:
- the builder.
-
contentDigests
public CreateNonRdfSourceOperationBuilder contentDigests(Collection<URI> digests)
Description copied from interface:NonRdfSourceOperationBuilder
Collection of digests for content in this resource- Specified by:
contentDigests
in interfaceCreateNonRdfSourceOperationBuilder
- Specified by:
contentDigests
in interfaceNonRdfSourceOperationBuilder
- Overrides:
contentDigests
in classAbstractNonRdfSourceOperationBuilder
- Parameters:
digests
- collection of digests- Returns:
- the builder.
-
contentSize
public CreateNonRdfSourceOperationBuilder contentSize(long size)
Description copied from interface:NonRdfSourceOperationBuilder
Set the number of bytes for the content- Specified by:
contentSize
in interfaceCreateNonRdfSourceOperationBuilder
- Specified by:
contentSize
in interfaceNonRdfSourceOperationBuilder
- Overrides:
contentSize
in classAbstractNonRdfSourceOperationBuilder
- Parameters:
size
- size of the content in bytes- Returns:
- the builder
-
userPrincipal
public CreateNonRdfSourceOperationBuilder userPrincipal(String userPrincipal)
Description copied from interface:ResourceOperationBuilder
Set the principal for the user performing the operation- Specified by:
userPrincipal
in interfaceCreateNonRdfSourceOperationBuilder
- Specified by:
userPrincipal
in interfaceNonRdfSourceOperationBuilder
- Specified by:
userPrincipal
in interfaceResourceOperationBuilder
- Overrides:
userPrincipal
in classAbstractNonRdfSourceOperationBuilder
- Parameters:
userPrincipal
- user principal- Returns:
- this builder
-
parentId
public CreateNonRdfSourceOperationBuilder parentId(FedoraId parentId)
Description copied from interface:CreateNonRdfSourceOperationBuilder
Set the parent identifier of the resource- Specified by:
parentId
in interfaceCreateNonRdfSourceOperationBuilder
- Parameters:
parentId
- parent internal identifier- Returns:
- the builder
-
build
public CreateNonRdfSourceOperation build()
Description copied from interface:ResourceOperationBuilder
Build the ResourceOperation constructed by this builder- Specified by:
build
in interfaceNonRdfSourceOperationBuilder
- Specified by:
build
in interfaceResourceOperationBuilder
- Returns:
- the constructed operation
-
-