Skip navigation links

Java API Reference for Oracle Infrastructure Web Services
11
Release 1 (11.1.1)

E10654-02


oracle.webservices.model
Interface Component

All Known Subinterfaces:
Message, Model, Operation, Port, Service

public interface Component

The base interface for all components of the model. Each component has two types of children: components and extensions. The two are treated separately. There may be arbitrary number of components of the same type registered with a single parent component and each must have a unique name. Only a single extension of a given type is allowed per parent component.


Method Summary
 void addComponent(Component component)
          Adds a new child component to this parent component.
 void addExtension(QName type, Object extension)
          Adds a new extension of the given type as a child of this component.
 void addExtensionAttribute(QName type, Object extensionAttribute)
          Adds a new extension attribute of the given type to this component.
 Object createExtension(QName extensionType)
          Creates a new instance of the extension of the provided types.
 List getAllExtensions(QName extensionType)
          Get all child extensions of this component with the given type
 Component getComponent(QName componentType, QName componentName)
          The child component (if any) with the provided type and name.
 Collection getComponents()
          A collection of all the child components of this component.
 Collection<Component> getComponents(QName type)
          A collection of the child components of this component, that are of the specified type
 Object getExtension(QName extensionType)
          The child extension of this component with the given type.
 Object getExtension(QName extensionType, boolean create)
          Returns or optionally creates a child extension of this component with the given type.
 Object getExtensionAttribute(QName extensionAttributeType)
          The extension attribute of this component with the given type.
 QName[] getExtensionAttributeTypes()
          Returns an array of all the currently registered extension attribute types for this component.
 QName[] getExtensionTypes()
          Returns an array of all the currently registered extension types for this component.
 Factory getFactory()
          A reference to the factory that created the component.
 Model getModel()
          A reference to the model in which the component exists.
 QName getName()
          The unique name of this component within the content of its parent.
 Component getParent()
          The parent of this component in the model.
 QName getType()
          The component type name.
 void removeComponent(QName componentType, QName componentName)
          Removes a child component with the given type and name.
 void removeExtension(QName extensionType)
          Removes an extension of the given type from this component.
 void removeExtensionAttribute(QName extensionAttributeType)
          Removes an extension attribute of the given type from this component.

 

Method Detail

getType

QName getType()
The component type name.
Returns:
The component type name.

getFactory

Factory getFactory()
A reference to the factory that created the component.
Returns:
A reference to the factory that created the component.

getModel

Model getModel()
A reference to the model in which the component exists.
Returns:
A reference to the model in which the component exists.

getParent

Component getParent()
The parent of this component in the model.
Returns:
The parent of this component in the model.

getName

QName getName()
The unique name of this component within the content of its parent.
Returns:
The unique name of this component within the content of its parent.

getExtensionTypes

QName[] getExtensionTypes()
Returns an array of all the currently registered extension types for this component.
Returns:
Returns an array of all the currently registered extension types for this component. Will not be null but may be empty.

getExtension

Object getExtension(QName extensionType)
The child extension of this component with the given type.
Parameters:
extensionType - The extension type of the extension to returned.
Returns:
The child extension of this component with the given type. May be null if no extension of that type is currently registered with this component.

getAllExtensions

List getAllExtensions(QName extensionType)
Get all child extensions of this component with the given type
Parameters:
extensionName -
Returns:
A list containing all child extensions with the given type - empty if no extensions of that type are currently registered with this component

getExtension

Object getExtension(QName extensionType,
                    boolean create)
Returns or optionally creates a child extension of this component with the given type. If an extension of the given type does not exist as a child of this component the serializer for the extension type registered with the model's factory will be used to create a new instance. This new instance will then be added to this component.
Parameters:
extensionType - Type type of the extension to be found or created.
create - True if an extension should be created if not found and false otherwise.
Returns:
The extension registered with this component having the required type. May return null if an extension of that type does not exist and create is false.

createExtension

Object createExtension(QName extensionType)
Creates a new instance of the extension of the provided types. The serializer registered with the model for the given type is used to create the extension.
Parameters:
extensionType - The type of the extension to be created.
Returns:
A new instance of the extension created by the model's serialize for that extension type.

addExtension

void addExtension(QName type,
                  Object extension)
Adds a new extension of the given type as a child of this component. This new extension will replace any existing extension registered with the same type in this component.
Parameters:
type - Type type of the extension being added.
extension - The extension to be added.

removeExtension

void removeExtension(QName extensionType)
Removes an extension of the given type from this component. If there is not extension of that type registered with this component, no action is taken.
Parameters:
extensionType - The type of extension to remove.

getExtensionAttributeTypes

QName[] getExtensionAttributeTypes()
Returns an array of all the currently registered extension attribute types for this component. Will not be null but may be empty.

getExtensionAttribute

Object getExtensionAttribute(QName extensionAttributeType)
The extension attribute of this component with the given type.
Parameters:
extensionType - The extension attribute type of the extension attribute to returned.
Returns:
The extension attribute of this component with the given type. May be null if no extension attribute of that type is currently registered with this component.

addExtensionAttribute

void addExtensionAttribute(QName type,
                           Object extensionAttribute)
Adds a new extension attribute of the given type to this component. This new extension attribute will replace any existing extension attribute registered with the same type in this component.
Parameters:
type - Type type of the extension attribute being added.
extensionAttribute - The extension attribute to be added.

removeExtensionAttribute

void removeExtensionAttribute(QName extensionAttributeType)
Removes an extension attribute of the given type from this component. If there is no extension attribute of that type registered with this component, no action is taken.
Parameters:
extensionAttributeType - The type of extension attribute to remove.

getComponents

Collection getComponents()
A collection of all the child components of this component.
Returns:
A collection of all the child components of this component. May not be null.

getComponents

Collection<Component> getComponents(QName type)
A collection of the child components of this component, that are of the specified type
Parameters:
type - The type of the components to return
Returns:
A collection of child components of this component, that are of the specified type May not be null.

getComponent

Component getComponent(QName componentType,
                       QName componentName)
The child component (if any) with the provided type and name.
Parameters:
componentType - The type of the component to return.
componentName - The name of the component to return.
Returns:
The child component (if any) with the provided type and name. May be null if the a matching component is not null.

addComponent

void addComponent(Component component)
Adds a new child component to this parent component.
Parameters:
component - The new child component. Will replace any existing child component with the same type and name.

removeComponent

void removeComponent(QName componentType,
                     QName componentName)
Removes a child component with the given type and name. If a matching child component cannot be found no action is taken.
Parameters:
componentType - The type of the child component to remove.
componentName - The name of the child component to remove.

Skip navigation links

Copyright © 2006, 2009 Oracle. All Rights Reserved.