You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-dev@portals.apache.org by dl...@apache.org on 2005/08/28 23:35:09 UTC

cvs commit: ws-wsrp4j/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/interfaces/user User.java UserRegistry.java

dlouzan     2005/08/28 14:35:08

  Added:       sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/interfaces/user
                        User.java UserRegistry.java
  Log:
  Initial commit.
  
  Revision  Changes    Path
  1.1                  ws-wsrp4j/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/interfaces/user/User.java
  
  Index: User.java
  ===================================================================
  /*
   * Copyright 2003-2005 The Apache Software Foundation.
   * 
   * Licensed 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.wsrp4j.commons.consumer.interfaces.user;
  
  
  import oasis.names.tc.wsrp.v1.types.UserContext;
  
  
  /**
   * This interface defines a user with a certain
   * user id and a user context.
   * 
   * @author Stephan Laertz
   *
   * @version $Id: User.java,v 1.1 2005/08/28 21:35:05 dlouzan Exp $
   **/
  public interface User {
  
      /**
       * Returns the userID
       * 
       * @return _userID
       */
      String getUserID();
  
      /**
       * Sets the userID
       * 
       * @param userID as String
       */
      void setUserID(String userID);
  
      /**
       * Returns the UserContext for this userid
       * 
       * @return _userContext 
       */
      UserContext getUserContext();
  
      /**
       * Sets the UserContext for this userID
       *
       * @param userContext 
       */
      void setUserContext(UserContext userContext);
  }
  
  
  
  1.1                  ws-wsrp4j/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/interfaces/user/UserRegistry.java
  
  Index: UserRegistry.java
  ===================================================================
  /*
   * Copyright 2003-2005 The Apache Software Foundation.
   * 
   * Licensed 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.wsrp4j.commons.consumer.interfaces.user;
  
  
  import java.util.Iterator;
  
  
  /**
   * Defines a registry which can be used to manage users.
   * 
   * @author Stephan Laertz
   *
   * @version $Id: UserRegistry.java,v 1.1 2005/08/28 21:35:05 dlouzan Exp $
   **/
  public interface UserRegistry {
  
      /**
       * Add a user to the registry
       *
       * @param user The user to add
       *
       * @return The user added or null
       **/
      User addUser(User user);
  
      /**
       * Get the user with the given id
       * 
       * @param userID The ID of the user
       * 
       * @return The user object with the given user id
       **/
      User getUser(String userID);
  
      /**
       * Remove a user from the list of known user
       * 
       * @param userID The ID of the user 
       * @return The user which has been removed or null
       **/
      User removeUser(String userID);
  
      /**
       * Remove all users from the registry     
       **/
      void removeAllUsers();
  
      /**
       * Get an iterator with all known users
       * 
       * @return All known user objects in an iterator
       **/
      Iterator getAllUsers();
  }