|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cassinidivision.oce.content.XMLSerializationController
This class controls the XML import/export process for the content framework.
Other classes need only communicate with this one in order to get what they need done (content classes need to implement the methods XMLParser will invoke in them).
Field Summary | |
NSDictionary |
configDict
|
NSArray |
contentPaths
|
String |
parentContentPath
|
NSMutableArray |
topLevelImportedChildren
|
NSDictionary |
xmlPipelineConfigDict
|
Constructor Summary | |
XMLSerializationController()
|
Method Summary | |
void |
addTopLevelImportedChild(Object child)
Adds an object to the array of top level imported children, which are tracked so that hyperlink paths can be fixed in the correct parts of the content hierarchy. |
NSDictionary |
configDict()
Returns the current configuration dictionary |
void |
exportXMLToPathForContentArray(String path,
NSArray contentArray)
Exports XML to a file |
void |
importXMLAtPathIntoParent(String path,
C_ContentContainer targetParent)
Imports xml from a file |
void |
importXMLFromStringIntoParent(String xmlString,
C_ContentContainer targetParent)
Imports xml from a string |
String |
mergeOverwriteOrCancel()
Called automatically by C_ContentContainer when it is importing an object and finds it already has one at that path. |
String |
newPathForContentPath(String oldPath)
Calculates paths when exporting content hyperlinks. |
String |
parentContentPath()
Reports the parent content path, the path to the root of the current export. |
void |
setConfigDict(NSDictionary value)
Sets the configuration dictionary for the target. |
static XMLSerializationController |
sharedInstance()
|
boolean |
shouldExportChildrenOfObject(C_Content content)
Examines the configuration dictionary and decides whether or not to export the children of a given object (according to its class). |
boolean |
shouldExportObject(C_Content content)
Examines the configuration dictionary and decides whether or not to export a given object (according to its class). |
boolean |
shouldExportTagNamed(String name)
Examines the config dictionary and decides whether or not to include a given tag in the export. |
boolean |
shouldReportUnexportedChildrenOfObject(C_Content content)
Examines the configuration dictionary to determine whether or not the XML should mention that children of this object were omitted from the export. |
String |
xmlForContentArray(NSArray contentArray)
Calculates the appropriate export XML string for some content |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public NSArray contentPaths
public String parentContentPath
public NSMutableArray topLevelImportedChildren
public NSDictionary configDict
public NSDictionary xmlPipelineConfigDict
Constructor Detail |
public XMLSerializationController()
Method Detail |
public static XMLSerializationController sharedInstance()
public void importXMLAtPathIntoParent(String path, C_ContentContainer targetParent)
path
- the path to the xml filetargetParent
- the C_ContentContainer into which the content
specified in the XML will be imported.public void importXMLFromStringIntoParent(String xmlString, C_ContentContainer targetParent)
xmlString
- the xml stringtargetParent
- the C_ContentContainer into which the content
specified in the XML will be imported.public String xmlForContentArray(NSArray contentArray)
contentArray
- an array of content objects to export
public void exportXMLToPathForContentArray(String path, NSArray contentArray) throws IOException
path
- the path to the xml filecontentArray
- an array of content objects to export
IOException
public String newPathForContentPath(String oldPath)
oldPath
- the path to the target content
public String parentContentPath()
public String mergeOverwriteOrCancel()
C_ContentContainer understands the following values:
"merge": Keep the existing child object, but apply the new values and child objects from the XML to it. Children of the object which are not mentioned in the XML being imported are kept.
"mergeTop": Keep the existing child object but delete any existing children it already has; then apply the new values and child objects from the XML to it. This was used in the client to import new values for a C_Feature, so that the C_Feature would keep the same primary key for links to navigation, but no old pages etc. would be kept.
"overwrite": Delete the existing child entirely, then proceed with the import as though it had never been there.
"cancel": Ignore this portion of the import XML but continue with the import.
public void addTopLevelImportedChild(Object child)
child
- the child to add.public void setConfigDict(NSDictionary value)
value
- The dictionary.public NSDictionary configDict()
public boolean shouldExportTagNamed(String name)
name
- the name of the tag
public boolean shouldExportObject(C_Content content)
public boolean shouldExportChildrenOfObject(C_Content content)
content
- the content object in question
public boolean shouldReportUnexportedChildrenOfObject(C_Content content)
content
- the content object in question
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |