fr.ifremer.wao.ui.services
Class ContactModelFactory

java.lang.Object
  extended by fr.ifremer.wao.ui.services.ContactModelFactory

public class ContactModelFactory
extends Object

This class is used in Contacts page to fix what column can be see (depending on view option, role, program), and how to display the content in each column. Created: 18 nov. 2009

Author:
fdesbois

Nested Class Summary
protected static class ContactModelFactory.ContactReaderPropertyConduit
          put in common some implementation of PropertyConduit interface.
 
Field Summary
protected  boolean fullView
           
protected  org.apache.tapestry5.beaneditor.BeanModel<Contact> model
          the model the factory will build
protected  ObsProgram obsProgram
           
protected  UserRole userRole
           
 
Constructor Summary
ContactModelFactory(ObsProgram obsProgram, UserRole userRole, boolean fullView)
           
 
Method Summary
protected  void addNonSortableProperty(String property, org.apache.tapestry5.PropertyConduit conduit)
          add a property in the model and make it not sortable
protected  void filterModel()
          remove properties from model depending on role, program, and fullView
protected  org.apache.tapestry5.PropertyConduit getActualSamplingStrategyPropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getBoatDistrictCodePropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getBoatImmatriculationPropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getBoatPropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getCommentAdminPropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getCommentCoordinatorPropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getCompanyPropertyConduit()
           
 org.apache.tapestry5.PropertyConduit getContactStateMotifPropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getDataReliabilityPropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getExpectedSamplingStrategyPropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getFishingZoneDivisionPropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getFishingZoneFacadePropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getFishingZoneSectorPropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getLandingDatePropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getObservationTypePropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getProfessionCodePropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getProfessionLibellePropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getProfessionSpeciesPropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getProgramPropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getSampleRowPropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getTerrestrialLocationPropertyConduit()
           
protected  org.apache.tapestry5.PropertyConduit getUserPropertyConduit()
           
protected  void initModel()
          add ALL properties to the bean model.
 org.apache.tapestry5.beaneditor.BeanModel<Contact> newModel(org.apache.tapestry5.services.BeanModelSource beanModelSource, org.apache.tapestry5.ComponentResources resources)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

userRole

protected UserRole userRole

obsProgram

protected ObsProgram obsProgram

fullView

protected boolean fullView

model

protected org.apache.tapestry5.beaneditor.BeanModel<Contact> model
the model the factory will build

Constructor Detail

ContactModelFactory

public ContactModelFactory(ObsProgram obsProgram,
                           UserRole userRole,
                           boolean fullView)
Method Detail

addNonSortableProperty

protected void addNonSortableProperty(String property,
                                      org.apache.tapestry5.PropertyConduit conduit)
add a property in the model and make it not sortable

Parameters:
property - the name of the property to add
conduit - a PropertyConduit to get the String representation of the value of the property, may be null if toString can be used

initModel

protected void initModel()
add ALL properties to the bean model.


filterModel

protected void filterModel()
remove properties from model depending on role, program, and fullView


newModel

public org.apache.tapestry5.beaneditor.BeanModel<Contact> newModel(org.apache.tapestry5.services.BeanModelSource beanModelSource,
                                                                   org.apache.tapestry5.ComponentResources resources)

getUserPropertyConduit

protected org.apache.tapestry5.PropertyConduit getUserPropertyConduit()

getCompanyPropertyConduit

protected org.apache.tapestry5.PropertyConduit getCompanyPropertyConduit()

getSampleRowPropertyConduit

protected org.apache.tapestry5.PropertyConduit getSampleRowPropertyConduit()

getBoatPropertyConduit

protected org.apache.tapestry5.PropertyConduit getBoatPropertyConduit()

getProgramPropertyConduit

protected org.apache.tapestry5.PropertyConduit getProgramPropertyConduit()

getProfessionCodePropertyConduit

protected org.apache.tapestry5.PropertyConduit getProfessionCodePropertyConduit()

getProfessionLibellePropertyConduit

protected org.apache.tapestry5.PropertyConduit getProfessionLibellePropertyConduit()

getProfessionSpeciesPropertyConduit

protected org.apache.tapestry5.PropertyConduit getProfessionSpeciesPropertyConduit()

getFishingZoneFacadePropertyConduit

protected org.apache.tapestry5.PropertyConduit getFishingZoneFacadePropertyConduit()

getFishingZoneSectorPropertyConduit

protected org.apache.tapestry5.PropertyConduit getFishingZoneSectorPropertyConduit()

getFishingZoneDivisionPropertyConduit

protected org.apache.tapestry5.PropertyConduit getFishingZoneDivisionPropertyConduit()

getBoatImmatriculationPropertyConduit

protected org.apache.tapestry5.PropertyConduit getBoatImmatriculationPropertyConduit()

getBoatDistrictCodePropertyConduit

protected org.apache.tapestry5.PropertyConduit getBoatDistrictCodePropertyConduit()

getCommentCoordinatorPropertyConduit

protected org.apache.tapestry5.PropertyConduit getCommentCoordinatorPropertyConduit()

getCommentAdminPropertyConduit

protected org.apache.tapestry5.PropertyConduit getCommentAdminPropertyConduit()

getDataReliabilityPropertyConduit

protected org.apache.tapestry5.PropertyConduit getDataReliabilityPropertyConduit()

getActualSamplingStrategyPropertyConduit

protected org.apache.tapestry5.PropertyConduit getActualSamplingStrategyPropertyConduit()

getExpectedSamplingStrategyPropertyConduit

protected org.apache.tapestry5.PropertyConduit getExpectedSamplingStrategyPropertyConduit()

getTerrestrialLocationPropertyConduit

protected org.apache.tapestry5.PropertyConduit getTerrestrialLocationPropertyConduit()

getLandingDatePropertyConduit

protected org.apache.tapestry5.PropertyConduit getLandingDatePropertyConduit()

getObservationTypePropertyConduit

protected org.apache.tapestry5.PropertyConduit getObservationTypePropertyConduit()

getContactStateMotifPropertyConduit

public org.apache.tapestry5.PropertyConduit getContactStateMotifPropertyConduit()


Copyright © 2009-2011 Ifremer. All Rights Reserved.