org.apache.felix.ipojo.api
Class ServiceProperty

java.lang.Object
  extended by org.apache.felix.ipojo.api.ServiceProperty

public class ServiceProperty
extends Object

Allows configuring a service property.

Author:
Felix Project Team

Constructor Summary
ServiceProperty()
           
 
Method Summary
 Element getElement()
          Gets the 'property' element.
 Object getPropertyValue(ComponentInstance instance)
          Gets the property value of the current property on the given instance.
 ServiceProperty setField(String name)
          Sets the property field.
 ServiceProperty setImmutable(boolean immutable)
          Sets if the property is immutable.
 ServiceProperty setMandatory(boolean mandatory)
          Sets if the property is mandatory.
 ServiceProperty setName(String name)
          Sets the property name.
 ServiceProperty setType(String name)
          Sets the property type.
 ServiceProperty setValue(String name)
          Sets the property value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceProperty

public ServiceProperty()
Method Detail

setName

public ServiceProperty setName(String name)
Sets the property name.

Parameters:
name - the property name
Returns:
the current property object

setField

public ServiceProperty setField(String name)
Sets the property field.

Parameters:
name - the property field
Returns:
the current property object

setType

public ServiceProperty setType(String name)
Sets the property type.

Parameters:
name - the property type
Returns:
the current property object

setValue

public ServiceProperty setValue(String name)
Sets the property value.

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

setImmutable

public ServiceProperty setImmutable(boolean immutable)
Sets if the property is immutable.

Parameters:
immutable - true if the dependency is immutable.
Returns:
the current property object

setMandatory

public ServiceProperty setMandatory(boolean mandatory)
Sets if the property is mandatory.

Parameters:
mandatory - true if the dependency is mandatory.
Returns:
the current property object

getElement

public Element getElement()
Gets the 'property' element.

Returns:
the element describing the current property.

getPropertyValue

public Object getPropertyValue(ComponentInstance instance)
Gets the property value of the current property on the given instance.

Parameters:
instance - the instance on which looking for the property value
Returns:
the property value or null if not found.


Copyright © 2011 Apache Software Foundation. All Rights Reserved.