public abstract class ImageValueSemanticsProviderAbstract<T> extends ValueSemanticsProviderAndFacetAbstract<T> implements ImageValueFacet
ValueSemanticsProviderAndFacetAbstract.EqualByContent, ValueSemanticsProviderAndFacetAbstract.ImmutabilityFacetAbstract.Derivation, FacetAbstract.Disabling, FacetAbstract.Hiding, FacetAbstract.Validating| Modifier and Type | Field and Description |
|---|---|
protected static byte[] |
REVERSE_BASE_64_CHARS |
| Constructor and Description |
|---|
ImageValueSemanticsProviderAbstract(FacetHolder holder,
Class<T> adaptedClass,
IsisConfiguration configuration,
ValueSemanticsProviderContext context) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
alwaysReplace()
We don't replace any (none no-op) facets.
|
protected Image |
createImage(int[][] pixels) |
protected String |
doEncode(Object object)
Hook method to perform the actual encoding.
|
protected T |
doParse(Object original,
String entry) |
T |
doRestore(String data)
Hook method to perform the actual restoring.
|
byte[] |
getAsByteArray(ObjectAdapter object) |
FacetHolder |
getFacetHolder()
The
holder of this facet. |
String |
getIconName() |
org.apache.isis.applib.adapters.Parser<T> |
getParser()
Returns null to indicate that this value does not parse entry strings
|
protected abstract int[][] |
getPixels(Object object) |
Facet |
getUnderlyingFacet()
|
protected int[][] |
grabPixels(Image image) |
boolean |
isDerived()
Whether this facet implementation is derived (as opposed to explicit);
used to determine precedence.
|
T |
restoreFromByteArray(byte[] byteArray) |
void |
setFacetHolder(FacetHolder facetHolder)
Allows reparenting of Facet.
|
void |
setMask(String mask) |
protected abstract T |
setPixels(int[][] pixels) |
void |
setUnderlyingFacet(Facet underlyingFacet)
Not required because
alwaysReplace() is false. |
String |
titleString(Object value,
org.apache.isis.applib.profiles.Localization localization)
Return a string representation of aforesaid object.
|
String |
titleStringWithMask(Object value,
String usingMask) |
String |
toString() |
createAdapter, determineNumberFormat, displayTitleOf, displayTitleOf, doParse, fromEncodedString, getAdaptedClass, getAdapterManager, getAuthenticationSessionProvider, getClock, getConfiguration, getContext, getDefaultsProvider, getDefaultValue, getDependencyInjector, getEncoderDecoder, getSpecification, getSpecificationLookup, isEqualByContent, isImmutable, parseableTitleOf, parseTextEntry, titleString, toEncodedString, typicalLengthfacetType, getIdentified, isNoop, toStringValuesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateValue, getHeight, getImage, getWidthprotected static final byte[] REVERSE_BASE_64_CHARS
public ImageValueSemanticsProviderAbstract(FacetHolder holder, Class<T> adaptedClass, IsisConfiguration configuration, ValueSemanticsProviderContext context)
public org.apache.isis.applib.adapters.Parser<T> getParser()
getParser in interface org.apache.isis.applib.adapters.ValueSemanticsProvider<T>getParser in class ValueSemanticsProviderAndFacetAbstract<T>protected T doParse(Object original, String entry)
doParse in class ValueSemanticsProviderAndFacetAbstract<T>original - - the underlying object, or null.entry - - the proposed new object, as a string representation to be
parsedpublic byte[] getAsByteArray(ObjectAdapter object)
public boolean alwaysReplace()
ValueSemanticsProviderAndFacetAbstract
For example, if there is already a PropertyDefaultFacet then we
shouldn't replace it.
alwaysReplace in interface FacetalwaysReplace in class ValueSemanticsProviderAndFacetAbstract<T>public Facet getUnderlyingFacet()
FacetgetUnderlyingFacet in interface FacetgetUnderlyingFacet in class FacetAbstractpublic void setUnderlyingFacet(Facet underlyingFacet)
alwaysReplace() is false.setUnderlyingFacet in interface FacetsetUnderlyingFacet in class FacetAbstractpublic boolean isDerived()
FacetFor example, we might derive the typical length of a property based on its type; but if the typical length has been explicitly specified using an annotation then that should take precedence.
isDerived in interface FacetisDerived in class FacetAbstractpublic T restoreFromByteArray(byte[] byteArray)
protected String doEncode(Object object)
ValueSemanticsProviderAndFacetAbstractdoEncode in class ValueSemanticsProviderAndFacetAbstract<T>protected Image createImage(int[][] pixels)
public String getIconName()
protected int[][] grabPixels(Image image)
public T doRestore(String data)
ValueSemanticsProviderAndFacetAbstractdoRestore in class ValueSemanticsProviderAndFacetAbstract<T>public String titleString(Object value, org.apache.isis.applib.profiles.Localization localization)
ValueSemanticsProviderAndFacetAbstracttitleString in class ValueSemanticsProviderAndFacetAbstract<T>public String titleStringWithMask(Object value, String usingMask)
titleStringWithMask in class ValueSemanticsProviderAndFacetAbstract<T>public FacetHolder getFacetHolder()
Facetholder of this facet.getFacetHolder in interface FacetgetFacetHolder in class FacetAbstractpublic void setFacetHolder(FacetHolder facetHolder)
FacetUsed by Facet decorators.
setFacetHolder in interface FacetsetFacetHolder in class FacetAbstractpublic String toString()
toString in class FacetAbstractCopyright © 2010–2014 The Apache Software Foundation. All rights reserved.