Package com.adobe.granite.contexthub.api
Class Store
- java.lang.Object
-
- com.adobe.granite.contexthub.api.Store
-
public class Store extends java.lang.ObjectThis class is a bean providing information of the ContextHub's 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.StringgetName()Returns store name.java.lang.StringgetPath()If this store was created from a resource, returns store path (for example: /etc/cloudsettings/default/contexthub/store-name).ValueMapgetProperties()Returns store properties.java.lang.StringgetResourceType()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.booleanisEnabled()Returns true if store is enabled.voidsetEnabled(boolean enabled)Set whether this store should be enabled or not.voidsetName(java.lang.String name)Set the store's name.voidsetProperties(ValueMap properties)Set all & any properties for this store.java.lang.StringtoString()Overrides defaulttoString()and returns store specific information.
-
-
-
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:
trueif 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, returnsnull.- 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:
ValueMapcontaining 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:
Listof kernel client libraries used by the store
-
toString
public java.lang.String toString()
Overrides defaulttoString()and returns store specific information.- Overrides:
toStringin classjava.lang.Object- Returns:
- store's
name,pathandresourceType
-
-