Hey folks,
i’m currently implementing the standard PropertySources for
SystemPropertySource and EnvironmentPropertySource.
to have a simple handling with the default ordinals i've added an interface
with constants for the default ordinals.
the default ordinals are currently taken from deltaspike but the values should
be discussed.
i've also added a TAMAYA_ORDINAL constant to PropertySource which can be
specified in every PropertySource to override the default ordinal. The value of
TAMAYA_ORDINAL is currently tamaya.ordinal but i think this should be discussed
also.
i’ll upload my patch to the created JIRA issue - pls review it and let me know
what i can do better ;-)
lg
reini
/**
* This interface defines the default ordinals for the 'standard'
* {@link org.apache.tamaya.spi.PropertySource}s
*
* DefaultOrdinals can be overwritten via {@link
org.apache.tamaya.spi.PropertySource#TAMAYA_ORDINAL}
*/
public interface DefaultOrdinal {
/**
* default ordinal for {@link
org.apache.tamaya.core.propertysource.BasePropertySource} if
* not overriden in each class
*/
static final int PROPERTY_SOURCE = 1000;
/**
* default ordinal for {@link
org.apache.tamaya.core.propertysource.SystemPropertySource}
*/
static final int SYSTEM_PROPERTIES = 400;
/**
* default ordinal for {@link
org.apache.tamaya.core.propertysource.EnvironmentPropertySource}
*/
static final int ENVIRONMENT_PROPERTIES = 300;
}