org.norther.tammi.core.security
Class DefaultPermissionConverter

java.lang.Object
  extended by org.norther.tammi.core.base.Adaptee
      extended by org.norther.tammi.core.converter.DefaultObjectConverter
          extended by org.norther.tammi.core.security.DefaultPermissionConverter
All Implemented Interfaces:
Serializable, NotificationBroadcaster, NotificationEmitter, Manageable, MBeanDelegate, ObjectConverter

public class DefaultPermissionConverter
extends DefaultObjectConverter

A converter for instances representing permissions. The string representation of the permission consists of the class name of the permission, the name of the permission and the actions of the permission enclosed in parenthesis: ('class name' 'name' 'actions').

Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
static String PERMISSION_TYPE
          The object name type.
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE
 
Constructor Summary
DefaultPermissionConverter()
          Constructs a new converter.
 
Method Summary
protected  Object getComponentInstance(String className, Object object, String pattern, Object minValue, Object maxValue)
          Gets an instance of the named component class by converting the source object and optionally applying the specified pattern and limits.
 boolean isConversionSupported(String className)
          Checks whether conversion of the specified class is supported.
 
Methods inherited from class org.norther.tammi.core.converter.DefaultObjectConverter
fromLocalizedObject, getFormatPattern, getInstance, getInstance, getInstance, getLocalizedPattern, getResourceFinderName, postmanaged, setResourceFinderName, toComponentString, toLocalizedObject, toString, toString, toString, toStrings, toStrings, toStrings, unmanaged
 
Methods inherited from class org.norther.tammi.core.base.Adaptee
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PERMISSION_TYPE

public static final String PERMISSION_TYPE
The object name type.

Constructor Detail

DefaultPermissionConverter

public DefaultPermissionConverter()
Constructs a new converter.

Method Detail

isConversionSupported

public boolean isConversionSupported(String className)
Description copied from interface: ObjectConverter
Checks whether conversion of the specified class is supported.

Specified by:
isConversionSupported in interface ObjectConverter
Overrides:
isConversionSupported in class DefaultObjectConverter
Parameters:
className - the class name.
Returns:
true for a supported conversion, false otherwise.

getComponentInstance

protected Object getComponentInstance(String className,
                                      Object object,
                                      String pattern,
                                      Object minValue,
                                      Object maxValue)
                               throws ConversionException
Description copied from class: DefaultObjectConverter
Gets an instance of the named component class by converting the source object and optionally applying the specified pattern and limits.

Overrides:
getComponentInstance in class DefaultObjectConverter
Parameters:
className - the name of the class.
object - the source object.
pattern - an optional conversion pattern.
minValue - an optional minimum value.
maxValue - an optional maximum value.
Returns:
the component instance.
Throws:
ConversionException - if conversion fails.


Copyright © 2004 The Norther Organization. All rights reserved.