oracle.adf.view.rich.render

## Class ClientMetadata

- java.lang.Object
- - oracle.adf.view.rich.render.ClientMetadata

- All Implemented Interfaces:
    Serializable, Cloneable

      public final class ClientMetadata
      extends Object
      implements Cloneable, Serializable

  Encapsulates the metadata for a type of client component.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ClientMetadata.Secured`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientMetadata(org.apache.myfaces.trinidad.bean.FacesBean.Type beanType)` Creates a ClientMetadata object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addIfComponentProperty(org.apache.myfaces.trinidad.bean.PropertyKey key)` Registers a key as a property that should be sent if there will be a client component.
    `void` | `addPersistedProperty(org.apache.myfaces.trinidad.bean.PropertyKey key)` Adds a 'persistence' property.
    `void` | `addRequiredProperty(org.apache.myfaces.trinidad.bean.PropertyKey key)` Registers a key as a required property.
    `void` | `addSecureProperty(org.apache.myfaces.trinidad.bean.PropertyKey key)` Convenience function for marking a property as always secure.
    `void` | `addSecureProperty(org.apache.myfaces.trinidad.bean.PropertyKey key, ClientMetadata.Secured secured)` Registers a key as a secure property key with specified secure type.
    `ClientMetadata` | `clone()` Clones a ClientMetadata
    `Set<String>` | `getAlwaysSecurePropertyKeyNames()` Retrieve the property key names that are always secure.
    `ClientComponent.AttrType` | `getPropertyType(org.apache.myfaces.trinidad.bean.PropertyKey key)` Returns the type of a given attribute.
    `ClientMetadata.Secured` | `getSecured(org.apache.myfaces.trinidad.bean.PropertyKey key)` Returns the secure type of the specified property if the property key is not registered, it will be of type Secured.NEVER, meaning it is always settable by client.
    `boolean` | `hasRequiredProperty()` Returns true if there are any required properties.
    `boolean` | `isPersistedProperty(org.apache.myfaces.trinidad.bean.PropertyKey key)` Returns true if a property is persistence and any client changes should be peristed using change manager
    `boolean` | `isSecure(org.apache.myfaces.trinidad.bean.PropertyKey key)` Deprecated. use the public API ClientMetadata.getSecured(PropertyKey) instead

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ClientMetadata

          public ClientMetadata(org.apache.myfaces.trinidad.bean.FacesBean.Type beanType)

      Creates a ClientMetadata object.
      Parameters:
        `beanType` - the type of the FacesBean for this component

  - ### Method Detail

    - #### hasRequiredProperty

          public boolean hasRequiredProperty()

      Returns true if there are any required properties.
      Returns:
        if there are required properties.

    - #### getPropertyType

          public ClientComponent.AttrType getPropertyType(org.apache.myfaces.trinidad.bean.PropertyKey key)

      Returns the type of a given attribute. All anonymous keys (keys that are not registered on this type) will be considered REQUIRED.
      Parameters:
        `key` - the property key
      Returns:
        the client component attribute type.

    - #### addRequiredProperty

          public void addRequiredProperty(org.apache.myfaces.trinidad.bean.PropertyKey key)

      Registers a key as a required property. Required properties will force the instantiation of a client component. This method must only be called when a ClientMetadata object is first being set up.
      Parameters:
        `key` - the to the required property

    - #### addIfComponentProperty

          public void addIfComponentProperty(org.apache.myfaces.trinidad.bean.PropertyKey key)

      Registers a key as a property that should be sent if there will be a client component. This method must only be called when a ClientMetadata object is first being set up.
      Parameters:
        `key` - the property key to be registered

    - #### addSecureProperty

          public void addSecureProperty(org.apache.myfaces.trinidad.bean.PropertyKey key)

      Convenience function for marking a property as always secure. Secure properties will not be synced back from client changes, however properties that are secured by default can be made unsecure on a per-component instance basis. This method must only be called when a ClientMetadata object is first being set up.
      Parameters:
        `key` - the property key to be registered

    - #### addSecureProperty

          public void addSecureProperty(org.apache.myfaces.trinidad.bean.PropertyKey key,
                                        ClientMetadata.Secured secured)

      Registers a key as a secure property key with specified secure type. There is no need to register a Secured.NEVER typed secure property, property key that is not registered will automatically become a Secured.NEVER typed secure property key. Secure.ALWAYS is the default secure type for secure property keys. Properties of this secure type will always remain secure and cannot be changed from client. Property keys that is sececure by default, but can be made unsecure can register as Secure.BYDEFAULT. Currently, only "disabled" is registered as this secure type.
      Parameters:
        `key` - the property key to be registered
        `secured` - security type associated with the key

    - #### isSecure

          public boolean isSecure(org.apache.myfaces.trinidad.bean.PropertyKey key)

      Deprecated. use the public API ClientMetadata.getSecured(PropertyKey) instead
      Returns true if a property is secure (either by default or always). Property that is always secure should not be synced back from client changes. Property that is secure by default can be made unsecure by using "unsecure" property.
      Parameters:
        `key` - the property key to be registered
      Returns:
        `true` if the property is secured.

    - #### getSecured

          public ClientMetadata.Secured getSecured(org.apache.myfaces.trinidad.bean.PropertyKey key)

      Returns the secure type of the specified property if the property key is not registered, it will be of type Secured.NEVER, meaning it is always settable by client.
      Parameters:
        `key` - the property key to check for secure type
      Returns:
        the secure type associated with the property key.

    - #### getAlwaysSecurePropertyKeyNames

          public Set<String> getAlwaysSecurePropertyKeyNames()

      Retrieve the property key names that are always secure.
      Returns:
        a set of the property key names that are always secure.

    - #### addPersistedProperty

          public void addPersistedProperty(org.apache.myfaces.trinidad.bean.PropertyKey key)

      Adds a 'persistence' property. Persistence properties will be persisted using change manager during attribute synch from client
      Parameters:
        `key` - the property key to be registered

    - #### isPersistedProperty

          public boolean isPersistedProperty(org.apache.myfaces.trinidad.bean.PropertyKey key)

      Returns true if a property is persistence and any client changes should be peristed using change manager
      Parameters:
        `key` - the property key to be registered
      Returns:
        `true` if the property is persistence.

    - #### clone

          public ClientMetadata clone()

      Clones a ClientMetadata
      Overrides:
        `clone` in class `Object`

Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.