fr.paris.lutece.plugins.dila.service.impl
Class DilaXmlService

java.lang.Object
  extended by fr.paris.lutece.plugins.dila.service.impl.DilaXmlService
All Implemented Interfaces:
IDilaXmlService, Serializable

public class DilaXmlService
extends Object
implements IDilaXmlService, Serializable

Implementation of IDilaXmlService

See Also:
Serialized Form

Constructor Summary
DilaXmlService()
           
 
Method Summary
 List<XmlDTO> findAll()
          Find all XML
 XmlDTO findByIdAndTypesAndAudience(String strId, List<String> listAvailableTypes, Long lIdAudience)
          Find a XmlDTO by its id and type
 XmlDTO findFolderById(String strId)
          Find a XmlDTO by its id
 XmlDTO findHomeHowTo(Long audienceId)
          Find the "How to ..." section for given audience
 Long findIdByXmlAndAudience(String strXmlName, Long lAudienceId)
          Find a national card's technical id by it xml name and audience
 String findResourceTypeByIdXMLAndAudience(String strIdXml, Long lIdAudience)
          Find the resource type of a XmlDTO
 String findTitleById(String strId)
          Find the title of a XmlDTO
 String findTitleByIdAndTypesAndAudience(String strIdDossierFrere, List<String> listAvailableTypes, Long lIdAudience)
          Find the title of a XmlDTO
 Document insertHowToLinks(Long lAudienceId, DocumentBuilder builder, Document document)
          Insert "comment faire" resource in document
 Document insertRssLinks(DocumentBuilder builder, Document document, Locale locale)
          Access RSS feeds and get links to display in document
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DilaXmlService

public DilaXmlService()
Method Detail

findTitleById

public String findTitleById(String strId)
Find the title of a XmlDTO

Specified by:
findTitleById in interface IDilaXmlService
Parameters:
strId - the id to find
Returns:
the corresponding title

findFolderById

public XmlDTO findFolderById(String strId)
Find a XmlDTO by its id

Specified by:
findFolderById in interface IDilaXmlService
Parameters:
strId - the id to find
Returns:
the corresponding XmlDTO

findTitleByIdAndTypesAndAudience

public String findTitleByIdAndTypesAndAudience(String strIdDossierFrere,
                                               List<String> listAvailableTypes,
                                               Long lIdAudience)
Find the title of a XmlDTO

Specified by:
findTitleByIdAndTypesAndAudience in interface IDilaXmlService
Parameters:
strIdDossierFrere - the id to find
listAvailableTypes - list of types for the resource
lIdAudience - the id audience
Returns:
the corresponding title

findByIdAndTypesAndAudience

public XmlDTO findByIdAndTypesAndAudience(String strId,
                                          List<String> listAvailableTypes,
                                          Long lIdAudience)
Find a XmlDTO by its id and type

Specified by:
findByIdAndTypesAndAudience in interface IDilaXmlService
Parameters:
strId - the id to find
listAvailableTypes - list of types for the resource
lIdAudience - the id audience
Returns:
the corresponding title

findResourceTypeByIdXMLAndAudience

public String findResourceTypeByIdXMLAndAudience(String strIdXml,
                                                 Long lIdAudience)
Find the resource type of a XmlDTO

Specified by:
findResourceTypeByIdXMLAndAudience in interface IDilaXmlService
Parameters:
strIdXml - the xml id
lIdAudience - the audience id
Returns:
the corresponding type_resource

findAll

public List<XmlDTO> findAll()
Find all XML

Specified by:
findAll in interface IDilaXmlService
Returns:
list of all XML files

insertHowToLinks

public Document insertHowToLinks(Long lAudienceId,
                                 DocumentBuilder builder,
                                 Document document)
Insert "comment faire" resource in document

Specified by:
insertHowToLinks in interface IDilaXmlService
Parameters:
lAudienceId - the audience to check
builder - the document builder
document - the document
Returns:
the updated document

findIdByXmlAndAudience

public Long findIdByXmlAndAudience(String strXmlName,
                                   Long lAudienceId)
Find a national card's technical id by it xml name and audience

Specified by:
findIdByXmlAndAudience in interface IDilaXmlService
Parameters:
strXmlName - the xmlName
lAudienceId - the audience id
Returns:
the technical id, null if not found

insertRssLinks

public Document insertRssLinks(DocumentBuilder builder,
                               Document document,
                               Locale locale)
Access RSS feeds and get links to display in document

Specified by:
insertRssLinks in interface IDilaXmlService
Parameters:
builder - the builder
document - the document
locale - the locale
Returns:
the modified document

findHomeHowTo

public XmlDTO findHomeHowTo(Long audienceId)
Find the "How to ..." section for given audience

Specified by:
findHomeHowTo in interface IDilaXmlService
Parameters:
audienceId - the audienceId
Returns:
XmlDTO for "How to ..." section of given audience


Copyright © 2013 Mairie de Paris. All Rights Reserved.