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.opengis.feature
Interface LockResponse

Deprecated. Removed pending a redesign of feature storage interfaces

    @Deprecated
    @XmlElement(value="LockFeatureResponse")
    public interface LockResponse

Represents a response for a lock request. A lock is requested for a duration, except for the special case of a `TRANSACTION_LOCK` where the request is until the next commit or rollback.

A successful lock request will result in an authorization ID being generated. This is a simple token you can keep until you need to work with the content again. Without this token you are prevented from work (at least until the duration is up).

Since:
  GeoAPI 2.0

Method Summary
`void` | `addAuthorization(FeatureStore store, String token)` Deprecated. Add an additional authorization token to collected results for `Transaction.commit()`.
`String` | `getAuthorization(FeatureStore store)` Deprecated. Returns the authorization token for indicated feature store, or null if there is no locks known for the feature store.
`Set<FeatureStore>` | `getFeatureStores()` Deprecated. Returns the set of locked feature stores.
`int` | `getNumberLocked()` Deprecated. Number of features successfully locked, or -1 if unknown In the rare case where you need to report back on the number of successful locks you can issue a bunch of individual lock request and check the number of features locked.
`String` | `getToken()` Deprecated. Retreives the authorization token for the special case of only one `FeatureStore` being locked.
`void` | `increaseNumberLocked(int amount)` Deprecated. Used to collect the results of a number of lock requests for `Transaction.commit()`.

Method Detail

### getNumberLocked

    int getNumberLocked()

  Deprecated.
  Number of features successfully locked, or -1 if unknown In the rare case where you need to report back on the number of successful locks you can issue a bunch of individual lock request and check the number of features locked.

  Returns:
    number of locked features or -1 if unknown.

### increaseNumberLocked

    void increaseNumberLocked(int amount)

  Deprecated.
  Used to collect the results of a number of lock requests for `Transaction.commit()`.

### addAuthorization

    void addAuthorization(FeatureStore store,
                          String token)

  Deprecated.
  Add an additional authorization token to collected results for `Transaction.commit()`. Note this abstraction does not allow the collection of more than one token per `FeatureStore`. This should not be an issue give our two workflows:
  - `AUTO_COMMIT`: Each lock method returns a different `LockResponse`.
  - `Transaction` + `TRANSACTION_LOCK`: Sepcial case object `TRANSACTION_LOCK_RESPONSE` is always returned.
  - `Transaction`: Each lock method returns null, commit returns a single `LockResponse`. Given that a `Transaction` is supposed to gather everything up into a single commit, a datastore should be capable of issuing a single authorization token (even if more then one of its `FeatureCollection`s was involved in the transaction.

### getToken

    @XmlElement(value="LockID")
    String getToken()

  Deprecated.
  Retreives the authorization token for the special case of only one `FeatureStore` being locked. This is the most common situation. Often client code will only work on one `FeatureCollection` at a time, or several `FeatureCollection`s belonging to the same `FeatureStore`.

  Returns:
    token, or null if a single token was unavailable.
  TODO:
    Consider renaming this method as `getAuthorization()` for consistency with `getAuthorization(org.opengis.feature.FeatureStore)` and the rest of feature API.

### getAuthorization

    String getAuthorization(FeatureStore store)

  Deprecated.
  Returns the authorization token for indicated feature store, or null if there is no locks known for the feature store.

  Parameters:
    `store` - The feature store to search for.
  Returns:
    token, or null if a token for feature store was unavailable.

### getFeatureStores

    @XmlElement(value="FeaturesLocked")
    Set<FeatureStore> getFeatureStores()

  Deprecated.
  Returns the set of locked feature stores.

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 © 1994-2008 Open Geospatial Consortium. All Rights Reserved.