org.apache.aries.jmx.codec
Class RoleData

java.lang.Object
  extended by org.apache.aries.jmx.codec.RoleData
Direct Known Subclasses:
UserData

public class RoleData
extends Object

RoleData represents Role Type @see UserAdminMBean.ROLE_TYPE.It is a codec for the CompositeData representing a Role.

Version:
$Rev: 920467 $ $Date: 2010-03-08 19:22:22 +0000 (Mon, 08 Mar 2010) $

Field Summary
protected  String name
          role name.
protected  int type
          role type.
 
Constructor Summary
RoleData(org.osgi.service.useradmin.Role role)
          Constructs new RoleData from Role object.
RoleData(String name, int type)
          Constructs new RoleData.
 
Method Summary
static RoleData from(CompositeData data)
          Static factory method to create RoleData from CompositeData object.
 String getName()
           
 int getType()
           
protected static Dictionary<String,Object> propertiesFrom(TabularData data)
          Creates properties from TabularData object.
 CompositeData toCompositeData()
          Translates RoleData to CompositeData represented by compositeType UserAdminMBean.ROLE_TYPE.
protected static TabularData toTabularData(Dictionary<String,Object> props)
          Creates TabularData from Dictionary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name
role name.


type

protected int type
role type.

Constructor Detail

RoleData

public RoleData(org.osgi.service.useradmin.Role role)
Constructs new RoleData from Role object.

Parameters:
role - Role instance.

RoleData

public RoleData(String name,
                int type)
Constructs new RoleData.

Parameters:
name - role name.
type - role type.
Method Detail

toCompositeData

public CompositeData toCompositeData()
Translates RoleData to CompositeData represented by compositeType UserAdminMBean.ROLE_TYPE.

Returns:
translated RoleData to compositeData.

from

public static RoleData from(CompositeData data)
Static factory method to create RoleData from CompositeData object.

Parameters:
data - CompositeData instance.
Returns:
RoleData instance.

toTabularData

protected static TabularData toTabularData(Dictionary<String,Object> props)
Creates TabularData from Dictionary.

Parameters:
props - Dictionary instance.
Returns:
TabularData instance.

propertiesFrom

protected static Dictionary<String,Object> propertiesFrom(TabularData data)
Creates properties from TabularData object.

Parameters:
data - TabularData instance.
Returns:
translated tabular data to properties Dictionary.

getName

public String getName()
Returns:
the name

getType

public int getType()
Returns:
the type


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