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 protectedCreateNonRdfSourceOperationBuilderImpl(Transaction transaction, FedoraId rescId, InputStream stream)Constructor for internal binary.protectedCreateNonRdfSourceOperationBuilderImpl(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 CreateNonRdfSourceOperationbuild()Build the ResourceOperation constructed by this builderCreateNonRdfSourceOperationBuildercontentDigests(Collection<URI> digests)Collection of digests for content in this resourceCreateNonRdfSourceOperationBuildercontentSize(long size)Set the number of bytes for the contentCreateNonRdfSourceOperationBuilderfilename(String filename)Set the filenameCreateNonRdfSourceOperationBuildermimeType(String mimeType)Set the mimetype for content in this resourceCreateNonRdfSourceOperationBuilderparentId(FedoraId parentId)Set the parent identifier of the resourceCreateNonRdfSourceOperationBuilderuserPrincipal(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:NonRdfSourceOperationBuilderSet the mimetype for content in this resource- Specified by:
mimeTypein interfaceCreateNonRdfSourceOperationBuilder- Specified by:
mimeTypein interfaceNonRdfSourceOperationBuilder- Overrides:
mimeTypein classAbstractNonRdfSourceOperationBuilder- Parameters:
mimeType- the mime-type.- Returns:
- the builder.
-
filename
public CreateNonRdfSourceOperationBuilder filename(String filename)
Description copied from interface:NonRdfSourceOperationBuilderSet the filename- Specified by:
filenamein interfaceCreateNonRdfSourceOperationBuilder- Specified by:
filenamein interfaceNonRdfSourceOperationBuilder- Overrides:
filenamein classAbstractNonRdfSourceOperationBuilder- Parameters:
filename- name of the file.- Returns:
- the builder.
-
contentDigests
public CreateNonRdfSourceOperationBuilder contentDigests(Collection<URI> digests)
Description copied from interface:NonRdfSourceOperationBuilderCollection of digests for content in this resource- Specified by:
contentDigestsin interfaceCreateNonRdfSourceOperationBuilder- Specified by:
contentDigestsin interfaceNonRdfSourceOperationBuilder- Overrides:
contentDigestsin classAbstractNonRdfSourceOperationBuilder- Parameters:
digests- collection of digests- Returns:
- the builder.
-
contentSize
public CreateNonRdfSourceOperationBuilder contentSize(long size)
Description copied from interface:NonRdfSourceOperationBuilderSet the number of bytes for the content- Specified by:
contentSizein interfaceCreateNonRdfSourceOperationBuilder- Specified by:
contentSizein interfaceNonRdfSourceOperationBuilder- Overrides:
contentSizein classAbstractNonRdfSourceOperationBuilder- Parameters:
size- size of the content in bytes- Returns:
- the builder
-
userPrincipal
public CreateNonRdfSourceOperationBuilder userPrincipal(String userPrincipal)
Description copied from interface:ResourceOperationBuilderSet the principal for the user performing the operation- Specified by:
userPrincipalin interfaceCreateNonRdfSourceOperationBuilder- Specified by:
userPrincipalin interfaceNonRdfSourceOperationBuilder- Specified by:
userPrincipalin interfaceResourceOperationBuilder- Overrides:
userPrincipalin classAbstractNonRdfSourceOperationBuilder- Parameters:
userPrincipal- user principal- Returns:
- this builder
-
parentId
public CreateNonRdfSourceOperationBuilder parentId(FedoraId parentId)
Description copied from interface:CreateNonRdfSourceOperationBuilderSet the parent identifier of the resource- Specified by:
parentIdin interfaceCreateNonRdfSourceOperationBuilder- Parameters:
parentId- parent internal identifier- Returns:
- the builder
-
build
public CreateNonRdfSourceOperation build()
Description copied from interface:ResourceOperationBuilderBuild the ResourceOperation constructed by this builder- Specified by:
buildin interfaceNonRdfSourceOperationBuilder- Specified by:
buildin interfaceResourceOperationBuilder- Returns:
- the constructed operation
-
-