org.apache.muse.ws.resource.properties.listeners
Interface PropertyChangeApprover

All Known Implementing Classes:
AbstractChangeApprover, ExternalChangeApprover, InsertOnlyApprover, ReadOnlyApprover, StaticValuesApprover, ValidValuesApprover

public interface PropertyChangeApprover

PropertyChangeApprover describes a type of property listener that is invoked when a property change is about to occur (through the WS-RP SetResourceProperties operation). Approvers can prevent the change by throwing an exception from the validateChange() method. Before writing your own approver, make sure that Muse's WS-RMD support doesn't already do what you are trying to do.

Author:
Dan Jemiolo (danj)
See Also:
MetadataDescriptor

Method Summary
 QName getPropertyName()
           
 boolean isSecure(Object securityToken)
           
 void setSecurityToken(Object securityToken)
          Sets the security token that will be used in all security checks via isSecure(Object).
 void validateChange(Element oldValue, Element newValue, Object token)
          Analyzes the property change being made and throws an exception if the change is invalid.
 

Method Detail

getPropertyName

QName getPropertyName()
Returns:
The QName of the property being monitored.

isSecure

boolean isSecure(Object securityToken)
Parameters:
securityToken - The security token provided by the caller who wishes to make the property change.
Returns:
True if the token matches one the approver knows to be valid.
See Also:
setSecurityToken(Object)

setSecurityToken

void setSecurityToken(Object securityToken)
Sets the security token that will be used in all security checks via isSecure(Object).

Parameters:
securityToken -
See Also:
isSecure(Object)

validateChange

void validateChange(Element oldValue,
                    Element newValue,
                    Object token)
                    throws BaseFault
Analyzes the property change being made and throws an exception if the change is invalid.

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.