com.japisoft.xmlpad
Class XMLIntegrity

java.lang.Object
  extended bycom.japisoft.xmlpad.XMLIntegrity

public class XMLIntegrity
extends java.lang.Object

This class is used inside the XMLContainer for avoiding user to corrupt the current XML document. For instance, you can disable tag update or force a parsing before saving

Version:
1.0
Author:
(c) 2003 JAPISOFT

Constructor Summary
XMLIntegrity()
           
 
Method Summary
 boolean isParseBeforeSaving()
           
 boolean isProtectTag()
          A protection mean user can't edit it
 void setParseBeforeSaving(boolean b)
          Decide to parse the document before saving.
 void setProtectTag(boolean b)
          If true, it protects all tag from user insert or remove
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLIntegrity

public XMLIntegrity()
Method Detail

isParseBeforeSaving

public boolean isParseBeforeSaving()
Returns:
true if the document is parsed before saving. If the document is not valid, the save action has no effect. By default false.

setParseBeforeSaving

public void setParseBeforeSaving(boolean b)
Decide to parse the document before saving. If the document is wrong the saving action is canceled.

Parameters:
b -

isProtectTag

public boolean isProtectTag()
A protection mean user can't edit it

Returns:
true is a protection is available on tag.

setProtectTag

public void setProtectTag(boolean b)
If true, it protects all tag from user insert or remove

Parameters:
b - true to protect all tag.