public abstract class ValueSemanticsProviderAndFacetAbstract<T> extends FacetAbstract implements org.apache.isis.applib.adapters.ValueSemanticsProvider<T>, org.apache.isis.applib.adapters.EncoderDecoder<T>, org.apache.isis.applib.adapters.Parser<T>, org.apache.isis.applib.adapters.DefaultsProvider<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
ValueSemanticsProviderAndFacetAbstract.EqualByContent |
static class |
ValueSemanticsProviderAndFacetAbstract.Immutability |
FacetAbstract.Derivation, FacetAbstract.Disabling, FacetAbstract.Hiding, FacetAbstract.Validating| Constructor and Description |
|---|
ValueSemanticsProviderAndFacetAbstract(Class<? extends Facet> adapterFacetType,
FacetHolder holder,
Class<T> adaptedClass,
int typicalLength,
ValueSemanticsProviderAndFacetAbstract.Immutability immutability,
ValueSemanticsProviderAndFacetAbstract.EqualByContent equalByContent,
T defaultValue,
IsisConfiguration configuration,
ValueSemanticsProviderContext context) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
alwaysReplace()
We don't replace any (none no-op) facets.
|
protected ObjectAdapter |
createAdapter(Class<?> type,
Object object) |
protected NumberFormat |
determineNumberFormat(String suffix) |
String |
displayTitleOf(Object object,
org.apache.isis.applib.profiles.Localization localization) |
String |
displayTitleOf(Object object,
String usingMask) |
protected abstract String |
doEncode(Object object)
Hook method to perform the actual encoding.
|
protected T |
doParse(Object context,
String entry) |
protected T |
doParse(Object context,
String entry,
org.apache.isis.applib.profiles.Localization localization) |
protected abstract T |
doRestore(String data)
Hook method to perform the actual restoring.
|
T |
fromEncodedString(String data) |
Class<T> |
getAdaptedClass()
The underlying class that has been adapted.
|
protected AdapterManager |
getAdapterManager()
From
context. |
protected AuthenticationSessionProvider |
getAuthenticationSessionProvider()
From
context. |
protected static org.apache.isis.applib.clock.Clock |
getClock() |
protected IsisConfiguration |
getConfiguration() |
protected ValueSemanticsProviderContext |
getContext() |
org.apache.isis.applib.adapters.DefaultsProvider<T> |
getDefaultsProvider() |
T |
getDefaultValue() |
protected ServicesInjector |
getDependencyInjector()
From
context. |
org.apache.isis.applib.adapters.EncoderDecoder<T> |
getEncoderDecoder() |
org.apache.isis.applib.adapters.Parser<T> |
getParser() |
ObjectSpecification |
getSpecification() |
protected SpecificationLoader |
getSpecificationLookup()
From
context. |
boolean |
isEqualByContent() |
boolean |
isImmutable() |
String |
parseableTitleOf(Object existing)
Defaults to
displayTitleOf(Object, Localization). |
T |
parseTextEntry(Object context,
String entry,
org.apache.isis.applib.profiles.Localization localization) |
protected String |
titleString(Format formatter,
Object object) |
protected abstract String |
titleString(Object object,
org.apache.isis.applib.profiles.Localization localization)
Return a string representation of aforesaid object.
|
abstract String |
titleStringWithMask(Object value,
String usingMask) |
String |
toEncodedString(Object object) |
int |
typicalLength() |
facetType, getFacetHolder, getIdentified, getUnderlyingFacet, isDerived, isNoop, setFacetHolder, setUnderlyingFacet, toString, toStringValuespublic ValueSemanticsProviderAndFacetAbstract(Class<? extends Facet> adapterFacetType, FacetHolder holder, Class<T> adaptedClass, int typicalLength, ValueSemanticsProviderAndFacetAbstract.Immutability immutability, ValueSemanticsProviderAndFacetAbstract.EqualByContent equalByContent, T defaultValue, IsisConfiguration configuration, ValueSemanticsProviderContext context)
public ObjectSpecification getSpecification()
public final Class<T> getAdaptedClass()
Used to determine whether an empty string can be parsed, (for primitive
types a non-null entry is required, see mustHaveEntry()), and
potentially useful for debugging.
public boolean alwaysReplace()
For example, if there is already a PropertyDefaultFacet then we
shouldn't replace it.
alwaysReplace in interface FacetalwaysReplace in class FacetAbstractpublic org.apache.isis.applib.adapters.EncoderDecoder<T> getEncoderDecoder()
getEncoderDecoder in interface org.apache.isis.applib.adapters.ValueSemanticsProvider<T>public org.apache.isis.applib.adapters.Parser<T> getParser()
getParser in interface org.apache.isis.applib.adapters.ValueSemanticsProvider<T>public org.apache.isis.applib.adapters.DefaultsProvider<T> getDefaultsProvider()
getDefaultsProvider in interface org.apache.isis.applib.adapters.ValueSemanticsProvider<T>public boolean isEqualByContent()
isEqualByContent in interface org.apache.isis.applib.adapters.ValueSemanticsProvider<T>public boolean isImmutable()
isImmutable in interface org.apache.isis.applib.adapters.ValueSemanticsProvider<T>public T parseTextEntry(Object context, String entry, org.apache.isis.applib.profiles.Localization localization)
parseTextEntry in interface org.apache.isis.applib.adapters.Parser<T>protected T doParse(Object context, String entry)
context - - the underlying object, or null.entry - - the proposed new object, as a string representation to be
parsedprotected T doParse(Object context, String entry, org.apache.isis.applib.profiles.Localization localization)
public String displayTitleOf(Object object, org.apache.isis.applib.profiles.Localization localization)
displayTitleOf in interface org.apache.isis.applib.adapters.Parser<T>public String displayTitleOf(Object object, String usingMask)
displayTitleOf in interface org.apache.isis.applib.adapters.Parser<T>public String parseableTitleOf(Object existing)
displayTitleOf(Object, Localization).parseableTitleOf in interface org.apache.isis.applib.adapters.Parser<T>protected String titleString(Format formatter, Object object)
protected abstract String titleString(Object object, org.apache.isis.applib.profiles.Localization localization)
public abstract String titleStringWithMask(Object value, String usingMask)
public final int typicalLength()
typicalLength in interface org.apache.isis.applib.adapters.Parser<T>public T getDefaultValue()
getDefaultValue in interface org.apache.isis.applib.adapters.DefaultsProvider<T>public String toEncodedString(Object object)
toEncodedString in interface org.apache.isis.applib.adapters.EncoderDecoder<T>public T fromEncodedString(String data)
fromEncodedString in interface org.apache.isis.applib.adapters.EncoderDecoder<T>protected abstract String doEncode(Object object)
protected NumberFormat determineNumberFormat(String suffix)
protected ObjectAdapter createAdapter(Class<?> type, Object object)
protected IsisConfiguration getConfiguration()
protected ValueSemanticsProviderContext getContext()
protected AdapterManager getAdapterManager()
context.protected SpecificationLoader getSpecificationLookup()
context.protected ServicesInjector getDependencyInjector()
context.protected AuthenticationSessionProvider getAuthenticationSessionProvider()
context.protected static org.apache.isis.applib.clock.Clock getClock()
Copyright © 2010–2014 The Apache Software Foundation. All rights reserved.