Class FileResource.FileResourceBuilder
java.lang.Object
se.idsec.signservice.integration.core.FileResource.FileResourceBuilder
- All Implemented Interfaces:
ObjectBuilder<FileResource>
- Enclosing class:
- FileResource
public static class FileResource.FileResourceBuilder
extends Object
implements ObjectBuilder<FileResource>
Builder class for
FileResource
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the object.The base64 encoded contents of the file resource.description
(String description) Optional descriptive string for the file resource.eagerlyLoadContents
(boolean eagerlyLoadContents) If theDefaultFileResource
object is initialized by a resource string the object can function in two modes; it either loads the contents directly when the object is created usingFileResource.afterPropertiesSet()
(eagerlyLoadContents = true
), or it loads the contents every time it is asked for (eagerlyLoadContents = false
).The resource string for the file/resource.toString()
-
Method Details
-
contents
The base64 encoded contents of the file resource.- Returns:
this
.
-
description
Optional descriptive string for the file resource.- Returns:
this
.
-
resource
The resource string for the file/resource.- Returns:
this
.
-
eagerlyLoadContents
If theDefaultFileResource
object is initialized by a resource string the object can function in two modes; it either loads the contents directly when the object is created usingFileResource.afterPropertiesSet()
(eagerlyLoadContents = true
), or it loads the contents every time it is asked for (eagerlyLoadContents = false
). The latter is the default and should be used if large documents that are assigned to several configuration objects are handled. This will prevent a heavy memory usage at the cost of speed in fetching the document contents.- Returns:
this
.
-
build
Description copied from interface:ObjectBuilder
Builds the object.- Specified by:
build
in interfaceObjectBuilder<FileResource>
- Returns:
- the object
-
toString
-