Class ReferenceMetadata
- java.lang.Object
-
- org.apache.felix.scr.impl.metadata.ReferenceMetadata
-
public class ReferenceMetadata extends Object
Information associated to a dependency
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReferenceMetadata.ReferenceScope
-
Field Summary
Fields Modifier and Type Field Description static StringCARDINALITY_0_1static StringCARDINALITY_0_Nstatic StringCARDINALITY_1_1static StringCARDINALITY_1_Nstatic StringFIELD_VALUE_TYPE_PROPERTIESstatic StringFIELD_VALUE_TYPE_REFERENCEstatic StringFIELD_VALUE_TYPE_SERVICEstatic StringFIELD_VALUE_TYPE_SERVICEOBJECTSstatic StringFIELD_VALUE_TYPE_TUPLEstatic StringPOLICY_DYNAMICstatic StringPOLICY_OPTION_GREEDYstatic StringPOLICY_OPTION_RELUCTANTstatic StringPOLICY_STATIC
-
Constructor Summary
Constructors Constructor Description ReferenceMetadata()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBind()Get the name of a method in the component implementation class that is used to notify that a service is bound to the component configurationStringgetCardinality()Get the cardinality as a stringStringgetDebugInfo()StringgetField()Get the name of a field in the component implementation class that is used to hold the referenceStringgetFieldCollectionType()Get the value type of a field in the component implementation class that is used to hold the referenceStringgetFieldOption()Get the strategy of a field in the component implementation class that is used to hold the referenceStringgetInterface()Returns the fully qualified name of the class that is used by the component to access the serviceStringgetMinCardinalityName()StringgetName()Returns the name of the referenceStringgetPolicy()Get the policy as a stringStringgetPolicyOption()Get the policy option as a stringReferenceMetadata.ReferenceScopegetScope()StringgetTarget()Returns the filter expression that further constrains the set of target servicesStringgetTargetPropertyName()Returns the name of the component property referring to thetargetproperty of this reference.StringgetUnbind()Get the name of a method in the component implementation class that is used to notify that a service is unbound from the component configurationStringgetUpdated()Get the name of a method in the component implementation class that is used to notify that the service properties of a bound service have been updatedbooleanisMultiple()Test if dependency is multiple (0..n or 1..n)booleanisOptional()Test if dependency is optional (0..1 or 0..n)booleanisReluctant()Test if policy option is reluctantbooleanisReplace()Test if field strategy is replace.booleanisStatic()Test if dependency's binding policy is staticvoidsetBind(String bind)Setter for the bind method attributevoidsetCardinality(String cardinality)Setter for the cardinality attributevoidsetField(String field)Setter for the field attributevoidsetFieldCollectionType(String valuetype)Setter for the field value type attributevoidsetFieldOption(String strategy)Setter for the field strategy attributevoidsetInterface(String interfaceName)Setter for the interfaceName attributevoidsetName(String name)Setter for the name attributevoidsetPolicy(String policy)Setter for the policy attributevoidsetPolicyOption(String policyOption)Setter for the policy option attributevoidsetScope(String scopeName)voidsetTarget(String target)Setter for the target attribute (filter)voidsetUnbind(String unbind)Setter for the unbind method attributevoidsetUpdated(String updated)Setter for the updated method attribute
-
-
-
Field Detail
-
CARDINALITY_0_1
public static final String CARDINALITY_0_1
- See Also:
- Constant Field Values
-
CARDINALITY_0_N
public static final String CARDINALITY_0_N
- See Also:
- Constant Field Values
-
CARDINALITY_1_1
public static final String CARDINALITY_1_1
- See Also:
- Constant Field Values
-
CARDINALITY_1_N
public static final String CARDINALITY_1_N
- See Also:
- Constant Field Values
-
POLICY_STATIC
public static final String POLICY_STATIC
- See Also:
- Constant Field Values
-
POLICY_DYNAMIC
public static final String POLICY_DYNAMIC
- See Also:
- Constant Field Values
-
POLICY_OPTION_RELUCTANT
public static final String POLICY_OPTION_RELUCTANT
- See Also:
- Constant Field Values
-
POLICY_OPTION_GREEDY
public static final String POLICY_OPTION_GREEDY
- See Also:
- Constant Field Values
-
FIELD_VALUE_TYPE_SERVICE
public static final String FIELD_VALUE_TYPE_SERVICE
- See Also:
- Constant Field Values
-
FIELD_VALUE_TYPE_PROPERTIES
public static final String FIELD_VALUE_TYPE_PROPERTIES
- See Also:
- Constant Field Values
-
FIELD_VALUE_TYPE_REFERENCE
public static final String FIELD_VALUE_TYPE_REFERENCE
- See Also:
- Constant Field Values
-
FIELD_VALUE_TYPE_SERVICEOBJECTS
public static final String FIELD_VALUE_TYPE_SERVICEOBJECTS
- See Also:
- Constant Field Values
-
FIELD_VALUE_TYPE_TUPLE
public static final String FIELD_VALUE_TYPE_TUPLE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setName
public void setName(String name)
Setter for the name attribute- Parameters:
name-
-
setInterface
public void setInterface(String interfaceName)
Setter for the interfaceName attribute- Parameters:
interfaceName-
-
setCardinality
public void setCardinality(String cardinality)
Setter for the cardinality attribute- Parameters:
cardinality-
-
setPolicy
public void setPolicy(String policy)
Setter for the policy attribute- Parameters:
policy-
-
setPolicyOption
public void setPolicyOption(String policyOption)
Setter for the policy option attribute- Parameters:
policyOption-
-
setTarget
public void setTarget(String target)
Setter for the target attribute (filter)- Parameters:
target-
-
setBind
public void setBind(String bind)
Setter for the bind method attribute- Parameters:
bind-
-
setUpdated
public void setUpdated(String updated)
Setter for the updated method attribute- Parameters:
updated-
-
setUnbind
public void setUnbind(String unbind)
Setter for the unbind method attribute- Parameters:
unbind-
-
setField
public void setField(String field)
Setter for the field attribute- Parameters:
field- the field name
-
setFieldOption
public void setFieldOption(String strategy)
Setter for the field strategy attribute- Parameters:
strategy- the field strategy
-
setFieldCollectionType
public void setFieldCollectionType(String valuetype)
Setter for the field value type attribute- Parameters:
valuetype- the field value type
-
setScope
public void setScope(String scopeName)
-
getName
public String getName()
Returns the name of the reference- Returns:
- A string containing the reference's name
-
getInterface
public String getInterface()
Returns the fully qualified name of the class that is used by the component to access the service- Returns:
- A string containing a fully qualified name
-
getCardinality
public String getCardinality()
Get the cardinality as a string- Returns:
- A string with the cardinality
-
getPolicy
public String getPolicy()
Get the policy as a string- Returns:
- A string with the policy
-
getPolicyOption
public String getPolicyOption()
Get the policy option as a string- Returns:
- A string with the policy option
-
getTarget
public String getTarget()
Returns the filter expression that further constrains the set of target services- Returns:
- A string with a filter
-
getBind
public String getBind()
Get the name of a method in the component implementation class that is used to notify that a service is bound to the component configuration- Returns:
- a String with the name of the bind method
-
getUpdated
public String getUpdated()
Get the name of a method in the component implementation class that is used to notify that the service properties of a bound service have been updated- Returns:
- a String with the name of the updated method
-
getUnbind
public String getUnbind()
Get the name of a method in the component implementation class that is used to notify that a service is unbound from the component configuration- Returns:
- a String with the name of the unbind method
-
getField
public String getField()
Get the name of a field in the component implementation class that is used to hold the reference- Returns:
- a String with the name of the field
-
getFieldOption
public String getFieldOption()
Get the strategy of a field in the component implementation class that is used to hold the reference- Returns:
- a String with the strategy name for the field
-
getFieldCollectionType
public String getFieldCollectionType()
Get the value type of a field in the component implementation class that is used to hold the reference- Returns:
- a String with the value type for the field
-
isStatic
public boolean isStatic()
Test if dependency's binding policy is static- Returns:
- true if static
-
isOptional
public boolean isOptional()
Test if dependency is optional (0..1 or 0..n)- Returns:
- true if the dependency is optional
-
isMultiple
public boolean isMultiple()
Test if dependency is multiple (0..n or 1..n)- Returns:
- true if the dependency is multiple
-
isReluctant
public boolean isReluctant()
Test if policy option is reluctant- Returns:
- true if policy option is reluctant
-
isReplace
public boolean isReplace()
Test if field strategy is replace.- Returns:
- true if field strategy is replace
-
getTargetPropertyName
public String getTargetPropertyName()
Returns the name of the component property referring to thetargetproperty of this reference.- Returns:
- the name of the target property which is the name of this referene suffixed with the string ".target".
-
getMinCardinalityName
public String getMinCardinalityName()
-
getScope
public ReferenceMetadata.ReferenceScope getScope()
-
getDebugInfo
public String getDebugInfo()
-
-