Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.birt.report.model.api.validators
Class StructureListValidator

    java.lang.Object
      org.eclipse.birt.report.model.validators.AbstractSemanticValidator
          org.eclipse.birt.report.model.validators.AbstractPropertyValidator
              org.eclipse.birt.report.model.api.validators.StructureListValidator

    public class StructureListValidator

extends org.eclipse.birt.report.model.validators.AbstractPropertyValidator

Validates one list property of element. The property type should structure list.

### Rule

The rule is that

- all structures in this list property should be valid.
- the value of the property with `NamePropertyType` should be unique in the structure list.

### Applicability

This validator is only applied to the property whose type is structure list of one `DesignElement`.

Field Summary
`static java.lang.String` | `NAME` Name of this validator.

Fields inherited from class org.eclipse.birt.report.model.validators.AbstractSemanticValidator
`modules, name`

Constructor Summary
`StructureListValidator()`

Method Summary
`static StructureListValidator` | `getInstance()` Returns the singleton validator instance.
`java.util.List<SemanticException>` | `validate(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element, java.lang.String propName)` Validates whether the list property specified by `propName` is invalid.
`java.util.List<SemanticException>` | `validateForAdding(DesignElementHandle element, IPropertyDefn propDefn, java.util.List<java.lang.Object> list, IStructure toAdd)` Validates whether a new structure can be added to structure list.
`java.util.List<SemanticException>` | `validateForRenaming(DesignElementHandle element, IPropertyDefn propDefn, java.util.List<java.lang.Object> list, IStructure toRenamed, IPropertyDefn memberDefn, java.lang.String newName)` Validates whether a structure can be renamed to the given name.

Methods inherited from class org.eclipse.birt.report.model.validators.AbstractSemanticValidator
`canApplyToDesign, canApplyToLibrary, getName, isInTemplateParameterDefinitionSlot, setModules, setName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NAME

    public static final java.lang.String NAME

  Name of this validator.

  See Also:
    Constant Field Values

Constructor Detail

### StructureListValidator

    public StructureListValidator()

Method Detail

### getInstance

    public static StructureListValidator getInstance()

  Returns the singleton validator instance.

  Returns:
    the validator instance

### validateForAdding

    public java.util.List<SemanticException> validateForAdding(DesignElementHandle element,
                                                               IPropertyDefn propDefn,
                                                               java.util.List<java.lang.Object> list,
                                                               IStructure toAdd)

  Validates whether a new structure can be added to structure list.

  Parameters:
    `element` - the element holding the structure list
    `propDefn` - definition of the list property
    `list` - the structure list
    `toAdd` - the structure to add
  Returns:
    error list, each of which is the instance of `SemanticException`.

### validate

    public java.util.List<SemanticException> validate(org.eclipse.birt.report.model.core.Module module,
                                                      org.eclipse.birt.report.model.core.DesignElement element,
                                                      java.lang.String propName)

  Validates whether the list property specified by `propName` is invalid.

  Specified by:
    `validate` in class `org.eclipse.birt.report.model.validators.AbstractPropertyValidator`
  Parameters:
    `module` - the module
    `element` - the element to validate
    `propName` - the name of the list property to validate
  Returns:
    error list, each of which is the instance of `SemanticException`.

### validateForRenaming

    public java.util.List<SemanticException> validateForRenaming(DesignElementHandle element,
                                                                 IPropertyDefn propDefn,
                                                                 java.util.List<java.lang.Object> list,
                                                                 IStructure toRenamed,
                                                                 IPropertyDefn memberDefn,
                                                                 java.lang.String newName)

  Validates whether a structure can be renamed to the given name.

  Parameters:
    `element` - the element holding the structure list
    `propDefn` - definition of the list property
    `list` - the structure list
    `toRenamed` - the structure to rename
    `memberDefn` - the member definition
    `newName` - the new name
  Returns:
    error list, each of which is the instance of `SemanticException`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Actuate Corp. All rights reserved.