Class Store


  • public class Store
    extends Object
    This class is a bean providing information of the ContextHub's store.
    • Constructor Detail

      • Store

        public Store​(Resource resource)
        Constructs bean with information of specified store.
        Parameters:
        resource - store resource
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Returns true if store is enabled.
        Returns:
        true if store is enabled
      • getName

        public String getName()
        Returns store name.
        Returns:
        store name
      • getPath

        public String getPath()
        If this store was created from a resource, returns store path (for example: /etc/cloudsettings/default/contexthub/store-name). Otherwise, returns null.
        Returns:
        store path, or null
      • getRunModes

        public Set<String> getRunModes()
        Returns list of run modes in which store should be available.
        Returns:
        list of run modes
      • getResourceType

        public String getResourceType()
        Returns store resource type (for example: granite/contexthub/components/stores/store-name).
        Returns:
        store resource type
      • getProperties

        public ValueMap getProperties()
        Returns store properties.
        Returns:
        ValueMap containing store properties
      • setEnabled

        public void setEnabled​(boolean enabled)
        Set whether this store should be enabled or not.
        Parameters:
        enabled - whether this store should be enabled or not
      • setName

        public void setName​(String name)
        Set the store's name.
        Parameters:
        name - the store's name
      • setProperties

        public void setProperties​(ValueMap properties)
        Set all & any properties for this store.
        Parameters:
        properties - the properties
      • getCategories

        public List<String> getCategories()
        Returns store specific kernel client libraries.
        Returns:
        List of kernel client libraries used by the store
      • toString

        public String toString()
        Overrides default toString() and returns store specific information.
        Overrides:
        toString in class Object
        Returns:
        store's name, path and resourceType