Class CSettings

All Implemented Interfaces:
Serializable, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, Badgeable, Identified, Tool, overit.geocall.ux.configurability.UIConfigurable, overit.geocall.ux.edm.ModelConfigurable
Direct Known Subclasses:
CDBSystemSettings

@Component public class CSettings extends Container
This container must be used to define a page to manage the system's properties with UI widget.
Since:
10.2
See Also:
GCApi:
component
  • Field Details

    • formRegistryName

      protected String formRegistryName
    • type

      protected String type
    • propertyFilter

      protected String propertyFilter
    • form

      protected Form form
    • config

      protected Lazy<overit.geocall.config.CompositeConfig> config
    • mapPropertyInput

      protected HashMap<String,Input> mapPropertyInput
  • Constructor Details

    • CSettings

      public CSettings()
  • Method Details

    • setFORM

      public void setFORM(String s)
      Sets the registryName of the form that this container have to manage
      Parameters:
      s - The registryName of the form
    • setTYPE

      public void setTYPE(String s)
      Sets the type of properties to manage. If it set 'company' means that the properties to manage must be the company one, otherwise the systems properties will be managed.
      By default, the type is company.invalid input: '<'br Possible values, for the property's type, are:
      • company
      • system
      Parameters:
      s - the type of properties to manage
    • setPROPERTYFILTER

      public void setPROPERTYFILTER(String s)
      Sets the regexp with which the container will filter the page's inputs related to the properties
      Parameters:
      s - the regexp with which the container will filter the page's inputs related to the properties
    • onOpen

      public void onOpen(Object o)
      Description copied from class: Container
      Method called when is executed the WindowManager.push(overit.geocall.basic.ui.Window, java.lang.Object) of the Window that contains the Container. It calls the onOpen(o) method of all the Container's childrens.
      If a page is opened through the process of a route, it is possible that the route was called with params to pass to the page.
      The route params could be passed specifying them like query string's param on the url, using commas or the '=' character, to separate the keys and the values. Valid syntaxs are: "&params=KEY1,VAL1,KEY2,VAL2" or "&params=KEY1=VAL1,KEY2=VAL2"
      In that case it is possible to retrieve those params via the WindowManager.getRouteParams() method that returns an HashGetter with the params passed as parameters.
      For example it's possible to retrieve and use the params in this way: HashGetter hg = getWM().getRouteParams();
      String val1 = hg.getString("key1",null);
      String val2 = hg.getString("key2",null);
      Overrides:
      onOpen in class Container
      Parameters:
      o - Object received from the caller
    • preparePage

      protected void preparePage()
    • getRealPropertyValue

      protected Object getRealPropertyValue(overit.geocall.config.CompositeConfig c, Input i, String key)
    • getStringPropertyValue

      protected Object getStringPropertyValue(Class<? extends Input> cl, overit.geocall.config.CompositeConfig c, String key)
    • getDtzPropertyValue

      protected Object getDtzPropertyValue(overit.geocall.config.CompositeConfig c, String key, String inputName)
    • getTimePropertyValue

      protected Object getTimePropertyValue(overit.geocall.config.CompositeConfig c, String key, String inputName)
    • getDatePropertyValue

      protected Object getDatePropertyValue(overit.geocall.config.CompositeConfig c, String key, String inputName)
    • getDoublePropertyValue

      protected Object getDoublePropertyValue(overit.geocall.config.CompositeConfig c, String key, String inputName)
    • loadAdditionalValues

      protected void loadAdditionalValues()
    • saveAdditionalValues

      protected org.apache.commons.configuration2.Configuration saveAdditionalValues(Map<String,Object> values, org.apache.commons.configuration2.Configuration newConfiguration)
    • buildMapPropertyDefault

      protected void buildMapPropertyDefault(ArrayList<Component> al)
    • setPropertyValue

      protected void setPropertyValue(String key, Object value)
    • onSave

      public boolean onSave(UIMessage uim)
      UI event handler to save the system settings and the configuration. Please note that not all the displayed data will be saved in the system settings table. All the data that corresponds to company properties, will be saved in the company configuration.
      Parameters:
      uim - the UIMessage
      Returns:
      true to break the responsibility chain, false otherwise.
    • saveConfiguration

      protected org.apache.commons.configuration2.Configuration saveConfiguration(Map<String,Object> values)
    • manageValueOnConf

      protected void manageValueOnConf(org.apache.commons.configuration2.Configuration fullConf, org.apache.commons.configuration2.Configuration editConf, String key, Input i, Object value)
    • getFormattedDate

      protected String getFormattedDate(Input i, Date value)