portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlest...@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/prefs/src/java/org/apache/jetspeed/prefs/impl PreferencesProviderImpl.java PreferencesImpl.java PreferencesComponentImpl.java
Date Tue, 09 Mar 2004 15:57:49 GMT
dlestrat    2004/03/09 07:57:49

  Modified:    components/prefs/src/java/org/apache/jetspeed/prefs/impl
                        PreferencesImpl.java
  Added:       components/prefs/src/java/org/apache/jetspeed/prefs/impl
                        PreferencesProviderImpl.java
  Removed:     components/prefs/src/java/org/apache/jetspeed/prefs/impl
                        PreferencesComponentImpl.java
  Log:
  Removed PreferencesComponent, replaced by configurable provider.
  
  Revision  Changes    Path
  1.4       +2 -2      jakarta-jetspeed-2/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PreferencesImpl.java
  
  Index: PreferencesImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PreferencesImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PreferencesImpl.java	6 Mar 2004 20:13:15 -0000	1.3
  +++ PreferencesImpl.java	9 Mar 2004 15:57:49 -0000	1.4
  @@ -35,7 +35,7 @@
   import org.apache.jetspeed.components.persistence.store.PersistenceStore;
   import org.apache.jetspeed.components.persistence.store.PersistenceStoreContainer;
   import org.apache.jetspeed.components.persistence.store.impl.DefaultPersistenceStoreContainer;
  -import org.apache.jetspeed.prefs.PreferencesComponent;
  +import org.apache.jetspeed.prefs.PreferencesProvider;
   import org.apache.jetspeed.prefs.om.Node;
   import org.apache.jetspeed.prefs.om.Property;
   import org.apache.jetspeed.prefs.om.PropertyKey;
  @@ -120,7 +120,7 @@
   
           if (log.isDebugEnabled())
               log.debug("Constructing node: " + nodeName);
  -        PreferencesComponent prefComponent = PreferencesComponentImpl.prefComponent;
  +        PreferencesProvider prefComponent = PreferencesProviderImpl.prefComponent;
           this.storeContainer = prefComponent.getStoreContainer();
           this.jetspeedStoreName = prefComponent.getStoreKeyName();
           this.commonQueries = new CommonQueries(storeContainer, jetspeedStoreName);
  
  
  
  1.1                  jakarta-jetspeed-2/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PreferencesProviderImpl.java
  
  Index: PreferencesProviderImpl.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.impl;
  
  import org.apache.jetspeed.prefs.PreferencesProvider;
  import org.apache.jetspeed.components.persistence.store.PersistenceStoreContainer;
  
  /**
   * @author <a href="">David Le Strat</a>
   *
   */
  public class PreferencesProviderImpl implements PreferencesProvider
  {
  
      /** The {@link PreferencesComponent} instance. */
      static PreferencesProvider prefComponent;
      
      /** The persistence store container. */
      private PersistenceStoreContainer storeContainer;
  
      /** The store name. */
      private String storeKeyName;
  
      /**
       * <p>Constructor providing the {@link PersistenceStoreContainer} 
       * and store key name and the {@link java.util.prefs.PreferencesFactory}.</p>
       */
      public PreferencesProviderImpl(PersistenceStoreContainer storeContainer, String storeKeyName,
String prefsFactoryImpl)
      {
          this.storeKeyName = storeKeyName;
          this.storeContainer = storeContainer;
          System.setProperty("java.util.prefs.PreferencesFactory", prefsFactoryImpl);
          PreferencesProviderImpl.prefComponent = this;
  
      }
  
      /**
       * @see org.apache.jetspeed.prefs.PreferencesComponent#getStoreContainer()
       */
      public PersistenceStoreContainer getStoreContainer()
      {
          return this.storeContainer;
      }
  
      /**
       * @see org.apache.jetspeed.prefs.PreferencesComponent#getStoreKeyName()
       */
      public String getStoreKeyName()
      {
          return this.storeKeyName;
      }
  }
  
  
  

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