|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.modeshape.jcr.value.basic.AbstractValueFactory<BinaryValue>
org.modeshape.jcr.value.binary.BinaryStoreValueFactory
@Immutable public class BinaryStoreValueFactory
An abstract BinaryFactory implementation that contains many general methods that are likely to be appropriate for many
concrete implementations.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.modeshape.jcr.value.basic.AbstractValueFactory |
|---|
AbstractValueFactory.ConvertingIterator<ValueType> |
| Field Summary |
|---|
| Fields inherited from interface org.modeshape.jcr.value.ValueFactory |
|---|
DEFAULT_DECODER, DEFAULT_ENCODER |
| Constructor Summary | |
|---|---|
BinaryStoreValueFactory(BinaryStore store,
TextDecoder decoder,
ValueFactory<String> stringValueFactory)
Create a factory instance that finds persisted binary values in the supplied store, and that uses the supplied decoder and string value factory to convert string values into binary values. |
|
| Method Summary | |
|---|---|
BinaryValue |
create(BigDecimal value)
Create a value from a decimal. |
BinaryValue |
create(BinaryValue value)
Create a value from the binary content given by the supplied stream. |
BinaryValue |
create(boolean value)
Create a boolean from a string. |
BinaryValue |
create(byte[] value)
Create a value from the binary content given by the supplied array. |
BinaryValue |
create(Calendar value)
Create a value from a Calendar instance. |
BinaryValue |
create(Date value)
Create a value from a date. |
BinaryValue |
create(DateTime value)
Create a value from a date-time instant. |
BinaryValue |
create(double value)
Create a value from a double. |
BinaryValue |
create(float value)
Create a value from a float. |
BinaryValue |
create(InputStream stream)
Create a value from the binary content given by the supplied stream. |
BinaryValue |
create(int value)
Create a value from an integer. |
BinaryValue |
create(long value)
Create a long from a string. |
BinaryValue |
create(Name value)
Create a value from a name. |
BinaryValue |
create(NodeKey value)
Create a value from a NodeKey. |
BinaryValue |
create(Path.Segment value)
Create a value from a path segment. |
BinaryValue |
create(Path value)
Create a value from a path. |
BinaryValue |
create(Reference value)
Create a value from a reference. |
BinaryValue |
create(String value)
Create a value from a string, using no decoding. |
BinaryValue |
create(String value,
TextDecoder decoder)
Create a value from a string, using the supplied decoder. |
BinaryValue |
create(URI value)
Create a value from a URI. |
BinaryValue |
create(UUID value)
Create a value from a UUID. |
protected BinaryValue[] |
createEmptyArray(int length)
|
BinaryValue |
find(BinaryKey secureHash,
long size)
Find an existing binary value given the supplied binary key. |
BinaryStoreValueFactory |
with(BinaryStore store)
Return a new binary value factory that is identical to this store but which uses the supplied store. |
| Methods inherited from class org.modeshape.jcr.value.basic.AbstractValueFactory |
|---|
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, getDecoder, getDecoder, getPropertyType, getStringValueFactory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.modeshape.jcr.value.ValueFactory |
|---|
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, getPropertyType |
| Constructor Detail |
|---|
public BinaryStoreValueFactory(BinaryStore store,
TextDecoder decoder,
ValueFactory<String> stringValueFactory)
store - the binary store; may not be nulldecoder - the text decoder; may be null if the default decoder should be usedstringValueFactory - the string value factory; may not be null| Method Detail |
|---|
public BinaryStoreValueFactory with(BinaryStore store)
store - the binary store; may not be null
protected BinaryValue[] createEmptyArray(int length)
createEmptyArray in class AbstractValueFactory<BinaryValue>public BinaryValue create(String value)
ValueFactory
create in interface ValueFactory<BinaryValue>value - the string from which the value is to be created
ValueFactory.create(String, TextDecoder)
public BinaryValue create(String value,
TextDecoder decoder)
ValueFactory
create in interface ValueFactory<BinaryValue>value - the string from which the value is to be createddecoder - the decoder that should be used; if null, the default decoder is used
ValueFactory.create(String)public BinaryValue create(int value)
ValueFactory
create in interface ValueFactory<BinaryValue>value - the integer from which the value is to be created
public BinaryValue create(long value)
ValueFactory
create in interface ValueFactory<BinaryValue>value - the string from which the long is to be created
public BinaryValue create(boolean value)
ValueFactory
create in interface ValueFactory<BinaryValue>value - the boolean from which the value is to be created
public BinaryValue create(float value)
ValueFactory
create in interface ValueFactory<BinaryValue>value - the float from which the value is to be created
public BinaryValue create(double value)
ValueFactory
create in interface ValueFactory<BinaryValue>value - the double from which the value is to be created
public BinaryValue create(BigDecimal value)
ValueFactory
create in interface ValueFactory<BinaryValue>value - the decimal from which the value is to be created
public BinaryValue create(Calendar value)
ValueFactory
create in interface ValueFactory<BinaryValue>value - the Calendar instance from which the value is to be created
public BinaryValue create(Date value)
ValueFactory
create in interface ValueFactory<BinaryValue>value - the date from which the value is to be created
public BinaryValue create(DateTime value)
throws ValueFormatException
ValueFactory
create in interface ValueFactory<BinaryValue>value - the date-time instant from which the value is to be created
ValueFormatException - if the conversion from a Date could not be performedpublic BinaryValue create(Name value)
ValueFactory
create in interface ValueFactory<BinaryValue>value - the name from which the value is to be created
public BinaryValue create(Path value)
ValueFactory
create in interface ValueFactory<BinaryValue>value - the path from which the value is to be created
public BinaryValue create(Path.Segment value)
ValueFactory
create in interface ValueFactory<BinaryValue>value - the path segment from which the value is to be created
public BinaryValue create(Reference value)
ValueFactory
create in interface ValueFactory<BinaryValue>value - the reference from which the value is to be created
public BinaryValue create(URI value)
ValueFactory
create in interface ValueFactory<BinaryValue>value - the URI from which the value is to be created
public BinaryValue create(UUID value)
ValueFactory
create in interface ValueFactory<BinaryValue>value - the UUID from which the value is to be created
public BinaryValue create(NodeKey value)
throws ValueFormatException
ValueFactoryNodeKey.
create in interface ValueFactory<BinaryValue>value - the node key from which the value is to be created
ValueFormatException - if the conversion from a NodeKey could not be performed
public BinaryValue create(BinaryValue value)
throws ValueFormatException,
IoException
ValueFactory
create in interface ValueFactory<BinaryValue>value - the binary object to be used to create the value
ValueFormatException - if the conversion from the binary object could not be performed
IoException - If an unexpected problem occurs while accessing the supplied binary value (such as an
IOException).
public BinaryValue create(byte[] value)
throws ValueFormatException
ValueFactory
create in interface ValueFactory<BinaryValue>value - the content to be used to create the value
ValueFormatException - if the conversion from a byte array could not be performed
public BinaryValue create(InputStream stream)
throws IoException
ValueFactory
create in interface ValueFactory<BinaryValue>stream - the stream containing the content to be used to create the value
IoException - If an unexpected problem occurs while accessing the supplied stream (such as an IOException).
public BinaryValue find(BinaryKey secureHash,
long size)
throws BinaryStoreException
BinaryFactory
find in interface BinaryFactorysecureHash - the secure hash of the binary content, which was probably obtained from a
previously-held BinaryValue object; a null or empty value is allowed, but will always result in returning nullsize - the size of the binary content
BinaryStoreException - if there is a problem accessing the binary store
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||