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

## org.apache.muse.ws.resource.metadata.impl
Class ValidValuesApprover

    java.lang.Object
      org.apache.muse.ws.resource.properties.listeners.AbstractChangeApprover
          org.apache.muse.ws.resource.metadata.impl.ValidValuesApprover

All Implemented Interfaces:
  PropertyChangeApprover

public class ValidValuesApprover
extends AbstractChangeApprover

ValidValuesApprover is a PropertyChangeApprover that throws an exception if a caller tries to insert or update a property instance with a value that is not defined in the WS-RMD document's ValidValues section. If a property's metadata defines valid values, those are the only values it may have; if not, any value is acceptable.

Author:
  Dan Jemiolo (danj)

Constructor Summary
`ValidValuesApprover(QName qname, MetadataDescriptor metadata)` Creates a new approver for the property with the given name and RMD.

Method Summary
`void` | `validateChange(org.w3c.dom.Element oldValue, org.w3c.dom.Element newValue, java.lang.Object token)` Throws an exception if the the second parameter is not null (signifying an insertion or update) and is not one of the valid values defined in the RMD.

Methods inherited from class org.apache.muse.ws.resource.properties.listeners.AbstractChangeApprover
`getPropertyName, isSecure, setSecurityToken`

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

Constructor Detail

### ValidValuesApprover

    public ValidValuesApprover(QName qname,
                               MetadataDescriptor metadata)

  Creates a new approver for the property with the given name and RMD.

Parameters:
  `qname` - The QName of the property to monitor.
  `metadata` - The RMD descriptor with the metadata for the property.

Method Detail

### validateChange

    public void validateChange(org.w3c.dom.Element oldValue,
                               org.w3c.dom.Element newValue,
                               java.lang.Object token)
                        throws BaseFault

  Throws an exception if the the second parameter is not null (signifying an insertion or update) and is not one of the valid values defined in the RMD.

  Parameters:
    `oldValue` - The current (about to be "old") value of the resource property. This should be null if the change is a WS-RP Insert.
    `newValue` - The potential new value of the resource property. This should be null if the change is a WS-RP Delete.
    `token` - The security token provided by the caller who wishes to make the property change.
  Throws:
    `BaseFault` -
    - If the modification is not allowed for any reason.

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