de.smartics.properties.api.core.domain
Interface PropertyDescriptor

Package class diagram package PropertyDescriptor
All Superinterfaces:
Serializable
All Known Implementing Classes:
PropertyMetaData

public interface PropertyDescriptor
     
     
extends Serializable

Defines property meta data. This information excludes the actual property value. It provides information such as name, type, default values and constraints on the property value.


Method Summary
 AccessType getAccessType()
          Returns the flag to define the access type.
 PropertyCategories getCategories()
          Returns the categories this property is associated with.
 PropertyComment getComment()
          Returns the comment to the property and its values.
 PropertyComment getComment(Locale locale)
          Returns the comment to the property and its values.
 PropertyDefinitionTime getConfigurationTime()
          The designed time the property is defined.
 List<? extends PropertyConstraint<?>> getConstraints()
          Returns a list of constraints a value for the property has to meet.
 PropertyContext getContext()
          Returns the context of the property descriptor.
 Class<?> getDeclaringType()
          Returns the type that declares the property that is described by this instance.
 PropertyExpression getDefaultExpression()
          Returns the expression to use to construct the value of the property.
 PropertyProjectdoc getDocumentMetaData()
          Returns the meta data information for the property.
 PropertyProjectdoc getDocumentMetaData(Locale locale)
          Returns the meta data information for the property.
 PropertySetProjectdoc getDocumentMetaDataProjectSet()
          Returns the meta data information for the property set.
 PropertySetProjectdoc getDocumentMetaDataProjectSet(Locale locale)
          Returns the meta data information for the property set.
 DocumentName getDocumentName()
          Returns the name of the document that identifies the document uniquely within the context of the project.
 PropertyKey getKey()
          Returns the key of the property.
 PropertyType getType()
          Returns the type of the property value.
 long getUpdateIntervalInMs()
          Returns the update interval in milliseconds (ms).
 PropertyUse.UseType getUseType()
          Returns the use type of the property.
 PropertyValueRange<?> getValueRange()
          Returns the range of values allowed for this property.
 boolean isMandatory()
          Checks if the property is mandatory to be not null.
 boolean isRuntimeMutable()
          Checks whether or not the property is mutable at runtime.
 boolean isSecured()
          Checks if the property is secured.
 

Method Detail

getContext

PropertyContext getContext()
Returns the context of the property descriptor.

Returns:
the context of the property descriptor.

getDeclaringType

Class<?> getDeclaringType()
Returns the type that declares the property that is described by this instance.

Returns:
the declaring type of the property this instance is the descriptor for.

getKey

PropertyKey getKey()
Returns the key of the property.

This value must not be null.

Returns:
the name of the component the property belongs to.

getType

PropertyType getType()
Returns the type of the property value.

This value must not be null.

If there is no value range specified for the property type, the type is either required to specify a static fromString method or is a standard or registered type whose conversion rules are well known.

 public static T fromString(String value);
 

Returns:
the type of the property value.

isMandatory

boolean isMandatory()
Checks if the property is mandatory to be not null. If the property is not mandatory, it is optional.

Returns:
true if the property is mandatory to be not null, false otherwise.

isSecured

boolean isSecured()
Checks if the property is secured.

Returns:
true if the property is secured, false if is readable by anyone.

getAccessType

AccessType getAccessType()
Returns the flag to define the access type.

Returns:
the flag to define the access type.

isRuntimeMutable

boolean isRuntimeMutable()
Checks whether or not the property is mutable at runtime.

Returns:
true if the property may be changed after startup, false if the property value is immutable (that is: stays the same) after startup.
See Also:
getUpdateIntervalInMs()

getUpdateIntervalInMs

long getUpdateIntervalInMs()
Returns the update interval in milliseconds (ms).

An application may cache the value of the property for the given period of time.

 
     
     
value description
< 0 Property is not mutable.
0 Property is read on each access.
> 0 Property is required to be read new after the given number of ms elapsed. In the meantime a previously read cached value is returned.

The constants defined in PropertyLifecycle.UpdateInterval provide constants to define intervals.

Returns:
the update interval in milliseconds (ms).

getConfigurationTime

PropertyDefinitionTime getConfigurationTime()
The designed time the property is defined.

This value must not be null.

Returns:
the designed time the property is defined.

getDefaultExpression

PropertyExpression getDefaultExpression()
Returns the expression to use to construct the value of the property. An expression may reference another property or may serve as a template containing any number of property references.

Resolving fails if at least one property reference cannot be resolved.

Example:

$ server
/path/${command}}

Returns:
the value of the expression. May be null.

getValueRange

PropertyValueRange<?> getValueRange()
Returns the range of values allowed for this property.

The returned value may be null if there is no specific range of values the value of the property has to be part of. For instance a property may have no value range or only value ranges that are not enumerable. The latter may only be modeled by a property constraint.

Returns:
the range for values allowed for this property. May be null.

getConstraints

List<? extends PropertyConstraint<?>> getConstraints()
Returns a list of constraints a value for the property has to meet.

Returns:
a list of constraints a value for the property has to meet. The list may be empty, but is never null.

getDocumentName

DocumentName getDocumentName()
Returns the name of the document that identifies the document uniquely within the context of the project. It is used to select the projectdoc document in the META-INF folder.

Returns:
the name of the document that identifies the document uniquely within the context of the project.

getDocumentMetaData

PropertyProjectdoc getDocumentMetaData()
Returns the meta data information for the property.

This value must not be null.

Returns:
the meta data information for the property.

getDocumentMetaData

PropertyProjectdoc getDocumentMetaData(Locale locale)
Returns the meta data information for the property.

This value must not be null.

Parameters:
locale - the locale to determine which bundle to use.
Returns:
the meta data information for the property.

getDocumentMetaDataProjectSet

PropertySetProjectdoc getDocumentMetaDataProjectSet()
Returns the meta data information for the property set.

This value must not be null.

Returns:
the meta data information for the property set.

getDocumentMetaDataProjectSet

PropertySetProjectdoc getDocumentMetaDataProjectSet(Locale locale)
Returns the meta data information for the property set.

This value must not be null.

Parameters:
locale - the locale to determine which bundle to use.
Returns:
the meta data information for the property set.

getComment

PropertyComment getComment()
Returns the comment to the property and its values.

This value must not be null.

Returns:
the comment to the property and its values.

getComment

PropertyComment getComment(Locale locale)
Returns the comment to the property and its values.

This value must not be null.

Parameters:
locale - the locale to determine which bundle to use.
Returns:
the comment to the property and its values.

getCategories

PropertyCategories getCategories()
Returns the categories this property is associated with.

Returns:
the categories this property is associated with.

getUseType

PropertyUse.UseType getUseType()
Returns the use type of the property.

Returns:
the use type of the property.


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