Interface OMSourcedElement

    • Method Detail

      • isExpanded

        boolean isExpanded()
        Returns:
        true if tree is expanded or being expanded.
      • getDataSource

        OMDataSource getDataSource()
        Returns:
        OMDataSource
      • setDataSource

        OMDataSource setDataSource​(OMDataSource dataSource)
        Deprecated.
        This method is deprecated because its semantics are not clearly defined. In particular it is unspecified whether the name of the element may change as a result of an invocation of this method.
      • getObject

        Object getObject​(Class<? extends OMDataSourceExt> dataSourceClass)
        Get the object that backs the data source set on this element. This method provides a safe way to access that object. It will return a non null value if all of the following conditions are satisfied:
        1. The element is configured with an OMDataSource of the type specified by the dataSourceClass parameter (in the sense of Class.isInstance(Object)).
        2. The OMDataSourceExt.getObject() method returns a non null value on the configured data source.
        3. The instance can ensure that the content of the element has not been modified. This is always the case if the element has not been expanded (i.e. if isExpanded() returns false), but the implementation may use additional mechanisms to detect changes after expansion of the element.
        These are exactly the conditions that must be satisfied if the application code wants to implement optimized processing of the sourced element by accessing the backing object.
        Parameters:
        dataSourceClass - the expected data source class; must be assignment compatible with OMDataSourceExt
        Returns:
        the backing Java object or null if the conditions specified above are not satisfied