T - public abstract class CommonFactory<T> extends Object implements IFactory<T>, IPresentationSupport, IElementConfigurable, IContextSupport, IClassLoaderSupport, ILocatorFactorySupport, IFileEnvironment, ICategorySupport, IAttributeSupport
IFactory.| Modifier and Type | Field and Description |
|---|---|
static String |
ARG_CLASSLOADER |
static String |
ARG_CONFIGURATION |
static String |
ARG_CONTEXT |
ATTR_DESCRIPTION, ATTR_ICON, ATTR_LABEL, ATTR_TIP| Modifier and Type | Method and Description |
|---|---|
void |
configure(IElement pElement) |
T |
createInstance(IArgs args) |
Object |
getAttribute(Object key)
Get an attribute value from the context
|
File |
getBaseDir()
The platform base directory.
|
ICategory |
getCategory()
The
ICategory for this. |
ClassLoader |
getClassLoader()
A
ClassLoader instance suitable to load classes and resources in
the context of the receiver. |
Object |
getContext() |
String |
getDescription()
A long, descriptive string representation.
|
String |
getIconName()
A name for an icon.
|
String |
getId() |
IElement |
getInstanceConfiguration() |
String |
getLabel()
A short string representation (suitable for example for use with an icon
or menu item).
|
ILocatorFactory |
getLocatorFactory()
An
ILocatorFactory to lookup resources in the context of the
receiver. |
File |
getProfileDir()
Some user specific private directory.
|
File |
getTempDir()
The directory for temporary files.
|
String |
getTip()
An "intermediate" length description (suitable for example with a
tooltip).
|
File |
getWorkingDir()
The working directory.
|
Object |
removeAttribute(Object key)
Remove an attribute binding in the context
|
Object |
setAttribute(Object key,
Object value)
Set the value of an attribute in the context
|
void |
setClassLoader(ClassLoader classLoader) |
void |
setContext(Object context) |
void |
setDescription(Object description) |
void |
setIconName(String iconName) |
void |
setInstanceConfiguration(IElement instanceConfiguration) |
void |
setLabel(Object label) |
void |
setTip(Object tip) |
String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetResultTypepublic static final String ARG_CONFIGURATION
public static final String ARG_CONTEXT
public static final String ARG_CLASSLOADER
public void configure(IElement pElement) throws ConfigurationException
configure in interface IElementConfigurableConfigurationExceptionpublic final T createInstance(IArgs args) throws ObjectCreationException
createInstance in interface IFactory<T>ObjectCreationExceptionpublic Object getAttribute(Object key)
IAttributeSupportgetAttribute in interface IAttributeSupportkey - the name of the attribute to getkeypublic File getBaseDir()
IFileEnvironmentNormally this will be equal to the VM "user.dir" property.
getBaseDir in interface IFileEnvironmentpublic ICategory getCategory()
ICategorySupportICategory for this.getCategory in interface ICategorySupportICategory for this.public ClassLoader getClassLoader()
IClassLoaderSupportClassLoader instance suitable to load classes and resources in
the context of the receiver.getClassLoader in interface IClassLoaderSupportClassLoader instance suitable to load classes and
resources in the context of the receiver.public Object getContext()
public String getDescription()
IPresentationSupportgetDescription in interface IPresentationSupportpublic String getIconName()
IPresentationSupportgetIconName in interface IPresentationSupportpublic IElement getInstanceConfiguration()
public String getLabel()
IPresentationSupportgetLabel in interface IPresentationSupportpublic ILocatorFactory getLocatorFactory()
ILocatorFactorySupportILocatorFactory to lookup resources in the context of the
receiver.getLocatorFactory in interface ILocatorFactorySupportILocatorFactory to lookup resources in the context of
the receiver.public File getProfileDir()
IFileEnvironmentNormally this will be equal to the VM "user.home" property or an application defined subdirectory.
getProfileDir in interface IFileEnvironmentpublic File getTempDir()
IFileEnvironmentNormally this will be equal to the VM "java.io.tmpdir" property.
getTempDir in interface IFileEnvironmentpublic String getTip()
IPresentationSupportgetTip in interface IPresentationSupportpublic File getWorkingDir()
IFileEnvironmentNormally this will be equal to the VM "user.dir" property.
getWorkingDir in interface IFileEnvironmentpublic Object removeAttribute(Object key)
IAttributeSupportremoveAttribute in interface IAttributeSupportkey - the name of the attribute to removekeypublic Object setAttribute(Object key, Object value)
IAttributeSupportsetAttribute in interface IAttributeSupportkey - the name of the attribute to setvalue - the new value the attributekeypublic void setClassLoader(ClassLoader classLoader)
public void setContext(Object context) throws ConfigurationException
setContext in interface IContextSupportConfigurationExceptionpublic void setDescription(Object description)
public void setIconName(String iconName)
public void setInstanceConfiguration(IElement instanceConfiguration)
public void setLabel(Object label)
public void setTip(Object tip)
Copyright © 2013 intarsys consulting GmbH. All Rights Reserved.