Class OWRepository
java.lang.Object
tripleo.vendor.thinlet.objectwrapper.OWRepository
OWRepository is a repository implementation of (object wrapper - thinlet component), which simply acts like
a Map.
Implementation Note:
- With JDK < 1.3, all widget which are definitively removed from the hierachy must have it's
conter part OWObject released by the
OWObject.release()call, to avoid leak memory. - For JDK >= 1.3, the repository use a java.util.WeakHashMap, so explicit
OWObject.release()is optional.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionbuild a new OWThinlet, for managing Objecr Wrapper thinlet widget -
Method Summary
Modifier and TypeMethodDescriptionvoidregister the given OWObject, as managed by the given thinletprotected static ClassfindWrapperClassForComponent(String componentName) helper method to find the wrapper object class corresponding to the given thinlet componentregister the given OWObject, as managed by the given thinletvoidunregister the given OWObject, as not managed by the given thinlet@NotNull OWObjectreturn a previously registered object wrapper from the given thinlet component, or build a new wrapper object, ans register it.
-
Field Details
-
fcomponents
-
fobjectWrappers
-
fobjectWrappersGet
-
fobjectWrappersPut
-
fobjectWrappersRemove
-
-
Constructor Details
-
OWRepository
public OWRepository()build a new OWThinlet, for managing Objecr Wrapper thinlet widget
-
-
Method Details
-
remove
unregister the given OWObject, as not managed by the given thinlet -
wrap
@NotNull public @NotNull OWObject wrap(OWThinlet thinlet, Object component, String componentClassname) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException return a previously registered object wrapper from the given thinlet component, or build a new wrapper object, ans register it. -
get
register the given OWObject, as managed by the given thinlet -
findWrapperClassForComponent
helper method to find the wrapper object class corresponding to the given thinlet component -
add
register the given OWObject, as managed by the given thinlet
-