Interface Metadatable

    • Method Detail

      • setMetadata

        void setMetadata​(@NotNull
                         String metadataKey,
                         @NotNull
                         MetadataValue newMetadataValue)
        Sets a metadata value in the implementing object's metadata store.
        Parameters:
        metadataKey - A unique key to identify this metadata.
        newMetadataValue - The metadata value to apply.
        Throws:
        IllegalArgumentException - If value is null, or the owning plugin is null
      • getMetadata

        @NotNull
        List<MetadataValue> getMetadata​(@NotNull
                                        String metadataKey)
        Returns a list of previously set metadata values from the implementing object's metadata store.
        Parameters:
        metadataKey - the unique metadata key being sought.
        Returns:
        A list of values, one for each plugin that has set the requested value.
      • hasMetadata

        boolean hasMetadata​(@NotNull
                            String metadataKey)
        Tests to see whether the implementing object contains the given metadata value in its metadata store.
        Parameters:
        metadataKey - the unique metadata key being queried.
        Returns:
        the existence of the metadataKey within subject.
      • removeMetadata

        void removeMetadata​(@NotNull
                            String metadataKey,
                            @NotNull
                            Plugin owningPlugin)
        Removes the given metadata value from the implementing object's metadata store.
        Parameters:
        metadataKey - the unique metadata key identifying the metadata to remove.
        owningPlugin - This plugin's metadata value will be removed. All other values will be left untouched.
        Throws:
        IllegalArgumentException - If plugin is null