Package overit.geocall.platform.ui
Class UIFactory
java.lang.Object
overit.geocall.platform.ui.UIFactory
- Direct Known Subclasses:
UIFactory
Utility class used to create an instance of UI class through the method
make(java.lang.String, java.lang.Object). This utility class is very
important because it allows to get an instance of an UI class by passing the
name of the file and the caller. The name of the file can be passed if the class
lies in the same package of the caller, otherwise it must have the relative path
starting from the layer root. The resolution of the UI class depends from the
identity package. The searching logic is: search inside the package of the identity
and then in all the other levels, the order of the levels depends from the layers.
This allows the possibility to extends other UI classes with some specific logic
inside that may differ from project to project assuring the creation of the right
class.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intReturns the dimention of the cachestatic DocumentReturns theDocumentstatic DocumentgetDom(String absPath, boolean normalizeTags, boolean normalizeAttributes, String xsl, boolean useCache) Returns theDocumentprotected static UINodeReturns an instance of the UI classprotected static UINodeReturns an instance of the UI classstatic voidInvalidate the cache by creating a new oneprotected static Documentstatic <T> TReturns an instance of the UI class searching for an eventual personalization of the classstatic <T> TReturns an instance of the UI class searching for an eventual personalization of the classstatic <T> TReturns an instance of the UI class searching for an eventual personalization of the classstatic ObjectReturns an instance of the UI class searching for an eventual personalization of the classstatic <T> TReturns an instance of the UI class searching for an eventual personalization of the classstatic <T> TReturns an instance of the UI class searching for an eventual personalization of the classstatic <T> TReturns an instance of the UI class searching for an eventual personalization of the classstatic <T> TReturns an instance of the UI class searching for an eventual personalization of the classstatic <T> TReturns an instance of the UI class searching for an eventual personalization of the classstatic <T> TReturns an instance of the UI class searching for an eventual personalization of the classstatic <T> TReturns an instance of the UI class searching for an eventual personalization of the classstatic voidnormalizeDom(Element el, String from, boolean normalizeTags, boolean normalizeAttributes) Normalize the documentprotected static void
-
Constructor Details
-
UIFactory
public UIFactory()
-
-
Method Details
-
getCacheDimension
public static int getCacheDimension()Returns the dimention of the cache- Returns:
- The dimension of the cache
-
invalidateCache
public static void invalidateCache()Invalidate the cache by creating a new one -
getDom
public static Document getDom(String absPath, boolean normalizeTags, boolean normalizeAttributes, String xsl) Returns theDocument- Parameters:
absPath- String containint the absolute pathnormalizeTags- Boolean indicating the use of normalize tagsnormalizeAttributes- Boolean indicating the use of normalize attributesxsl- String containing the xls- Returns:
- The
Document
-
getDom
public static Document getDom(String absPath, boolean normalizeTags, boolean normalizeAttributes, String xsl, boolean useCache) Returns theDocument- Parameters:
absPath- String containint the absolute pathnormalizeTags- Boolean indicating the use of normalize tagsnormalizeAttributes- Boolean indicating the use of normalize attributesxsl- String containing the xlsuseCache- specify if retrieve this instance from cache first or if load it from scratch every time- Returns:
- The
Document
-
loadDom
-
normalizeDom
public static void normalizeDom(Element el, String from, boolean normalizeTags, boolean normalizeAttributes) Normalize the document- Parameters:
el- The document elementfrom- String fromnormalizeTags- Boolean indicating the use of normalize tagsnormalizeAttributes- Boolean indicating the use of normalize attributes
-
make
Returns an instance of the UI class searching for an eventual personalization of the class- Type Parameters:
T- The type of the class- Parameters:
reference- The reference of the class- Returns:
- An instance of the class searching for an eventual personalization of the class
-
make
Returns an instance of the UI class searching for an eventual personalization of the class- Type Parameters:
T- The type of the class- Parameters:
resource- The rootpath of the classfrom- The class- Returns:
- An instance of the class searching for an eventual personalization of the class
-
make
Returns an instance of the UI class searching for an eventual personalization of the class- Type Parameters:
T- The type of the class- Parameters:
resource- The rootpath of the classcaller- The caller- Returns:
- An instance of the class searching for an eventual personalization of the class
-
make
Returns an instance of the UI class searching for an eventual personalization of the class- Parameters:
resource- The rootpath of the classcaller- The callerxsl- The xls- Returns:
- An instance of the class searching for an eventual personalization of the class
-
make
Returns an instance of the UI class searching for an eventual personalization of the class- Type Parameters:
T- The type of the class- Parameters:
resource- The rootpath of the classcaller- The callerxsl- The xlsparent- The UINode parent- Returns:
- An instance of the class searching for an eventual personalization of the class
-
make
Returns an instance of the UI class searching for an eventual personalization of the class- Type Parameters:
T- The type of the class- Parameters:
resource- The rootpath of the classfrom- The starting position. If it is null, thepathis meant to be absolutexsl- String containing the xlsparent- The UINode parent- Returns:
- An instance of the class searching for an eventual personalization of the class
-
make
Returns an instance of the UI class searching for an eventual personalization of the class- Type Parameters:
T- The type of the class- Parameters:
resource- The rootpath of the classfrom- The starting position. If it is null, thepathis meant to be absolutexsl- String containing the xlsparent- The UINode parentuseCache- specify if retrieve this instance from cache first or if load it from scratch every time- Returns:
- An instance of the class searching for an eventual personalization of the class
-
make
Returns an instance of the UI class searching for an eventual personalization of the class- Type Parameters:
T- The type of the class- Parameters:
tree- The [@link XMLTree]resource- The rootpath of the classcaller- The callerxsl- The xls- Returns:
- An instance of the class searching for an eventual personalization of the class
-
make
public static <T> T make(XMLTree tree, String resource, Object caller, String xsl, boolean useCache) Returns an instance of the UI class searching for an eventual personalization of the class- Type Parameters:
T- The type of the class- Parameters:
tree- The [@link XMLTree]resource- The rootpath of the classcaller- The callerxsl- The xlsuseCache- specify if retrieve this instance from cache first or if load it from scratch every time- Returns:
- An instance of the class searching for an eventual personalization of the class
-
make
Returns an instance of the UI class searching for an eventual personalization of the class- Type Parameters:
T- The type of the class- Parameters:
tree- The [@link XMLTree]resource- The rootpath of the classcaller- The callerxsl- The xlsparent- The UINode parent- Returns:
- An instance of the class searching for an eventual personalization of the class
-
make
public static <T> T make(XMLTree tree, String resource, Object caller, String xsl, UINode parent, boolean useCache) Returns an instance of the UI class searching for an eventual personalization of the class- Type Parameters:
T- The type of the class- Parameters:
tree- The [@link XMLTree]resource- The rootpath of the classcaller- The callerxsl- The xlsparent- The UINode parentuseCache- specify if retrieve this instance from cache first or if load it from scratch every time- Returns:
- An instance of the class searching for an eventual personalization of the class
-
getInstance
protected static UINode getInstance(Element e, String resource, String from, UINode parent, UISchema uis) Returns an instance of the UI class -
getInstance
protected static UINode getInstance(Element e, String resource, String from, UINode parent, UISchema uis, boolean useCache) Returns an instance of the UI class -
setBean
-