private static String getExpression(final PropertyDescriptor descriptor) { final PropertyExpression expression = descriptor.getDefaultExpression(); return expression != null ? expression.getExpression() : null; }
private static String resolve(final PropertyDescriptor descriptor) { final DocumentName name = descriptor.getDocumentName(); final String target = name.getName(); // final String target = descriptor.getKey().toString(); return target; }
/** * Default constructor. * * @param code the error or exception code of the exception. * @param cause the cause to the problem. * @param propertyDescriptor the descriptor of the property raising the * exception. */ public PropertyDescriptorMessageBean(final PropertiesCode code, final Throwable cause, final PropertyDescriptor propertyDescriptor) { super(code, cause, provide(propertyDescriptor).getKey()); this.propertyDescriptor = provide(propertyDescriptor); }
/** * Returns the key of the property raising the exception. * * @return the key of the property raising the exception. */ public PropertyKey getPropertyKey() { return getMessageBean().getPropertyKey(); }
private void checkDuplication(final String systemId, final ConfigurationKey<?> anyKey, final ConfigurationKey<?> key) { if (anyKey != null) { throw new DuplicateDefaultKeyException(duplicate(systemId, anyKey.toString(), key.toString())); } }
@Override public PropertyExpressionMessageBean getMessageBean() { return (PropertyExpressionMessageBean) super.getMessageBean(); }
/** * Adds a tag. Blank tag names or tags already part of the list will be * ignored. * * @param tag the tag to be added. */ public final void addTag(final String tag) { addElement(tags, tag); }
/** * Returns the string representation of the object. * * @return the string representation of the object. */ @Override public String toString() { return getDisplayId(); } }
/** * Returns the document instance metadata. * * @return the document instance metadata. */ public DocumentMetaData getMetaData() { return descriptor.getDocumentMetaData(); }
/** * Returns the string representation of the object. * * @return the string representation of the object. */ @Override public String toString() { return getDisplayId(); } }
private static PropertyDescriptor provide( final PropertyDescriptor propertyDescriptor) { return propertyDescriptor != null ? propertyDescriptor : new DefaultPropertyDescriptor(); }
/** * Returns the URL to the XML report in the META-INF directory of the given * descriptor. * * @param descriptor the properties descriptor whose XML report URL is * requested. * @return the class loader root rooted path. */ public String createMetaInfPath(final PropertyDescriptor descriptor) { return createMetaInfPath(descriptor, null); }
/** * Returns the URL to the property set XML report in the META-INF directory of * the given descriptor. * * @param descriptor the properties descriptor whose property set XML report * URL is requested. * @return the class loader root rooted path. */ public String createMetaInfPathPropertySet(final PropertyDescriptor descriptor) { return createMetaInfPathPropertySet(descriptor, null); }
private static String getExpression(final PropertyDescriptor descriptor) { final PropertyExpression expression = descriptor.getDefaultExpression(); return expression != null ? expression.getExpression() : null; }
@Override public final PropertyValueMessageBean getMessageBean() { return (PropertyValueMessageBean) super.getMessageBean(); }
/** * Adds a parent. Blank parent names or parents already part of the list will * be ignored. * * @param parent the parent to be added. */ public final void addParent(final String parent) { addElement(parents, parent); }
@Override public final PropertyDescriptorClashingMessageBean getMessageBean() { return (PropertyDescriptorClashingMessageBean) super.getMessageBean(); }
/** * Adds a note. Blank notes or notes already part of the list will be ignored. * * @param note the note to be added. */ public final void addNote(final String note) { addElement(notes, note); }
@Override public final PropertyValidationMessageBean getMessageBean() { return (PropertyValidationMessageBean) super.getMessageBean(); }