@Override public void build() throws IllegalStateException { template.setAutoCreated(super.autocreate); template.setMandatory(super.isMandatory); template.setOnParentVersion(super.onParent); template.setProtected(super.isProtected); template.setRequiredType(super.requiredType); template.setValueConstraints(constraints.toArray(new String[constraints.size()])); template.setDefaultValues(values.toArray(new Value[values.size()])); template.setMultiple(super.isMultiple); template.setAvailableQueryOperators(super.queryOperators); template.setFullTextSearchable(super.fullTextSearchable); template.setQueryOrderable(super.queryOrderable); @SuppressWarnings("unchecked") List<PropertyDefinitionTemplate> templates = ntd.template.getPropertyDefinitionTemplates(); templates.add(template); }
@Override public void build() throws IllegalStateException { template.setAutoCreated(super.autocreate); template.setMandatory(super.isMandatory); template.setOnParentVersion(super.onParent); template.setProtected(super.isProtected); template.setRequiredType(super.requiredType); template.setValueConstraints(constraints.toArray(new String[constraints.size()])); template.setDefaultValues(values.toArray(new Value[values.size()])); template.setMultiple(super.isMultiple); template.setAvailableQueryOperators(super.queryOperators); template.setFullTextSearchable(super.fullTextSearchable); template.setQueryOrderable(super.queryOrderable); @SuppressWarnings("unchecked") List<PropertyDefinitionTemplate> templates = ntd.template.getPropertyDefinitionTemplates(); templates.add(template); }
@Override public void build() throws IllegalStateException { template.setAutoCreated(super.autocreate); template.setMandatory(super.isMandatory); template.setOnParentVersion(super.onParent); template.setProtected(super.isProtected); template.setRequiredType(super.requiredType); template.setValueConstraints(constraints.toArray(new String[constraints.size()])); template.setDefaultValues(values.toArray(new Value[values.size()])); template.setMultiple(super.isMultiple); template.setAvailableQueryOperators(super.queryOperators); template.setFullTextSearchable(super.fullTextSearchable); template.setQueryOrderable(super.queryOrderable); @SuppressWarnings("unchecked") List<PropertyDefinitionTemplate> templates = ntd.template.getPropertyDefinitionTemplates(); templates.add(template); }
propertyDefinitionTemplate.setMultiple(Boolean.valueOf( getAttrValue("multiple", child))); propertyDefinitionTemplate.setFullTextSearchable(Boolean.valueOf( getAttrValue("isFullTextSearchable", child))); propertyDefinitionTemplate.setQueryOrderable(Boolean.valueOf(
/** * Creates the property definition template. * * @param ntm the ntm * @param prop the prop * @return the property definition template * @throws RepositoryException the repository exception */ private static PropertyDefinitionTemplate createPropertyDefTemplate(NodeTypeManager ntm, String prop, int type) throws RepositoryException { PropertyDefinitionTemplate pdt = ntm.createPropertyDefinitionTemplate(); pdt.setName(prop); pdt.setOnParentVersion(OnParentVersionAction.IGNORE); pdt.setRequiredType(type); pdt.setValueConstraints(null); pdt.setDefaultValues(null); pdt.setFullTextSearchable(true); pdt.setValueConstraints(new String[0]); return pdt; }
propertyDefinition.setFullTextSearchable(isFullTextSearchable); propertyDefinition.setMandatory(isMandatory); propertyDefinition.setMultiple(isMultiple);
path.setRequiredType(PropertyType.PATH); path.setQueryOrderable(false); path.setFullTextSearchable(false); nodeType.getPropertyDefinitionTemplates().add(path); nom.setRequiredType(PropertyType.STRING); nom.setQueryOrderable(true); nom.setFullTextSearchable(true); nodeType.getPropertyDefinitionTemplates().add(nom); description.setRequiredType(PropertyType.STRING); description.setQueryOrderable(true); description.setFullTextSearchable(true); nodeType.getPropertyDefinitionTemplates().add(description); motsCles.setRequiredType(PropertyType.STRING); motsCles.setQueryOrderable(true); motsCles.setFullTextSearchable(true); nodeType.getPropertyDefinitionTemplates().add(motsCles); size.setRequiredType(PropertyType.STRING); size.setQueryOrderable(true); size.setFullTextSearchable(false); nodeType.getPropertyDefinitionTemplates().add(size); users.setRequiredType(PropertyType.STRING); users.setQueryOrderable(true); users.setFullTextSearchable(false); nodeType.getPropertyDefinitionTemplates().add(users);
private PropertyDefinitionTemplate createBooleanPropTemplate() throws RepositoryException { PropertyDefinitionTemplate pdt = ntm.createPropertyDefinitionTemplate(); pdt.setName(expandedPropName); pdt.setAutoCreated(false); pdt.setMandatory(false); pdt.setOnParentVersion(OnParentVersionAction.IGNORE); pdt.setProtected(false); pdt.setRequiredType(PropertyType.BOOLEAN); pdt.setValueConstraints(null); pdt.setDefaultValues(null); pdt.setMultiple(false); pdt.setAvailableQueryOperators(new String[] { QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO }); pdt.setFullTextSearchable(false); pdt.setQueryOrderable(false); return pdt; } }
propertyDefinitionTemplate.setProtected(Boolean.valueOf(propdDef.getProperty("protected"))); propertyDefinitionTemplate.setMultiple(Boolean.valueOf(propdDef.getProperty("multiple"))); propertyDefinitionTemplate.setFullTextSearchable(Boolean.valueOf(propdDef.getProperty("isFullTextSearchable"))); propertyDefinitionTemplate.setQueryOrderable(Boolean.valueOf(propdDef.getProperty("isQueryOrderable")));
pdt.setAvailableQueryOperators(new String[0]); pdt.setFullTextSearchable(true); pdt.setMandatory(field.isJcrMandatory()); pdt.setMultiple(field.isJcrMultiple());
/** * Create a new JCR property definition from the given <code>QPropertyDefinition</code>. * * @param qPd A SPI property definition. * @return the corresponding JCR property definition. * @throws RepositoryException if an error occurs. */ public PropertyDefinition create(QPropertyDefinition qPd) throws RepositoryException { PropertyDefinitionTemplate pt = ntMgr.createPropertyDefinitionTemplate(); pt.setName(getJCRName(qPd.getName())); pt.setAutoCreated(qPd.isAutoCreated()); pt.setMandatory(qPd.isMandatory()); pt.setOnParentVersion(qPd.getOnParentVersion()); pt.setProtected(qPd.isProtected()); pt.setRequiredType(qPd.getRequiredType()); pt.setMultiple(qPd.isMultiple()); pt.setFullTextSearchable(qPd.isFullTextSearchable()); pt.setValueConstraints(createValueConstraints(qPd.getRequiredType(), qPd.getValueConstraints())); pt.setAvailableQueryOperators(qPd.getAvailableQueryOperators()); pt.setQueryOrderable(qPd.isQueryOrderable()); pt.setDefaultValues(createValues(qPd.getDefaultValues())); return pt; }
/** * Create a new JCR property definition from the given <code>QPropertyDefinition</code>. * * @param qPd A SPI property definition. * @return the corresponding JCR property definition. * @throws RepositoryException if an error occurs. */ public PropertyDefinition create(QPropertyDefinition qPd) throws RepositoryException { PropertyDefinitionTemplate pt = ntMgr.createPropertyDefinitionTemplate(); pt.setName(getJCRName(qPd.getName())); pt.setAutoCreated(qPd.isAutoCreated()); pt.setMandatory(qPd.isMandatory()); pt.setOnParentVersion(qPd.getOnParentVersion()); pt.setProtected(qPd.isProtected()); pt.setRequiredType(qPd.getRequiredType()); pt.setMultiple(qPd.isMultiple()); pt.setFullTextSearchable(qPd.isFullTextSearchable()); pt.setValueConstraints(createValueConstraints(qPd.getRequiredType(), qPd.getValueConstraints())); pt.setAvailableQueryOperators(qPd.getAvailableQueryOperators()); pt.setQueryOrderable(qPd.isQueryOrderable()); pt.setDefaultValues(createValues(qPd.getDefaultValues())); return pt; }
tmpl.setMultiple(def.isMultiple()); tmpl.setAvailableQueryOperators(def.getAvailableQueryOperators()); tmpl.setFullTextSearchable(def.isFullTextSearchable()); tmpl.setQueryOrderable(def.isQueryOrderable());
tmpl.setMultiple(def.isMultiple()); tmpl.setAvailableQueryOperators(def.getAvailableQueryOperators()); tmpl.setFullTextSearchable(def.isFullTextSearchable()); tmpl.setQueryOrderable(def.isQueryOrderable());