Class PropertiesCommand


  • public class PropertiesCommand
    extends RestCommand
    This command is used to manipulate the standard shared property stores as well as configuration specific property stores.
    • properties/[instance:]storename/propname[/value] - Get or set value in specific store
    • properties/[instance:]storename - Get all values in store (HTTP GET)
    • properties/[instance:]storename - Put all posted values to store (HTTP POST)
    • properties/☆/propname[/value] - Get or set value in default store
    • properties - List all property stores
    The instance ID is optional. If one is specified, the instance ID is used to access the property store. If the instance is running, the properties for the running configuration is used, otherwise the configuration file for the instance is loaded to update the property store.
    • Constructor Detail

      • PropertiesCommand

        public PropertiesCommand()
    • Method Detail

      • execute

        public void execute()
                     throws java.lang.Exception
        Specified by:
        execute in class RestCommand
        Throws:
        java.lang.Exception
      • setPropertyValue

        public java.lang.Object setPropertyValue​(java.lang.Object store,
                                                 java.lang.String key,
                                                 java.lang.String value)
                                          throws java.lang.Exception
        Returns the value for key and sets the new value.
        Parameters:
        store - TDIProperties or TDIPropertyStore
        key -
        value - if null the property is removed (if applicable)
        Returns:
        the value before setting the new one
        Throws:
        java.lang.Exception
      • setPropertyValue

        public void setPropertyValue​(java.lang.Object store,
                                     java.lang.String key,
                                     java.lang.String value,
                                     boolean protect)
                              throws java.lang.Exception
        Sets a new value for the key in the store.
        Parameters:
        store - TDIProperties or TDIPropertyStore
        key -
        value - if null the property is removed (if applicable)
        protect - if true, the property should be encrypted
        Throws:
        java.lang.Exception
      • getPropertyValue

        public java.lang.Object getPropertyValue​(java.lang.Object store,
                                                 java.lang.String key)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • commitStore

        public void commitStore​(java.lang.Object store)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception