org.apache.aries.jmx.codec
Class AuthorizationData

java.lang.Object
  extended by org.apache.aries.jmx.codec.AuthorizationData

public class AuthorizationData
extends Object

AuthorizationData represents Authorization Type @see UserAdminMBean.AUTORIZATION_TYPE.It is a codec for the CompositeData representing an Authorization .

Version:
$Rev: 896239 $ $Date: 2010-01-05 22:02:23 +0000 (Tue, 05 Jan 2010) $

Constructor Summary
AuthorizationData(org.osgi.service.useradmin.Authorization auth)
          Constructs new AuthorizationData from Authorization.
AuthorizationData(String name, String[] roles)
          Constructs new AuthorizationData.
 
Method Summary
static AuthorizationData from(CompositeData data)
          Static factory method to create AuthorizationData from CompositeData object.
 String getName()
           
 String[] getRoles()
           
 CompositeData toCompositeData()
          Translates AuthorizationData to CompositeData represented by compositeType UserAdminMBean.AUTORIZATION_TYPE.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthorizationData

public AuthorizationData(org.osgi.service.useradmin.Authorization auth)
Constructs new AuthorizationData from Authorization.

Parameters:
auth - Authorization instance.

AuthorizationData

public AuthorizationData(String name,
                         String[] roles)
Constructs new AuthorizationData.

Parameters:
name - of authorization context.
roles - implied by authorization context.
Method Detail

toCompositeData

public CompositeData toCompositeData()
Translates AuthorizationData to CompositeData represented by compositeType UserAdminMBean.AUTORIZATION_TYPE.

Returns:
translated AuthorizationData to compositeData.

from

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

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

getName

public String getName()
Returns:
the name

getRoles

public String[] getRoles()
Returns:
the roles


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