@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.setFullTextSearchable(Boolean.valueOf( getAttrValue("isFullTextSearchable", child))); propertyDefinitionTemplate.setQueryOrderable(Boolean.valueOf( getAttrValue("isQueryOrderable", child)));
propertyDefinition.setMultiple(isMultiple); propertyDefinition.setProtected(hasProtectedStatus); propertyDefinition.setQueryOrderable(isQueryOrderable);
path.setName("jcr:path"); path.setRequiredType(PropertyType.PATH); path.setQueryOrderable(false); path.setFullTextSearchable(false); nodeType.getPropertyDefinitionTemplates().add(path); nom.setName("jcr:nom"); nom.setRequiredType(PropertyType.STRING); nom.setQueryOrderable(true); nom.setFullTextSearchable(true); nodeType.getPropertyDefinitionTemplates().add(nom); description.setName("jcr:description"); description.setRequiredType(PropertyType.STRING); description.setQueryOrderable(true); description.setFullTextSearchable(true); nodeType.getPropertyDefinitionTemplates().add(description); motsCles.setName("jcr:motsCles"); motsCles.setRequiredType(PropertyType.STRING); motsCles.setQueryOrderable(true); motsCles.setFullTextSearchable(true); nodeType.getPropertyDefinitionTemplates().add(motsCles); size.setName("jcr:size"); size.setRequiredType(PropertyType.STRING); size.setQueryOrderable(true); size.setFullTextSearchable(false); nodeType.getPropertyDefinitionTemplates().add(size);
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.setMultiple(Boolean.valueOf(propdDef.getProperty("multiple"))); propertyDefinitionTemplate.setFullTextSearchable(Boolean.valueOf(propdDef.getProperty("isFullTextSearchable"))); propertyDefinitionTemplate.setQueryOrderable(Boolean.valueOf(propdDef.getProperty("isQueryOrderable")));
pdt.setOnParentVersion(onParentVersion); pdt.setProtected(field.isJcrProtected()); pdt.setQueryOrderable(true);
/** * 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.setAvailableQueryOperators(def.getAvailableQueryOperators()); tmpl.setFullTextSearchable(def.isFullTextSearchable()); tmpl.setQueryOrderable(def.isQueryOrderable());
tmpl.setAvailableQueryOperators(def.getAvailableQueryOperators()); tmpl.setFullTextSearchable(def.isFullTextSearchable()); tmpl.setQueryOrderable(def.isQueryOrderable());