org.nakedobjects.metamodel.spec
Interface NakedObjectSpecification

All Superinterfaces:
DefaultProvider, Dirtiable, FacetHolder, Hierarchical, Identified, NakedObjectActionContainer, NakedObjectAssociationContainer, Specification
All Known Implementing Classes:
InstanceCollectionSpecification, IntrospectableSpecificationAbstract, JavaSpecification, NakedObjectSpecificationNoMember

public interface NakedObjectSpecification
extends Specification, NakedObjectActionContainer, NakedObjectAssociationContainer, Hierarchical, Dirtiable, DefaultProvider


Nested Class Summary
static class NakedObjectSpecification.CreationMode
          Used by createObject(CreationMode)
 
Method Summary
 java.lang.Object createObject(NakedObjectSpecification.CreationMode creationMode)
          Create and optionally initialize object.
 ObjectTitleContext createTitleInteractionContext(AuthenticationSession session, InteractionInvocationMethod invocationMethod, NakedObject targetNakedObject)
          Create an InteractionContext representing an attempt to read the object's title.
 ObjectValidityContext createValidityInteractionContext(AuthenticationSession session, InteractionInvocationMethod invocationMethod, NakedObject targetNakedObject)
          Create an InteractionContext representing an attempt to save the object.
 java.lang.String getDescription()
          Returns the description, if any, of the specification.
 java.lang.String getFullName()
          Returns the name of this specification.
 java.lang.String getIconName(NakedObject object)
          Returns the name of an icon to use for the specified object.
 java.lang.String getPluralName()
          Returns the plural name for objects of this specification.
 java.lang.String getShortName()
          Returns the class name without the package.
 java.lang.String getSingularName()
          Returns the singular name for objects of this specification.
 java.lang.String getTitle(NakedObject adapter)
          Returns the title string for the specified object.
 boolean isAbstract()
           
 boolean isCollection()
          Determines if objects represents a collection.
 boolean isCollectionOrIsAggregated()
          Whether objects of this type are a collection or are intrinsically aggregated.
 boolean isEncodeable()
          Determines if objects of this type can be converted to a data-stream.
 boolean isImmutable()
          Whether has the ImmutableFacet.
 boolean isObject()
          Determines if the object represents an object (value or otherwise).
 boolean isParseable()
          Determines if objects of this type can be set up from a text entry string.
 boolean isService()
           
 Consent isValid(NakedObject adapter)
          Determines whether the specified object is in a valid state (for example, so can be persisted); represented as a Consent.
 InteractionResult isValidResult(NakedObject adapter)
          Determines whether the specified object is in a valid state (for example, so can be persisted); represented as a InteractionResult.
 boolean isValueOrIsAggregated()
          Determines if objects of this type are aggregated.
 Persistability persistability()
          Determines if objects of this specification can be persisted or not.
 
Methods inherited from interface org.nakedobjects.metamodel.spec.Specification
getInstance
 
Methods inherited from interface org.nakedobjects.metamodel.spec.identifier.Identified
getIdentifier
 
Methods inherited from interface org.nakedobjects.metamodel.facets.FacetHolder
addFacet, addFacet, containsFacet, getFacet, getFacets, getFacetTypes, removeFacet, removeFacet
 
Methods inherited from interface org.nakedobjects.metamodel.spec.feature.NakedObjectActionContainer
getObjectAction, getObjectAction, getObjectActionList, getObjectActions, getServiceActionsFor
 
Methods inherited from interface org.nakedobjects.metamodel.spec.feature.NakedObjectAssociationContainer
getAssociation, getAssociationList, getAssociationList, getAssociations, getAssociations, getCollectionList, getPropertyList
 
Methods inherited from interface org.nakedobjects.metamodel.spec.Hierarchical
addSubclass, hasSubclasses, interfaces, isOfType, subclasses, superclass
 
Methods inherited from interface org.nakedobjects.metamodel.spec.Dirtiable
clearDirty, isDirty, markDirty
 
Methods inherited from interface org.nakedobjects.metamodel.spec.DefaultProvider
getDefaultValue
 

Method Detail

getFullName

java.lang.String getFullName()
Returns the name of this specification. This will be the fully qualified name of the Class object that this object represents (i.e. it includes the package name).


getIconName

java.lang.String getIconName(NakedObject object)
Returns the name of an icon to use for the specified object.


getPluralName

java.lang.String getPluralName()
Returns the plural name for objects of this specification.


getShortName

java.lang.String getShortName()
Returns the class name without the package. Removes the text up to, and including the last period (".").


getDescription

java.lang.String getDescription()
Returns the description, if any, of the specification.


getSingularName

java.lang.String getSingularName()
Returns the singular name for objects of this specification.


getTitle

java.lang.String getTitle(NakedObject adapter)
Returns the title string for the specified object.


isAbstract

boolean isAbstract()

createTitleInteractionContext

ObjectTitleContext createTitleInteractionContext(AuthenticationSession session,
                                                 InteractionInvocationMethod invocationMethod,
                                                 NakedObject targetNakedObject)
Create an InteractionContext representing an attempt to read the object's title.


createValidityInteractionContext

ObjectValidityContext createValidityInteractionContext(AuthenticationSession session,
                                                       InteractionInvocationMethod invocationMethod,
                                                       NakedObject targetNakedObject)
Create an InteractionContext representing an attempt to save the object.


isValid

Consent isValid(NakedObject adapter)
Determines whether the specified object is in a valid state (for example, so can be persisted); represented as a Consent.


isValidResult

InteractionResult isValidResult(NakedObject adapter)
Determines whether the specified object is in a valid state (for example, so can be persisted); represented as a InteractionResult.


persistability

Persistability persistability()
Determines if objects of this specification can be persisted or not. If it can be persisted (i.e. it return something other than Persistability.TRANSIENT NakedObject.isPersistent() will indicated whether the object is persistent or not. If they cannot be persisted then NakedObject. persistability() should be ignored.


isObject

boolean isObject()
Determines if the object represents an object (value or otherwise).

In effect, means that it doesn't have the CollectionFacet, and therefore will return NOT isCollection()

See Also:
isCollection().

isCollection

boolean isCollection()
Determines if objects represents a collection.

In effect, means has got CollectionFacet, and therefore will return NOT isObject().

See Also:
isObject()

isCollectionOrIsAggregated

boolean isCollectionOrIsAggregated()
Whether objects of this type are a collection or are intrinsically aggregated.

In effect, means has got a CollectionFacet and/or got the AggregatedFacet.


isValueOrIsAggregated

boolean isValueOrIsAggregated()
Determines if objects of this type are aggregated.

In effect, means has got AggregatedFacet or ValueFacet.


isParseable

boolean isParseable()
Determines if objects of this type can be set up from a text entry string.

In effect, means has got a ParseableFacet.


isEncodeable

boolean isEncodeable()
Determines if objects of this type can be converted to a data-stream.

In effect, means has got EncodableFacet.


isImmutable

boolean isImmutable()
Whether has the ImmutableFacet.


createObject

java.lang.Object createObject(NakedObjectSpecification.CreationMode creationMode)
Create and optionally initialize object.


isService

boolean isService()


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