|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ceryle.ui.DatabaseUtils
public class DatabaseUtils
A class that provices database utility functions designed for use by the DocumentView, to which it is rather tightly associated. An instance of this class is accessible from the ViewManager (rather than Services).
| Field Summary | |
|---|---|
static boolean |
autoIndex
Variable controlling whether an index should be created upon changes to the collection or node lists. |
| Constructor Summary | |
|---|---|
DatabaseUtils(ViewManager viewmanager)
Default constructor, supplied with the application's ViewManager. |
|
| Method Summary | |
|---|---|
boolean |
changeID(EditorPanel m_editor)
Change the ID of the current document. |
void |
checkRevisionLimits(String cid,
XNode xnode)
If revision control limits are active, alerts the user if either the revision count or space limit of the provided XNode has been exceeded. |
String |
createCollection(CollectionList list,
String cid,
String title)
Create a new Collection whose identifier is the String cid. |
protected boolean |
createNode(EditorPanel m_editor)
Add the current view content as a new Node, using the current Collection and Node ID fields as its identifiers. |
protected boolean |
createNode(EditorPanel m_editor,
String cid,
String nid)
Add the current view content as a new Node. |
protected void |
deleteCollection(DocumentView dv)
Delete the Collection at the selected index of the provided DocumentView's CollectionList. |
boolean |
duplicateNode(EditorPanel m_editor,
boolean canSelectCID)
Duplicate the currently-loaded Node in the current collection, querying for the Collection and Node IDs, returning true if successful. |
protected Document |
getContentAsDocument(EditorPanel m_editor,
String content)
Turns the String content into an XML Document, either as valid or well-formed XML, or as a CDATA section. |
Document |
getContentAsDocument(int method,
String content,
boolean validating)
Turns the String content into an XML Document, either as valid or well-formed XML, or as a CDATA section. |
String |
getDefaultCollection(EditorPanel m_editor)
Returns a String containing the name of the default Collection, via a circuitous route from EditorPanel back to its DocumentView. |
boolean |
modifyNode(EditorPanel m_editor)
Modify an existing Node whose ID matches the current collection and node ID fields, returning true if successful. |
boolean |
modifyNode(EditorPanel m_editor,
String cid,
String nid)
Modify an existing Node whose ID matches the String nid, in Collection ID cid, returning true if successful. |
protected String |
openCollection(CollectionList list,
String cid)
Opens the Collection cid as the default Collection. |
protected void |
savePresentation(EditorPanel m_editor)
If this is a Note, save its location as metadata to its stored XNode. |
protected void |
savePresentation(EditorPanel m_editor,
String cid,
String nid,
XNode xnode,
boolean writeNode)
Saves the current background color, font, and bounds of the window to the XNode's metadata. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean autoIndex
| Constructor Detail |
|---|
public DatabaseUtils(ViewManager viewmanager)
| Method Detail |
|---|
public String createCollection(CollectionList list,
String cid,
String title)
list - the optional CollectionList to updatecid - the Collection IDtitle - the optional Collection title
protected String openCollection(CollectionList list,
String cid)
protected void deleteCollection(DocumentView dv)
protected boolean createNode(EditorPanel m_editor)
public String getDefaultCollection(EditorPanel m_editor)
throws ProcessException
ProcessException
protected boolean createNode(EditorPanel m_editor,
String cid,
String nid)
throws ProcessException
ProcessException
protected Document getContentAsDocument(EditorPanel m_editor,
String content)
public Document getContentAsDocument(int method,
String content,
boolean validating)
throws XMLParseException,
ProcessException
XMLParseException
ProcessExceptionpublic boolean modifyNode(EditorPanel m_editor)
createNode(EditorPanel). If
the node already exists, its content will be changed and its metadata
updated accordingly.
public boolean modifyNode(EditorPanel m_editor,
String cid,
String nid)
createNode(EditorPanel,String,String). If the node already
exists, its content will be changed and its metadata updated accordingly.
public void checkRevisionLimits(String cid,
XNode xnode)
protected void savePresentation(EditorPanel m_editor)
protected void savePresentation(EditorPanel m_editor,
String cid,
String nid,
XNode xnode,
boolean writeNode)
throws XNodeException
XNodeException
public boolean duplicateNode(EditorPanel m_editor,
boolean canSelectCID)
public boolean changeID(EditorPanel m_editor)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||