org.nakedobjects.metamodel.facets.object.parseable
Interface ParseableFacet

All Superinterfaces:
Facet, MultipleValueFacet
All Known Implementing Classes:
ParseableFacetAbstract, ParseableFacetAnnotation, ParseableFacetFromConfiguration, ParseableFacetUsingParser

public interface ParseableFacet
extends MultipleValueFacet

Indicates that this class can parse an entry string.


Method Summary
 java.lang.String parseableTitle(NakedObject obj)
          A title for the object that is valid but which may be easier to edit than the title provided by a TitleFacet.
 NakedObject parseTextEntry(NakedObject original, java.lang.String text)
          Parses a text entry made by a user and sets the domain object's value.
 
Methods inherited from interface org.nakedobjects.metamodel.facets.Facet
alwaysReplace, facetType, getFacetHolder, getUnderlyingFacet, isDerived, isNoop, setFacetHolder, setUnderlyingFacet
 

Method Detail

parseTextEntry

NakedObject parseTextEntry(NakedObject original,
                           java.lang.String text)
Parses a text entry made by a user and sets the domain object's value.

Equivalent to Parser#parseTextEntry(Object, String), though may be implemented through some other mechanism.

Throws:
InvalidEntryException
TextEntryParseException

parseableTitle

java.lang.String parseableTitle(NakedObject obj)
A title for the object that is valid but which may be easier to edit than the title provided by a TitleFacet.

The idea here is that the viewer can display a parseable title for an existing object when, for example, the user initially clicks in the field. So, a date might be rendered via a TitleFacet as May 2, 2007, but its parseable form might be 20070502.



Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.