Package org.apache.unomi.api
Class Metadata
java.lang.Object
org.apache.unomi.api.Metadata
- All Implemented Interfaces:
Serializable,Comparable<Metadata>
A class providing information about context server entities.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault scope, gathers default entities and can also be used to share entities across scopes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanRetrieves the description.getId()Retrieves the identifier for the entity associated with this MetadatagetName()Retrieves the name.getScope()Retrieves the scope for the entity associated with this MetadataRetrieves a set ofStringsystem tag names associated with this MetadatagetTags()Retrieves a set ofStringtag names associated with this MetadatainthashCode()booleanWhether the associated entity is considered active by the context server, in particular to check if rules need to be created / triggeredbooleanisHidden()Whether the associated entity is considered for internal purposes only and should therefore be hidden to accessing UIs.booleanWhether the associated entity is waiting on additional plugins to become available to be able to properly perform its function.booleanWhether the associated entity can be accessed but not modified.voidsetDescription(String description) Sets the description.voidsetEnabled(boolean enabled) Specifies whether the associated entity should be active or not.voidsetHidden(boolean hidden) Specifies whether the associated entity is hidden.voidSets the id.voidsetMissingPlugins(boolean missingPlugins) Specifies whether the associated entity is waiting on additional plugins to become available.voidSets the name.voidsetReadOnly(boolean readOnly) Specifies whether the associated entity should be only accessed and not modified.voidSets the scope.voidsetSystemTags(Set<String> systemTags) Sets the system tags.voidSets the tags.
-
Field Details
-
SYSTEM_SCOPE
Default scope, gathers default entities and can also be used to share entities across scopes.- See Also:
-
-
Constructor Details
-
Metadata
public Metadata()Instantiates a new Metadata. -
Metadata
Instantiates a new Metadata with the specified identifier.- Parameters:
id- the identifier for this Metadata
-
Metadata
Instantiates a new Metadata with the provided information.- Parameters:
scope- the scope for this Metadataid- the identifier of the associatedItemname- the namedescription- the description
-
-
Method Details
-
getId
Retrieves the identifier for the entity associated with this Metadata- Returns:
- the identifier
-
setId
Sets the id.- Parameters:
id- the id
-
getName
Retrieves the name.- Returns:
- the name
-
setName
Sets the name.- Parameters:
name- the name
-
getDescription
Retrieves the description.- Returns:
- the description
-
setDescription
Sets the description.- Parameters:
description- the description
-
getScope
Retrieves the scope for the entity associated with this Metadata- Returns:
- the scope for the entity associated with this Metadata
- See Also:
-
setScope
Sets the scope.- Parameters:
scope- the scope
-
getTags
Retrieves a set ofStringtag names associated with this Metadata- Returns:
- a set of
Stringtag names associated with this Metadata
-
setTags
Sets the tags.- Parameters:
tags- the tag ids
-
getSystemTags
Retrieves a set ofStringsystem tag names associated with this Metadata- Returns:
- a set of
Stringsystem tag names associated with this Metadata
-
setSystemTags
Sets the system tags.- Parameters:
systemTags- the system tag ids
-
isEnabled
public boolean isEnabled()Whether the associated entity is considered active by the context server, in particular to check if rules need to be created / triggered- Returns:
trueif the associated entity is enabled,falseotherwise
-
setEnabled
public void setEnabled(boolean enabled) Specifies whether the associated entity should be active or not.- Parameters:
enabled-trueif the associated entity is enabled,falseotherwise
-
isMissingPlugins
public boolean isMissingPlugins()Whether the associated entity is waiting on additional plugins to become available to be able to properly perform its function.- Returns:
trueif plugins are missing,falseotherwise
-
setMissingPlugins
public void setMissingPlugins(boolean missingPlugins) Specifies whether the associated entity is waiting on additional plugins to become available.- Parameters:
missingPlugins-trueif plugins are missing,falseotherwise
-
isHidden
public boolean isHidden()Whether the associated entity is considered for internal purposes only and should therefore be hidden to accessing UIs.- Returns:
trueif the associated entity needs to be hidden,falseotherwise
-
setHidden
public void setHidden(boolean hidden) Specifies whether the associated entity is hidden.- Parameters:
hidden-trueif the associated entity needs to be hidden,falseotherwise
-
isReadOnly
public boolean isReadOnly()Whether the associated entity can be accessed but not modified.- Returns:
trueif the associated entity can be accessed but not modified,falseotherwise
-
setReadOnly
public void setReadOnly(boolean readOnly) Specifies whether the associated entity should be only accessed and not modified.- Parameters:
readOnly-trueif the associated entity can be accessed but not modified,falseotherwise
-
compareTo
- Specified by:
compareToin interfaceComparable<Metadata>
-
equals
-
hashCode
public int hashCode()
-