org.apache.muse.ws.resource.metadata.impl
Class StaticValuesApprover

java.lang.Object
  extended by org.apache.muse.ws.resource.properties.listeners.AbstractChangeApprover
      extended by org.apache.muse.ws.resource.metadata.impl.StaticValuesApprover
All Implemented Interfaces:
PropertyChangeApprover

public class StaticValuesApprover
extends AbstractChangeApprover

StaticValuesApprover is a PropertyChangeApprover that throws an exception if a caller tries to delete a property instance whose value is defined in the WS-RMD document's StaticValues section. If a property's metadata defines static values, those values must be in the WS-RP document for the entire resource lifecycle.

Author:
Dan Jemiolo (danj)

Constructor Summary
StaticValuesApprover(QName qname, MetadataDescriptor metadata)
          Creates a new approver for the property with the given name and RMD.
 
Method Summary
 void validateChange(Element oldValue, Element newValue, Object token)
          Throws an exception if the second parameter is null (signifying a deletion) and the current property value is one of the static 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

StaticValuesApprover

public StaticValuesApprover(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(Element oldValue,
                           Element newValue,
                           Object token)
                    throws BaseFault
Throws an exception if the second parameter is null (signifying a deletion) and the current property value is one of the static 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.


Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.