public abstract class DefaultManager extends Object implements AttributeManager
| Constructor and Description |
|---|
DefaultManager() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBeUsedAsThumbnail()
Tells if the attrubute can be used as Thumbnail (image)
|
Collection<AttributeTypeParameter> |
getAttributeParametersValues(int nAttributeId,
Locale locale)
Get the attribute type parameters of an attribute
|
String |
getAttributeTypeCode()
Return the attribute Type code
|
String |
getAttributeXmlValue(Document document,
DocumentAttribute attribute)
Get the XML data corresponding to the attribute to build the docuemnt XML
content
|
String |
getCreateFormHtml(DocumentAttribute attribute,
Locale locale,
String strBaseUrl)
Gets the part of an HTML form to enter attribute data
|
String |
getCreateParametersFormHtml(List<AttributeTypeParameter> listParameters,
Locale locale)
Gets the part of an HTML form to enter parameters data
|
String |
getCreateParametersFormHtml(List<AttributeTypeParameter> listParameters,
Locale locale,
Map<String,Object> model) |
String |
getCreateParametersFormHtml(Locale locale)
Gets the part of an HTML form to enter parameters data
|
protected abstract String |
getCreateParametersTemplate()
Returns the Create HTML template for parameters corresponding to this
attribute
|
protected abstract String |
getCreateTemplate()
Returns the Create HTML template corresponding to this attribute
|
List<AttributeTypeParameter> |
getExtraParameters(Locale locale)
Gets extra parameters for the attribute
|
List<AttributeTypeParameter> |
getExtraParametersValues(Locale locale,
int nAttributeId)
Gets extra parameters values for the attribute
|
String |
getModifyFormHtml(DocumentAttribute attribute,
Document document,
Locale locale,
String strBaseUrl)
Gets the part of an HTML form to modify attribute data
|
String |
getModifyParametersFormHtml(Locale locale,
int nAttributeId)
Gets the part of an HTML form to modify parameters data
|
String |
getModifyParametersFormHtml(Locale locale,
int nAttributeId,
Map<String,Object> model) |
protected abstract String |
getModifyParametersTemplate()
Returns the Modify HTML template for parameters corresponding to this
attribute
|
protected abstract String |
getModifyTemplate()
Returns the Modify HTML template corresponding to this attribute
|
protected Map<String,List<String>> |
getParameters(int nAttributeId,
Locale locale)
Get parameters map
|
List<AttributeTypeParameter> |
getValueParameters(javax.servlet.http.HttpServletRequest request,
Locale locale)
Get the value parameters
|
void |
setAttributeTypeCode(String strCode)
Define the attribute Type code
|
String |
validateValue(int nAttributeId,
String strValue,
Locale locale)
Validate the value for the attribute
|
String |
validateValueParameters(List<AttributeTypeParameter> listParameters,
Locale locale)
Validate the value for the parameters
|
protected abstract String getCreateTemplate()
protected abstract String getModifyTemplate()
protected abstract String getCreateParametersTemplate()
protected abstract String getModifyParametersTemplate()
public String getCreateFormHtml(DocumentAttribute attribute, Locale locale, String strBaseUrl)
getCreateFormHtml in interface AttributeManagerattribute - The attributelocale - The current LocalestrBaseUrl - the base urlpublic String getModifyFormHtml(DocumentAttribute attribute, Document document, Locale locale, String strBaseUrl)
getModifyFormHtml in interface AttributeManagerattribute - The attributedocument - The attribute documentlocale - The current LocalestrBaseUrl - The base urlpublic String getCreateParametersFormHtml(Locale locale)
getCreateParametersFormHtml in interface AttributeManagerlocale - The current Localepublic String getCreateParametersFormHtml(List<AttributeTypeParameter> listParameters, Locale locale)
getCreateParametersFormHtml in interface AttributeManagerlistParameters - list attribute type parameterslocale - The current Localepublic String getCreateParametersFormHtml(List<AttributeTypeParameter> listParameters, Locale locale, Map<String,Object> model)
public String getModifyParametersFormHtml(Locale locale, int nAttributeId)
getModifyParametersFormHtml in interface AttributeManagerlocale - The current LocalenAttributeId - Attribute Idpublic String getModifyParametersFormHtml(Locale locale, int nAttributeId, Map<String,Object> model)
public List<AttributeTypeParameter> getExtraParameters(Locale locale)
getExtraParameters in interface AttributeManagerlocale - The current Localepublic List<AttributeTypeParameter> getExtraParametersValues(Locale locale, int nAttributeId)
getExtraParametersValues in interface AttributeManagerlocale - The current Localepublic void setAttributeTypeCode(String strCode)
setAttributeTypeCode in interface AttributeManagerstrCode - The Attribute Type Codepublic String getAttributeTypeCode()
getAttributeTypeCode in interface AttributeManagerpublic String validateValue(int nAttributeId, String strValue, Locale locale)
validateValue in interface AttributeManagernAttributeId - The attribute identifierstrValue - The value to checklocale - The current Localepublic String validateValueParameters(List<AttributeTypeParameter> listParameters, Locale locale)
validateValueParameters in interface AttributeManagerlistParameters - The list of parameters to checklocale - The localepublic String getAttributeXmlValue(Document document, DocumentAttribute attribute)
getAttributeXmlValue in interface AttributeManagerdocument - The documentattribute - The attributepublic Collection<AttributeTypeParameter> getAttributeParametersValues(int nAttributeId, Locale locale)
nAttributeId - The id of the attribute to get the parameter oflocale - The localepublic boolean canBeUsedAsThumbnail()
canBeUsedAsThumbnail in interface AttributeManagerpublic List<AttributeTypeParameter> getValueParameters(javax.servlet.http.HttpServletRequest request, Locale locale)
getValueParameters in interface AttributeManagerrequest - the HTTP requestlocale - the localeAttributeTypeParameterCopyright © 2020 City of Paris. All rights reserved.