|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webobjects.eocontrol.EOCustomObject
com.webobjects.eocontrol.EOGenericRecord
com.cassinidivision.oce.content.base._C_Content
com.cassinidivision.oce.content.C_Content
An abstract EO entity class for representing an arbitrary item of content.
The root entity for all types of OCE content.
Nested Class Summary |
Nested classes inherited from class com.webobjects.eocontrol.EOGenericRecord |
EOGenericRecord._DictionaryBinding, EOGenericRecord._LazyDictionaryBinding |
Nested classes inherited from class com.webobjects.eocontrol.EOCustomObject |
EOCustomObject._BooleanFieldBinding, EOCustomObject._FieldBinding, EOCustomObject._LazyFieldBinding, EOCustomObject._NumberFieldBinding |
Nested classes inherited from class com.webobjects.eocontrol.EOKeyValueCodingAdditions |
EOKeyValueCodingAdditions.DefaultImplementation, EOKeyValueCodingAdditions.Utility |
Nested classes inherited from class com.webobjects.eocontrol.EOKeyValueCoding |
EOKeyValueCoding._BestBindingCreation, EOKeyValueCoding._KeyBindingCreation, EOKeyValueCoding._StoredForwardingBinding |
Nested classes inherited from class com.webobjects.foundation.NSValidation |
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException |
Nested classes inherited from class com.webobjects.eocontrol._EOPrivateMemento |
_EOPrivateMemento.DefaultImplementation |
Field Summary |
Fields inherited from class com.webobjects.eocontrol.EOGenericRecord |
_CLASS |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
_KeyPathSeparatorChar, KeyPathSeparator |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding |
NullValue |
Constructor Summary | |
C_Content()
|
Method Summary | |
void |
addCAttributeWithValues(String element,
NSDictionary attributes)
Called automatically from an XMLParser instance
when a C_Attribute tag is found. |
void |
addCharacterData(String value)
Called automatically by XMLParser when character data is found. |
NSMutableArray |
allParents()
Retrieve all the ancestors of the receiving instance. |
void |
appendExportXMLForAdditionalAttributesToString(StringBuffer returnString)
Builds the list of additional key/value pairs associated with this object. |
void |
appendExportXMLForAttributeNamedKeyPathToString(String attributeName,
String keyPath,
StringBuffer returnString)
Builds the XML string for a single attribute (name="value" pair). |
void |
appendExportXMLForAttributeNamedValueToString(String attributeName,
String value,
StringBuffer returnString)
Builds the export XML for a single attribute (name="value" pair). |
void |
appendExportXMLForAttributesToString(StringBuffer returnString)
Builds the appropriate string to go into the opening tag for the receiver's objects attributes. |
void |
appendExportXMLForAttributeToString(String attribute,
StringBuffer returnString)
Builds the XML string for a single attribute (name="value" pair). |
void |
appendExportXMLForClosingTagToString(StringBuffer returnString)
Builds the export XML for a closing tag for this object. |
void |
appendExportXMLForEmptyTagToString(StringBuffer returnString)
Builds the XML string for a tag representing the receiver as an empty XML tag, ie |
void |
appendExportXMLForObjectToString(StringBuffer returnString)
Builds the XML tag for this object, including the opening tag, any child tags and text content, and the closing tag. |
void |
appendExportXMLForOpeningTagToString(StringBuffer returnString)
Builds the export XML for an opening tag representing this object, including attributes. |
void |
appendExportXMLForPropertiesToString(StringBuffer returnString)
Called during XML export to append XML corresponding to the receiver's properties (children) to the given string. |
void |
appendExportXMLForPropertyNamedKeyPathToString(String propertyName,
String keyPath,
StringBuffer returnString)
Builds the XML for a child tag. |
void |
appendExportXMLForPropertyNamedValueToString(String propertyName,
String value,
StringBuffer returnString)
Builds the export XML string for a single child tag. |
void |
appendExportXMLForPropertyToString(String property,
StringBuffer returnString)
Builds the XML for a child tag. |
void |
appendStringValueForPropertyToString(String property,
StringBuffer returnString)
Builds the XML string value of the given property of the receiver. |
void |
awakeFromInsertion(EOEditingContext ec)
All newly-created content in the OCE system is immediately instantiated with the following values. |
C_Content |
contentAtContentPath(String aPath)
Locates the content at a given relative path. |
Number |
contentId()
Retrieve a unique identifier for the receiving content instance. |
String |
contentPath()
Returns a unique location path (URI) in content space for the receiver. |
static C_Content |
contentWithContentIdInEditingContext(Number aContentId,
EOEditingContext ec)
Fetches the C_Content instance related to the unique content identifier requested (works across all subclasses). |
C_Content |
copyIntoEC(EOEditingContext ec)
Make a copy of the receiver into the given editing context. |
C_Content |
copyToNewParent(C_ContentContainer newParent)
Perform a deep copy of the receiver into a new parent container. |
C_Content |
copyWithinEC()
Makes a copy of the receiver within the current editing context. |
String |
defaultXMLRepresentation()
Retrieves the default XML representation of the receiving content. |
void |
deleteSelf()
Attempt to remove the receiver from the parent instance (if there is one). |
boolean |
endElement(String element)
Called automatically by the XML parser when an end tag is found. |
StringBuffer |
exportXMLForAttributes()
Called during XML export: builds a StringBuffer holding all the attribute name="value" pairs for the receiver's XML. |
void |
forceDeleteSelf()
Forcibly remove the receiver from the parent instance (if there is one). |
NSArray |
globalIDsForSelfAndAllChildren()
Locates content IDs for self and any children. |
NSArray |
globalIDsForSelfAndAllLoadedChildren()
Locates content IDs for self and any children that were previously loaded from the database (non-fault instances). |
String |
longDebuggingOutput()
|
void |
moveToNewParent(C_ContentContainer newParent)
Moves the receiver from the existing parent to the new one. |
boolean |
renameSelf(String newName)
Rename the receiving content. |
NSArray |
selfAndAllLoadedChildren()
Retrieve the receiver all related child content. |
boolean |
selfOrSomeDescendantPublished()
Uncover if the receiver or any descendent children have been published. |
void |
setDataPropertyFromDictionary(String property,
NSDictionary pList)
Sets one NSData-type instance variable in the receiver to the appropriate value from the dictionary. |
void |
setDatePropertyFromDictionary(String property,
NSDictionary pList)
Sets one Date-type instance variable in the receiver to the appropriate value from the dictionary. |
void |
setNumberPropertyFromDictionary(String property,
NSDictionary pList)
Sets one Number-type instance variable in the receiver to the appropriate value from the dictionary. |
void |
setStringPropertyFromDictionary(String property,
NSDictionary pList)
Sets one String-type instance variable in the receiver to the appropriate value from the dictionary. |
void |
setStringPropertyNamedKeyPathFromDictionary(String propertyName,
String keyPath,
NSDictionary pList)
Sets one instance variable in the receiver to the appropriate value from the dictionary. |
String |
sortField()
Provides a field which can be used to sort C_Content objects of any one type, by simply sorting on the given field alphabetically. |
void |
startCAttributeList()
Convenience method used to ensure that attribute dictionaries are cleared before new attributes are added. |
C_Content |
startElementWithAttributes(String element,
NSDictionary attributes)
Called automatically by XMLParser when an opening tag is found. |
void |
takeAttributesFromDictionary(NSDictionary pList)
Sets up the receiver's instance variables from given values. |
Methods inherited from class com.cassinidivision.oce.content.base._C_Content |
addToXmlAttributes, className, creationDate, modificationDate, name, parent, removeFromXmlAttributes, setClassName, setCreationDate, setModificationDate, setName, setParent, setXmlAttributes, setXmlLabel, xmlAttributes, xmlLabel |
Methods inherited from class com.webobjects.eocontrol.EOGenericRecord |
__setClassDescription, _keyGetBindingForKey, _keySetBindingForKey, _otherStorageBinding, _storedKeyGetBindingForKey, _storedKeySetBindingForKey, classDescription, usesDeferredFaultCreation |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public C_Content()
Method Detail |
public void awakeFromInsertion(EOEditingContext ec)
EOEnterpriseObject.awakeFromInsertion(com.webobjects.eocontrol.EOEditingContext)
public static C_Content contentWithContentIdInEditingContext(Number aContentId, EOEditingContext ec)
aContentId
- Number indicating the unique content ID.ec
- The editing context to be used for the requested content.
public Number contentId()
public C_Content contentAtContentPath(String aPath)
aPath
- The relative path from the content root to the desired content.
public String contentPath()
public NSMutableArray allParents()
public NSArray selfAndAllLoadedChildren()
The base implementation simply returns the receiver in an array (no children).
public NSArray globalIDsForSelfAndAllLoadedChildren()
The base implementation returns the unique ID of the receiver, as obviously there are no children.
Note this method does not check if the content IDs are not temporary.
public NSArray globalIDsForSelfAndAllChildren()
The base implementation returns the unique ID of the receiver, as obviously there are no children.
public String sortField()
The default implementation returns the name attribute; subclasses may override as necessary.
public C_Content copyWithinEC()
The new content will be associated with a new content ID when saved to the database. For this and other reasons, the content should be renamed prior to saving to preserve uniqueness in the content URI namespace.
public C_Content copyIntoEC(EOEditingContext ec)
Does not copy XML attributes attached to the receiver, and does not copy the content ID or creation/modification dates, so a new copy will have a new identifier and timestamps.
ec
- The editing context with which to create the copy.
public void deleteSelf()
public void forceDeleteSelf()
public boolean renameSelf(String newName)
newName
- The new name of the receiver.
public boolean selfOrSomeDescendantPublished()
The base implementation returns false, as abstract content cannot be published.
public void moveToNewParent(C_ContentContainer newParent)
May throw exceptions if the process fails.
The current implementation does not check if the new parent resides in a different editing context.
newParent
- The new parent content instance.public C_Content copyToNewParent(C_ContentContainer newParent)
newParent
- The new parent content instance.
public void appendExportXMLForPropertiesToString(StringBuffer returnString)
The base implementation does nothing (there are no children, so there cannot be any properties).
returnString
- A StringBuffer to which the XML will be appended to.public StringBuffer exportXMLForAttributes()
public void appendExportXMLForPropertyNamedKeyPathToString(String propertyName, String keyPath, StringBuffer returnString)
propertyName
- The name of the child tag.keyPath
- A key-path which will be resolved to determine the contents of the tag.returnString
- The StringBuffer to which to append the child tag.public void appendExportXMLForAttributeNamedKeyPathToString(String attributeName, String keyPath, StringBuffer returnString)
attributeName
- The name of the attribute.keyPath
- A key-path which will be resolved to determine the value of the attribute.returnString
- The StringBuffer to which to append the results.public void appendStringValueForPropertyToString(String property, StringBuffer returnString)
This is the basic valueForKeyPath value, with dates output in the desired format and special XML characters escaped.
property
- The key-path to be resolved to give the value.returnString
- The StringBuffer to which the results are appended.public void appendExportXMLForPropertyToString(String property, StringBuffer returnString)
property
- The name of both the child tag to be output and the key to resolve to obtain the value.returnString
- The StringBuffer to which to append the child tag.public void appendExportXMLForAttributeToString(String attribute, StringBuffer returnString)
attribute
- The name of both the attribute to be output and the key to resolve to obtain its value.returnString
- The StringBuffer to which the results are appended.public void appendExportXMLForEmptyTagToString(StringBuffer returnString)
Does not check the receiver will be correctly represented by an empty tag, i.e. that the receiver does not wish to export any child tags or text contents.
returnString
- The StringBuffer to which the results will be appended.public void appendExportXMLForAdditionalAttributesToString(StringBuffer returnString)
returnString
- The StringBuffer to which the results will be appended.public void appendExportXMLForObjectToString(StringBuffer returnString)
Does not check if an empty tag is appropriate.
returnString
- The StringBuffer to which the results will be appended.public void appendExportXMLForOpeningTagToString(StringBuffer returnString)
returnString
- The StringBuffer to which the results will be appended.public void appendExportXMLForClosingTagToString(StringBuffer returnString)
returnString
- The StringBuffer to which the results will be appended.public void appendExportXMLForAttributesToString(StringBuffer returnString)
This will be the return value from exportXMLForAttributes with the space removed from the end and one added to the beginning.
returnString
- The StringBuffer to which the results will be appended.public void appendExportXMLForPropertyNamedValueToString(String propertyName, String value, StringBuffer returnString)
propertyName
- The name for the child tag.value
- The text to go inside the child tag.returnString
- The StringBuffer to which the results will be appended.public void appendExportXMLForAttributeNamedValueToString(String attributeName, String value, StringBuffer returnString)
Checks first with the XMLSerializationController instance that we wish to export attributes with this name.
attributeName
- The name to use for the attribute.value
- The value for the attribute.returnString
- The StringBuffer to which the results will be appended.public boolean endElement(String element)
For a discussion of which objects receive messages about which tags, see
XMLParser
.
element
- The name of the ending tag.
public void addCharacterData(String value)
For a discussion of which objects receive messages about which pieces
of character data, see XMLParser
.
value
- The character data which has been parsed.public C_Content startElementWithAttributes(String element, NSDictionary attributes)
For a discussion of which objects receive messages about which opening
tags, see XMLParser
.
element
- The name of the start tag found.attributes
- A dictionary of the attribute keys and values in the start tag.public void startCAttributeList()
public void addCAttributeWithValues(String element, NSDictionary attributes)
XMLParser
instance
when a C_Attribute
tag is found.
This will add a key/value pair to the C_Attributes list for this object.
element
- Name of the start tag.attributes
- The dictionary of attributes for this tag.C_Attribute
,
XMLParser
public void takeAttributesFromDictionary(NSDictionary pList)
The values will normally have come from the attributes of an XML start element tag.
pList
- The dictionary of values.public void setStringPropertyNamedKeyPathFromDictionary(String propertyName, String keyPath, NSDictionary pList)
propertyName
- The key in the given dictionary providing the appropriate value.keyPath
- The key-path to set with the retrieved value.pList
- The dictionary of values.public void setStringPropertyFromDictionary(String property, NSDictionary pList)
property
- The name of both the key in the dictionary to access the value
and the key in the receiver for which to set the value.pList
- The dictionary of values.public void setDataPropertyFromDictionary(String property, NSDictionary pList)
property
- The name of both the key in the dictionary to access the value
and the key in the receiver for which to set the value.pList
- The dictionary of values.public void setDatePropertyFromDictionary(String property, NSDictionary pList)
property
- The name of both the key in the dictionary to access the value
and the key in the receiver for which to set the value.pList
- The dictionary of values.public void setNumberPropertyFromDictionary(String property, NSDictionary pList)
property
- The name of both the key in the dictionary to access the value
and the key for which to set the value in the receiver.pList
- The dictionary of values.public String defaultXMLRepresentation()
The base implementation throws an exception (purely abstract content has no representation).
public String longDebuggingOutput()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |