/** * @since 3.3.0 */ public boolean getMarkAsFinal() { Property prop = getProperty(MARK_AS_FINAL); if (prop==null) return false; return prop.isBool(); }
value = docPropsCustomPart.getProperty(key);
public void setProperty(String propName, String propValue) { // does it exist already? org.docx4j.docProps.custom.Properties.Property newProp = getProperty(propName); // If not, let's add one. if (newProp==null) { org.docx4j.docProps.custom.ObjectFactory factory = new org.docx4j.docProps.custom.ObjectFactory(); newProp = factory.createPropertiesProperty(); newProp.setName(propName); newProp.setFmtid(fmtidValLpwstr ); // Magic string newProp.setPid( getNextPid() ); getJaxbElement().getProperty().add(newProp); } if (!newProp.getFmtid().equals(fmtidValLpwstr )) { log.warn("Wrong fmtid? This might not work..."); } // set the value newProp.setLpwstr(propValue); }
/** * @param propName * @param propValue * * @since 3.3.0 */ public void setProperty(String propName, boolean propValue) { // does it exist already? org.docx4j.docProps.custom.Properties.Property newProp = getProperty(propName); // If not, let's add one. if (newProp==null) { org.docx4j.docProps.custom.ObjectFactory factory = new org.docx4j.docProps.custom.ObjectFactory(); newProp = factory.createPropertiesProperty(); newProp.setName(propName); newProp.setFmtid(fmtidValLpwstr ); // Magic string newProp.setPid( getNextPid() ); getJaxbElement().getProperty().add(newProp); } if (!newProp.getFmtid().equals(fmtidValLpwstr )) { log.warn("Wrong fmtid? This might not work..."); } // set the value newProp.setBool(propValue); }
/** * @since 3.3.0 */ public boolean getMarkAsFinal() { Property prop = getProperty(MARK_AS_FINAL); if (prop==null) return false; return prop.isBool(); }
value = docPropsCustomPart.getProperty(key);
public void setProperty(String propName, String propValue) { // does it exist already? org.docx4j.docProps.custom.Properties.Property newProp = getProperty(propName); // If not, let's add one. if (newProp==null) { org.docx4j.docProps.custom.ObjectFactory factory = new org.docx4j.docProps.custom.ObjectFactory(); newProp = factory.createPropertiesProperty(); newProp.setName(propName); newProp.setFmtid(fmtidValLpwstr ); // Magic string newProp.setPid( getNextPid() ); getJaxbElement().getProperty().add(newProp); } if (!newProp.getFmtid().equals(fmtidValLpwstr )) { log.warn("Wrong fmtid? This might not work..."); } // set the value newProp.setLpwstr(propValue); }
/** * @param propName * @param propValue * * @since 3.3.0 */ public void setProperty(String propName, boolean propValue) { // does it exist already? org.docx4j.docProps.custom.Properties.Property newProp = getProperty(propName); // If not, let's add one. if (newProp==null) { org.docx4j.docProps.custom.ObjectFactory factory = new org.docx4j.docProps.custom.ObjectFactory(); newProp = factory.createPropertiesProperty(); newProp.setName(propName); newProp.setFmtid(fmtidValLpwstr ); // Magic string newProp.setPid( getNextPid() ); getJaxbElement().getProperty().add(newProp); } if (!newProp.getFmtid().equals(fmtidValLpwstr )) { log.warn("Wrong fmtid? This might not work..."); } // set the value newProp.setBool(propValue); }