Package org.nuiton.decorator

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

See: Description

Package org.nuiton.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 © 2013–2015 CodeLutin. All rights reserved.