public class SkinParametersModel extends Object implements Model
SkinModel
)Modifier and Type | Field and Description |
---|---|
private Context |
_context |
private Map<String,ElementDefinition> |
_flatDefinitions |
private ServiceManager |
_manager |
private List<ModelItem> |
_modelItems |
private File |
_skinDir |
private String |
_skinName |
private AbstractThreadSafeComponentExtensionPoint<? extends ElementType> |
_skinParameterTypeEP |
private List<CategorizedElementDefinitionProxy> |
_skinParams |
Constructor and Description |
---|
SkinParametersModel(String skinName,
File skinDir,
SkinParameterTypeExtensionPoint skinParameterTypeEP,
Context context,
ServiceManager manager)
Create an instance of a model, based on the skin directory
|
Modifier and Type | Method and Description |
---|---|
private Configuration |
_getConfigurationModel(File skinDir) |
private List<CategorizedElementDefinitionProxy> |
_getParameters()
Read the
CategorizedElementDefinitionProxy from the skin dir |
private void |
_initialize() |
String |
getFamilyId()
Retrieves the Family Id (for example the extension point)
Each model Id have to be unique in it's family Id
|
Map<String,ElementDefinition> |
getFlatDefinitions()
Get a flat map of
ElementDefinition |
String |
getId()
Retrieves the model id (an id must be unique in the family
Model.getFamilyId() |
ModelItem |
getModelItem(String itemPath)
Retrieves the model item at given path
|
Collection<? extends ModelItem> |
getModelItems()
Retrieves all the model items of this container
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChild, hasModelItem
private AbstractThreadSafeComponentExtensionPoint<? extends ElementType> _skinParameterTypeEP
private ServiceManager _manager
private List<ModelItem> _modelItems
private Map<String,ElementDefinition> _flatDefinitions
private List<CategorizedElementDefinitionProxy> _skinParams
public SkinParametersModel(String skinName, File skinDir, SkinParameterTypeExtensionPoint skinParameterTypeEP, Context context, ServiceManager manager) throws ProcessingException
skinName
- name of the skin (must be unique)skinDir
- the skin directory where the configuration will be readskinParameterTypeEP
- the skin parameter type extension pointcontext
- the current contextmanager
- the service managerProcessingException
- something went wrong while parsing the filepublic ModelItem getModelItem(String itemPath) throws UndefinedItemPathException
ModelItemContainer
getModelItem
in interface ModelItemContainer
itemPath
- the item pathUndefinedItemPathException
- if there is no item defined at the given pathpublic Collection<? extends ModelItem> getModelItems()
ModelItemContainer
getModelItems
in interface ModelItemContainer
public String getId()
Model
Model.getFamilyId()
public String getFamilyId()
Model
getFamilyId
in interface Model
public Map<String,ElementDefinition> getFlatDefinitions() throws ProcessingException
ElementDefinition
ElementDefinition
ProcessingException
- something went wrong when reading the configuration fileprivate void _initialize() throws ProcessingException
ProcessingException
private List<CategorizedElementDefinitionProxy> _getParameters() throws ProcessingException
CategorizedElementDefinitionProxy
from the skin dirCategorizedElementDefinitionProxy
ProcessingException
- error while reading the XMLprivate Configuration _getConfigurationModel(File skinDir) throws ConfigurationException, SAXException, IOException