All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nakedobjects.noa.spec.NakedObjectSpecification Maven / Gradle / Ivy

The newest version!
package org.nakedobjects.noa.spec;

import org.nakedobjects.noa.adapter.NakedObject;
import org.nakedobjects.noa.adapter.NakedReference;
import org.nakedobjects.noa.adapter.Persistable;
import org.nakedobjects.noa.reflect.Consent;


public interface NakedObjectSpecification 
    extends ActionContainer, 
            FieldContainer, 
            ExtensionHolder, 
            HasType, 
            HasLifecycle, 
            HoldsFeatures, 
            Hierarchical, 
            DirtyManager, 
            DefaultProvider {

    /**
     * Get the aggregate that holds/owns this adapted object.
     */
    NakedObject getAggregate(NakedObject object);


    /**
     * Get the extension object of the specified type for the field with the specified name.
     * 
     * 

* TODO: think this should live on NakedObjectMember - or even NakedObjectFeature - instead. */ Object getFieldExtension(String id, Class cls); /** * Get the list of all extension types that are supported by the field with the specified name. * *

* TODO: think this should live on NakedObjectMember - or even NakedObjectFeature - instead. */ Class[] getFieldExtensions(String id); /** * 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). */ String getFullName(); /** * Returns the name of an icon to use for the specified object. */ String getIconName(NakedReference object); /** * Returns the plural name for objects of this specification. */ String getPluralName(); Class getSearchViaRepository(); /** * Returns the class name without the package. Removes the text up to, and including the last period * ("."). */ String getShortName(); /** * Returns the description, if any, of the specification. */ String getDescription(); /** * Returns the singular name for objects of this specification. */ String getSingularName(); /** * Returns the title string for the specified object. */ String getTitle(NakedObject object); /** * Determines whether the specified object can be persisted, that is, it is in a valid state to be save. * *

* This method will throw an exception if the specified object is already persistent. */ Consent isPersistable(NakedObject transientObject); /** * Determines if objects of this specification can be persisted or not. If it can be persisted (i.e. it * return something other than Persistable.TRANSIENT) NakedObject.isPersistent() will indicated whether * the object is persistent or not. If they cannot be persisted then NakedObject.persistable() should be * ignored. * * @see NakedObject#persistable() */ Persistable persistable(); boolean queryByExample(); } // Copyright (c) Naked Objects Group Ltd.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy