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.properties.set
Interface SetResourcePropertiesPermissions

All Known Subinterfaces:
  ResourcePropertyCollection

All Known Implementing Classes:
  SimpleResourcePropertyCollection

public interface SetResourcePropertiesPermissions

SetResourcePropertyPermissions defines a security mechanism that can be used to limit the use of these methods to internal callers, and/or to differentiate between internal and external callers so that internal requests can have more freedom in their modifications. A resource may need to modify properties in a way that is not allowed from an external client; an example would be a read-only property such as "free disk space" which changes frequently but is not directly write-able by clients. It also allows users to define specialized methods for accessing certain properties and disallow access through the generic WS-RP methods.
The security token is meant to be a simple unique value that cannot be easily generated by an external caller; for many implementations, the use of a simple Object reference will suffice, since the JVM will never produce two references with the same address. If code is written that uses the security token version of these methods, the calls will not succeed unless the token matches the document's internal token.

Author:
  Dan Jemiolo (danj)

Method Summary
`void` | `deleteResourceProperty(QName qname, java.lang.Object securityToken)` Removes all properties with the given name.
`java.lang.Object` | `getSecurityToken()` Returns the security token that can be used by users of the WS-RP document to verify that they are internal callers with permission to circumvent published restrictions on property changes, etc.
`void` | `insertResourceProperty(QName qname, java.lang.Object[] values, java.lang.Object securityToken)` Creates a new instance of the given property for each value specified in the array of values.
`void` | `updateResourceProperty(QName qname, java.lang.Object[] values, java.lang.Object securityToken)` Updates all instances of the given property using the given values; all previous values will be removed in lieu of these new values.

Method Detail

### deleteResourceProperty

    public void deleteResourceProperty(QName qname,
                                       java.lang.Object securityToken)
                                throws BaseFault

  Removes all properties with the given name. This call will not complete if the given security token doesn't match the document's token and the caller is trying to delete an immutable property.

  Parameters:
    `qname` - The name of the property to delete.
    `securityToken` - The token used to verify permission to call this method.
  Throws:
    `BaseFault` -
    - If there were zero instances of the property named.
    - If performing the delete would result in the number of property instances being below the schema's minimum value.
    - If the property is read-only or insert-only and the security token is not valid.
    - If one of the PropertyChangeListeners assigned to this property throws an exception while reacting to the deletion.

### getSecurityToken

    public java.lang.Object getSecurityToken()

  Returns the security token that can be used by users of the WS-RP document to verify that they are internal callers with permission to circumvent published restrictions on property changes, etc. The security token system may be used to allow modification of read-only properties, modification to properties that are not supposed to be set with WS-RP's generic SetResourceProperties, and other special behavior.
  The token should be given to internal components that will need special permissions, but it should not be used by components that are handling external requests directly.

  Returns:
    The valid security token for the WS-RP document.

### insertResourceProperty

    public void insertResourceProperty(QName qname,
                                       java.lang.Object[] values,
                                       java.lang.Object securityToken)
                                throws BaseFault

  Creates a new instance of the given property for each value specified in the array of values. This call will not complete if the given security token doesn't match the document's token and the caller is trying to insert an immutable property.

  Parameters:
    `qname` - The name of the property instances to create.
    `values` - The set of values that will be assigned to the new property instances. Each value will be created once.
    `securityToken` - The token used to verify permission to call this method.
  Throws:
    `BaseFault` -
    - If the property is not defined in the document's schema.
    - If adding the new instances would create more than the maximum defined by the schema.
    - If the property is read-only and the security token is not valid.
    - If one of the PropertyChangeListeners assigned to this property throws an exception while reacting to the insertion.
    - If the container tries to create or manipulate the Topic for the property and fails.

### updateResourceProperty

    public void updateResourceProperty(QName qname,
                                       java.lang.Object[] values,
                                       java.lang.Object securityToken)
                                throws BaseFault

  Updates all instances of the given property using the given values; all previous values will be removed in lieu of these new values. This call will not complete if the given security token doesn't match the document's token and the caller is trying to update an immutable property.

  Parameters:
    `qname` - The name of the property to update.
    `values` - The values to assign to the property.
    `securityToken` - The token used to verify permission to call this method.
  Throws:
    `BaseFault` -
    - If the property is not defined in the document's schema.
    - If a new value is null and the property is not nillable.
    - If the property is read-only and the security token is not valid.
    - If one of the PropertyChangeListeners assigned to this property throws an exception while reacting to the update.

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