org.apache.felix.scr.impl.metadata
Class ReferenceMetadata

java.lang.Object
  extended by org.apache.felix.scr.impl.metadata.ReferenceMetadata

public class ReferenceMetadata
extends Object

Information associated to a dependency


Field Summary
static String CARDINALITY_0_1
           
static String CARDINALITY_0_N
           
static String CARDINALITY_1_1
           
static String CARDINALITY_1_N
           
static String POLICY_DYNAMIC
           
static String POLICY_STATIC
           
 
Constructor Summary
ReferenceMetadata()
           
 
Method Summary
 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
 String getCardinality()
          Get the cardinality as a string
 String getInterface()
          Returns the fully qualified name of the class that is used by the component to access the service
 String getName()
          Returns the name of the reference
 String getPolicy()
          Get the policy as a string
 String getTarget()
          Returns the filter expression that further constrains the set of target services
 String getTargetPropertyName()
          Returns the name of the component property referring to the target property of this reference.
 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
 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
 boolean isMultiple()
          Test if dependency is multiple (0..n or 1..n)
 boolean isOptional()
          Test if dependency is optional (0..1 or 0..n)
 boolean isStatic()
          Test if dependency's binding policy is static
 void setBind(String bind)
          Setter for the bind method attribute
 void setCardinality(String cardinality)
          Setter for the cardinality attribute
 void setInterface(String interfaceName)
          Setter for the interfaceName attribute
 void setName(String name)
          Setter for the name attribute
 void setPolicy(String policy)
          Setter for the policy attribute
 void setTarget(String target)
          Setter for the target attribute (filter)
 void setUnbind(String unbind)
          Setter for the unbind method attribute
 void setUpdated(String updated)
          Setter for the updated method attribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

ReferenceMetadata

public ReferenceMetadata()
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 -

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 -

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

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

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

getTargetPropertyName

public String getTargetPropertyName()
Returns the name of the component property referring to the target property of this reference.

Returns:
the name of the target property which is the name of this referene suffixed with the string ".target".


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.