This is the initial API that I came with for the meta data service client
component.

    /**
     * Initialize the MetaDataServiceClient. Should be called once before
using the MetaDataServiceClient.
     * @throws MetaDataServiceClientExeption
     */
    public void initialize () throws MetaDataServiceClientExeption;

    /**
     * Adds a property key value pair for the relevant cluster of the
specified app
     *
     * @param appId Application id
     * @param clusterId Cluster id
     * @param propertyKey Key of the Property
     * @param propertyValue Value of the Property
     * @throws MetaDataServiceClientExeption
     */
    public void addProperty (String appId, String clusterId, String
propertyKey, String propertyValue) throws MetaDataServiceClientExeption;

    /**
     * Adds a property key value pair for the specified app
     *
     * @param appId Application id
     * @param propertyKey Key of the Property
     * @param propertyValue Value of the Property
     * @throws MetaDataServiceClientExeption
     */
    public void addProperty (String appId, String propertyKey, String
propertyValue) throws MetaDataServiceClientExeption;

    /**
     * Retrieves the property key value pairs for the relevant cluster of
the specified app
     *
     * @param appId Application id
     * @param clusterId Cluster id
     * @return Map of Keys and Values for the specified cluster in the
relevant app. Each key can have multiple Values.
     * @throws MetaDataServiceClientExeption
     */
    public Map<String, Set<String>> getProperties (String appId, String
clusterId) throws MetaDataServiceClientExeption;

    /**
     * Retrieves the property key value pairs of the specified app
     *
     * @param appId Application id
     * @return Map of Keys and Values for the specified app. Each key can
have multiple Values.
     * @throws MetaDataServiceClientExeption
     */
    public Map<String, Set<String>> getProperties (String appId) throws
MetaDataServiceClientExeption;

    /**
     * Retrieves the property values for the specified key of the relevant
app
     *
     * @param appId Application id
     * @param propertyKey Key of the Property
     * @return Set of Values for specified Key of the relevant app.
     * @throws MetaDataServiceClientExeption
     */
    public Set<String> getProperty (String appId, String propertyKey)
throws MetaDataServiceClientExeption;

    /**
     * Retrieves the property values for the specified key of the relevant
cluster and app
     *
     * @param appId Application id
     * @param clusterId Cluster id
     * @param propertyKey Key of the Property
     * @return Set of Values for specified Key of the relevant cluster in
the relevant app.
     * @throws MetaDataServiceClientExeption
     */
    public Set<String> getProperty (String appId, String clusterId, String
propertyKey) throws MetaDataServiceClientExeption;

    /**
     * Shutdown the MetaDataServiceClient. Should be called once after
using the client.
     * @throws MetaDataServiceClientExeption
     */
    public void terminate () throws MetaDataServiceClientExeption;


This is in line with the discussion in the thread [1]. Might need to
add/modify as we go on.

[1]. Extending metadata service with service group

On Wed, Sep 17, 2014 at 3:12 PM, Isuru Haththotuwa <isu...@apache.org>
wrote:

> Hi Devs,
>
> In Service Grouping, we would heavily need to use the meta data service to
> put and get data. Therefore, shall we implement a $subject? Then it can be
> re-used wherever required across Stratos. WDYT?
>
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048
>
> --
> <%2B94%20716%20358%20048>
> Thanks and Regards,
>
> Isuru H.
> <%2B94%20716%20358%20048>
> +94 716 358 048* <http://wso2.com/>*
>
>
> * <http://wso2.com/>*
>
>
>

Reply via email to