org.ow2.frascati.tinfi.api.control
Interface SCAPropertyController


public interface SCAPropertyController

Property control interface for SCA primitive components.

Author:
Lionel Seinturier

Field Summary
static java.lang.String NAME
          NAME of the content controller.
 
Method Summary
 boolean containsPropertyName(java.lang.String name)
          Return true if the specified property has been set.
 SCAPropertyController getPromoter(java.lang.String name)
          Return the reference of the property controller which promotes the specified property.
 java.lang.String getPromoterPropertyName(java.lang.String name)
          Return the name of the property defined at the level of the component which promotes the specified property.
 java.lang.String[] getPropertyNames()
          Return the names of the properties whose values have been set by invoking setValue(String, Object).
 java.lang.Class<?> getType(java.lang.String name)
          Return the type of the specified property.
 java.lang.Object getValue(java.lang.String name)
          Return the value of the specified property.
 boolean hasBeenSet(java.lang.String name)
          Return true if the specified property has been set by calling setValue(String, Object).
 boolean isDeclared(java.lang.String name)
          Return true if the specified property is declared by the content class associated with the current component.
 void setPromoter(java.lang.String name, SCAPropertyController promoter)
          Set the reference of the property controller which promotes the specified property to the current property controller.
 void setPromoter(java.lang.String name, SCAPropertyController promoter, java.lang.String promoterPropertyName)
          Set the reference of the property controller which promotes the specified property name to the current property controller and the associated property name at the level of the promoter.
 void setType(java.lang.String name, java.lang.Class<?> type)
           Set the type of the specified property.
 void setValue(java.lang.String name, java.lang.Object value)
          Set the value of the specified property.
 

Field Detail

NAME

static final java.lang.String NAME
NAME of the content controller.

See Also:
Constant Field Values
Method Detail

setType

void setType(java.lang.String name,
             java.lang.Class<?> type)

Set the type of the specified property. If the property type has already been set, the old value is lost, and the new one is recorded.

The rationale for recording property types lies in the fact that complex properties may have a type which differs from the one of the field where their values will be injected. Typically, complex property values will be injected in fields of type Object.

Parameters:
name - the property name
type - the property type
Since:
1.1.1

setValue

void setValue(java.lang.String name,
              java.lang.Object value)
              throws java.lang.IllegalArgumentException
Set the value of the specified property. If the property value has already been set, the old value is lost, and the new one is recorded.

Parameters:
name - the property name
value - the property value
Throws:
java.lang.IllegalArgumentException - if a type has been defined for the specified property with setValue(String, Object) and if the specified value is not an instance of this type

getType

java.lang.Class<?> getType(java.lang.String name)
Return the type of the specified property. Return null if the property type has not been set.

Parameters:
name - the property name
Returns:
the property value
Since:
1.1.1

getValue

java.lang.Object getValue(java.lang.String name)
Return the value of the specified property. Return null if the property value has not been set.

Parameters:
name - the property name
Returns:
the property value

containsPropertyName

boolean containsPropertyName(java.lang.String name)
Return true if the specified property has been set.

Parameters:
name - the property name
Returns:
true if the property has been set, false otherwise

getPropertyNames

java.lang.String[] getPropertyNames()
Return the names of the properties whose values have been set by invoking setValue(String, Object).

Since:
1.1.1

isDeclared

boolean isDeclared(java.lang.String name)
Return true if the specified property is declared by the content class associated with the current component. Else, or if the current component is not associated with a content class, return false.

Parameters:
name - the property name
Returns:
true if the property is declared
Since:
1.4.2

hasBeenSet

boolean hasBeenSet(java.lang.String name)
Return true if the specified property has been set by calling setValue(String, Object).

Parameters:
name - the property name
Returns:
true if the property has been set
Since:
1.4.2

setPromoter

void setPromoter(java.lang.String name,
                 SCAPropertyController promoter)
                 throws IllegalPromoterException
Set the reference of the property controller which promotes the specified property to the current property controller.

Parameters:
name - the property name
promoter - the promoter component or null to unregister the promoter
Throws:
IllegalPromoterException - when attempting to set a cycle between property promoters
Since:
0.4.3

getPromoter

SCAPropertyController getPromoter(java.lang.String name)
Return the reference of the property controller which promotes the specified property. Return null if the property is managed locally by the current property controller.

Parameters:
name - the property name
Returns:
the promoter component or null
Since:
0.4.3

setPromoter

void setPromoter(java.lang.String name,
                 SCAPropertyController promoter,
                 java.lang.String promoterPropertyName)
                 throws IllegalPromoterException
Set the reference of the property controller which promotes the specified property name to the current property controller and the associated property name at the level of the promoter.

Parameters:
name - the property name
promoter - the promoter component or null to unregister the promoter
promoterPropertyName - the property name at the level of the promoter
Throws:
IllegalPromoterException - when attempting to set a cycle between property promoters
Since:
1.4

getPromoterPropertyName

java.lang.String getPromoterPropertyName(java.lang.String name)
Return the name of the property defined at the level of the component which promotes the specified property. Return null if the property is managed locally by the current property controller.

Parameters:
name - the property name
Returns:
the property name at the level of the promoter or null
Since:
1.4


Copyright © 2007-2011. All Rights Reserved.