Class Store


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

      Constructors 
      Constructor Description
      Store​(Resource resource)
      Constructs bean with information of specified store.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getCategories()
      Returns store specific kernel client libraries.
      java.lang.String getName()
      Returns store name.
      java.lang.String getPath()
      If this store was created from a resource, returns store path (for example: /etc/cloudsettings/default/contexthub/store-name).
      ValueMap getProperties()
      Returns store properties.
      java.lang.String getResourceType()
      Returns store resource type (for example: granite/contexthub/components/stores/store-name).
      java.util.Set<java.lang.String> getRunModes()
      Returns list of run modes in which store should be available.
      boolean isEnabled()
      Returns true if store is enabled.
      void setEnabled​(boolean enabled)
      Set whether this store should be enabled or not.
      void setName​(java.lang.String name)
      Set the store's name.
      void setProperties​(ValueMap properties)
      Set all & any properties for this store.
      java.lang.String toString()
      Overrides default toString() and returns store specific information.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 java.lang.String getName()
        Returns store name.
        Returns:
        store name
      • getPath

        public java.lang.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 java.util.Set<java.lang.String> getRunModes()
        Returns list of run modes in which store should be available.
        Returns:
        list of run modes
      • getResourceType

        public java.lang.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​(java.lang.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 java.util.List<java.lang.String> getCategories()
        Returns store specific kernel client libraries.
        Returns:
        List of kernel client libraries used by the store
      • toString

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