webMethods Broker Administration Java API
Version 9.5.1.0.171 091713

COM.activesw.api.client
Class BrokerAdminTypeDef

java.lang.Object
  extended by COM.activesw.api.client.BrokerAdminTypeDef

public class BrokerAdminTypeDef
extends java.lang.Object

This type is used to represent a type definition as used by admin clients.


Constructor Summary
BrokerAdminTypeDef(BrokerAdminTypeDef type_def)
          Copy constructor.
BrokerAdminTypeDef(BrokerTypeDef normal_def)
          Create from a normal type definition.
BrokerAdminTypeDef(short type)
          Create a new type definition for a non-Event type.
BrokerAdminTypeDef(java.lang.String type_name, short type)
          Create a new type definition.
 
Method Summary
 void clearField(java.lang.String field_name)
          Clear/delete a given field.
 void clearFields()
          Clear/delete all fields.
 void clearModificationFlag()
          Clear the modification flag for the type definition to false.
 java.lang.String getBaseTypeName()
          Get the base name (name without scope qualifier) of this event type.
 java.lang.String getDescription()
          Get the type's description.
 BrokerAdminTypeDef getFieldDef(java.lang.String field_name)
          Get the type of a field as a BrokerAdminTypeDef.
 java.lang.String[] getFieldNames(java.lang.String field_name)
          Get the list of field names in an event type.
 short getFieldType(java.lang.String field_name)
          Get the type for a given field.
 java.lang.String getScopeTypeName()
          Get the name of this event type's scope.
 int getStorageType()
          Get the type's storage type.
 int getTimeToLive()
          Get the type's time-to-live.
 java.lang.String getTypeName()
          Get the fully qualified name of this event type.
 int getValidationType()
          Get the type's validation type.
 boolean hasBeenModified()
          Get the modification flag for the type definition.
 void insertFieldDef(java.lang.String field_name, int index, BrokerAdminTypeDef field_def)
          Insert the a field using a BrokerAdminTypeDef.
 boolean isSystemDefined()
          Check if type is system defined.
 void orderFields(java.lang.String field_name, java.lang.String[] new_field_names)
          Set the order of fields in a type.
 void renameField(java.lang.String old_field_name, java.lang.String new_field_name)
          Rename or move a field.
 void setDescription(java.lang.String description)
          Set the type's description.
 void setFieldDef(java.lang.String field_name, BrokerAdminTypeDef field_def)
          Set the type of a field.
 void setFieldType(java.lang.String field_name, short field_type, java.lang.String type_name)
          Set the type for a given field.
 void setModificationFlag()
          Set the modification flag for the type definition to true.
 void setStorageType(int storage_type)
          Set the type's storage type.
 void setTimeToLive(int time_to_live)
          Set the type's time-to-live.
 void setTypeName(java.lang.String type_name)
          Set the fully qualified name of this event type.
 void setValidationType(int validation_type)
          Set the type's validation type.
 java.lang.String toExtendedString()
          --- Used by test cases only --- Get a string representation of the type definition and of all related definitions.
 java.lang.String toString()
          Get a string representation of the type definition.
 java.lang.String toString(int indent_level)
          Get a string representation of the type definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BrokerAdminTypeDef

public BrokerAdminTypeDef(java.lang.String type_name,
                          short type)
                   throws BrokerException
Create a new type definition. The type may only be struct or event.

Throws:
BrokerInvalidEventTypeNameException - If the type name is not valid.
BrokerInvalidTypeException - If type is not event or struct.
BrokerNullParameterException - If type_name is null and type is event.
BrokerException

BrokerAdminTypeDef

public BrokerAdminTypeDef(short type)
                   throws BrokerException
Create a new type definition for a non-Event type.

Throws:
BrokerInvalidTypeException - If type is not valid.
BrokerException

BrokerAdminTypeDef

public BrokerAdminTypeDef(BrokerAdminTypeDef type_def)
                   throws BrokerException
Copy constructor.

Throws:
BrokerNullParameterException - If type_def is null.
BrokerException

BrokerAdminTypeDef

public BrokerAdminTypeDef(BrokerTypeDef normal_def)
                   throws BrokerException
Create from a normal type definition.

Throws:
BrokerNullParameterException - If normal_def is null.
BrokerException
Method Detail

getTypeName

public java.lang.String getTypeName()
Get the fully qualified name of this event type.


getBaseTypeName

public java.lang.String getBaseTypeName()
Get the base name (name without scope qualifier) of this event type.


getScopeTypeName

public java.lang.String getScopeTypeName()
Get the name of this event type's scope.


setTypeName

public void setTypeName(java.lang.String type_name)
                 throws BrokerException
Set the fully qualified name of this event type.

Throws:
BrokerInvalidEventTypeNameException - If the type_name is not valid.
BrokerInvalidTypeException - If the type is not a struct or event.
BrokerNullParameterException - If type_name is null.
BrokerException

getTimeToLive

public int getTimeToLive()
                  throws BrokerException
Get the type's time-to-live. Zero is 'forever'.

Throws:
BrokerInvalidTypeException - If the type is not an event.
BrokerException

setTimeToLive

public void setTimeToLive(int time_to_live)
                   throws BrokerException
Set the type's time-to-live. Zero is 'forever'.

Throws:
BrokerInvalidTypeException - If the type is not an event.
BrokerOutOfRangeException - If time_to_live is less than zero.
BrokerException

getStorageType

public int getStorageType()
                   throws BrokerException
Get the type's storage type. Uses the BrokerTypeDef.STORAGE_* values.

Throws:
BrokerInvalidTypeException - If the type is not an event.
BrokerException

setStorageType

public void setStorageType(int storage_type)
                    throws BrokerException
Set the type's storage type. Use the BrokerTypeDef.STORAGE_* values.

Throws:
BrokerInvalidTypeException - If the type is not an event.
BrokerOutOfRangeException - If storage_type is not a valid type.
BrokerException

getValidationType

public int getValidationType()
                      throws BrokerException
Get the type's validation type. Uses the BrokerTypeDef.VALIDATION_* values.

Throws:
BrokerInvalidTypeException - If the type is not an event.
BrokerException

setValidationType

public void setValidationType(int validation_type)
                       throws BrokerException
Set the type's validation type. Use the BrokerTypeDef.VALIDATION_* values.

Throws:
BrokerInvalidTypeException - If the type is not an event.
BrokerOutOfRangeException - If validation_type is not a valid type.
BrokerException

getDescription

public java.lang.String getDescription()
                                throws BrokerException
Get the type's description.

Throws:
BrokerInvalidTypeException - If the type is not an event.
BrokerException

setDescription

public void setDescription(java.lang.String description)
                    throws BrokerException
Set the type's description.

Throws:
BrokerInvalidTypeException - If the type is not an event.
BrokerNullParameterException - If description is null.
BrokerException

isSystemDefined

public boolean isSystemDefined()
Check if type is system defined.


getFieldNames

public java.lang.String[] getFieldNames(java.lang.String field_name)
                                 throws BrokerException
Get the list of field names in an event type. If field_name is 'null' or "", it gets the fields a the top level of the event. Otherwise, the field_name should refer to a structure sub-field and it will return the names at that level. Non-structured type will return null.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event type.
BrokerFieldTypeMismatchException - If the field name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerException

getFieldType

public short getFieldType(java.lang.String field_name)
                   throws BrokerException
Get the type for a given field. If field_name is 'null' or "", it gets the type for the top level of the event.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event type.
BrokerFieldTypeMismatchException - If the field name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerException

setFieldType

public void setFieldType(java.lang.String field_name,
                         short field_type,
                         java.lang.String type_name)
                  throws BrokerException
Set the type for a given field. Creates the field if it doesn't exist, and redefines fields as necessary. The 'type_name' field is currently not in use and should be null for future compatibility.

Throws:
BrokerFieldTypeMismatchException - If this definition is not an event, struct, or sequence.
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerInvalidTypeException - If try to change a field's type to a sequence.
BrokerNullParameterException - If field_name is null.
BrokerException

getFieldDef

public BrokerAdminTypeDef getFieldDef(java.lang.String field_name)
                               throws BrokerException
Get the type of a field as a BrokerAdminTypeDef. If field_name is 'null' or "", it gets the type for the top level of the event.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event type.
BrokerFieldTypeMismatchException - If the field name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerException

setFieldDef

public void setFieldDef(java.lang.String field_name,
                        BrokerAdminTypeDef field_def)
                 throws BrokerException
Set the type of a field. Creates the field if it doesn't exist, and redefines fields as necessary.

Throws:
BrokerFieldTypeMismatchException - If this definition is not an event, struct, or sequence.
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerNullParameterException - If field_name or field_def are null.
BrokerException

insertFieldDef

public void insertFieldDef(java.lang.String field_name,
                           int index,
                           BrokerAdminTypeDef field_def)
                    throws BrokerException
Insert the a field using a BrokerAdminTypeDef. Creates the field if it does not exist, and redefines fields as necessary. Otherwise just reorders its position. The field is inserted before the index value, so that zero(0) puts it at the top of the list and any value larger than the list size will put it at the end.

Throws:
BrokerFieldTypeMismatchException - If this definition is not an event, struct, or sequence.
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerInvalidTypeException - If the field is not a struct or event.
BrokerNullParameterException - If field_name or field_def are null.
BrokerOutOfRangeException - If index is less than zero.
BrokerException

renameField

public void renameField(java.lang.String old_field_name,
                        java.lang.String new_field_name)
                 throws BrokerException
Rename or move a field.

Throws:
BrokerFieldNotFoundException - If the old field name does not exist in the event type.
BrokerFieldTypeMismatchException - If the field name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If either field name is not valid.
BrokerInvalidTypeException - If either field name does not refer to a named field. For example, "x[]" is not a named field.
BrokerNullParameterException - If old_field_name or new_field_name are null.
BrokerException

orderFields

public void orderFields(java.lang.String field_name,
                        java.lang.String[] new_field_names)
                 throws BrokerException
Set the order of fields in a type. Specify all fields to be ordered. Any which are not listed will be placed at the end in their current order. If 'field_name' is null, the top level of the definition is manipulated. Only usable on struct and event type definitions.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event type.
BrokerFieldTypeMismatchException - If the field name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerInvalidTypeException - If the field is not a struct or event.
BrokerNullParameterException - If new_field_names is null, or if any entry in the array is null.
BrokerException

clearField

public void clearField(java.lang.String field_name)
                throws BrokerException
Clear/delete a given field.

Throws:
BrokerFieldNotFoundException - If the field name does not exist in the event type.
BrokerFieldTypeMismatchException - If the field name incorrectly accesses a type (such as using [2] on a non-sequence field).
BrokerInvalidFieldNameException - If the field name is not valid.
BrokerInvalidTypeException - If the type is not a struct or event.
BrokerNullParameterException - If field_name is null.
BrokerException

clearFields

public void clearFields()
                 throws BrokerException
Clear/delete all fields.

Throws:
BrokerInvalidTypeException - If the type is not a struct or event.
BrokerException

hasBeenModified

public boolean hasBeenModified()
Get the modification flag for the type definition.


setModificationFlag

public void setModificationFlag()
Set the modification flag for the type definition to true.


clearModificationFlag

public void clearModificationFlag()
Clear the modification flag for the type definition to false.


toString

public java.lang.String toString()
Get a string representation of the type definition.

Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(int indent_level)
Get a string representation of the type definition. The "indent_level" is the number of 4-space indents that the output should be generated for.


toExtendedString

public java.lang.String toExtendedString()
--- Used by test cases only --- Get a string representation of the type definition and of all related definitions.


webMethods Broker Administration Java API
Version 9.5.1.0.171 091713


Copyright © 2001 - 2013 Software AG Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, United States of America, and/or their suppliers.