org.openpermis.editor.policy.adapter
Class PartBeanAdapter

java.lang.Object
  extended by org.openpermis.editor.policy.adapter.AbstractAdapter
      extended by org.openpermis.editor.policy.adapter.PartBeanAdapter
All Implemented Interfaces:
Serializable, Adapter

public class PartBeanAdapter
extends AbstractAdapter

A basic implementation of an Adapter.

See Also:
Serialized Form
Since:
0.3.0

Constructor Summary
PartBeanAdapter()
           
 
Method Summary
protected  org.picocontainer.MutablePicoContainer createContainer()
          Creates a pico container and fill it with all combinations of objects and adaptee types.
protected  Class<?> getAdapteeImplementationClass(Class<?> adapteeType, Class<?> objectType)
          Returns the concrete adaptee implementation class to use when converting objects of the specified type to a given adaptee type.
protected  String getAdapteeImplementationClassName(Class<?> adapteeType, Class<?> objectType)
          Returns the fully qualified class name of the concrete adaptee implementation class to use when converting objects of the specified type to a given adaptee type.
protected  Class<?> getObjectType(Object object)
          Determines the object type of the specified object.
 
Methods inherited from class org.openpermis.editor.policy.adapter.AbstractAdapter
adaptTo, getKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartBeanAdapter

public PartBeanAdapter()
Method Detail

getAdapteeImplementationClassName

protected String getAdapteeImplementationClassName(Class<?> adapteeType,
                                                   Class<?> objectType)
Returns the fully qualified class name of the concrete adaptee implementation class to use when converting objects of the specified type to a given adaptee type.

Parameters:
adapteeType - the base adaptee type to convert to.
objectType - the object type to be converted.
Returns:
the fully qualified class name to use, must not be null.
Since:
0.9.0

getAdapteeImplementationClass

protected Class<?> getAdapteeImplementationClass(Class<?> adapteeType,
                                                 Class<?> objectType)
                                          throws IllegalStateException
Returns the concrete adaptee implementation class to use when converting objects of the specified type to a given adaptee type.

Parameters:
adapteeType - the base adaptee type to convert to.
objectType - the object type to be converted.
Returns:
the adaptee implementation class to use.
Throws:
IllegalStateException - if there is no such concrete adaptee implementation.
Since:
0.9.0

createContainer

protected org.picocontainer.MutablePicoContainer createContainer()
Creates a pico container and fill it with all combinations of objects and adaptee types.

Specified by:
createContainer in class AbstractAdapter
Returns:
the pico container used to create Adaptees.
Since:
0.3.0

getObjectType

protected Class<?> getObjectType(Object object)
Description copied from class: AbstractAdapter
Determines the object type of the specified object.

The default implementation returns the implementation class of the object.

Overrides:
getObjectType in class AbstractAdapter
Parameters:
object - the object for which to determine the type in the context of this trader.
Returns:
the class requested.
Since:
0.9.0


OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:17:21
Copyright (c) 2002-2007 Ergon Informatik AG