Package org.ametys.web.skin
Class SkinParametersModel
- java.lang.Object
-
- org.ametys.web.skin.SkinParametersModel
-
- All Implemented Interfaces:
Model
,ModelItemAccessor
,ModelItemContainer
public class SkinParametersModel extends Object implements Model
Model for Skin (do not mistake this withSkinModel
)
-
-
Constructor Summary
Constructors Constructor Description SkinParametersModel(String skinName, Path skinDir, SkinParameterTypeExtensionPoint skinParameterTypeEP, Context context, ServiceManager manager)
Create an instance of a model, based on the skin directory
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFamilyId()
Retrieves the Family Id (for example the extension point) Each model Id have to be unique in it's family IdString
getId()
Retrieves the model id (an id must be unique in the familyModel.getFamilyId()
ElementDefinition
getModelItem(String itemPath)
Retrieves the model item at given pathCollection<ElementDefinition>
getModelItems()
Retrieves all the model items of this accessorView
getView()
Retrieves the view of skin parameters-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.runtime.model.ModelItemAccessor
getChild, hasModelItem
-
-
-
-
Constructor Detail
-
SkinParametersModel
public SkinParametersModel(String skinName, Path skinDir, SkinParameterTypeExtensionPoint skinParameterTypeEP, Context context, ServiceManager manager) throws ProcessingException
Create an instance of a model, based on the skin directory- Parameters:
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 manager- Throws:
ProcessingException
- something went wrong while parsing the file
-
-
Method Detail
-
getModelItems
public Collection<ElementDefinition> getModelItems()
Description copied from interface:ModelItemAccessor
Retrieves all the model items of this accessor- Specified by:
getModelItems
in interfaceModelItemAccessor
- Returns:
- the model items
-
getModelItem
public ElementDefinition getModelItem(String itemPath) throws UndefinedItemPathException
Description copied from interface:ModelItemAccessor
Retrieves the model item at given path- Specified by:
getModelItem
in interfaceModelItemAccessor
- Parameters:
itemPath
- the item path- Returns:
- the model item.
- Throws:
UndefinedItemPathException
- if there is no item defined at the given path
-
getView
public View getView()
Retrieves the view of skin parameters- Returns:
- the skin parameters' view
-
getId
public String getId()
Description copied from interface:Model
Retrieves the model id (an id must be unique in the familyModel.getFamilyId()
-
getFamilyId
public String getFamilyId()
Description copied from interface:Model
Retrieves the Family Id (for example the extension point) Each model Id have to be unique in it's family Id- Specified by:
getFamilyId
in interfaceModel
- Returns:
- content point (for example "org.ametys.cms.contenttype.ContentTypeExtensionPoint" for a content)
-
-