Package com.hybris.cockpitng.core.impl
Class AbstractComponentDefinitionFactory
- java.lang.Object
-
- com.hybris.cockpitng.core.impl.AbstractComponentDefinitionFactory
-
- All Implemented Interfaces:
CockpitComponentDefinitionFactory
- Direct Known Subclasses:
ActionDefinitionFactory,EditorDefinitionFactory,WidgetDefinitionFactory
public abstract class AbstractComponentDefinitionFactory extends java.lang.Object implements CockpitComponentDefinitionFactory
Base component definition factory managing some common properties like the location path, settings etc.
-
-
Field Summary
Fields Modifier and Type Field Description static intARRAY_CAPACITYprotected static java.lang.StringPATH_SEPARATORPath separator.static java.lang.StringPROPERTY_COMPONENT_SETTINGSstatic java.lang.StringPROPERTY_WIDGET_IDstatic java.lang.StringPROPERTY_WIDGET_INPUTSstatic java.lang.StringPROPERTY_WIDGET_IO_FORWARDSstatic java.lang.StringPROPERTY_WIDGET_OUTPUTSstatic java.lang.StringPROPERTY_WIDGET_PARENT
-
Constructor Summary
Constructors Constructor Description AbstractComponentDefinitionFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleancheckIfFileIsAbsent(java.lang.String viewURI, CockpitComponentInfo info)AbstractCockpitComponentDefinitioncreate(CockpitComponentInfo info)Creates a component definition out of information about it.abstract AbstractCockpitComponentDefinitioncreateDefinition(CockpitComponentInfo info)java.lang.StringgetDirectoryURI()protected java.io.InputStreamgetInfoResourceAsStream(CockpitComponentInfo info, java.lang.String filename)protected java.lang.StringgetWidgetSimpleID(java.lang.String id)protected <T> TgetXMLDefinition(java.lang.String path, CockpitComponentInfo info, java.lang.Class<T> defClass)protected voidloadProperties(java.util.Properties properties, ComponentDefinition xmlDef)protected java.util.List<java.lang.String[]>parseSocketInfo(java.lang.String propsStr)voidsetDirectoryURI(java.lang.String directoryURI)voidsetJaxbContextFactory(JAXBContextFactory jaxbContextFactory)protected voidsetProperty(java.util.Properties properties, java.lang.String key, java.lang.String value)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.hybris.cockpitng.core.CockpitComponentDefinitionFactory
initialize
-
-
-
-
Field Detail
-
PROPERTY_COMPONENT_SETTINGS
public static final java.lang.String PROPERTY_COMPONENT_SETTINGS
- See Also:
- Constant Field Values
-
PROPERTY_WIDGET_ID
public static final java.lang.String PROPERTY_WIDGET_ID
- See Also:
- Constant Field Values
-
PROPERTY_WIDGET_PARENT
public static final java.lang.String PROPERTY_WIDGET_PARENT
- See Also:
- Constant Field Values
-
PROPERTY_WIDGET_INPUTS
public static final java.lang.String PROPERTY_WIDGET_INPUTS
- See Also:
- Constant Field Values
-
PROPERTY_WIDGET_OUTPUTS
public static final java.lang.String PROPERTY_WIDGET_OUTPUTS
- See Also:
- Constant Field Values
-
PROPERTY_WIDGET_IO_FORWARDS
public static final java.lang.String PROPERTY_WIDGET_IO_FORWARDS
- See Also:
- Constant Field Values
-
ARRAY_CAPACITY
public static final int ARRAY_CAPACITY
- See Also:
- Constant Field Values
-
PATH_SEPARATOR
protected static final java.lang.String PATH_SEPARATOR
Path separator.- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public final AbstractCockpitComponentDefinition create(CockpitComponentInfo info)
Description copied from interface:CockpitComponentDefinitionFactoryCreates a component definition out of information about it. Information itself may be altered, if any new meta data becomes available in process of creating component definition (yet none of already existing information should be lost).
Definition may not be yet initialized. After all definitions are created, they should be additionally initialized by calling factory's
CockpitComponentDefinitionFactory.initialize(CockpitComponentInfo, AbstractCockpitComponentDefinition)method.- Specified by:
createin interfaceCockpitComponentDefinitionFactory- Parameters:
info- information about component- Returns:
- definition created
-
createDefinition
public abstract AbstractCockpitComponentDefinition createDefinition(CockpitComponentInfo info)
-
parseSocketInfo
protected java.util.List<java.lang.String[]> parseSocketInfo(java.lang.String propsStr)
-
getXMLDefinition
protected <T> T getXMLDefinition(java.lang.String path, CockpitComponentInfo info, java.lang.Class<T> defClass)
-
getInfoResourceAsStream
protected java.io.InputStream getInfoResourceAsStream(CockpitComponentInfo info, java.lang.String filename)
-
loadProperties
protected void loadProperties(java.util.Properties properties, ComponentDefinition xmlDef)
-
setProperty
protected void setProperty(java.util.Properties properties, java.lang.String key, java.lang.String value)
-
getWidgetSimpleID
protected java.lang.String getWidgetSimpleID(java.lang.String id)
-
checkIfFileIsAbsent
protected boolean checkIfFileIsAbsent(java.lang.String viewURI, CockpitComponentInfo info)
-
getDirectoryURI
public java.lang.String getDirectoryURI()
-
setDirectoryURI
public void setDirectoryURI(java.lang.String directoryURI)
-
setJaxbContextFactory
public void setJaxbContextFactory(JAXBContextFactory jaxbContextFactory)
-
-