fr.paris.lutece.plugins.dila.business.fichelocale.dao.impl
Class XmlDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.dila.business.fichelocale.dao.impl.XmlDAO
All Implemented Interfaces:
IXmlDAO, Serializable

public class XmlDAO
extends Object
implements IXmlDAO, Serializable

Implementation of IXmlDAO

See Also:
Serialized Form

Constructor Summary
XmlDAO()
           
 
Method Summary
 void create(XmlDTO dilaXml)
          Create a XmlDTO
 void delete()
          Delete old files
 List<XmlDTO> findAll()
          Find all XML
 XmlDTO findByIdAndTypesAndAudience(String strId, List<String> availableTypes, Long lIdAudience)
          Find a XmlDTO by its id and type
 XmlDTO findFolderById(String id)
          Find a XmlDTO by its id
 XmlDTO findHomeHowTo(Long audienceId)
          Find the "How to ..." section for given audience
 List<XmlDTO> findHowToByAudience(Long audienceId)
          Find all "Comment faire si" resources for audience
 Long findIdByXmlAndAudience(String xmlName, Long audienceId)
          Find a national card's technical id by its xml name and audience
 String findResourceTypeByIdXMLAndAudience(String strIdXml, Long lIdAudience)
          Find the resource type of a XmlDTO
 String findTitleById(String id)
          Find the title of a XmlDTO
 String findTitleByIdAndTypesAndAudience(String idDossierFrere, List<String> availableTypes, Long idAudience)
          Find the title of a XmlDTO
 void store(XmlDTO dilaXml)
          Update a XmlDTO
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlDAO

public XmlDAO()
Method Detail

findTitleById

public String findTitleById(String id)
Description copied from interface: IXmlDAO
Find the title of a XmlDTO

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

findFolderById

public XmlDTO findFolderById(String id)
Description copied from interface: IXmlDAO
Find a XmlDTO by its id

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

findTitleByIdAndTypesAndAudience

public String findTitleByIdAndTypesAndAudience(String idDossierFrere,
                                               List<String> availableTypes,
                                               Long idAudience)
Description copied from interface: IXmlDAO
Find the title of a XmlDTO

Specified by:
findTitleByIdAndTypesAndAudience in interface IXmlDAO
Parameters:
idDossierFrere - the id to find
availableTypes - list of types for the resource
idAudience - the id audience
Returns:
the corresponding title

findByIdAndTypesAndAudience

public XmlDTO findByIdAndTypesAndAudience(String strId,
                                          List<String> availableTypes,
                                          Long lIdAudience)
Description copied from interface: IXmlDAO
Find a XmlDTO by its id and type

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

findResourceTypeByIdXMLAndAudience

public String findResourceTypeByIdXMLAndAudience(String strIdXml,
                                                 Long lIdAudience)
Description copied from interface: IXmlDAO
Find the resource type of a XmlDTO

Specified by:
findResourceTypeByIdXMLAndAudience in interface IXmlDAO
Parameters:
strIdXml - the xml id
lIdAudience - the audience id
Returns:
the corresponding resource type

findAll

public List<XmlDTO> findAll()
Description copied from interface: IXmlDAO
Find all XML

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

findHowToByAudience

public List<XmlDTO> findHowToByAudience(Long audienceId)
Description copied from interface: IXmlDAO
Find all "Comment faire si" resources for audience

Specified by:
findHowToByAudience in interface IXmlDAO
Parameters:
audienceId - the audience to check
Returns:
the list of corresponding XmlDTO

findIdByXmlAndAudience

public Long findIdByXmlAndAudience(String xmlName,
                                   Long audienceId)
Description copied from interface: IXmlDAO
Find a national card's technical id by its xml name and audience

Specified by:
findIdByXmlAndAudience in interface IXmlDAO
Parameters:
xmlName - the xmlName
audienceId - the audience id
Returns:
the technical id, null if not found

findHomeHowTo

public XmlDTO findHomeHowTo(Long audienceId)
Description copied from interface: IXmlDAO
Find the "How to ..." section for given audience

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

create

public void create(XmlDTO dilaXml)
Description copied from interface: IXmlDAO
Create a XmlDTO

Specified by:
create in interface IXmlDAO
Parameters:
dilaXml - the xml to create

store

public void store(XmlDTO dilaXml)
Description copied from interface: IXmlDAO
Update a XmlDTO

Specified by:
store in interface IXmlDAO
Parameters:
dilaXml - the xml to store

delete

public void delete()
Description copied from interface: IXmlDAO
Delete old files

Specified by:
delete in interface IXmlDAO


Copyright © 2013 Mairie de Paris. All Rights Reserved.