org.ops4j.peaberry.util
Class Attributes

java.lang.Object
  extended by org.ops4j.peaberry.util.Attributes

public final class Attributes
extends Object

Methods for dealing with service attributes.

Author:
mcculls@gmail.com (Stuart McCulloch)

Method Summary
static Map<String,?> names(String... names)
          Convert the given LDAP distinguished names into a service attribute map.
static Map<String,?> objectClass(Class<?>... interfaces)
          Create an objectClass service attribute from the given API.
static Map<String,?> properties(Properties properties)
          Convert the given service properties into a service attribute map.
static Map<String,?> union(Map... attributes)
          Create a union of all the services attributes passed into this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

properties

public static Map<String,?> properties(Properties properties)
Convert the given service properties into a service attribute map.

Parameters:
properties - service properties
Returns:
service attributes
Throws:
IllegalArgumentException - if there are any non-String keys

names

public static Map<String,?> names(String... names)
Convert the given LDAP distinguished names into a service attribute map.

Parameters:
names - distinguished names
Returns:
service attributes
Throws:
IllegalArgumentException - if there are any invalid names
See Also:
RFC-2253

objectClass

public static Map<String,?> objectClass(Class<?>... interfaces)
Create an objectClass service attribute from the given API.

Parameters:
interfaces - service API
Returns:
service attributes

union

public static Map<String,?> union(Map... attributes)
Create a union of all the services attributes passed into this method.

Parameters:
attributes - collection of service attributes
Returns:
union of the given service attributes
Since:
1.1


Copyright © 2006-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.