|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.api.core.domain.PropertiesContext
@ThreadSafe public final class PropertiesContext
Defines the configuration for smartics properties configuration.
A context provides information for all its properties. Not all properties of an application may refer to the same context.
help.de.smartics.properties.core.PropertiesContextBuilder
.
Nested Class Summary | |
---|---|
static class |
PropertiesContext.Builder The builder of PropertiesContext . |
Field Summary | |
---|---|
static String |
BOOT_PROPERTIES_HOME The path to the folder within "META-INF/smartics-properties" where boot properties resources are located. |
static String |
DECLARATION_FILE The default location of the properties declaration configuration file. |
static String |
DECLARATION_FILE_NAME The name of the properties configuration file that provides information for declarations. |
static String |
DEFINITION_FILE The default location of the properties definition configuration file. |
static String |
DEFINITION_FILE_NAME The name of the properties configuration file that provides information for definitions. |
static String |
META_INF_HOME The path to the folder within META-INF where properties resources are located. |
static String |
META_INF_PROPERTY_SET_REPORT The location of the property set reports within the META-INF folder. |
Method Summary | |
---|---|
static PropertiesContext |
createEmptyContext() Creates an empty context. |
String |
createMetaInfPath(PropertyDescriptor descriptor) Returns the URL to the XML report in the META-INF directory of the given descriptor. |
String |
createMetaInfPath(PropertyDescriptor descriptor, Locale locale) Returns the URL to the XML report in the META-INF directory of the given descriptor. |
String |
createMetaInfPathPropertySet(PropertyDescriptor descriptor) Returns the URL to the property set XML report in the META-INF directory of the given descriptor. |
String |
createMetaInfPathPropertySet(PropertyDescriptor descriptor, Locale locale) Returns the URL to the property set XML report in the META-INF directory of the given descriptor. |
String |
createReportUrl(PropertyDescriptor descriptor) Returns the URL to the report documentation for the given descriptor. |
String |
createReportUrl(String target) Returns the URL to the relative target. |
String |
getHomePageUrl() Returns the URL to the home page of the project. |
List<Locale> |
getLocales() Returns the list of supported locales. |
String |
getPropertiesReportIndexUrl() Returns the URL to the index document of smartics properties reports. |
String |
getPropertiesReportUrl() Returns the URL to the root directory of smartics properties reports. |
boolean |
hasAliases() Checks whether any aliases are registered. |
String |
resolve(String alias) Resolves the alias to the target it points to. |
String |
toString() Returns the string representation of the object. |
void |
traverseAliases(AliasTraverser traverser) Traverses the registered aliases. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String META_INF_HOME
META-INF
where properties resources are located.
The value of this constant is "META-INF/smartics-properties".
"META-INF/smartics-properties"
public static final String BOOT_PROPERTIES_HOME
"META-INF/smartics-properties"
where boot properties resources are located.
The value of this constant is "META-INF/smartics-properties/boot".
"META-INF/smartics-properties/boot"
public static final String DECLARATION_FILE_NAME
The value of this constant is "declaration.xml".
"declaration.xml"
public static final String DEFINITION_FILE_NAME
The value of this constant is "definition.xml".
"definition.xml"
public static final String DECLARATION_FILE
The value of this constant is "META-INF/smartics-properties/declaration.xml".
"META-INF/smartics-properties/declaration.xml"
public static final String DEFINITION_FILE
The value of this constant is "META-INF/smartics-properties/definition.xml".
"META-INF/smartics-properties/definition.xml"
public static final String META_INF_PROPERTY_SET_REPORT
META-INF
folder.
The value of this constant is "META-INF/smartics-properties/property-set-report/".
"META-INF/smartics-properties/property-set-report/"
Method Detail |
---|
public static PropertiesContext createEmptyContext()
@CheckForNull public String getHomePageUrl()
null
.
@CheckForNull public String getPropertiesReportUrl()
null
.
@CheckForNull public String getPropertiesReportIndexUrl()
null
.
public List<Locale> getLocales()
public String createReportUrl(String target) throws IllegalArgumentException
target
- the relative URL.
null
if no root URL is provided by the context.
IllegalArgumentException
- of
target
is blank.
public String createReportUrl(PropertyDescriptor descriptor)
descriptor
- the properties descriptor whose report documentation URL is requested.
public String createMetaInfPath(PropertyDescriptor descriptor)
descriptor
- the properties descriptor whose XML report URL is requested.
public String createMetaInfPath(PropertyDescriptor descriptor, Locale locale)
descriptor
- the properties descriptor whose XML report URL is requested.
locale
- the locale to determine the comments.
public String createMetaInfPathPropertySet(PropertyDescriptor descriptor)
descriptor
- the properties descriptor whose property set XML report URL is requested.
public String createMetaInfPathPropertySet(PropertyDescriptor descriptor, Locale locale)
descriptor
- the properties descriptor whose property set XML report URL is requested.
locale
- the locale to determine the comments.
public String resolve(String alias) throws de.smartics.util.lang.BlankArgumentException, UnknownAliasException
alias
- the alias whose physical resource is requested.
de.smartics.util.lang.BlankArgumentException
- if
alias
is blank.
UnknownAliasException
- if the alias is not known.
public void traverseAliases(AliasTraverser traverser) throws NullPointerException
traverser
- the traverser to use.
NullPointerException
- if
traverser
is
null
.
public boolean hasAliases()
true
if at least one alias is registered,
false
otherwise.
public String toString()
toString
in class
Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |