Class AbstractTagStore

    • Constructor Detail

      • AbstractTagStore

        protected AbstractTagStore​(java.lang.String managerName,
                                   GatewayContext context)
    • Method Detail

      • getLogger

        public LoggerEx getLogger()
      • isErrored

        public boolean isErrored()
        Description copied from interface: TagStore
        Returns whether or not the tag provider is running without error.
        Specified by:
        isErrored in interface TagStore
      • updateStatMetrics

        public void updateStatMetrics​(java.util.Map<java.lang.String,​NamedValue<StatMetric>> statMetrics)
        Description copied from interface: TagStore
        Allows tag stores to update StatMetrics for the provider status display. The key of the named value describes the metric.
        Specified by:
        updateStatMetrics in interface TagStore
      • getLastError

        public java.lang.Exception getLastError()
        Description copied from interface: TagStore
        If isErrored() is TRUE, this should return the error that is causing that state.
        Specified by:
        getLastError in interface TagStore
      • getManagerName

        public java.lang.String getManagerName()
      • addConfigurationListener

        public void addConfigurationListener​(TagStoreListener listener)
        Description copied from interface: TagStore
        The configuration listener will be notified any time items are added or removed. When first added, it will be called immediately with the current set of objects, unless startup has not been called. In that case, it will likely be called at startup.
        Specified by:
        addConfigurationListener in interface TagStore
      • setErrored

        protected void setErrored​(boolean isErrored,
                                  java.lang.Exception lastError)
      • getDBId

        protected java.lang.Long getDBId​(EntityId id)
        Returns the long value contained in the entityid. Handles override ids as well.
      • updateUdtEidCache

        protected void updateUdtEidCache​(EntityId owner,
                                         java.lang.String memberUid,
                                         EntityId memberId)
        The UDT EID cache is a structure containing EID mappings for UDT member items. This function updates the specified member under the given owner.
      • updateUDTsForLoadedTags

        protected void updateUDTsForLoadedTags​(java.util.List<TagStoreObject<TagConfig>> loaded)
      • registerUDTs

        protected void registerUDTs​(java.util.Map<EntityId,​java.util.Map<java.lang.String,​EntityId>> udtMap)
        Registers new UDTs with the udt/eid cache, which maps from EntityId (for UDT) to map of Path/EntityId for member path to EID.
      • removeFromUidEidCache

        protected java.util.List<EntityId> removeFromUidEidCache​(java.util.Collection<EntityId> tagIds)
        Goes through the tag ids, and removes them from the UDT/EID cache. Returns the full list of all member EIDs, in addition to the complex tag's id.
      • getIdForMemberPath

        protected EntityId getIdForMemberPath​(EntityId parent,
                                              java.lang.String memberUid)
      • getIdsForMemberPaths

        protected java.util.List<EntityId> getIdsForMemberPaths​(EntityId parent,
                                                                java.util.Collection<java.lang.String> uids)
        Returns a 1-to-1 list of ids for the passed in paths. A id will be null if the member doesn't exist.
      • notifyItemsRemoved

        protected void notifyItemsRemoved​(java.util.Collection<EntityId> tagIds,
                                          java.util.Collection<EntityId> scIds)
      • notifyPropertiesChanged

        protected void notifyPropertiesChanged​(java.util.Collection<TagPropertyValue> properties)
      • getDeepTagCount

        protected int getDeepTagCount​(java.util.List<? extends Tag> tags)
        Takes a set of tags and returns how many tags are contained below them. Includes folders and top level tags.
      • flattenTags

        protected java.util.List<GeneralTagConfig<Tag,​java.lang.String>> flattenTags​(TagPath parent,
                                                                                           java.util.List<? extends Tag> tags)
      • deleteTags

        public void deleteTags​(java.util.Collection<EntityId> tagIds)
                        throws java.lang.Exception
        Description copied from interface: TagStore
        Deletes the given tags from the store. Will result in the itemsRemoved notification.
        Specified by:
        deleteTags in interface TagStore
        Throws:
        java.lang.Exception
      • internalDeleteTag

        protected abstract void internalDeleteTag​(java.util.List<EntityId> tags,
                                                  TaskProgressUpdater updater)
                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • executeScalar

        protected java.lang.Object executeScalar​(java.sql.PreparedStatement stmt)
                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • buildPropertyValue

        protected PropertyValue buildPropertyValue​(java.lang.String propId,
                                                   java.lang.Object value,
                                                   int bindType,
                                                   DataTypeClass fallbackType)
      • getTypeForValueProp

        protected DataType getTypeForValueProp​(PropertySet propSet)
        Gets the data type for the value property stored in the provided property set