portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/prefs NodeDoesNotExistException.java NodeAlreadyExistsException.java FailedToCreateNodeException.java PreferencesException.java PropertyManager.java PreferencesProvider.java
Date Fri, 29 Oct 2004 14:16:13 GMT
weaver      2004/10/29 07:16:13

  Modified:    jetspeed-api/src/java/org/apache/jetspeed/prefs
                        PropertyManager.java PreferencesProvider.java
  Added:       jetspeed-api/src/java/org/apache/jetspeed/prefs
                        NodeDoesNotExistException.java
                        NodeAlreadyExistsException.java
                        FailedToCreateNodeException.java
                        PreferencesException.java
  Log:
  Added an exception hierarchy to the prefs api.
  
  Revision  Changes    Path
  1.2       +8 -4      jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/prefs/PropertyManager.java
  
  Index: PropertyManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/prefs/PropertyManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PropertyManager.java	16 Jul 2004 19:30:14 -0000	1.1
  +++ PropertyManager.java	29 Oct 2004 14:16:13 -0000	1.2
  @@ -51,8 +51,9 @@
        * @throws PropertyException Thrown if any property in the
        *                           set in already assigned to a property set
        *                           definition.
  +     * @throws PreferencesException
        */
  -    void addPropertyKeys(Preferences prefNode, Map propertyKeysMap) throws PropertyException;
  +    void addPropertyKeys(Preferences prefNode, Map propertyKeysMap) throws PropertyException,
PreferencesException;
   
       /**
        * <p>Returns the property keys available to a {@link Preferences} node whether
  @@ -66,16 +67,18 @@
        * </ul>
        * @param prefNode The {@link Preferences} node.
        * @return The map of property keys names / types.
  +     * @throws PreferencesException
        */
  -    Map getPropertyKeys(Preferences prefNode);
  +    Map getPropertyKeys(Preferences prefNode) throws PreferencesException;
   
       /**
        * <p>Remove the specified collection of property keys from the given preferences
node.</p>
        * @param prefNode The {@link Preferences} node.
        * @param propertyKeys A collection of property key names.
        * @throws PropertyException Throws if delete fails.
  +     * @throws PreferencesException
        */
  -    void removePropertyKeys(Preferences prefNode, Collection propertyKeys) throws PropertyException;
  +    void removePropertyKeys(Preferences prefNode, Collection propertyKeys) throws PropertyException,
PreferencesException;
   
       /**
        * <p>Update a property key.</p>
  @@ -84,8 +87,9 @@
        * @param newPropertyKey The property key name / type map used to
        *                       update the old property.
        * @throws PropertyException Throws if update fails.
  +     * @throws PreferencesException
        */
       void updatePropertyKey(String oldPropertyKeyName, Preferences prefNode, Map newPropertyKey)
  -        throws PropertyException;
  +        throws PropertyException, PreferencesException;
   
   }
  
  
  
  1.2       +17 -4     jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/prefs/PreferencesProvider.java
  
  Index: PreferencesProvider.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/prefs/PreferencesProvider.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PreferencesProvider.java	16 Jul 2004 19:30:14 -0000	1.1
  +++ PreferencesProvider.java	29 Oct 2004 14:16:13 -0000	1.2
  @@ -14,9 +14,10 @@
    */
   package org.apache.jetspeed.prefs;
   
  +import java.util.Collection;
   import java.util.prefs.Preferences;
   
  -import org.apache.jetspeed.components.persistence.store.PersistenceStore;
  +import org.apache.jetspeed.prefs.om.Node;
   
   /**
    * <p>Utility component used to pass the {@link PersistenceStoreContainer} and
  @@ -25,9 +26,21 @@
    * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
    */
   public interface PreferencesProvider
  -{
  -    PersistenceStore getPersistenceStore();
  -
  +{    
       boolean isPropertyManagerEnabled();
       
  +    Node getNode( String fullPath, int nodeType ) throws NodeDoesNotExistException;
  +    
  +    boolean nodeExists( String fullPath, int nodeType );
  +    
  +    Node createNode( Node parent, String nodeName, int nodeType, String fullPath )
  +    throws FailedToCreateNodeException, NodeAlreadyExistsException;
  +    
  +    Collection getChildren(Node parentNode);
  +    
  +    void storeNode(Node node);
  +    
  +    void removeNode(Node node);
  +    
  +    void init() throws Exception;
   }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/prefs/NodeDoesNotExistException.java
  
  Index: NodeDoesNotExistException.java
  ===================================================================
  /*
   * Copyright 2000-2001,2004 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.jetspeed.prefs;
  
  /**
   * <p>
   * NodeDoesNotExistException
   * </p>
   * <p>
   *
   * </p>
   * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
   * @version $Id: NodeDoesNotExistException.java,v 1.1 2004/10/29 14:16:13 weaver Exp $
   *
   */
  public class NodeDoesNotExistException extends PreferencesException
  {
  
      /**
       * 
       */
      public NodeDoesNotExistException()
      {
          super();
          // TODO Auto-generated constructor stub
      }
  
      /**
       * @param message
       */
      public NodeDoesNotExistException( String message )
      {
          super(message);
          // TODO Auto-generated constructor stub
      }
  
      /**
       * @param nested
       */
      public NodeDoesNotExistException( Throwable nested )
      {
          super(nested);
          // TODO Auto-generated constructor stub
      }
  
      /**
       * @param msg
       * @param nested
       */
      public NodeDoesNotExistException( String msg, Throwable nested )
      {
          super(msg, nested);
          // TODO Auto-generated constructor stub
      }
  
  }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/prefs/NodeAlreadyExistsException.java
  
  Index: NodeAlreadyExistsException.java
  ===================================================================
  /*
   * Copyright 2000-2001,2004 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.jetspeed.prefs;
  
  /**
   * <p>
   * NodeAlreadyExistsException
   * </p>
   * <p>
   *
   * </p>
   * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
   * @version $Id: NodeAlreadyExistsException.java,v 1.1 2004/10/29 14:16:13 weaver Exp $
   *
   */
  public class NodeAlreadyExistsException extends PreferencesException
  {
  
      /**
       * 
       */
      public NodeAlreadyExistsException()
      {
          super();
      }
  
      /**
       * @param message
       */
      public NodeAlreadyExistsException( String message )
      {
          super(message);
      }
  
      /**
       * @param nested
       */
      public NodeAlreadyExistsException( Throwable nested )
      {
          super(nested);
      }
  
      /**
       * @param msg
       * @param nested
       */
      public NodeAlreadyExistsException( String msg, Throwable nested )
      {
          super(msg, nested);
      }
  
  }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/prefs/FailedToCreateNodeException.java
  
  Index: FailedToCreateNodeException.java
  ===================================================================
  /*
   * Copyright 2000-2001,2004 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.jetspeed.prefs;
  
  /**
   * <p>
   * FailedToCreateNodeException
   * </p>
   * <p>
   *
   * </p>
   * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
   * @version $Id: FailedToCreateNodeException.java,v 1.1 2004/10/29 14:16:13 weaver Exp $
   *
   */
  public class FailedToCreateNodeException extends PreferencesException
  {
  
      /**
       * 
       */
      public FailedToCreateNodeException()
      {
          super();
          // TODO Auto-generated constructor stub
      }
  
      /**
       * @param message
       */
      public FailedToCreateNodeException( String message )
      {
          super(message);
          // TODO Auto-generated constructor stub
      }
  
      /**
       * @param nested
       */
      public FailedToCreateNodeException( Throwable nested )
      {
          super(nested);
          // TODO Auto-generated constructor stub
      }
  
      /**
       * @param msg
       * @param nested
       */
      public FailedToCreateNodeException( String msg, Throwable nested )
      {
          super(msg, nested);
          // TODO Auto-generated constructor stub
      }
  
  }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/prefs/PreferencesException.java
  
  Index: PreferencesException.java
  ===================================================================
  /*
   * Copyright 2000-2001,2004 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.jetspeed.prefs;
  
  import org.apache.jetspeed.exception.JetspeedException;
  
  /**
   * <p>
   * PreferencesException
   * </p>
   * <p>
   *
   * </p>
   * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
   * @version $Id: PreferencesException.java,v 1.1 2004/10/29 14:16:13 weaver Exp $
   *
   */
  public class PreferencesException extends JetspeedException
  {
  
      /**
       * 
       */
      public PreferencesException()
      {
          super();
          
      }
  
      /**
       * @param message
       */
      public PreferencesException( String message )
      {
          super(message);
  
      }
  
      /**
       * @param nested
       */
      public PreferencesException( Throwable nested )
      {
          super(nested);
      }
  
      /**
       * @param msg
       * @param nested
       */
      public PreferencesException( String msg, Throwable nested )
      {
          super(msg, nested);
      }
  
  }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message