org.apache.felix.ipojo.api

## Class ServiceProperty

- java.lang.Object
- - org.apache.felix.ipojo.api.ServiceProperty

    public class ServiceProperty
    extends java.lang.Object

Allows configuring a service property.

Author:
  Felix Project Team

### Constructor Summary

Constructors
Constructor and Description
`ServiceProperty()`

### Method Summary

All Methods Instance Methods Concrete Methods
`org.apache.felix.ipojo.metadata.Element` `getElement()` Gets the 'property' element.
`java.lang.Object` `getPropertyValue(ComponentInstance instance)` Gets the property value of the current property on the given instance.
`ServiceProperty` `setField(java.lang.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(java.lang.String name)` Sets the property name.
`ServiceProperty` `setType(java.lang.String name)` Sets the property type.
`ServiceProperty` `setValue(java.lang.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(java.lang.String name)

Sets the property name.

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

#### setField

    public ServiceProperty setField(java.lang.String name)

Sets the property field.

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

#### setType

    public ServiceProperty setType(java.lang.String name)

Sets the property type.

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

#### setValue

    public ServiceProperty setValue(java.lang.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 org.apache.felix.ipojo.metadata.Element getElement()

Gets the 'property' element.

Returns:
  the element describing the current property.

#### getPropertyValue

    public java.lang.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.