From: bruce m. <tr...@us...> - 2004-07-30 01:33:15
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/resource In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7955/modules/core/src/com/babeldoc/core/resource Modified Files: IResource.java Resource.java ResourceConfigInfo.java ResourceFactory.java ResourceType.java Log Message: javadoc and formatting here. Index: ResourceFactory.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/resource/ResourceFactory.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ResourceFactory.java 24 Jul 2004 00:18:51 -0000 1.7 --- ResourceFactory.java 30 Jul 2004 01:33:04 -0000 1.8 *************** *** 88,101 **** */ public class ResourceFactory { public static final int NUM_LRU = 100; ! /** constants for the configuration stuff */ public static final String TYPE = "type"; public static final String RESOURCE = "resource"; ! /** holds singleton reference */ private static ResourceFactory instance = new ResourceFactory(); ! /** this is the actual journal object */ private Map resources; --- 88,103 ---- */ public class ResourceFactory { + /** lru size for map. */ public static final int NUM_LRU = 100; ! /** constants for the configuration stuff. */ public static final String TYPE = "type"; + /** constants for the configuration stuff. */ public static final String RESOURCE = "resource"; ! /** holds singleton reference .*/ private static ResourceFactory instance = new ResourceFactory(); ! /** this is the actual journal object. */ private Map resources; *************** *** 106,110 **** private ResourceFactory() { /** ! * Scanner configuration */ resources = Collections.synchronizedMap(new LRUMap(NUM_LRU)); --- 108,112 ---- private ResourceFactory() { /** ! * resource configuration */ resources = Collections.synchronizedMap(new LRUMap(NUM_LRU)); *************** *** 112,116 **** /** ! * Get an instance of the singleton - make one if necessary * * @return factory object --- 114,118 ---- /** ! * Get an instance of the singleton - make one if necessary. * * @return factory object *************** *** 122,130 **** /** * Get a named resource object. Must be synchronized to disallow the access ! * and possible creation of a new resource ! * ! * @param name DOCUMENT ME! * ! * @return the sqlconnectionmanager object */ public static synchronized IResource getResource(String name) { --- 124,131 ---- /** * Get a named resource object. Must be synchronized to disallow the access ! * and possible creation of a new resource. * ! * @param name resource name ! * @return resource object */ public static synchronized IResource getResource(String name) { Index: IResource.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/resource/IResource.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** IResource.java 15 Aug 2003 00:25:29 -0000 1.4 --- IResource.java 30 Jul 2004 01:33:04 -0000 1.5 *************** *** 81,87 **** extends INamed, IConfigurable { /** ! * Check back in a checked out connection * ! * @param object */ public void checkIn(Object object) throws ResourceException; --- 81,88 ---- extends INamed, IConfigurable { /** ! * Check back in a checked out resouce. * ! * @param object object to check in ! * @throws ResourceException */ public void checkIn(Object object) throws ResourceException; *************** *** 91,94 **** --- 92,96 ---- * * @return the checked out connection + * @throws ResourceException */ public Object checkOut() throws ResourceException; Index: ResourceType.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/resource/ResourceType.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ResourceType.java 16 Sep 2003 05:19:01 -0000 1.5 --- ResourceType.java 30 Jul 2004 01:33:04 -0000 1.6 *************** *** 83,87 **** * Private constructor - do not use this - use the constants above. * ! * @param resourceType DOCUMENT ME! */ private ResourceType(String resourceType) { --- 83,87 ---- * Private constructor - do not use this - use the constants above. * ! * @param resourceType name of the resource type */ private ResourceType(String resourceType) { *************** *** 90,98 **** /** ! * Get a resource type object ! * ! * @param resourceType * ! * @return */ public static ResourceType getResourceType(String resourceType) { --- 90,97 ---- /** ! * Get a resource type object. * ! * @param resourceType name of the resource type ! * @return the resource type */ public static ResourceType getResourceType(String resourceType) { *************** *** 103,107 **** * Get the service prefix for this type. * ! * @return */ public String getServicePrefix() { --- 102,106 ---- * Get the service prefix for this type. * ! * @return the service prefix */ public String getServicePrefix() { Index: ResourceConfigInfo.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/resource/ResourceConfigInfo.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ResourceConfigInfo.java 15 Aug 2003 00:25:29 -0000 1.1 --- ResourceConfigInfo.java 30 Jul 2004 01:33:04 -0000 1.2 *************** *** 1,98 **** ! /* ==================================================================== ! * The Apache Software License, Version 1.1 ! * ! * Copyright (c) 2000 The Apache Software Foundation. All rights ! * reserved. ! * ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions ! * are met: ! * ! * 1. Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * ! * 2. Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in ! * the documentation and/or other materials provided with the ! * distribution. ! * ! * 3. The end-user documentation included with the redistribution, ! * if any, must include the following acknowledgment: ! * "This product includes software developed by the ! * Apache Software Foundation (http://www.apache.org/)." ! * Alternately, this acknowledgment may appear in the software itself, ! * if and wherever such third-party acknowledgments normally appear. ! * ! * 4. The names "Apache" and "Apache Software Foundation" must ! * not be used to endorse or promote products derived from this ! * software without prior written permission. For written ! * permission, please contact ap...@ap.... ! * ! * 5. Products derived from this software may not be called "Apache", ! * nor may "Apache" appear in their name, without prior written ! * permission of the Apache Software Foundation. ! * ! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ! * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ! * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ! * SUCH DAMAGE. ! * ==================================================================== ! * ! * This software consists of voluntary contributions made by many ! * individuals on behalf of the Apache Software Foundation. For more ! * information on the Apache Software Foundation, please see ! * <http://www.apache.org/>. ! * ! * Portions of this software are based upon public domain software ! * originally written at the National Center for Supercomputing Applications, ! * University of Illinois, Urbana-Champaign. ! * ==================================================================== ! * ! * Babeldoc: The Universal Document Processor ! * ! * $Header$ ! * $DateTime$ ! * $Author$ ! * ! */ ! package com.babeldoc.core.resource; ! ! import com.babeldoc.core.option.ConfigInfo; ! ! import java.util.Collection; ! ! /** ! * Configuration information object for resources. This will allow objects ! * to describe those configuration options that are required and optional. ! * ! * @author bmcdonald ! * @version 1.1 ! */ ! public abstract class ResourceConfigInfo ! extends ConfigInfo { ! /** ! * Return an xmlized version of the of the config info ! * ! * @return String of configuration information. ! */ ! public String toXml() { ! return null; ! } ! ! /** ! * This method returns options that are general to all components ! * ! * @return comments ! */ ! public Collection getGeneralOptions() { ! return null; ! } ! } --- 1,170 ---- ! /* ==================================================================== ! ! * The Apache Software License, Version 1.1 ! ! * ! ! * Copyright (c) 2000 The Apache Software Foundation. All rights ! ! * reserved. ! ! * ! ! * Redistribution and use in source and binary forms, with or without ! ! * modification, are permitted provided that the following conditions ! ! * are met: ! ! * ! ! * 1. Redistributions of source code must retain the above copyright ! ! * notice, this list of conditions and the following disclaimer. ! ! * ! ! * 2. Redistributions in binary form must reproduce the above copyright ! ! * notice, this list of conditions and the following disclaimer in ! ! * the documentation and/or other materials provided with the ! ! * distribution. ! ! * ! ! * 3. The end-user documentation included with the redistribution, ! ! * if any, must include the following acknowledgment: ! ! * "This product includes software developed by the ! ! * Apache Software Foundation (http://www.apache.org/)." ! ! * Alternately, this acknowledgment may appear in the software itself, ! ! * if and wherever such third-party acknowledgments normally appear. ! ! * ! ! * 4. The names "Apache" and "Apache Software Foundation" must ! ! * not be used to endorse or promote products derived from this ! ! * software without prior written permission. For written ! ! * permission, please contact ap...@ap.... ! ! * ! ! * 5. Products derived from this software may not be called "Apache", ! ! * nor may "Apache" appear in their name, without prior written ! ! * permission of the Apache Software Foundation. ! ! * ! ! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ! ! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! ! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ! ! * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ! ! * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ! ! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ! ! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ! ! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ! ! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ! ! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ! ! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ! ! * SUCH DAMAGE. ! ! * ==================================================================== ! ! * ! ! * This software consists of voluntary contributions made by many ! ! * individuals on behalf of the Apache Software Foundation. For more ! ! * information on the Apache Software Foundation, please see ! ! * <http://www.apache.org/>. ! ! * ! ! * Portions of this software are based upon public domain software ! ! * originally written at the National Center for Supercomputing Applications, ! ! * University of Illinois, Urbana-Champaign. ! ! * ==================================================================== ! ! * ! ! * Babeldoc: The Universal Document Processor ! ! * ! ! * $Header$ ! ! * $DateTime$ ! ! * $Author$ ! ! * ! ! */ ! ! package com.babeldoc.core.resource; ! ! import com.babeldoc.core.option.ConfigInfo; ! ! ! ! import java.util.Collection; ! ! /** ! * Configuration information object for resources. This will allow objects ! * to describe those configuration options that are required and optional. ! * ! * @author bmcdonald ! * @version 1.1 ! */ ! public abstract class ResourceConfigInfo ! extends ConfigInfo { ! ! /** ! * Return an xmlized version of the of the config info. ! * ! * @return String of configuration information. ! */ ! ! public String toXml() { ! return null; ! } ! ! /** ! * This method returns options that are general to all components. ! * ! * @return general options ! */ ! ! public Collection getGeneralOptions() { ! return null; ! } ! } ! ! Index: Resource.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/resource/Resource.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Resource.java 15 Aug 2003 00:25:29 -0000 1.6 --- Resource.java 30 Jul 2004 01:33:04 -0000 1.7 *************** *** 80,88 **** implements IResource { ! /** State variables */ private boolean initialized = false; /** ! * Setup the resource - this MUST be overridden by child resources * * @throws ResourceException --- 80,88 ---- implements IResource { ! /** State variables. */ private boolean initialized = false; /** ! * Setup the resource - this MUST be overridden by child resources. * * @throws ResourceException *************** *** 94,98 **** * * @return NOTHING - the extending class needs to do the actual work - * * @throws ResourceException */ --- 94,97 ---- *************** *** 108,114 **** /** ! * Has this resource been initialized * ! * @return */ protected boolean isInitialized() { --- 107,113 ---- /** ! * Has this resource been initialized. * ! * @return initialization flag. */ protected boolean isInitialized() { *************** *** 117,123 **** /** ! * Set this resouces initialized state * ! * @param initialized */ protected void setInitialized(boolean initialized) { --- 116,122 ---- /** ! * Set this resouces initialized state. * ! * @param initialized flag */ protected void setInitialized(boolean initialized) { |