You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by si...@apache.org on 2010/02/26 23:29:05 UTC

svn commit: r916844 - /labs/amber/server/src/main/java/org/apache/labs/amber/server/CredentialsStorage.java

Author: simonetripodi
Date: Fri Feb 26 22:29:04 2010
New Revision: 916844

URL: http://svn.apache.org/viewvc?rev=916844&view=rev
Log:
first checkin of CredentialsStorage class

Added:
    labs/amber/server/src/main/java/org/apache/labs/amber/server/CredentialsStorage.java   (with props)

Added: labs/amber/server/src/main/java/org/apache/labs/amber/server/CredentialsStorage.java
URL: http://svn.apache.org/viewvc/labs/amber/server/src/main/java/org/apache/labs/amber/server/CredentialsStorage.java?rev=916844&view=auto
==============================================================================
--- labs/amber/server/src/main/java/org/apache/labs/amber/server/CredentialsStorage.java (added)
+++ labs/amber/server/src/main/java/org/apache/labs/amber/server/CredentialsStorage.java Fri Feb 26 22:29:04 2010
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.labs.amber.server;
+
+import org.apache.labs.amber.signature.credential.Credential;
+
+/**
+ * Temporary/Token storage inerface.
+ *
+ * @version $Id$
+ */
+public interface CredentialsStorage {
+
+    /**
+     * Stores a new token.
+     *
+     * @param clientCredentials Consumer key associated to the token to be stored.
+     * @param credential The token to be stored.
+     * @throws StorageException if a backend error occurs.
+     */
+    void add(String clientCredentials, Credential credential) throws StorageException;
+
+    /**
+     * Modifies an existing token.
+     *
+     * @param token The token to be modified.
+     * @throws StorageException if a backend error occurs.
+     */
+    void update(Credential token) throws StorageException;
+
+    /**
+     * Searches for an existing token.
+     *
+     * @param clientCredentials The consumer key associated with the Token.
+     * @param token The token string to be searched.
+     * @return the relative token associated to the consumerKey.
+     * @throws StorageException if a backend error occurs.
+     */
+    Credential read(String clientCredentials, String token) throws StorageException;
+
+    /**
+     * Searches for an existing token.
+     *
+     * @param token The token string to be searched.
+     * @return the relative token.
+     * @throws StorageException if a backend error occurs.
+     */
+    Credential read(String token) throws StorageException;
+
+    /**
+     * Removes a token from the store.
+     *
+     * @param credential The token to be removed.
+     * @throws StorageException if a backend error occurs.
+     */
+    void delete(String credential) throws StorageException;
+
+}

Propchange: labs/amber/server/src/main/java/org/apache/labs/amber/server/CredentialsStorage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: labs/amber/server/src/main/java/org/apache/labs/amber/server/CredentialsStorage.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: labs/amber/server/src/main/java/org/apache/labs/amber/server/CredentialsStorage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org