Package org.nuiton.util.decorator

This package contains a api to do some decoration over any object.

See:
          Description

Class Summary
Decorator<O> A simple contract to define a String decorator on any java object.
DecoratorMulti18nProvider A decorator provider for multi-i18n locale.
DecoratorMulti18nProvider.DecoratorContext<T>  
DecoratorProvider A decorator provider.
DecoratorProvider.DecoratorContext<T>  
DecoratorUtil Some usefull methods on Decorator to create, and sort data with decorators.
JXPathDecorator<O> JXPath decorator based on String.format(String, Object...) method.
JXPathDecorator.Context<O>  
JXPathDecorator.JXPathComparator<O>  
MapPropertyHandler A extended handler to deal with map in JXPath contexts.
MultiJXPathDecorator<O> JXPathDecorator implementation with multiple contexts.
PropertyDecorator<O> Simple property decorator based on String.format(String, Object...) method.
 

Package org.nuiton.util.decorator Description

This package contains a api to do some decoration over any object.

Decorator api

The Decorator has an internal state which is the type of object to decorate and a method to do the decoration : Decorator.toString(Object).

There is some default implementations of a decorator using a simple property, or more complex one using jxpath mecanisms.

DecoratorProvider api

The DecoratorProvider api is there to provide some decorators for you, There is a second one DecoratorMulti18nProvider which take account of a given locale (so can be used in web context for example). User has to fill method DecoratorProvider#loadDecorators()} or DecoratorMulti18nProvider.loadDecorators(Locale) to specify which decorators are available. Then it can use the provider using the methods getDecorator(XXX) Note: Decorator can be contextualized so for a same type of object we can provide different way of decorating then.

DecoratorUtil class

This class offers some usefull method to create new decorator via the newXXX methods and also some method to sort list of objects using a decorator. Note: This api comes from the jaxx-runtime project.

Since:
2.3
Author:
tchemit
See Also:
Decorator, DecoratorProvider, DecoratorMulti18nProvider


Copyright © 2004-2011 CodeLutin. All Rights Reserved.