/** * Verifies the documentProtection tag inside settings.xml file * if the protection is enforced (w:enforcement="1") * and if the kind of protection equals to passed (STDocProtect.Enum editValue) * * @return true if documentProtection is enforced with option readOnly * @since 3.3.0 */ public boolean isRestrictEditingWith(STDocProtect editValue) { CTDocProtect ctDocProtect = this.jaxbElement.getDocumentProtection(); if (ctDocProtect == null) { return false; } return ctDocProtect.isEnforcement() && ctDocProtect.getEdit().equals(editValue); }
/** * Verifies the documentProtection tag inside settings.xml file * if the protection is enforced (w:enforcement="1") * and if the kind of protection equals to passed (STDocProtect.Enum editValue) * * @return true if documentProtection is enforced with option readOnly * @since 3.3.0 */ public boolean isRestrictEditingWith(STDocProtect editValue) { CTDocProtect ctDocProtect = this.jaxbElement.getDocumentProtection(); if (ctDocProtect == null) { return false; } return ctDocProtect.isEnforcement() && ctDocProtect.getEdit().equals(editValue); }