com.hp.ucmdb.api.util
Interface SupportsClientProperties<E>

Type Parameters:
E - the extending interface for method chaining.
All Known Subinterfaces:
PerspectiveBasedViewReferenceDefinition, RuleBasedViewDefinition, SingleViewReferenceDefinition, ViewDefinition<T>, ViewWithFoldingDefinition

@NotFinalAPI
public interface SupportsClientProperties<E>

Interfaces extending this interface support persistence for a properties map (string to string) by namespace.

The map from the clientProperties(String) can be changed freely unless otherwise noted in the extending interface. When the object extending this interface is saved with the object-specific save method, this map is also saved.

Since:
UCMDB 9.0

Method Summary
 java.util.Map<java.lang.String,java.lang.String> clientProperties(java.lang.String namespace)
          Returns a client properties map that can be changed freely and is saved when the object of the extending interface is saved.
 java.lang.String clientProperty(java.lang.String namespace, java.lang.String key)
          Returns the client property for the namespace and key, or null if the namespace does not exist or the key does not exist in the namespace.
 java.util.Set<java.lang.String> usedNamespaces()
          Returns the set of all the namespaces used in this object.
 E withClientProperty(java.lang.String namespace, java.lang.String key, java.lang.String value)
          Adds the given key-value pair to the given namespace, returning "this" for method chaining.
 

Method Detail

clientProperties

java.util.Map<java.lang.String,java.lang.String> clientProperties(java.lang.String namespace)
Returns a client properties map that can be changed freely and is saved when the object of the extending interface is saved.

Parameters:
namespace - the namespace of the properties.
Returns:
the properties map.

usedNamespaces

java.util.Set<java.lang.String> usedNamespaces()
Returns the set of all the namespaces used in this object.

Returns:
the set of all the namespaces used in this object.

withClientProperty

E withClientProperty(java.lang.String namespace,
                     java.lang.String key,
                     java.lang.String value)
Adds the given key-value pair to the given namespace, returning "this" for method chaining. The same as calling clientProperties(namespace).put(key, value).

Parameters:
namespace - the namespace.
key - the key.
value - the value.
Returns:
"this" for method chaining.

clientProperty

java.lang.String clientProperty(java.lang.String namespace,
                                java.lang.String key)
Returns the client property for the namespace and key, or null if the namespace does not exist or the key does not exist in the namespace. The same as calling clientProperties(namespace).get(key), but with null checks.

Parameters:
namespace - the namespace.
key - the key.
Returns:
the client property value or null.


Documentation Feedback
Copyright 2010 Hewlett-Packard Development Company, L.P.