de.smartics.properties.spi.core.context
Class MandatoryPropertyContext

Package class diagram package MandatoryPropertyContext
java.lang.Object
  extended by de.smartics.properties.spi.core.context.MandatoryPropertyContext
All Implemented Interfaces:
PropertyContext, Serializable

public final class MandatoryPropertyContext
     
     
extends Object
implements PropertyContext

Provides context information for a given property.

The implementation guarantees that a context is present.

See Also:
Serialized Form

Constructor Summary
MandatoryPropertyContext(PropertiesContext propertiesContext, PropertyDescriptor descriptor)
          Default constructor.
 
Method Summary
 String getHomePageUrl()
          Returns the URL to the home page of the project.
 String getHomePageUrl(Locale locale)
          Returns the URL to the home page of the project in the given locale.
 PropertiesContext getPropertiesContext()
          Returns the context of the properties.
 String getPropertiesReportIndexUrl()
          Returns the URL to the index document of properties reports.
 String getPropertiesReportIndexUrl(Locale locale)
          Returns the URL to the index document of properties reports.
 String getPropertiesReportUrl()
          Returns the URL to the root directory of properties reports.
 String getPropertiesReportUrl(Locale locale)
          Returns the URL to the root directory of properties reports.
 String getPropertyReportUrl()
          Returns the URL to the report documentation for the given descriptor.
 String getPropertyReportUrl(Locale locale)
          Returns the URL to the report documentation for the given descriptor.
 List<Locale> getSupportedLocales()
          Returns the list of supported locales.
 String toString()
          Returns the string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MandatoryPropertyContext

public MandatoryPropertyContext(PropertiesContext propertiesContext,
                                PropertyDescriptor descriptor)
                         throws de.smartics.util.lang.NullArgumentException
Default constructor.

Parameters:
propertiesContext - the context of the properties.
descriptor - the descriptor of the property.
Throws:
de.smartics.util.lang.NullArgumentException - if either propertiesContext or descriptor is null.
Method Detail

getPropertiesContext

public PropertiesContext getPropertiesContext()
Description copied from interface: PropertyContext
Returns the context of the properties.

Specified by:
getPropertiesContext in interface PropertyContext
Returns:
the context of the properties.

getHomePageUrl

public String getHomePageUrl()
Description copied from interface: PropertyContext
Returns the URL to the home page of the project.

Specified by:
getHomePageUrl in interface PropertyContext
Returns:
the URL to the home page of the project.

getHomePageUrl

public String getHomePageUrl(Locale locale)
Description copied from interface: PropertyContext
Returns the URL to the home page of the project in the given locale. Returns a default URL, if the given locale is not supported.

Specified by:
getHomePageUrl in interface PropertyContext
Parameters:
locale - the identifier of the requested localized resource.
Returns:
the URL to the home page of the project.

getPropertiesReportIndexUrl

public String getPropertiesReportIndexUrl()
Description copied from interface: PropertyContext
Returns the URL to the index document of properties reports.

Specified by:
getPropertiesReportIndexUrl in interface PropertyContext
Returns:
the URL to the index document of properties reports.

getPropertiesReportIndexUrl

public String getPropertiesReportIndexUrl(Locale locale)
Description copied from interface: PropertyContext
Returns the URL to the index document of properties reports.

Specified by:
getPropertiesReportIndexUrl in interface PropertyContext
Parameters:
locale - the identifier of the requested localized resource.
Returns:
the URL to the index document of properties reports.

getPropertiesReportUrl

public String getPropertiesReportUrl()
Description copied from interface: PropertyContext
Returns the URL to the root directory of properties reports.

Specified by:
getPropertiesReportUrl in interface PropertyContext
Returns:
the URL to the root directory of properties reports.

getPropertiesReportUrl

public String getPropertiesReportUrl(Locale locale)
Description copied from interface: PropertyContext
Returns the URL to the root directory of properties reports.

Specified by:
getPropertiesReportUrl in interface PropertyContext
Parameters:
locale - the identifier of the requested localized resource.
Returns:
the URL to the root directory of properties reports.

getPropertyReportUrl

public String getPropertyReportUrl()
Description copied from interface: PropertyContext
Returns the URL to the report documentation for the given descriptor.

Specified by:
getPropertyReportUrl in interface PropertyContext
Returns:
the absolute URL to the report.

getPropertyReportUrl

public String getPropertyReportUrl(Locale locale)
Description copied from interface: PropertyContext
Returns the URL to the report documentation for the given descriptor.

Specified by:
getPropertyReportUrl in interface PropertyContext
Parameters:
locale - the identifier of the requested localized resource.
Returns:
the absolute URL to the report.

getSupportedLocales

public List<Locale> getSupportedLocales()
Description copied from interface: PropertyContext
Returns the list of supported locales. The list contains locales the context provides localized information for.

Specified by:
getSupportedLocales in interface PropertyContext
Returns:
the list of supported locales.

toString

public String toString()
Returns the string representation of the object.

Overrides:
toString in class Object
Returns:
the string representation of the object.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.