fr.paris.lutece.plugins.document.service
Interface AttributeManager

All Known Implementing Classes:
DefaultManager, FileManager, MultilineManager, RichTextManager, TextManager, UrlManager

public interface AttributeManager

Define the interface for attribute's specific behavior


Method Summary
 java.lang.String getAttributeTypeCode()
          Return the attribute Type code
 java.lang.String getAttributeXmlValue(Document document, DocumentAttribute attribute)
          Get the XML data corresponding to the attribute to build the docuemnt XML content
 java.lang.String getCreateFormHtml(DocumentAttribute attribute, java.util.Locale locale)
          Gets the part of an HTML form to enter attribute data
 java.util.List<AttributeTypeParameter> getExtraParameters(java.util.Locale locale)
          Gets extra parameters for the attribute
 java.util.Collection getExtraParametersValues(java.util.Locale locale, int nAttributeId)
          Gets extra parameters values for the attribute
 java.lang.String getModifyFormHtml(DocumentAttribute attribute, java.util.Locale locale)
          Gets the part of an HTML form to modify attribute data
 void setAttributeTypeCode(java.lang.String strCode)
          Define the attribute Type code
 java.lang.String validateValue(byte[] baValue)
          Validate the value for the attribute
 java.lang.String validateValue(java.lang.String strValue)
          Validate the value for the attribute
 

Method Detail

setAttributeTypeCode

void setAttributeTypeCode(java.lang.String strCode)
Define the attribute Type code

Parameters:
strCode - The Attribute Type Code

getAttributeTypeCode

java.lang.String getAttributeTypeCode()
Return the attribute Type code

Returns:
The Attribute Type Code

getCreateFormHtml

java.lang.String getCreateFormHtml(DocumentAttribute attribute,
                                   java.util.Locale locale)
Gets the part of an HTML form to enter attribute data

Parameters:
attribute - The attribute
locale - The current Locale
Returns:
A part of the HTML form

getModifyFormHtml

java.lang.String getModifyFormHtml(DocumentAttribute attribute,
                                   java.util.Locale locale)
Gets the part of an HTML form to modify attribute data

Parameters:
attribute - The attribute
locale - The current Locale
Returns:
A part of the HTML form

getExtraParameters

java.util.List<AttributeTypeParameter> getExtraParameters(java.util.Locale locale)
Gets extra parameters for the attribute

Parameters:
locale - The current Locale
Returns:
A collection of attribute parameters

getExtraParametersValues

java.util.Collection getExtraParametersValues(java.util.Locale locale,
                                              int nAttributeId)
Gets extra parameters values for the attribute

Parameters:
locale - The current Locale
nAttributeId -
Returns:

validateValue

java.lang.String validateValue(java.lang.String strValue)
Validate the value for the attribute

Parameters:
strValue - The value to check
Returns:
True if valid, otherwise false

validateValue

java.lang.String validateValue(byte[] baValue)
Validate the value for the attribute

Parameters:
baValue - The value to check
Returns:
True if valid, otherwise false

getAttributeXmlValue

java.lang.String getAttributeXmlValue(Document document,
                                      DocumentAttribute attribute)
Get the XML data corresponding to the attribute to build the docuemnt XML content

Parameters:
document - The document
attribute - The attribute
Returns:
The XML value of the attribute


Copyright © 2007 Mairie de Paris. All Rights Reserved.