|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mmm.content.base.AbstractContentObject
net.sf.mmm.content.model.base.AbstractContentReflectionObject
net.sf.mmm.content.model.base.AbstractContentClass
public abstract class AbstractContentClass
This is the abstract base implementation of the ContentClass
interface.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.sf.mmm.content.base.AbstractContentObject |
|---|
AbstractContentObject.AbstractContentObjectModifier |
| Field Summary |
|---|
| Fields inherited from interface net.sf.mmm.content.model.api.ContentClass |
|---|
CLASS_ID, CLASS_NAME, FIELD_NAME_DECLARED_FIELDS, FIELD_NAME_FIELDS, FIELD_NAME_SUB_CLASSES, FIELD_NAME_SUPER_CLASS, XML_TAG_CLASS, XML_TAG_CONTENT_MODEL |
| Fields inherited from interface net.sf.mmm.content.model.api.ContentReflectionObject |
|---|
FIELD_NAME_MODIFIERS |
| Fields inherited from interface net.sf.mmm.content.api.ContentObject |
|---|
ENV_VARIABLE_THIS, FIELD_NAME_DELETED, FIELD_NAME_ID, FIELD_NAME_NAME, PATH_SEPARATOR |
| Fields inherited from interface net.sf.mmm.content.value.api.MutableMetaData |
|---|
VALUE_NAME |
| Constructor Summary | |
|---|---|
AbstractContentClass()
The constructor. |
|
AbstractContentClass(String name,
SmartId id)
The constructor. |
|
| Method Summary | |
|---|---|
void |
addField(AbstractContentField field)
This method adds the given field to this class. |
void |
addSubClass(AbstractContentClass subClass)
This method adds a sub-class to this class. |
List<? extends AbstractContentClass> |
getChildren()
This method gets the list containing all direct children of this object. |
AbstractContentField |
getDeclaredField(String name)
This method gets the declared field with the given name. |
Collection<AbstractContentField> |
getDeclaredFields()
This method gets an iterator of all fields declared by this class. |
AbstractContentField |
getField(String name)
This method gets the field with the given name. |
Collection<AbstractContentField> |
getFields()
This method gets all fields defined in this class or inherited by the super-class(es). |
Class<? extends ContentObject> |
getJavaClass()
This method gets the class reflecting the closest type of this content-class. |
ClassModifiers |
getModifiers()
This method gets the modifiers of this object. |
List<AbstractContentClass> |
getSubClasses()
This method gets the list of all sub-classes. |
AbstractContentClass |
getSuperClass()
This method gets the super-class of this class. |
boolean |
isClass()
This method determines if this is a content-class or a
content-field. |
boolean |
isFolderClass()
This method determines if the entity represented by
this ContentClass is a folder. |
boolean |
isRevisionControlled()
This method determines if the entities of this
ContentClass are revision-controlled. |
boolean |
isSubClassOf(ContentClass contentClass)
This is the opposite of the method ContentClass.isSuperClassOf(ContentClass). |
boolean |
isSuperClassOf(ContentClass contentClass)
This method determines is this class is a super class of the given class. |
void |
setFolderClass(boolean isFolderClass)
|
protected void |
setJavaClass(Class<? extends ContentObject> javaClass)
This method sets the Java-class of this
content-class. |
protected void |
setModifiers(ClassModifiers modifiers)
|
void |
setRevisionControlled(boolean revisionControlled)
|
protected void |
setSuperClass(AbstractContentClass superClass)
This method sets the super-class. |
| Methods inherited from class net.sf.mmm.content.model.base.AbstractContentReflectionObject |
|---|
setDeletedFlag, setLock, setMetaDataSet, toString |
| Methods inherited from class net.sf.mmm.content.base.AbstractContentObject |
|---|
equals, getChild, getContentClass, getDeletedFlag, getId, getLock, getMetaDataSet, getModificationCount, getName, getParent, getPath, getRevision, getRevisionHistory, getValue, getValue, hashCode, isDeleted, isFolder, isRevisionClosed, removeValue, setModificationCount, setValue |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.sf.mmm.content.model.api.ContentClass |
|---|
getParent |
| Methods inherited from interface net.sf.mmm.content.api.ContentObject |
|---|
getChild, getContentClass, getDeletedFlag, getId, getLock, getMetaDataSet, getName, getPath, getRevision, getRevisionHistory, getValue, getValue, isDeleted, isFolder, isRevisionClosed, setValue |
| Constructor Detail |
|---|
public AbstractContentClass()
public AbstractContentClass(String name,
SmartId id)
name - is the name.id - is the ID.| Method Detail |
|---|
@FieldAnnotation(id=25) public AbstractContentClass getSuperClass()
ContentClass.getParent() and only exists for its
more precise name.
getSuperClass in interface ContentClasspublic List<? extends AbstractContentClass> getChildren()
folder the result will always be
an empty list.ContentObjects that have
this object as parent.ContentObject.getParent(). E.g. a SearchFolder
may be a virtual folder that performs a dynamic search returning arbitrary
objects from this method that themselves reside in different, physical
folders.
getChildren in interface ContentObjectgetChildren in interface ContentClassgetChildren in class AbstractContentObject@FieldAnnotation(id=26) public boolean isFolderClass()
entity represented by
this ContentClass is a folder.
isFolderClass in interface ContentClasstrue if the represented entity is a folder,
false if it is a leaf.ContentObject.isFolder()public void setFolderClass(boolean isFolderClass)
isFolderClass - the isFolderClass to setpublic boolean isRevisionControlled()
entities of this
ContentClass are revision-controlled. Such entity can be frozen to
a closed revision creating a
history. Besides the latest revision, the closed revisions can still be
accessed.
isRevisionControlled in interface ContentClasstrue if this type is revisioned, false
otherwise.ClassAnnotation.revisionControl()public void setRevisionControlled(boolean revisionControlled)
revisionControlled - the revisionControlled to setprotected void setSuperClass(AbstractContentClass superClass)
super-class.
superClass - the super-class to set.public Collection<AbstractContentField> getDeclaredFields()
super-class except they are overridden by this
class. An inherited field can be overridden (if supported by the
content-model) in order to declare it more
specific. Then the type of the field is a subtype of the field that is
overridden or the validator is more restrictive.
getDeclaredFields in interface ContentClasspublic AbstractContentField getDeclaredField(String name)
name. Declared means that the field is
initially defined or
overridden in this class.content-model) in order to declare it more
specific (typically the field-type is
specialized). Such field can be identified via
ContentField.getInitiallyDefiningClass().
getDeclaredField in interface ContentClassname - is the name of the requested field of this class.
null if no such
field is declared by this class.ContentClass.getField(String)public AbstractContentField getField(String name)
name. A field is either
declared in this class or inherited from a
super-class.
getField in interface ContentClassname - is the name of the requested field of this class.
null if no such
field exists for this class.public Collection<AbstractContentField> getFields()
ContentField.getDeclaringClass().Collection.size() method of the returned instance may be very
expensive. Please avoid unnecessary or repetitive calls.
getFields in interface ContentClasspublic ClassModifiers getModifiers()
getModifiers in interface ContentClassgetModifiers in interface ContentReflectionObjectgetModifiers in class AbstractContentReflectionObjectContentClass.getModifiers(),
ContentField.getModifiers()protected void setModifiers(ClassModifiers modifiers)
modifiers - the modifiers to setpublic List<AbstractContentClass> getSubClasses()
getSubClasses in interface ContentClass@FieldAnnotation(id=33) public Class<? extends ContentObject> getJavaClass()
getJavaClass in interface ContentClassprotected void setJavaClass(Class<? extends ContentObject> javaClass)
Java-class of this
content-class.
javaClass - is the class realizing the entity.public boolean isClass()
content-class or a
content-field. It is allowed to cast this object
according to the result of this method.
isClass in interface ContentReflectionObjecttrue if this is a content-class,
false if this is a
content-field.public boolean isSubClassOf(ContentClass contentClass)
ContentClass.isSuperClassOf(ContentClass). This means that
class1.isSubClassOf(class2) is equal to
class2.isSuperClassOf(class1).
isSubClassOf in interface ContentClasscontentClass - is the class to compare with.
true if this class is a sub-class of the given
class.public boolean isSuperClassOf(ContentClass contentClass)
isSuperClassOf in interface ContentClasscontentClass - is the class to compare with.
true if this class is a super-class of the given
class.
public void addSubClass(AbstractContentClass subClass)
throws ContentModelException
sub-class to this class.subClass is already a
registered sub-class of this class.
subClass - is the sub-class to add.
ContentModelException - if the operation fails.
public void addField(AbstractContentField field)
throws ContentModelException
field to this class.
field - is the field to add.
ContentModelException - if the field could NOT be added.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||