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 Details

  • Method Details

    • addAdminMetadata

      void addAdminMetadata(String resourceType, String identity, Map metadata) throws 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:
      IOException - If there was a problem accessing the repository for the request
      IllegalArgumentException
    • deployAdminMetadata

      void deployAdminMetadata(String resourceType, String identity, Map metadata) throws IllegalArgumentException, 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:
      IOException - If there was a problem accessing the repository for the request
      IllegalArgumentException
    • getAdminMetadata

      Map<String,Object> getAdminMetadata(String resourceType, String identity) throws IllegalArgumentException, 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:
      IOException - If there was a problem accessing the repository for the request
      IllegalArgumentException
    • getAdminMetadata

      Map<String,Object> getAdminMetadata(String resourceType, String identity, String[] mapKeys) throws IllegalArgumentException, 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:
      IOException - If there was a problem accessing the repository for the request
      IllegalArgumentException
    • setAdminMetadata

      void setAdminMetadata(String resourceType, String identity, Map<String,Object> metadata) throws IllegalArgumentException, 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:
      IOException - If there was a problem accessing the repository for the request
      IllegalArgumentException
    • removeAdminMetadata

      void removeAdminMetadata(String resourceType, String identity, Map metadata) throws 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:
      IOException - If there was a problem accessing the repository for the request
    • removeAllAdminMetadata

      void removeAllAdminMetadata(String resourceType, String identity) throws IllegalArgumentException, 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:
      IOException - If there was a problem accessing the repository for the request
      IllegalArgumentException
    • removeAllMetadata

      void removeAllMetadata(String identity) throws 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:
      IOException - If there was a problem accessing the repository for the request
    • addAdminTag

      void addAdminTag(String resourceType, String identity, String tag) throws IllegalArgumentException, 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:
      IOException - If there was a problem accessing the repository for the request
      IllegalArgumentException
    • addAdminTags

      void addAdminTags(String resourceType, String identity, String[] tags) throws IllegalArgumentException, 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:
      IOException - If there was a problem accessing the repository for the request
      IllegalArgumentException
    • getAdminTags

      String[] getAdminTags(String resourceType, String identity) throws IllegalArgumentException, 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:
      IOException - If there was a problem accessing the repository for the request
      IllegalArgumentException
    • getTags

      Retrieve all unique tags across all resource types.
      Returns:
      an array of tags
      Throws:
      IOException - If there was a problem accessing the repository for the request
      IllegalArgumentException
    • getResourceIdentities

      String[] getResourceIdentities(String resourceType) throws IllegalArgumentException, 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:
      IOException - If there was a problem accessing the repository for the request
      IllegalArgumentException
    • setAdminTags

      void setAdminTags(String resourceType, String identity, String[] tags) throws IllegalArgumentException, 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:
      IOException - If there was a problem accessing the repository for the request
      IllegalArgumentException
    • removeAdminTag

      void removeAdminTag(String resourceType, String identity, String tag) throws IllegalArgumentException, 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:
      IOException - If there was a problem accessing the repository for the request
      IllegalArgumentException
    • removeAdminTags

      void removeAdminTags(String resourceType, String identity) throws IllegalArgumentException, 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:
      IOException - If there was a problem accessing the repository for the request
      IllegalArgumentException
    • searchResources

      String[] searchResources(String resourceType, Map<String,Object> metadata) throws IllegalArgumentException, 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:
      IOException - If there was a problem accessing the repository for the request
      IllegalArgumentException
    • searchResources

      Map<String,String[]> searchResources(Map<String,Object> metadata) throws IllegalArgumentException, 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:
      IOException - If there was a problem accessing the repository for the request
      IllegalArgumentException