com.ibm.websphere.collective.repository

Interface AdminMetadataManagerMBean



  • public interface AdminMetadataManagerMBean
    The AdminMetadataManagerMBean provides the administrative metadata MBean operations to add, retrieve and remove metadata and the metadata includes tags, owner, contact and note data. The metadata information is stored in the collective repository.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String OBJECT_NAME
      A String representing the ObjectName that this MBean maps to.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void addAdminMetadata(java.lang.String resourceType, java.lang.String identity, java.util.Map metadata)
      Create administrative metadata for the given resource type, identity and metadata map.
      void addAdminTag(java.lang.String resourceType, java.lang.String identity, java.lang.String tag)
      Create a tag for the given resource type and identity.
      void addAdminTags(java.lang.String resourceType, java.lang.String identity, java.lang.String[] tags)
      Create tags for the given resource type and identity.
      void deployAdminMetadata(java.lang.String resourceType, java.lang.String identity, java.util.Map metadata)
      Deploy administrative metadata for the given resource type, identity and metadata map.
      java.util.Map<java.lang.String,java.lang.Object> getAdminMetadata(java.lang.String resourceType, java.lang.String identity)
      Retrieve all administrative metadata for the given resource type and identity.
      java.util.Map<java.lang.String,java.lang.Object> getAdminMetadata(java.lang.String resourceType, java.lang.String identity, java.lang.String[] mapKeys)
      Retrieve requested keys of administrative metadata for the given resource type and identity.
      java.lang.String[] getAdminTags(java.lang.String resourceType, java.lang.String identity)
      Retrieve all admin and deploy tags for the given resourceType and identity.
      java.lang.String[] getResourceIdentities(java.lang.String resourceType)
      Get the identities for a resource type.
      java.lang.String[] getTags()
      Retrieve all unique tags across all resource types.
      void removeAdminMetadata(java.lang.String resourceType, java.lang.String identity, java.util.Map metadata)
      Remove administrative metadata from the given resource type and identity, that matches the metadata map.
      void removeAdminTag(java.lang.String resourceType, java.lang.String identity, java.lang.String tag)
      Remove a specific tag for the given resource type and identity.
      void removeAdminTags(java.lang.String resourceType, java.lang.String identity)
      Remove all tags for a given resource type and identity.
      void removeAllAdminMetadata(java.lang.String resourceType, java.lang.String identity)
      Remove all administrative metadata from the given resource type and identity.
      void removeAllMetadata(java.lang.String identity)
      Remove the administrative metadata for all resource types for the given identity.
      java.util.Map<java.lang.String,java.lang.String[]> searchResources(java.util.Map<java.lang.String,java.lang.Object> metadata)
      Return all the identities that match any of the data in the supplied metadata map.
      java.lang.String[] searchResources(java.lang.String resourceType, java.util.Map<java.lang.String,java.lang.Object> metadata)
      For a specified resource type, return all the identities that match any of the data in the supplied metadata map.
      void setAdminMetadata(java.lang.String resourceType, java.lang.String identity, java.util.Map<java.lang.String,java.lang.Object> metadata)
      Set (replace) all administrative metadata for the given resource type and identity with the supplied metadata map.
      void setAdminTags(java.lang.String resourceType, java.lang.String identity, java.lang.String[] tags)
      Set (replace) all tags for the given resource type and identity.
    • Field Detail

      • OBJECT_NAME

        static final java.lang.String OBJECT_NAME
        A String representing the ObjectName that this MBean maps to.
        See Also:
        Constant Field Values
    • Method Detail

      • addAdminMetadata

        void addAdminMetadata(java.lang.String resourceType,
                            java.lang.String identity,
                            java.util.Map metadata)
                              throws java.io.IOException
        Create administrative metadata for the given resource type, identity and metadata map.

        Any metadata that is not identified with an expected map key as defined below, is ignored with no exception.

        A map entry that has an expected key, but the data for that key is not as expected will result in an IllegalArgumentException, but only after all other properly formed keys and their data have been processed. In the case that there are multiple instances of expected keys with improper data, only the first such occurrence is thrown in the IllegalArgumentException.

        Parameters:
        resourceType - resource type includes server, application, cluster, host and runtime.
        identity - specifies the unique resource for this action. This might be:
        • server identity - {hostName},{userDir},{serverName}
        • cluster identity - {clusterName}
        • application identity - {hostName},{userDir},{serverName},{applicationName}
        • clustered application identity - {clusterName},{applicationName}
        • host identity - {hostName}
        • runtime identity - {hostName},{installDir}
        metadata - a map of admin metadata. This is a map with the possible keys: tags, owner, contacts and note. The value for each key is as follows:
        • tags - an array of tag Strings (String[])
        • owner - a simple String field (String)
        • contacts - an array of contact Strings (String[])
        • note - a simple String field (String)
        Throws:
        java.io.IOException - If there was a problem accessing the repository for the request
        java.lang.IllegalArgumentException
      • deployAdminMetadata

        void deployAdminMetadata(java.lang.String resourceType,
                               java.lang.String identity,
                               java.util.Map metadata)
                                 throws java.lang.IllegalArgumentException,
                                        java.io.IOException
        Deploy administrative metadata for the given resource type, identity and metadata map. It replaces all metadata previously created by this method.

        Any metadata that is not identified with an expected map key as defined below, is ignored with no exception.

        A map entry that has an expected key, but the data for that key is not as expected will result in an IllegalArgumentException, but only after all other properly formed keys and their data have been processed. In the case that there are multiple instances of expected keys with improper data, only the first such occurrence is thrown in the IllegalArgumentException.

        Parameters:
        resourceType - resource type includes server, application, cluster, host and runtime.
        identity - specifies the unique resource for this action. This might be:
        • server identity - {hostName},{userDir},{serverName}
        • cluster identity - {clusterName}
        • application identity - {hostName},{userDir},{serverName},{applicationName}
        • clustered application identity - {clusterName},{applicationName}
        • host identity - {hostName}
        • runtime identity - {hostName},{installDir}
        metadata - a map of admin metadata. This is a map with the possible keys: tags, owner, contacts and note. The value for each key is as follows:
        • tags - an array of tag Strings for the identity (String[])
        • owner - a simple String indicating the owner of the identity (String)
        • contacts - an array of Strings that are contact information for the identity (String[])
        • note - a simple String that is free-form note text for the identity (String)
        Throws:
        java.io.IOException - If there was a problem accessing the repository for the request
        java.lang.IllegalArgumentException
      • getAdminMetadata

        java.util.Map<java.lang.String,java.lang.Object> getAdminMetadata(java.lang.String resourceType,
                                                                        java.lang.String identity)
                                                                          throws java.lang.IllegalArgumentException,
                                                                                 java.io.IOException
        Retrieve all administrative metadata for the given resource type and identity.
        Parameters:
        resourceType - resource type includes server, application, cluster, host and runtime.
        identity - specifies the unique resource for this action. This might be:
        • server identity - {hostName},{userDir},{serverName}
        • cluster identity - {clusterName}
        • application identity - {hostName},{userDir},{serverName},{applicationName}
        • clustered application identity - {clusterName},{applicationName}
        • host identity - {hostName}
        • runtime identity - {hostName},{installDir}
        Returns:
        a map of admin metadata. This is a map with the possible keys: tags, owner, contacts and note. The value for each key is as follows:
        • tags - an array of tag Strings for the identity (String[])
        • owner - a simple String indicating the owner of the identity (String)
        • contacts - an array of Strings that are contact information for the identity (String[])
        • note - a simple String that is free-form note text for the identity (String)
        Throws:
        java.io.IOException - If there was a problem accessing the repository for the request
        java.lang.IllegalArgumentException
      • getAdminMetadata

        java.util.Map<java.lang.String,java.lang.Object> getAdminMetadata(java.lang.String resourceType,
                                                                        java.lang.String identity,
                                                                        java.lang.String[] mapKeys)
                                                                          throws java.lang.IllegalArgumentException,
                                                                                 java.io.IOException
        Retrieve requested keys of administrative metadata for the given resource type and identity.
        Parameters:
        resourceType - resource type includes server, application, cluster, host and runtime.
        identity - specifies the unique resource for this action. This might be:
        • server identity - {hostName},{userDir},{serverName}
        • cluster identity - {clusterName}
        • application identity - {hostName},{userDir},{serverName},{applicationName}
        • clustered application identity - {clusterName},{applicationName}
        • host identity - {hostName}
        • runtime identity - {hostName},{installDir}
        mapKeys - the map keys to be returned for this request. The possible map keys includes tags, owner, contacts and note
        Returns:
        a map of admin metadata for the requested map keys. This is a map with the possible keys: tags, owner, contacts and note. If a key has no entries for this resource type and identity, the key will not be included in the returned map. The value for each key is as follows:
        • tags - an array of tag Strings for the identity (String[])
        • owner - a simple String indicating the owner of the identity (String)
        • contacts - an array of Strings that are contact information for the identity (String[])
        • note - a simple String that is free-form note text for the identity (String)
        Throws:
        java.io.IOException - If there was a problem accessing the repository for the request
        java.lang.IllegalArgumentException
      • setAdminMetadata

        void setAdminMetadata(java.lang.String resourceType,
                            java.lang.String identity,
                            java.util.Map<java.lang.String,java.lang.Object> metadata)
                              throws java.lang.IllegalArgumentException,
                                     java.io.IOException
        Set (replace) all administrative metadata for the given resource type and identity with the supplied metadata map. This will delete all the existing metadata for the resource type and identity (for all metadata keys whether passed in the new metdata map or not), before then adding the new metadata.
        Parameters:
        resourceType - resource type includes server, application, cluster, host and runtime.
        identity - specifies the unique resource for this action. This might be:
        • server identity - {hostName},{userDir},{serverName}
        • cluster identity - {clusterName}
        • application identity - {hostName},{userDir},{serverName},{applicationName}
        • clustered application identity - {clusterName},{applicationName}
        • host identity - {hostName}
        • runtime identity - {hostName},{installDir}
        metadata - a map of admin metadata. This is a map with the possible keys: tags, owner, contacts and note. The value for each key is as follows:
        • tags - an array of tag Strings for the identity (String[])
        • owner - a simple String indicating the owner of the identity (String)
        • contacts - an array of Strings that are contact information for the identity (String[])
        • note - a simple String that is free-form note text for the identity (String)
        Throws:
        java.io.IOException - If there was a problem accessing the repository for the request
        java.lang.IllegalArgumentException
      • removeAdminMetadata

        void removeAdminMetadata(java.lang.String resourceType,
                               java.lang.String identity,
                               java.util.Map metadata)
                                 throws java.io.IOException
        Remove administrative metadata from the given resource type and identity, that matches the metadata map.
        Parameters:
        resourceType - resource type includes server, application, cluster, host and runtime.
        identity - specifies the unique resource for this action. This might be:
        • server identity - {hostName},{userDir},{serverName}
        • cluster identity - {clusterName}
        • application identity - {hostName},{userDir},{serverName},{applicationName}
        • clustered application identity - {clusterName},{applicationName}
        • host identity - {hostName}
        • runtime identity - {hostName},{installDir}
        metadata - a map of admin metadata. This is a map with the possible keys: tags, owner, contacts and note. This map should include the specific values to delete for the desired keys. The value for each key is as follows:
        • tags - an array of tag Strings to delete for the identity (String[])
        • owner - a simple String indicating the owner to delete from the identity (String)
        • contacts - an array of Strings that are contact information to delete for the identity (String[])
        • note - a simple String that is free-form note text to delete for the identity (String)
        Throws:
        java.io.IOException - If there was a problem accessing the repository for the request
      • removeAllAdminMetadata

        void removeAllAdminMetadata(java.lang.String resourceType,
                                  java.lang.String identity)
                                    throws java.lang.IllegalArgumentException,
                                           java.io.IOException
        Remove all administrative metadata from the given resource type and identity.
        Parameters:
        resourceType - resource type including server, application, cluster, host and runtime.
        identity - specifies the unique resource for this action. This might be:
        • server identity - {hostName},{userDir},{serverName}
        • cluster identity - {clusterName}
        • application identity - {hostName},{userDir},{serverName},{applicationName}
        • clustered application identity - {clusterName},{applicationName}
        • host identity - {hostName}
        • runtime identity - {hostName},{installDir}
        Throws:
        java.io.IOException - If there was a problem accessing the repository for the request
        java.lang.IllegalArgumentException
      • removeAllMetadata

        void removeAllMetadata(java.lang.String identity)
                               throws java.io.IOException
        Remove the administrative metadata for all resource types for the given identity.
        Parameters:
        identity - specifies the unique resource for this action. This might be:
        • server identity - {hostName},{userDir},{serverName}
        • cluster identity - {clusterName}
        • application identity - {hostName},{userDir},{serverName},{applicationName}
        • clustered application identity - {clusterName},{applicationName}
        • host identity - {hostName}
        • runtime identity - {hostName},{installDir}
        Throws:
        java.io.IOException - If there was a problem accessing the repository for the request
      • addAdminTag

        void addAdminTag(java.lang.String resourceType,
                       java.lang.String identity,
                       java.lang.String tag)
                         throws java.lang.IllegalArgumentException,
                                java.io.IOException
        Create a tag for the given resource type and identity.
        Parameters:
        resourceType - resource type including server, application, cluster, host and runtime.
        identity - specifies the unique resource for this action. This might be:
        • server identity - {hostName},{userDir},{serverName}
        • cluster identity - {clusterName}
        • application identity - {hostName},{userDir},{serverName},{applicationName}
        • clustered application identity - {clusterName},{applicationName}
        • host identity - {hostName}
        • runtime identity - {hostName},{installDir}
        tag - to be added
        Throws:
        java.io.IOException - If there was a problem accessing the repository for the request
        java.lang.IllegalArgumentException
      • addAdminTags

        void addAdminTags(java.lang.String resourceType,
                        java.lang.String identity,
                        java.lang.String[] tags)
                          throws java.lang.IllegalArgumentException,
                                 java.io.IOException
        Create tags for the given resource type and identity.
        Parameters:
        resourceType - resource types including server, application, cluster, host and runtime.
        identity - specifies the unique resource for this action. This might be:
        • server identity - {hostName},{userDir},{serverName}
        • cluster identity - {clusterName}
        • application identity - {hostName},{userDir},{serverName},{applicationName}
        • clustered application identity - {clusterName},{applicationName}
        • host identity - {hostName}
        • runtime identity - {hostName},{installDir}
        tags - array of tags to be added to the identity
        Throws:
        java.io.IOException - If there was a problem accessing the repository for the request
        java.lang.IllegalArgumentException
      • getAdminTags

        java.lang.String[] getAdminTags(java.lang.String resourceType,
                                      java.lang.String identity)
                                        throws java.lang.IllegalArgumentException,
                                               java.io.IOException
        Retrieve all admin and deploy tags for the given resourceType and identity.
        Parameters:
        resourceType - resource types including server, application, cluster, host and runtime.
        identity - specifies the unique resource for this action. This might be:
        • server identity - {hostName},{userDir},{serverName}
        • cluster identity - {clusterName}
        • application identity - {hostName},{userDir},{serverName},{applicationName}
        • clustered application identity - {clusterName},{applicationName}
        • host identity - {hostName}
        • runtime identity - {hostName},{installDir}
        Returns:
        an array of tags
        Throws:
        java.io.IOException - If there was a problem accessing the repository for the request
        java.lang.IllegalArgumentException
      • getTags

        java.lang.String[] getTags()
                                   throws java.lang.IllegalArgumentException,
                                          java.io.IOException
        Retrieve all unique tags across all resource types.
        Returns:
        an array of tags
        Throws:
        java.io.IOException - If there was a problem accessing the repository for the request
        java.lang.IllegalArgumentException
      • getResourceIdentities

        java.lang.String[] getResourceIdentities(java.lang.String resourceType)
                                                 throws java.lang.IllegalArgumentException,
                                                        java.io.IOException
        Get the identities for a resource type.
        Parameters:
        resourceType - resource types including server, application, cluster, host and runtime.
        Returns:
        an array of identities. An identity specifies a unique resource and can be in the following forms:
        • server identity - {hostName},{userDir},{serverName}
        • cluster identity - {clusterName}
        • application identity - {hostName},{userDir},{serverName},{applicationName}
        • clustered application identity - {clusterName},{applicationName}
        • host identity - {hostName}
        • runtime identity - {hostName},{installDir}
        Throws:
        java.io.IOException - If there was a problem accessing the repository for the request
        java.lang.IllegalArgumentException
      • setAdminTags

        void setAdminTags(java.lang.String resourceType,
                        java.lang.String identity,
                        java.lang.String[] tags)
                          throws java.lang.IllegalArgumentException,
                                 java.io.IOException
        Set (replace) all tags for the given resource type and identity.
        Parameters:
        resourceType - resource types including server, application, cluster, host and runtime.
        identity - specifies the unique resource for this action. This might be:
        • server identity - {hostName},{userDir},{serverName}
        • cluster identity - {clusterName}
        • application identity - {hostName},{userDir},{serverName},{applicationName}
        • clustered application identity - {clusterName},{applicationName}
        • host identity - {hostName}
        • runtime identity - {hostName},{installDir}
        tags - array of tags
        Throws:
        java.io.IOException - If there was a problem accessing the repository for the request
        java.lang.IllegalArgumentException
      • removeAdminTag

        void removeAdminTag(java.lang.String resourceType,
                          java.lang.String identity,
                          java.lang.String tag)
                            throws java.lang.IllegalArgumentException,
                                   java.io.IOException
        Remove a specific tag for the given resource type and identity.
        Parameters:
        resourceType - resource types including server, application, cluster, host and runtime.
        identity - specifies the unique resource for this action. This might be:
        • server identity - {hostName},{userDir},{serverName}
        • cluster identity - {clusterName}
        • application identity - {hostName},{userDir},{serverName},{applicationName}
        • clustered application identity - {clusterName},{applicationName}
        • host identity - {hostName}
        • runtime identity - {hostName},{installDir}
        tag - to be removed
        Throws:
        java.io.IOException - If there was a problem accessing the repository for the request
        java.lang.IllegalArgumentException
      • removeAdminTags

        void removeAdminTags(java.lang.String resourceType,
                           java.lang.String identity)
                             throws java.lang.IllegalArgumentException,
                                    java.io.IOException
        Remove all tags for a given resource type and identity.
        Parameters:
        resourceType - resource types including server, application, cluster, host and runtime.
        identity - specifies the unique resource for this action. This might be:
        • server identity - {hostName},{userDir},{serverName}
        • cluster identity - {clusterName}
        • application identity - {hostName},{userDir},{serverName},{applicationName}
        • clustered application identity - {clusterName},{applicationName}
        • host identity - {hostName}
        • runtime identity - {hostName},{installDir}
        Throws:
        java.io.IOException - If there was a problem accessing the repository for the request
        java.lang.IllegalArgumentException
      • searchResources

        java.lang.String[] searchResources(java.lang.String resourceType,
                                         java.util.Map<java.lang.String,java.lang.Object> metadata)
                                           throws java.lang.IllegalArgumentException,
                                                  java.io.IOException
        For a specified resource type, return all the identities that match any of the data in the supplied metadata map.
        Parameters:
        resourceType - resource types including server, application, cluster, host and runtime.
        metadata - a map of admin metadata. This is a map with the possible keys: tags, owner, contacts and note. If a key has a value of null, this means return any identity that has that type of metadata (for example, an owner), no matter the value. The value for each key is as follows:
        • tags - an array of tag Strings for the identity (String[])
        • owner - a simple String indicating the owner of the identity (String)
        • contacts - an array of Strings that are contact information for the identity (String[])
        • note - a simple String that is free-form note text for the identity (String)
        Returns:
        an array of identities. An identity specifies a unique resource and can be in the following forms:
        • server identity - {hostName},{userDir},{serverName}
        • cluster identity - {clusterName}
        • application identity - {hostName},{userDir},{serverName},{applicationName}
        • clustered application identity - {clusterName},{applicationName}
        • host identity - {hostName}
        • runtime identity - {hostName},{installDir}
        Throws:
        java.io.IOException - If there was a problem accessing the repository for the request
        java.lang.IllegalArgumentException
      • searchResources

        java.util.Map<java.lang.String,java.lang.String[]> searchResources(java.util.Map<java.lang.String,java.lang.Object> metadata)
                                                                           throws java.lang.IllegalArgumentException,
                                                                                  java.io.IOException
        Return all the identities that match any of the data in the supplied metadata map.
        Parameters:
        metadata - a map of admin metadata. This is a map with the possible keys: tags, owner, contacts and note. If a key has a value of null, this means return any identity that has that type of metadata (for example, an owner), no matter the value. The value for each key is as follows:
        • tags - an array of tag Strings for the identity (String[])
        • owner - a simple String indicating the owner of the identity (String)
        • contacts - an array of Strings that are contact information for the identity (String[])
        • note - a simple String that is free-form note text for the identity (String)
        Returns:
        a map of identities across all resources, where the result map contains following keys:
        • server
        • cluster
        • application
        • host
        • runtime

        Each key will have a value that is an array of identities (String[]). An identity specifies a unique resource and can be in the following forms:

        • server identity - {hostName},{userDir},{serverName}
        • cluster identity - {clusterName}
        • application identity - {hostName},{userDir},{serverName},{applicationName}
        • clustered application identity - {clusterName},{applicationName}
        • host identity - {hostName}
        • runtime identity - {hostName},{installDir}
        Throws:
        java.io.IOException - If there was a problem accessing the repository for the request
        java.lang.IllegalArgumentException