|
© 2004 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.content.ContentEntity
com.bea.content.ObjectClass
ObjectClass is the type for a Node. It has both an id and a name that uniquely identifies it within a content repository.
An ObjectClass may have PropertyDefinitions associated with it that define the shape of Properties required for a Node. This does not mean that the Property must contain a value, but simply that the Property must exist for the Node.
The ObjectClass may have PropertyDefinitions without them actually being attached in memory. In this case, hasPropertyDefinitions would be true and a call to get the PropertyDefinitions would lazy load them. If there is a need to check if the PropertyDefinitions are currently set then a call to isPropertyDefinitionsNull() is appropriate as it will not try to load the PropertyDefinitions.
It may also have a primary PropertyDefinition that defines the primary content Property for a Node. This allows for the definition of content in the type since the api does not distinguish between content and meta-content.
A Node is only considered valid in the repository if its Properties conform to its ObjectClass PropertyDefinitions.
ObjectClass PropertyDefinitions may be lazy loaded, depending on the implementation of the underyling operation that retrieved the ObjectClass.
Field Summary |
Fields inherited from class com.bea.content.ContentEntity |
id |
Constructor Summary | |
ObjectClass(ID id,
String name)
Basic constructor. |
|
ObjectClass(ID id,
String name,
PropertyDefinition primaryPropertyDefinition,
PropertyDefinition[] propertyDefinitions)
Constructor without hasPropertyDefinitions. |
|
ObjectClass(ID id,
String name,
PropertyDefinition primaryPropertyDefinition,
PropertyDefinition[] propertyDefinitions,
boolean hasPropertyDefinitions)
Constructor without propertyDefinitions. |
Method Summary | |
String |
getName()
Returns a name that uniquely identifies this ObjectClass within a repository. |
PropertyDefinition |
getPrimaryPropertyDefinition()
Returns the primary PropertyDefinition, or null if one does not exist. |
PropertyDefinition |
getPropertyDefinition(String name)
Gets the named PropertyDefinition for this ObjectClass. |
PropertyDefinition[] |
getPropertyDefinitions()
Gets the PropertyDefinitions for this ObjectClass. |
boolean |
hasPropertyDefinitions()
Returns true if this ObjectClass has PropertyDefinitions. |
void |
hasPropertyDefinitions(boolean hasPropertyDefinitions)
Sets if this ObjectClass has PropertyDefinitions. |
boolean |
isPropertyDefinitionsNull()
Returns true if the propertyDefitions is null, false otherwise. |
void |
setName(String name)
Sets the name for this ObjectClass. |
void |
setObjectClassOps(ObjectClassOps objectClassOps)
Sets the ObjectClassOps for the repository. |
void |
setPrimaryPropertyDefinition(PropertyDefinition propertyDefinition)
Sets the primary PropertyDefinition. |
String |
toString()
Returns the ObjectClass attributes as a String. |
void |
validateProperties(Property[] properties)
Validates that each property passed in as part of the properties array is valid according to its PropertyDefinition. |
void |
validateProperty(Property property,
PropertyDefinition definition)
Validates that the property passed in is valid according to the property definition passed in. |
Methods inherited from class com.bea.content.ContentEntity |
getId, setId |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ObjectClass(ID id, String name)
public ObjectClass(ID id, String name, PropertyDefinition primaryPropertyDefinition, PropertyDefinition[] propertyDefinitions)
public ObjectClass(ID id, String name, PropertyDefinition primaryPropertyDefinition, PropertyDefinition[] propertyDefinitions, boolean hasPropertyDefinitions)
Method Detail |
public String getName()
public PropertyDefinition getPrimaryPropertyDefinition()
public PropertyDefinition getPropertyDefinition(String name) throws RepositoryException
name
- - the name of the property definition to get.
RepositoryException
- - if an error occurs getting the property definition.public PropertyDefinition[] getPropertyDefinitions() throws AuthorizationException
AuthorizationException
- - if the user attempting the get is not authorized.public boolean hasPropertyDefinitions()
public void hasPropertyDefinitions(boolean hasPropertyDefinitions)
public boolean isPropertyDefinitionsNull()
public void setName(String name)
public void setObjectClassOps(ObjectClassOps objectClassOps)
public void setPrimaryPropertyDefinition(PropertyDefinition propertyDefinition)
public String toString()
toString
in class ContentEntity
public void validateProperties(Property[] properties) throws RepositoryException
properties
-
RepositoryException
public void validateProperty(Property property, PropertyDefinition definition) throws RepositoryException
property
- definition
-
RepositoryException
|
© 2004 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |