org.nakedobjects.metamodel.specloader.internal.instances
Class InstanceCollectionSpecification

java.lang.Object
  extended by org.nakedobjects.metamodel.facets.FacetHolderImpl
      extended by org.nakedobjects.metamodel.runtimecontext.spec.IntrospectableSpecificationAbstract
          extended by org.nakedobjects.metamodel.specloader.internal.instances.InstanceCollectionSpecification
All Implemented Interfaces:
FacetHolder, DefaultProvider, Dirtiable, NakedObjectActionContainer, NakedObjectAssociationContainer, Hierarchical, Identified, IntrospectableSpecification, NakedObjectSpecification, Specification

public class InstanceCollectionSpecification
extends IntrospectableSpecificationAbstract


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.nakedobjects.metamodel.spec.NakedObjectSpecification
NakedObjectSpecification.CreationMode
 
Field Summary
 
Fields inherited from class org.nakedobjects.metamodel.runtimecontext.spec.IntrospectableSpecificationAbstract
fields, fullName, identifier, objectActions, superClassSpecification
 
Constructor Summary
InstanceCollectionSpecification(SpecificationLoader specificationLoader, RuntimeContext runtimeContext)
           
 
Method Summary
 NakedObjectAssociation getAssociation(java.lang.String name)
          Get the field object representing the field with the specified field identifier.
 java.lang.String getDescription()
          Returns the description, if any, of the specification.
 java.lang.String getIconName(NakedObject object)
          Returns the name of an icon to use for the specified object.
 NakedObjectAction getObjectAction(NakedObjectActionType type, java.lang.String id)
          Get the action object represented by the specified identity string.
 NakedObjectAction getObjectAction(NakedObjectActionType type, java.lang.String id, NakedObjectSpecification[] parameters)
          Returns the action of the specified type with the specified signature.
 NakedObjectAction[] getObjectActions(NakedObjectActionType... type)
          Returns an array of actions of the specified type(s).
 java.lang.String getPluralName()
          Returns the plural name for objects of this specification.
 NakedObjectAction[] getServiceActionsFor(NakedObjectActionType type)
          TODO: convert to relatedResourceActions
 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 object)
          Returns the title string for the specified object.
 void introspect(FacetDecoratorSet decorator)
          Discovers what attributes and behaviour the type specified by this specification.
 boolean isCollectionOrIsAggregated()
          Whether objects of this type are a collection or are intrinsically aggregated.
 void markAsService()
           
 
Methods inherited from class org.nakedobjects.metamodel.runtimecontext.spec.IntrospectableSpecificationAbstract
addSubclass, clearDirty, createObject, createTitleInteractionContext, createValidityInteractionContext, getActions, getAssociationList, getAssociationList, getAssociations, getAssociations, getAuthenticationSession, getCollectionList, getDefaultValue, getFacet, getFullName, getIdentifier, getInstance, getObjectActionList, getPropertyList, getRuntimeContext, getServiceActions, hasSubclasses, interfaces, isAbstract, isCollection, isDirty, isEncodeable, isFinal, isImmutable, isIntrospected, isObject, isOfType, isParseable, isService, isValid, isValidResult, isValueOrIsAggregated, markDirty, persistability, setIntrospected, subclasses, superclass, toString
 
Methods inherited from class org.nakedobjects.metamodel.facets.FacetHolderImpl
addFacet, addFacet, containsFacet, getFacets, getFacetTypes, removeFacet, removeFacet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.nakedobjects.metamodel.facets.FacetHolder
addFacet, addFacet, containsFacet, getFacets, getFacetTypes, removeFacet, removeFacet
 

Constructor Detail

InstanceCollectionSpecification

public InstanceCollectionSpecification(SpecificationLoader specificationLoader,
                                       RuntimeContext runtimeContext)
Method Detail

markAsService

public void markAsService()

introspect

public void introspect(FacetDecoratorSet decorator)
Description copied from interface: IntrospectableSpecification
Discovers what attributes and behaviour the type specified by this specification.

As specifications are cyclic (specifically a class will reference its subclasses, which in turn reference their superclass) they need be created first, and then later work out its internals. This allows for cyclic references to the be accommodated as there should always a specification available even though it might not be complete.


getAssociation

public NakedObjectAssociation getAssociation(java.lang.String name)
Description copied from interface: NakedObjectAssociationContainer
Get the field object representing the field with the specified field identifier.


getServiceActionsFor

public NakedObjectAction[] getServiceActionsFor(NakedObjectActionType type)
Description copied from interface: NakedObjectActionContainer
TODO: convert to relatedResourceActions

Specified by:
getServiceActionsFor in interface NakedObjectActionContainer
Overrides:
getServiceActionsFor in class IntrospectableSpecificationAbstract

getObjectActions

public NakedObjectAction[] getObjectActions(NakedObjectActionType... type)
Description copied from interface: NakedObjectActionContainer
Returns an array of actions of the specified type(s).

If the type is null, then returns all user, exploration and debug actions (but not action sets).

Specified by:
getObjectActions in interface NakedObjectActionContainer
Overrides:
getObjectActions in class IntrospectableSpecificationAbstract

getObjectAction

public NakedObjectAction getObjectAction(NakedObjectActionType type,
                                         java.lang.String id,
                                         NakedObjectSpecification[] parameters)
Description copied from interface: NakedObjectActionContainer
Returns the action of the specified type with the specified signature.


getObjectAction

public NakedObjectAction getObjectAction(NakedObjectActionType type,
                                         java.lang.String id)
Description copied from interface: NakedObjectActionContainer
Get the action object represented by the specified identity string.

The identity string should be Identifier.toNameParmsIdentityString().


getSingularName

public java.lang.String getSingularName()
Description copied from interface: NakedObjectSpecification
Returns the singular name for objects of this specification.


getPluralName

public java.lang.String getPluralName()
Description copied from interface: NakedObjectSpecification
Returns the plural name for objects of this specification.


getShortName

public java.lang.String getShortName()
Description copied from interface: NakedObjectSpecification
Returns the class name without the package. Removes the text up to, and including the last period (".").


getTitle

public java.lang.String getTitle(NakedObject object)
Description copied from interface: NakedObjectSpecification
Returns the title string for the specified object.


getIconName

public java.lang.String getIconName(NakedObject object)
Description copied from interface: NakedObjectSpecification
Returns the name of an icon to use for the specified object.

Specified by:
getIconName in interface NakedObjectSpecification
Overrides:
getIconName in class IntrospectableSpecificationAbstract

getDescription

public java.lang.String getDescription()
Description copied from interface: NakedObjectSpecification
Returns the description, if any, of the specification.


isCollectionOrIsAggregated

public boolean isCollectionOrIsAggregated()
Description copied from interface: NakedObjectSpecification
Whether objects of this type are a collection or are intrinsically aggregated.

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

Specified by:
isCollectionOrIsAggregated in interface NakedObjectSpecification
Overrides:
isCollectionOrIsAggregated in class IntrospectableSpecificationAbstract


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