Class DefaultManager
java.lang.Object
fr.paris.lutece.plugins.document.service.attributes.DefaultManager
- All Implemented Interfaces:
AttributeManager
- Direct Known Subclasses:
DateManager,FileManager,InternalLinkManager,ListBoxManager,MultilineManager,RichTextManager,TextManager
Default implementation of an attribute manager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTells if the attrubute can be used as Thumbnail (image)getAttributeParametersValues(int nAttributeId, Locale locale) Get the attribute type parameters of an attributeReturn the attribute Type codegetAttributeXmlValue(Document document, DocumentAttribute attribute) Get the XML data corresponding to the attribute to build the docuemnt XML contentgetCreateFormHtml(DocumentAttribute attribute, Locale locale, String strBaseUrl) Gets the part of an HTML form to enter attribute datagetCreateParametersFormHtml(List<AttributeTypeParameter> listParameters, Locale locale) Gets the part of an HTML form to enter parameters datagetCreateParametersFormHtml(List<AttributeTypeParameter> listParameters, Locale locale, Map<String, Object> model) getCreateParametersFormHtml(Locale locale) Gets the part of an HTML form to enter parameters datagetExtraParameters(Locale locale) Gets extra parameters for the attributegetExtraParametersValues(Locale locale, int nAttributeId) Gets extra parameters values for the attributegetModifyFormHtml(DocumentAttribute attribute, Document document, Locale locale, String strBaseUrl) Gets the part of an HTML form to modify attribute datagetModifyParametersFormHtml(Locale locale, int nAttributeId) Gets the part of an HTML form to modify parameters datagetModifyParametersFormHtml(Locale locale, int nAttributeId, Map<String, Object> model) getValueParameters(jakarta.servlet.http.HttpServletRequest request, Locale locale) Get the value parametersvoidsetAttributeTypeCode(String strCode) Define the attribute Type codevalidateValue(int nAttributeId, String strValue, Locale locale) Validate the value for the attributevalidateValueParameters(List<AttributeTypeParameter> listParameters, Locale locale) Validate the value for the parameters
-
Constructor Details
-
DefaultManager
public DefaultManager()
-
-
Method Details
-
getCreateFormHtml
Gets the part of an HTML form to enter attribute data- Specified by:
getCreateFormHtmlin interfaceAttributeManager- Parameters:
attribute- The attributelocale- The current LocalestrBaseUrl- the base url- Returns:
- A part of the HTML form
-
getModifyFormHtml
public String getModifyFormHtml(DocumentAttribute attribute, Document document, Locale locale, String strBaseUrl) Gets the part of an HTML form to modify attribute data- Specified by:
getModifyFormHtmlin interfaceAttributeManager- Parameters:
attribute- The attributedocument- The attribute documentlocale- The current LocalestrBaseUrl- The base url- Returns:
- A part of the HTML form
-
getCreateParametersFormHtml
Gets the part of an HTML form to enter parameters data- Specified by:
getCreateParametersFormHtmlin interfaceAttributeManager- Parameters:
locale- The current Locale- Returns:
- A part of the HTML form
-
getCreateParametersFormHtml
public String getCreateParametersFormHtml(List<AttributeTypeParameter> listParameters, Locale locale) Gets the part of an HTML form to enter parameters data- Specified by:
getCreateParametersFormHtmlin interfaceAttributeManager- Parameters:
listParameters- list attribute type parameterslocale- The current Locale- Returns:
- A part of the HTML form
-
getCreateParametersFormHtml
-
getModifyParametersFormHtml
Gets the part of an HTML form to modify parameters data- Specified by:
getModifyParametersFormHtmlin interfaceAttributeManager- Parameters:
locale- The current LocalenAttributeId- Attribute Id- Returns:
- A part of the HTML form
-
getModifyParametersFormHtml
-
getExtraParameters
Gets extra parameters for the attribute- Specified by:
getExtraParametersin interfaceAttributeManager- Parameters:
locale- The current Locale- Returns:
- A collection of attribute parameters
-
getExtraParametersValues
Gets extra parameters values for the attribute- Specified by:
getExtraParametersValuesin interfaceAttributeManager- Parameters:
locale- The current Locale- Returns:
- The extra parameters values for the attribute
-
setAttributeTypeCode
Define the attribute Type code- Specified by:
setAttributeTypeCodein interfaceAttributeManager- Parameters:
strCode- The Attribute Type Code
-
getAttributeTypeCode
Return the attribute Type code- Specified by:
getAttributeTypeCodein interfaceAttributeManager- Returns:
- The Attribute Type Code
-
validateValue
Validate the value for the attribute- Specified by:
validateValuein interfaceAttributeManager- Parameters:
nAttributeId- The attribute identifierstrValue- The value to checklocale- The current Locale- Returns:
- null if valid, otherwise error message
-
validateValueParameters
Validate the value for the parameters- Specified by:
validateValueParametersin interfaceAttributeManager- Parameters:
listParameters- The list of parameters to checklocale- The locale- Returns:
- null if valid, otherwise message property
-
getAttributeXmlValue
Get the XML data corresponding to the attribute to build the docuemnt XML content- Specified by:
getAttributeXmlValuein interfaceAttributeManager- Parameters:
document- The documentattribute- The attribute- Returns:
- The XML value of the attribute
-
getAttributeParametersValues
public Collection<AttributeTypeParameter> getAttributeParametersValues(int nAttributeId, Locale locale) Get the attribute type parameters of an attribute- Parameters:
nAttributeId- The id of the attribute to get the parameter oflocale- The locale- Returns:
- The list of parameters
-
canBeUsedAsThumbnail
public boolean canBeUsedAsThumbnail()Tells if the attrubute can be used as Thumbnail (image)- Specified by:
canBeUsedAsThumbnailin interfaceAttributeManager- Returns:
- true if the attrubute can be used as Thumbnail, otherwise false
-
getValueParameters
public List<AttributeTypeParameter> getValueParameters(jakarta.servlet.http.HttpServletRequest request, Locale locale) Get the value parameters- Specified by:
getValueParametersin interfaceAttributeManager- Parameters:
request- the HTTP requestlocale- the locale- Returns:
- a list of
AttributeTypeParameter
-