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/components/prefs/src/java/org/apache/jetspeed/prefs PreferencesProvider.java PropertyManager.java package.html
Date Fri, 16 Jul 2004 19:30:14 GMT
weaver      2004/07/16 12:30:14

  Added:       jetspeed-api/src/java/org/apache/jetspeed/prefs
                        PropertyManager.java package.html
                        PreferencesProvider.java
  Removed:     components/prefs/src/java/org/apache/jetspeed/prefs
                        PreferencesProvider.java PropertyManager.java
                        package.html
  Log:
  property and prefs interfaces moved to jetspeed-api
  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/prefs/PropertyManager.java
  
  Index: PropertyManager.java
  ===================================================================
  /* Copyright 2004 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 java.util.Collection;
  import java.util.Map;
  import java.util.prefs.Preferences;
  
  
  /**
   * <p>Service used to manage property and property set definition.<p>
   * <p>A property set definition defines a property set and the possible
   * properties assigned to that set. All or a subset of the property
   * set definition properties can be assigned to a node.<p>
   *
   * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
   */
  public interface PropertyManager
  {
  
      /** The name of the service. */
      String SERVICE_NAME = "PropertyManager";
  
      /**
       * <p>Add a set of property keys to a {@link Preferences} node.  Only
       * keys added to a node can be set on the {@link Preferences} node.</p>
       * <p>Property keys should be passed as a map of:</p>
       * <ul>
       *      <li><code>PROPERTYKEY_NAME</code>: The property key name of
type
       *      <code>java.lang.String</code>.</li>
       *      <li><code>PROPERTYKEY_TYPE</code>: The property key type of
type
       *      <code>java.lang.Short</code>.</li>
       * </ul>
       * <p>The Map of [PROPERTYKEY_NAME, PROPERTYKEY_TYPE] of properties to be 
       * added to the {@link Preferences} is passed to the method.</p>
       * <p>The property names associated to a node must be unique.</p>
       * @param prefNode The {@link Preferences} node.
       * @param propertyKeys A map property key name / key type.
       * @throws PropertyException Thrown if any property in the
       *                           set in already assigned to a property set
       *                           definition.
       */
      void addPropertyKeys(Preferences prefNode, Map propertyKeysMap) throws PropertyException;
  
      /**
       * <p>Returns the property keys available to a {@link Preferences} node whether
       * or node those keys have values assigned to them.</p>
       * <p>Property keys will be returned as a map of:</p>
       * <ul>
       *      <li><code>PROPERTYKEY_NAME</code>: The property key name of
type
       *      <code>java.lang.String</code>.</li>
       *      <li><code>PROPERTYKEY_TYPE</code>: The property key type of
type
       *      <code>java.lang.Short</code>.</li>
       * </ul>
       * @param prefNode The {@link Preferences} node.
       * @return The map of property keys names / types.
       */
      Map getPropertyKeys(Preferences prefNode);
  
      /**
       * <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.
       */
      void removePropertyKeys(Preferences prefNode, Collection propertyKeys) throws PropertyException;
  
      /**
       * <p>Update a property key.</p>
       * @param oldPropertyKeyName The old property key name.
       * @param prefNode The {@link Preferences} node.
       * @param newPropertyKey The property key name / type map used to
       *                       update the old property.
       * @throws PropertyException Throws if update fails.
       */
      void updatePropertyKey(String oldPropertyKeyName, Preferences prefNode, Map newPropertyKey)
          throws PropertyException;
  
  }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/prefs/package.html
  
  Index: package.html
  ===================================================================
  <html>
  <head>
    <title>org.apache.jetspeed.om.usermgt</title>
  </head>
  <body>
  
    <p>Interface for the services backing Jetspeed
    java.util.prefs.Preferences.</p>
    
  </body>
  </html>
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/prefs/PreferencesProvider.java
  
  Index: PreferencesProvider.java
  ===================================================================
  /* Copyright 2004 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 java.util.prefs.Preferences;
  
  import org.apache.jetspeed.components.persistence.store.PersistenceStore;
  
  /**
   * <p>Utility component used to pass the {@link PersistenceStoreContainer} and
   * store name to the {@link Preferences} SPI implementation.</p>
   * 
   * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
   */
  public interface PreferencesProvider
  {
      PersistenceStore getPersistenceStore();
  
      boolean isPropertyManagerEnabled();
      
  }
  
  
  

---------------------------------------------------------------------
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