protected boolean isPropertyEnabled(PropertyAccessor propertyAccessor) { // check if field is enabled Enabled enabled = propertyAccessor.getAnnotation(Enabled.class); if(enabled != null && !enabled.value()) { logger.debug("Skipping non-enabled field: {}", propertyAccessor.getName()); return false; } return true; }
@Enabled(false) public String getActualVariable() { return variable != null ? variable : name; }
protected boolean isPropertyEnabled(PropertyAccessor propertyAccessor) { // check if field is enabled Enabled enabled = propertyAccessor.getAnnotation(Enabled.class); if(enabled != null && !enabled.value()) { logger.debug("Skipping non-enabled field: {}", propertyAccessor.getName()); return false; } return true; }
@XmlElementWrapper(name="properties") @XmlElements({ @XmlElement(name="property",type=CrudProperty.class), @XmlElement(name="virtual-property",type=VirtualCrudProperty.class), }) @Enabled(false) public List<CrudProperty> getProperties() { return properties; }
if(enabled != null && !enabled.value()) { logger.debug("Skipping non-enabled field: {}", current.getName());
@XmlElementWrapper(name="selectionProviders") @XmlElements({ @XmlElement(name="selectionProvider",type=SelectionProviderReference.class) }) @Enabled(false) public List<SelectionProviderReference> getSelectionProviders() { return selectionProviders; }
if(enabled != null && !enabled.value()) { logger.debug("Skipping non-enabled field: {}", current.getName());
accessor.getAnnotation(Enabled.class); if (enabledAnnotation != null) { enabled = enabledAnnotation.value(); logger.debug("Enabled annotation present with value: {}", enabled);
boolean accessorEnabled = (enabledAnn == null || enabledAnn.value());
boolean accessorEnabled = (enabledAnn == null || enabledAnn.value());
accessor.getAnnotation(Enabled.class); if (enabledAnnotation != null) { enabled = enabledAnnotation.value(); logger.debug("Enabled annotation present with value: {}", enabled);
protected void setupPropertyEdits() { if(classAccessor == null) { return; } PropertyAccessor[] propertyAccessors = classAccessor.getProperties(); propertyEdits = new CrudPropertyEdit[propertyAccessors.length]; for (int i = 0; i < propertyAccessors.length; i++) { CrudPropertyEdit edit = new CrudPropertyEdit(); PropertyAccessor propertyAccessor = propertyAccessors[i]; edit.name = propertyAccessor.getName(); com.manydesigns.elements.annotations.Label labelAnn = propertyAccessor.getAnnotation(com.manydesigns.elements.annotations.Label.class); edit.label = labelAnn != null ? labelAnn.value() : null; Enabled enabledAnn = propertyAccessor.getAnnotation(Enabled.class); edit.enabled = enabledAnn != null && enabledAnn.value(); InSummary inSummaryAnn = propertyAccessor.getAnnotation(InSummary.class); edit.inSummary = inSummaryAnn != null && inSummaryAnn.value(); Insertable insertableAnn = propertyAccessor.getAnnotation(Insertable.class); edit.insertable = insertableAnn != null && insertableAnn.value(); Updatable updatableAnn = propertyAccessor.getAnnotation(Updatable.class); edit.updatable = updatableAnn != null && updatableAnn.value(); Searchable searchableAnn = propertyAccessor.getAnnotation(Searchable.class); edit.searchable = searchableAnn != null && searchableAnn.value(); propertyEdits[i] = edit; } }