diff --git a/nb-configuration.xml b/nb-configuration.xml new file mode 100644 index 0000000..ec4540c --- /dev/null +++ b/nb-configuration.xml @@ -0,0 +1,18 @@ + + + + + + none + + diff --git a/pom.xml b/pom.xml index be3a66c..8bd037c 100644 --- a/pom.xml +++ b/pom.xml @@ -152,7 +152,12 @@ org.apache.maven.plugins maven-surefire-plugin - 2.12 + 2.9 + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9 cismetCommons diff --git a/src/main/java/Sirius/util/collections/IntMapsString.java b/src/main/java/Sirius/util/collections/IntMapsString.java index c3e3904..b498c6b 100644 --- a/src/main/java/Sirius/util/collections/IntMapsString.java +++ b/src/main/java/Sirius/util/collections/IntMapsString.java @@ -7,8 +7,15 @@ ****************************************************/ package Sirius.util.collections; +import java.util.Hashtable; + /** - * DOCUMENT ME! + * Modified {@link Hashtable}, which maps Integer to String. + * + * * * @version $Revision$, $Date$ */ @@ -26,8 +33,10 @@ public class IntMapsString extends java.util.Hashtable { /** * Creates a new IntMapsString object. * - * @param initialCapacity DOCUMENT ME! - * @param loadFactor DOCUMENT ME! + * @param initialCapacity Capacity when Object is created + * @param loadFactor buffer for capacity increase + * + * @see Hashtable */ IntMapsString(final int initialCapacity, final float loadFactor) { super(initialCapacity, loadFactor); @@ -36,24 +45,27 @@ public class IntMapsString extends java.util.Hashtable { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Associates a Integer id(key) to a String astring(value). * - * @param id DOCUMENT ME! - * @param aString DOCUMENT ME! + * @param id key + * @param aString value + * + * @see #put(java.lang.Object, java.lang.Object) */ public void add(final int id, final String aString) { super.put(new Integer(id), aString); } // end add /** - * DOCUMENT ME! + * Getter for the Value as a String. * - * @param id DOCUMENT ME! + * @param id key * - * @return DOCUMENT ME! + * @return Stringvalue * - * @throws Exception DOCUMENT ME! - * @throws java.lang.NullPointerException DOCUMENT ME! + * @throws Exception throws Exeption if anything went wrong + * @throws java.lang.NullPointerException "Entry is not a String" if key not a String or "No entry" if + * id<\code> has no entry */ public String getStringValue(final int id) throws Exception { final Integer key = new Integer(id); @@ -72,11 +84,13 @@ public String getStringValue(final int id) throws Exception { // when exception concept is accomplished } /** - * ///// containsIntKey///////////////////////////////// + * Tests whether the specified object is a key in IntMapsString or not. + * + * @param key possible key * - * @param key DOCUMENT ME! + * @return true, if the object is a key in IntMapsString * - * @return DOCUMENT ME! + * @see #containsKey(java.lang.Object) */ public boolean containsIntKey(final int key) { return super.containsKey(new Integer(key)); diff --git a/src/main/java/Sirius/util/collections/MultiMap.java b/src/main/java/Sirius/util/collections/MultiMap.java index 93f69cb..72e00fc 100644 --- a/src/main/java/Sirius/util/collections/MultiMap.java +++ b/src/main/java/Sirius/util/collections/MultiMap.java @@ -9,7 +9,9 @@ import java.util.*; /** - * //key=idnetifier;value=LinkedList. + * Modified {@link HashMap}, which makes it possible to map Keys to multiple Values. + * + *

//key=idnetifier;value=LinkedList.

* * @version $Revision$, $Date$ */ @@ -18,15 +20,15 @@ public class MultiMap extends HashMap { //~ Constructors ----------------------------------------------------------- /** - * ////////////////////////////////////////////// + * Creates new Multimap Object with size 10. */ public MultiMap() { this(10); } /** - * ////////////////////////////////////////////// + * Creates new Multimap Object with specified size. * - * @param size DOCUMENT ME! + * @param size size */ public MultiMap(final int size) { super(size); @@ -36,6 +38,16 @@ public MultiMap(final int size) { ///////////////////////////////////////////////// + /** + * Assosiates value with key in this map. Instead of replace the previous + * value for a key,it is possible to have multiple values for one key possible. + * + * @param key key + * @param value value + * + * @return Null + */ + @Override public Object put(final Object key, final Object value) { SyncLinkedList list = null; @@ -59,6 +71,12 @@ public Object put(final Object key, final Object value) { } // end add ////////////////////////////////////////////////////////////// + /** + * Appends the values of the specified map to this map. Instead of replace the previous + * value for a key, it is possible multiple values for one key possible. + * + * @param t map + */ @Override public void putAll(final Map t) { @@ -84,12 +102,12 @@ public void putAll(final Map t) { } /** - * ////////////////////////////////////////////////////// + * Removes specified value associeated with specified key. * - * @param key DOCUMENT ME! - * @param value DOCUMENT ME! + * @param key key whose mapping is to be removed + * @param value mapping to be removed * - * @return DOCUMENT ME! + * @return true, if remove suceeded */ public boolean remove(final Object key, final Object value) { SyncLinkedList list = null; diff --git a/src/main/java/Sirius/util/collections/StringMapsInt.java b/src/main/java/Sirius/util/collections/StringMapsInt.java index f47c7f6..5811938 100644 --- a/src/main/java/Sirius/util/collections/StringMapsInt.java +++ b/src/main/java/Sirius/util/collections/StringMapsInt.java @@ -7,8 +7,15 @@ ****************************************************/ package Sirius.util.collections; +import java.util.Hashtable; + /** - * DOCUMENT ME! + * Modified {@link Hashtable}, which maps String to Integer. + * + * * * @version $Revision$, $Date$ */ @@ -26,8 +33,10 @@ public StringMapsInt() { /** * Creates a new StringMapsInt object. * - * @param initialCapacity DOCUMENT ME! - * @param loadFactor DOCUMENT ME! + * @param initialCapacity Capacity when Object is created + * @param loadFactor buffer for capacity increase + * + * @see Hashtable */ public StringMapsInt(final int initialCapacity, final float loadFactor) { super(initialCapacity, loadFactor); @@ -36,24 +45,26 @@ public StringMapsInt(final int initialCapacity, final float loadFactor) { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Associates Integer sq1ID(value) to a String descriptor(key). * - * @param descriptor DOCUMENT ME! - * @param sqlID DOCUMENT ME! + * @param descriptor key + * @param sqlID value + * + * @see #put(java.lang.Object, java.lang.Object) */ public void add(final String descriptor, final int sqlID) { super.put(descriptor, new Integer(sqlID)); } // end add /** - * ///////////////////////////////////////// + * Getter for the Value as a Integer. * - * @param descriptor DOCUMENT ME! + * @param descriptor descriptor * - * @return DOCUMENT ME! + * @return IntValue * - * @throws Exception DOCUMENT ME! - * @throws java.lang.NullPointerException DOCUMENT ME! + * @throws Exception throws Exeption if anything went wrong + * @throws java.lang.NullPointerException "Entry is not a Integer" or "No entry" */ public int getIntValue(final String descriptor) throws Exception { if (super.containsKey(descriptor)) { @@ -71,11 +82,13 @@ public int getIntValue(final String descriptor) throws Exception { // accomplished } /** - * ///// containsIntKey///////////////////////////////// + * Tests whether the specified object is a key in StringMapsInt or not. + * + * @param key possible key * - * @param key DOCUMENT ME! + * @return true, if the object is a key in StringMapsInt * - * @return DOCUMENT ME! + * @see #containsKey(java.lang.Object) */ public boolean containsStringKey(final String key) { return super.containsKey(key); diff --git a/src/main/java/Sirius/util/collections/StringMapsString.java b/src/main/java/Sirius/util/collections/StringMapsString.java index 1f10865..fd958b1 100644 --- a/src/main/java/Sirius/util/collections/StringMapsString.java +++ b/src/main/java/Sirius/util/collections/StringMapsString.java @@ -7,8 +7,15 @@ ****************************************************/ package Sirius.util.collections; +import java.util.Hashtable; + /** - * renames. + * Modified {@link Hashtable}, which maps String to String. + * + * * * @version $Revision$, $Date$ */ @@ -17,7 +24,7 @@ public class StringMapsString extends java.util.Hashtable { //~ Constructors ----------------------------------------------------------- /** - * --------------------------------------------------------- + * Creates a new StringMapString object. */ public StringMapsString() { super(); @@ -26,17 +33,21 @@ public StringMapsString() { /** * Creates a new StringMapsString object. * - * @param initialCapacity DOCUMENT ME! + * @param initialCapacity Capacity when Object is created + * + * @see Hashtable */ public StringMapsString(final int initialCapacity) { super(initialCapacity); } /** - * --------------------------------------------------------- + * Creates a new StringMapsString object. + * + * @param initialCapacity Capacity when Object is created + * @param loadFactor buffer for capacity increase * - * @param initialCapacity DOCUMENT ME! - * @param loadFactor DOCUMENT ME! + * @see Hashtable */ public StringMapsString(final int initialCapacity, final float loadFactor) { super(initialCapacity, loadFactor); @@ -45,12 +56,12 @@ public StringMapsString(final int initialCapacity, final float loadFactor) { //~ Methods ---------------------------------------------------------------- /** - * ----------------------------------------------------------- + * Associates a String astring(value) to a String descriptor(key). * - * @param descriptor DOCUMENT ME! - * @param aString DOCUMENT ME! + * @param descriptor key + * @param aString value * - * @throws Exception DOCUMENT ME! + * @throws Exception Contains no Key */ public void add(final String descriptor, final String aString) throws Exception { super.put(descriptor, aString); @@ -61,14 +72,14 @@ public void add(final String descriptor, final String aString) throws Exception } // end add /** - * --------------------------------------------------------- + * Getter for the Value as a String. * - * @param descriptor DOCUMENT ME! + * @param descriptor key * - * @return DOCUMENT ME! + * @return StringValue * - * @throws Exception DOCUMENT ME! - * @throws java.lang.NullPointerException DOCUMENT ME! + * @throws Exception throws Exeption if anything went wrong + * @throws java.lang.NullPointerException "Entry is no String" or "No Entry" */ public String getStringValue(final String descriptor) throws Exception { if (containsKey(descriptor)) { @@ -84,11 +95,13 @@ public String getStringValue(final String descriptor) throws Exception { throw new java.lang.NullPointerException("No entry :" + descriptor); // NOI18N } /** - * ///// containsIntKey///////////////////////////////// + * Tests whether the specified object is a key in StringMapsString or not. + * + * @param key possible key * - * @param key DOCUMENT ME! + * @return true, if the object is a key in StringMapsString * - * @return DOCUMENT ME! + * @see #containsKey(java.lang.Object) */ public boolean containsStringKey(final String key) { return super.containsKey(key); diff --git a/src/main/java/Sirius/util/collections/SyncLinkedList.java b/src/main/java/Sirius/util/collections/SyncLinkedList.java index 4184d81..65035ce 100644 --- a/src/main/java/Sirius/util/collections/SyncLinkedList.java +++ b/src/main/java/Sirius/util/collections/SyncLinkedList.java @@ -14,7 +14,7 @@ import java.util.*; /** - * DOCUMENT ME! + * Modified {@link LinkedList} for synchronisation. * * @author schlob * @version $Revision$, $Date$ @@ -24,6 +24,15 @@ public class SyncLinkedList extends LinkedList { //~ Methods ---------------------------------------------------------------- + /** + * Adds the given Object to the List, if it's not already contained in the List. synchronized. + * + * @param o Object to be added + * + * @return true, if the Object is already contained or if the Object was add succesfully. + * + * @see LinkedList#add(java.lang.Object) + */ @Override public synchronized boolean add(final Object o) { if (!contains(o)) { @@ -32,22 +41,51 @@ public synchronized boolean add(final Object o) { return true; } } - + /** + * Checks whether the List is Empty or not. synchronized. + * + * @return true, true if the list is Empty + * + * @see LinkedList#isEmpty() + */ @Override public synchronized boolean isEmpty() { return super.isEmpty(); } - + /** + * Adds the given Collection to the List. synchronized. + * + * @param c Collection to be added + * + * @return if the Collection was added + * + * @see LinkedList#addAll(java.util.Collection) + */ @Override public synchronized boolean addAll(final Collection c) { return super.addAll(c); } - + /** + * Removes the first Object in the List. synchronized. + * + * @return the deleted Object + * + * @see LinkedList#removeFirst() + */ @Override public synchronized Object removeFirst() { return super.removeFirst(); } - + /** + * Removes the first occurrence of the specified element from this list, if it is present. If this list does not + * contain the element, it is unchanged. synchronized. + * + * @param o Object to be removed + * + * @return true if the Object is removed + * + * @see LinkedList#remove(java.lang.Object) + */ @Override public synchronized boolean remove(final java.lang.Object o) { return super.remove(o); diff --git a/src/main/java/Sirius/util/collections/package.html b/src/main/java/Sirius/util/collections/package.html new file mode 100644 index 0000000..cb38b5e --- /dev/null +++ b/src/main/java/Sirius/util/collections/package.html @@ -0,0 +1,8 @@ + + +Sirius.util.collections + + + This Package includes various extended Classes of {@link java.util.Hashtable} and {@link java.util.HashMap}. + + diff --git a/src/main/java/de/cismet/cismap/commons/jtsgeometryfactories/PostGisGeometryFactory.java b/src/main/java/de/cismet/cismap/commons/jtsgeometryfactories/PostGisGeometryFactory.java index 7c8356b..bc84339 100644 --- a/src/main/java/de/cismet/cismap/commons/jtsgeometryfactories/PostGisGeometryFactory.java +++ b/src/main/java/de/cismet/cismap/commons/jtsgeometryfactories/PostGisGeometryFactory.java @@ -19,7 +19,7 @@ import java.util.Collection; /** - * DOCUMENT ME! + * Factory for org.postgis Geometries. * * @author hell * @version $Revision$, $Date$ @@ -37,11 +37,11 @@ public PostGisGeometryFactory() { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Getter for PostCompliantDBString. * - * @param g DOCUMENT ME! + * @param g Geometry * - * @return DOCUMENT ME! + * @return String "SRID= SRID;Text" */ public static String getPostGisCompliantDbString(final Geometry g) { if (g == null) { @@ -52,24 +52,24 @@ public static String getPostGisCompliantDbString(final Geometry g) { } /** - * DOCUMENT ME! + * Creates new JtsPoint by using point. * - * @param point DOCUMENT ME! - * @param geometryFactory DOCUMENT ME! + * @param point point + * @param geometryFactory geometryFactory * - * @return DOCUMENT ME! + * @return point */ private static Point createJtsPoint(final org.postgis.Point point, final GeometryFactory geometryFactory) { return geometryFactory.createPoint(new Coordinate(point.getX(), point.getY())); } /** - * DOCUMENT ME! + * Creates new JtsLineString by using lineString. * - * @param lineString DOCUMENT ME! - * @param geometryFactory DOCUMENT ME! + * @param lineString lineString + * @param geometryFactory geometryFactory * - * @return DOCUMENT ME! + * @return LineString */ private static LineString createJtsLineString(final org.postgis.LineString lineString, final GeometryFactory geometryFactory) { @@ -81,12 +81,12 @@ private static LineString createJtsLineString(final org.postgis.LineString lineS } /** - * DOCUMENT ME! + * Creates new JtsLinearRing by using linearRing. * - * @param linearRing DOCUMENT ME! - * @param geometryFactory DOCUMENT ME! + * @param linearRing linearRing + * @param geometryFactory geometryFactory * - * @return DOCUMENT ME! + * @return linearRing */ private static LinearRing createJtsLinearRing(final org.postgis.LinearRing linearRing, final GeometryFactory geometryFactory) { @@ -103,12 +103,14 @@ private static LinearRing createJtsLinearRing(final org.postgis.LinearRing linea } /** - * DOCUMENT ME! + * Creates new JtsPolygon by using polygon. * - * @param polygon DOCUMENT ME! - * @param geometryFactory DOCUMENT ME! + * @param polygon polygon + * @param geometryFactory geometryFactory * - * @return DOCUMENT ME! + * @return polygon + * + * @see #createJtsLinearRing(org.postgis.LinearRing, com.vividsolutions.jts.geom.GeometryFactory) */ private static Polygon createJtsPolygon(final org.postgis.Polygon polygon, final GeometryFactory geometryFactory) { final int ringcount = polygon.numRings(); @@ -128,12 +130,14 @@ private static Polygon createJtsPolygon(final org.postgis.Polygon polygon, final } /** - * DOCUMENT ME! + * Creates new JtsMultiPoint by using MultiPoint. + * + * @param multiPoint MultiPoint + * @param geometryFactory geometryFactory * - * @param multiPoint DOCUMENT ME! - * @param geometryFactory DOCUMENT ME! + * @return MultiPoint * - * @return DOCUMENT ME! + * @see #createJtsPoint(org.postgis.Point, com.vividsolutions.jts.geom.GeometryFactory) */ private static MultiPoint createJtsMultiPoint(final org.postgis.MultiPoint multiPoint, final GeometryFactory geometryFactory) { @@ -151,12 +155,14 @@ private static MultiPoint createJtsMultiPoint(final org.postgis.MultiPoint multi } /** - * DOCUMENT ME! + * Creates new JtsMultiLineString by using MultiLineString. * - * @param multiLineString DOCUMENT ME! - * @param geometryFactory DOCUMENT ME! + * @param multiLineString MultiLineString + * @param geometryFactory geometryFactory * - * @return DOCUMENT ME! + * @return MultiLineString + * + * @see #createJtsLineString(org.postgis.LineString, com.vividsolutions.jts.geom.GeometryFactory) */ private static MultiLineString createJtsMultiLineString(final org.postgis.MultiLineString multiLineString, final GeometryFactory geometryFactory) { @@ -174,12 +180,14 @@ private static MultiLineString createJtsMultiLineString(final org.postgis.MultiL } /** - * DOCUMENT ME! + * Creates new JtsMultiPolygon by using MultiPolygon. + * + * @param multiPolygon MultiPolygon! + * @param geometryFactory geometryFactory * - * @param multiPolygon DOCUMENT ME! - * @param geometryFactory DOCUMENT ME! + * @return MultiPolygon * - * @return DOCUMENT ME! + * @see #createJtsPolygon(org.postgis.Polygon, com.vividsolutions.jts.geom.GeometryFactory) */ private static MultiPolygon createJtsMultiPolygon(final org.postgis.MultiPolygon multiPolygon, final GeometryFactory geometryFactory) { @@ -197,12 +205,12 @@ private static MultiPolygon createJtsMultiPolygon(final org.postgis.MultiPolygon } /** - * DOCUMENT ME! + * Creates new JtsGeometryCollection by using GeometryCollection. * - * @param geometryCollection DOCUMENT ME! - * @param geometryFactory DOCUMENT ME! + * @param geometryCollection GeometryCollection + * @param geometryFactory geometryFactory * - * @return DOCUMENT ME! + * @return GeometryCollection */ private static GeometryCollection createJtsGeometryCollection( final org.postgis.GeometryCollection geometryCollection, @@ -256,11 +264,11 @@ private static GeometryCollection createJtsGeometryCollection( } /** - * DOCUMENT ME! + * Creates new JtsGeometry by using Geometry. * - * @param geom DOCUMENT ME! + * @param geom Geometry * - * @return DOCUMENT ME! + * @return Geometry */ public static Geometry createJtsGeometry(final org.postgis.Geometry geom) { final GeometryFactory geometryFactory = new GeometryFactory(new PrecisionModel(PrecisionModel.FLOATING), diff --git a/src/main/java/de/cismet/cismap/commons/jtsgeometryfactories/package.html b/src/main/java/de/cismet/cismap/commons/jtsgeometryfactories/package.html new file mode 100644 index 0000000..115f494 --- /dev/null +++ b/src/main/java/de/cismet/cismap/commons/jtsgeometryfactories/package.html @@ -0,0 +1,8 @@ + + +de.cismet.cismap.commons.jtsgeometryfactories + + + Includes a Factory for {@link org.postgis.Geometry} Geometries. + + diff --git a/src/main/java/de/cismet/ext/CExtContext.java b/src/main/java/de/cismet/ext/CExtContext.java index b3d61bc..5ff508d 100644 --- a/src/main/java/de/cismet/ext/CExtContext.java +++ b/src/main/java/de/cismet/ext/CExtContext.java @@ -62,14 +62,31 @@ public CExtContext(final String key, final Object value) { //~ Methods ---------------------------------------------------------------- /** - * @see HashMap#put(java.lang.Object, java.lang.Object) + * Appends the specified key with the specified mapping value to the + * propertyBag. If the specified key already has an associated value, this + * value would get removed by the specified value + * + * @param key the key for the given value + * @param value the value for the given key + * + * @return the previous value associated with key, or null if there was no mapping for + * the specified key. + * + * @see Map#put(java.lang.Object, java.lang.Object) */ public Object putProperty(final String key, final Object value) { return propertyBag.put(key, value); } /** - * @see HashMap#get(java.lang.Object) + * Get the associated value for the specified key. + * + * @param key the key, whose mapping is searched + * + * @return the value for the specified key, or null if there was no mapping + * for the specified key. + * + * @see Map#get(java.lang.Object) */ public Object getProperty(final String key) { return propertyBag.get(key); @@ -85,7 +102,13 @@ public Map getPropertyBag() { } /** - * @see HashMap#remove(java.lang.Object) + * Removes the value for the specified key from this map. + * + * @param key the key, whose mapping is removed + * + * @return the value, which is removed + * + * @see Map#remove(java.lang.Object) */ public Object clearProperty(final String key) { return propertyBag.remove(key); diff --git a/src/main/java/de/cismet/ext/package.html b/src/main/java/de/cismet/ext/package.html new file mode 100644 index 0000000..3d68577 --- /dev/null +++ b/src/main/java/de/cismet/ext/package.html @@ -0,0 +1,10 @@ + + +de.cismet.ext + + + Package for {@link de.cismet.ext.CExtManager}. The behavior is similar to those of the global {@link org.openide.util.Lookup}. + But with it includes the {@link de.cismet.ext.CExtContext}, which provides the possiblity to to collect + extensions for specific situations/usages. + + diff --git a/src/main/java/de/cismet/math/delaunytriangulation/DelaunayAp.java b/src/main/java/de/cismet/math/delaunytriangulation/DelaunayAp.java index ee0cd9c..c0d32d9 100644 --- a/src/main/java/de/cismet/math/delaunytriangulation/DelaunayAp.java +++ b/src/main/java/de/cismet/math/delaunytriangulation/DelaunayAp.java @@ -114,7 +114,7 @@ public void run() { /** * Main program (used when run as application instead of applet). * - * @param args DOCUMENT ME! + * @param args arguments */ public static void main(final String[] args) { final DelaunayAp applet = new DelaunayAp(); // Create applet @@ -252,7 +252,7 @@ public void mouseExited(final MouseEvent e) { /** * MouseClick event (not used, but needed for MouseListener). * - * @param e DOCUMENT ME! + * @param e MouseClick Event */ @Override public void mouseClicked(final MouseEvent e) { @@ -261,7 +261,7 @@ public void mouseClicked(final MouseEvent e) { /** * MouseRelease event (not used, but needed for MouseListener). * - * @param e DOCUMENT ME! + * @param e MouseRelease Event */ @Override public void mouseReleased(final MouseEvent e) { diff --git a/src/main/java/de/cismet/math/delaunytriangulation/DelaunayTriangulation.java b/src/main/java/de/cismet/math/delaunytriangulation/DelaunayTriangulation.java index 3ada3e2..39f37b0 100644 --- a/src/main/java/de/cismet/math/delaunytriangulation/DelaunayTriangulation.java +++ b/src/main/java/de/cismet/math/delaunytriangulation/DelaunayTriangulation.java @@ -173,7 +173,7 @@ public Set> delaunayPlace(final Pnt site) { /** * Main program; used for testing. * - * @param args DOCUMENT ME! + * @param args Arguments */ public static void main(final String[] args) { final Simplex tri = new Simplex(new Pnt(-10, 10), new Pnt(10, 10), new Pnt(0, -10)); diff --git a/src/main/java/de/cismet/math/delaunytriangulation/Pnt.java b/src/main/java/de/cismet/math/delaunytriangulation/Pnt.java index c4c6941..d7dab9f 100644 --- a/src/main/java/de/cismet/math/delaunytriangulation/Pnt.java +++ b/src/main/java/de/cismet/math/delaunytriangulation/Pnt.java @@ -120,9 +120,9 @@ public int hashCode() { /* Pnts as vectors */ /** - * DOCUMENT ME! + * Returns the Coordinate for the specified Dimension. * - * @param i DOCUMENT ME! + * @param i given dimension * * @return the specified coordinate of this Pnt */ @@ -131,7 +131,7 @@ public double coord(final int i) { } /** - * DOCUMENT ME! + * Returns the Amount of Dimensions, in which the point is. * * @return this Pnt's dimension. */ @@ -534,7 +534,7 @@ public int vsCircumcircle(final Pnt[] simplex) { * * @return the circumcenter (a Pnt) of simplex * - * @throws IllegalArgumentException DOCUMENT ME! + * @throws IllegalArgumentException Dimension does not match */ public static Pnt circumcenter(final Pnt[] simplex) { final int dim = simplex[0].dimension(); @@ -557,7 +557,7 @@ public static Pnt circumcenter(final Pnt[] simplex) { /** * Main program (used for testing). * - * @param args DOCUMENT ME! + * @param args Arguments */ public static void main(final String[] args) { final Pnt p = new Pnt(1, 2, 3); diff --git a/src/main/java/de/cismet/math/delaunytriangulation/Simplex.java b/src/main/java/de/cismet/math/delaunytriangulation/Simplex.java index 5524b91..2c8820e 100644 --- a/src/main/java/de/cismet/math/delaunytriangulation/Simplex.java +++ b/src/main/java/de/cismet/math/delaunytriangulation/Simplex.java @@ -141,8 +141,8 @@ public List> facets() { * Report the boundary of a Set of Simplices. The boundary is a Set of facets where each facet is a Set of vertices * . * - * @param DOCUMENT ME! - * @param simplexSet DOCUMENT ME! + * @param vertices (generic type V) + * @param simplexSet Set of Simplices * * @return an Iterator for the facets that make up the boundary */ @@ -163,7 +163,7 @@ public static Set> boundary(final Set> simplexSe /* Remaining methods are those required by AbstractSet */ /** - * DOCUMENT ME! + * Returns the Iterator for Simplex's vertices. * * @return Iterator for Simplex's vertices. */ @@ -173,7 +173,7 @@ public Iterator iterator() { } /** - * DOCUMENT ME! + * Returns the size (# of vertices) of this Simplex. * * @return the size (# of vertices) of this Simplex */ @@ -183,7 +183,7 @@ public int size() { } /** - * DOCUMENT ME! + * Returns the hashCode of this Simplex. * * @return the hashCode of this Simplex */ @@ -193,9 +193,10 @@ public int hashCode() { } /** - * We want to allow for different simplices that share the same vertex set. + * Tests, whether the Simplices are equal or not We want to allow for different simplices that share the same vertex + * set. * - * @param o DOCUMENT ME! + * @param o specified Simplix, which is compared to this Simplix * * @return true for equal Simplices */ diff --git a/src/main/java/de/cismet/math/delaunytriangulation/Triangulation.java b/src/main/java/de/cismet/math/delaunytriangulation/Triangulation.java index 907d0a3..9b89aeb 100644 --- a/src/main/java/de/cismet/math/delaunytriangulation/Triangulation.java +++ b/src/main/java/de/cismet/math/delaunytriangulation/Triangulation.java @@ -81,7 +81,7 @@ public int size() { } /** - * True iff the simplex is in this Triangulation. + * True if the simplex is in this Triangulation. * * @param simplex the simplex to check * diff --git a/src/main/java/de/cismet/math/delaunytriangulation/package.html b/src/main/java/de/cismet/math/delaunytriangulation/package.html new file mode 100644 index 0000000..12b1104 --- /dev/null +++ b/src/main/java/de/cismet/math/delaunytriangulation/package.html @@ -0,0 +1,8 @@ + + +de.cismet.math.delaunytriangulation + + + Includes Classes and Applets for Triangulation. + + diff --git a/src/main/java/de/cismet/math/geometry/StaticGeometryFunctions.java b/src/main/java/de/cismet/math/geometry/StaticGeometryFunctions.java index be6d6d0..9620b17 100644 --- a/src/main/java/de/cismet/math/geometry/StaticGeometryFunctions.java +++ b/src/main/java/de/cismet/math/geometry/StaticGeometryFunctions.java @@ -10,7 +10,7 @@ import java.awt.geom.Point2D; /** - * DOCUMENT ME! + * Geometry Functions. * * @author thorsten.hell@cismet.de * @version $Revision$, $Date$ @@ -20,14 +20,14 @@ public class StaticGeometryFunctions { //~ Methods ---------------------------------------------------------------- /** - * Berechnet den Lotpunkt des Triggers auf der Gerade durch lineStart und lineEnd. !!! Momentan kann der Punkt NICHT - * \u00FCber die Strecke hinaus verschoben werden !!! + * Calculates Perpendicular Point of the Trigger on the Line, which goes through lineStart and lineEnd. !Warning: + * Can't move the Point over the Line, yet. * - * @param lineStart Anfangspunkt der Gerade - * @param lineEnd Endpunkt der Gerade - * @param trigger Punkt zu dem der Lotpunkt auf der Geraden berechnet wird + * @param lineStart startPoint of the Line + * @param lineEnd endPoint of the Line + * @param trigger Point to which the Perpendicular Point will get calculated * - * @return Punkt auf der Geraden + * @return Perpendicular Point on the Line */ public static Point2D createPointOnLine(final Point2D lineStart, final Point2D lineEnd, final Point2D trigger) { final double maxX = Math.max(lineStart.getX(), lineEnd.getX()); @@ -71,13 +71,13 @@ public static Point2D createPointOnLine(final Point2D lineStart, final Point2D l } /** - * Berechnet den Abstand eines Punktes von der Geraden durch lineStart und lineEnd. + * Calculates the Distance between a specified Point and a specified Line, which goes through lineStart and lineEnd. * - * @param lineStart Anfangspunkt der Gerade - * @param lineEnd Endpunkt der Gerade - * @param trigger Punkt dessen Abstand zur Geraden berechnet werden soll + * @param lineStart startPoint of the Line + * @param lineEnd endPoint of the Line + * @param trigger Point, whose distance to the Line should get Calculated * - * @return Abstand vom Punkt zur Geraden + * @return Distance between the Point and the Line */ public static double distanceToLine(final Point2D lineStart, final Point2D lineEnd, final Point2D trigger) { final Point2D pointOnLine = createPointOnLine(lineStart, lineEnd, trigger); diff --git a/src/main/java/de/cismet/math/geometry/package.html b/src/main/java/de/cismet/math/geometry/package.html new file mode 100644 index 0000000..6f7a816 --- /dev/null +++ b/src/main/java/de/cismet/math/geometry/package.html @@ -0,0 +1,8 @@ + + +de.cismet.math.geometry + + + Provides various static methods for geometric calculations. + + diff --git a/src/main/java/de/cismet/netutil/Proxy.java b/src/main/java/de/cismet/netutil/Proxy.java index 3ee66ce..49bb0f8 100644 --- a/src/main/java/de/cismet/netutil/Proxy.java +++ b/src/main/java/de/cismet/netutil/Proxy.java @@ -16,7 +16,7 @@ import de.cismet.tools.PasswordEncrypter; /** - * DOCUMENT ME! + * Class that provides Proxy Usage. * * @author spuhl * @author martin.scholl@cismet.de @@ -55,43 +55,45 @@ public final class Proxy { //~ Constructors ----------------------------------------------------------- /** - * Creates a new ProxyConfig object. + * Creates a Default Proxy object. */ public Proxy() { this(null, -1, null, null, null, false); } /** - * Creates a new Proxy object. + * Creates a new Proxy object with specified host and port. * - * @param host DOCUMENT ME! - * @param port DOCUMENT ME! + * @param host proxyURL + * @param port computerName */ public Proxy(final String host, final int port) { this(host, port, null, null, null, true); } /** - * Creates a new ProxyConfig object. + * Creates a new Proxy object with specified host, port, username and + * password. * - * @param host proxyURL DOCUMENT ME! - * @param port DOCUMENT ME! - * @param username DOCUMENT ME! - * @param password DOCUMENT ME! + * @param host proxyURL + * @param port computerName + * @param username username + * @param password password */ public Proxy(final String host, final int port, final String username, final String password) { this(host, port, username, password, null, true); } /** - * Creates a new ProxyConfig object. + * Creates a new Proxy object host, port, username, password and + * domain. Additional it can be specified whether the Proxy is enabled or not * - * @param host proxyURL DOCUMENT ME! - * @param port computerName DOCUMENT ME! - * @param username DOCUMENT ME! - * @param password DOCUMENT ME! - * @param domain DOCUMENT ME! - * @param enabled DOCUMENT ME! + * @param host proxyURL + * @param port computerName + * @param username username + * @param password password + * @param domain domain + * @param enabled enabled or disabled */ public Proxy(final String host, final int port, @@ -110,41 +112,48 @@ public Proxy(final String host, //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Getter for host. * - * @return DOCUMENT ME! + * @return host */ public String getHost() { return host; } /** - * DOCUMENT ME! + * Setter for host. * - * @param host DOCUMENT ME! + * @param host host */ public void setHost(final String host) { this.host = ((host == null) || host.isEmpty()) ? null : host; } /** - * DOCUMENT ME! + * Getter for port. * - * @return DOCUMENT ME! + * @return port */ public int getPort() { return port; } /** - * DOCUMENT ME! + * Setter for port. * - * @param port DOCUMENT ME! + * @param port port */ public void setPort(final int port) { this.port = port; } + /** + * Return the Proxy's Attributes as String. + * + * @return "Proxy: " + host + ":" + port + " | username: " + username +" | + * password: " + ((password == null) ? null : "") + " | + * domain: " + domain + */ @Override public String toString() { return "Proxy: " + host + ":" + port + " | username: " + username + " | password: " // NOI18N @@ -152,86 +161,88 @@ public String toString() { } /** - * DOCUMENT ME! + * Getter for domain. * - * @return DOCUMENT ME! + * @return domain */ public String getDomain() { return domain; } /** - * DOCUMENT ME! + * Setter for domain. * - * @param domain DOCUMENT ME! + * @param domain domain */ public void setDomain(final String domain) { this.domain = ((domain == null) || domain.isEmpty()) ? null : domain; } /** - * DOCUMENT ME! + * Getter for password. * - * @return DOCUMENT ME! + * @return password */ public String getPassword() { return password; } /** - * DOCUMENT ME! + * Setter for password. * - * @param password DOCUMENT ME! + * @param password password */ public void setPassword(final String password) { this.password = ((password == null) || password.isEmpty()) ? null : password; } /** - * DOCUMENT ME! + * Getter for username. * - * @return DOCUMENT ME! + * @return username */ public String getUsername() { return username; } /** - * DOCUMENT ME! + * Setter for username. * - * @param username DOCUMENT ME! + * @param username username */ public void setUsername(final String username) { this.username = ((username == null) || username.isEmpty()) ? null : username; } /** - * DOCUMENT ME! + * Tests whether enabled is true or false. * - * @return DOCUMENT ME! + * @return true, if it is enabled */ public boolean isEnabled() { return enabled; } /** - * DOCUMENT ME! + * Enables or disables. * - * @param enabled DOCUMENT ME! + * @param enabled true or false */ public void setEnabled(final boolean enabled) { this.enabled = enabled; } /** - * DOCUMENT ME! + * Stores this proxy in the user's preferences. + * + * @see #toPreferences(de.cismet.netutil.Proxy) */ public void toPreferences() { toPreferences(this); } /** - * DOCUMENT ME! + * Clears the Proxy Object. */ public static void clear() { final Preferences prefs = Preferences.userNodeForPackage(Proxy.class); @@ -307,9 +318,11 @@ public static void toPreferences(final Proxy proxy) { } /** - * DOCUMENT ME! + * Loads a Proxy instance from System preferences. If there are no host and port proxy information + * null will be returned. If the return value is non-null at least the host and the port is + * initialised. Username, Password and Domain may be null. * - * @return DOCUMENT ME! + * @return the user's proxy settings or null if no settings present */ public static Proxy fromSystem() { if (Boolean.getBoolean(System.getProperty(SYSTEM_PROXY_SET))) { @@ -333,11 +346,10 @@ public static Proxy fromSystem() { } /** - * DOCUMENT ME! + * main program; used for testing. // NOTE: use cli library if there shall be more (complex) options * - * @param args DOCUMENT ME! + * @param args args */ - // NOTE: use cli library if there shall be more (complex) options @SuppressWarnings("CallToThreadDumpStack") public static void main(final String[] args) { try { @@ -374,10 +386,11 @@ public static void main(final String[] args) { } /** - * DOCUMENT ME! + * shows Message. If there is no System.console it writes the meassage on OptionPane.Else it writes the message on + * Console as Error or Output. * - * @param message DOCUMENT ME! - * @param error DOCUMENT ME! + * @param message the message + * @param error true if it is a error message,false if not */ private static void showMessage(final String message, final boolean error) { if (System.console() == null) { @@ -396,7 +409,7 @@ private static void showMessage(final String message, final boolean error) { } /** - * DOCUMENT ME! + * print usage. */ private static void printUsage() { showMessage("Supported parameters are:\n\n" // NOI18N diff --git a/src/main/java/de/cismet/netutil/package.html b/src/main/java/de/cismet/netutil/package.html new file mode 100644 index 0000000..be6c1b8 --- /dev/null +++ b/src/main/java/de/cismet/netutil/package.html @@ -0,0 +1,8 @@ + + +de.cismet.netutil + + + Includes Proxy Class. + + diff --git a/src/main/java/de/cismet/netutil/tunnel/TunnelTargetGroup.java b/src/main/java/de/cismet/netutil/tunnel/TunnelTargetGroup.java index c074dab..741ab56 100644 --- a/src/main/java/de/cismet/netutil/tunnel/TunnelTargetGroup.java +++ b/src/main/java/de/cismet/netutil/tunnel/TunnelTargetGroup.java @@ -14,7 +14,7 @@ import org.codehaus.jackson.map.ObjectMapper; /** - * DOCUMENT ME! + * TunnelTargetGroup Class. * * @author thorsten * @version $Revision$, $Date$ @@ -37,8 +37,8 @@ public TunnelTargetGroup() { /** * Creates a new TunnelTargetGroup object. * - * @param targetGroupkey DOCUMENT ME! - * @param targetExpressions DOCUMENT ME! + * @param targetGroupkey target Group Key + * @param targetExpressions target Expressions */ public TunnelTargetGroup(final String targetGroupkey, final String[] targetExpressions) { this.targetGroupkey = targetGroupkey; @@ -48,47 +48,47 @@ public TunnelTargetGroup(final String targetGroupkey, final String[] targetExpre //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Getter for targetExpressions. * - * @return DOCUMENT ME! + * @return targetExpressions */ public String[] getTargetExpressions() { return targetExpressions; } /** - * DOCUMENT ME! + * Setter for targetExpressions. * - * @param targetExpressions DOCUMENT ME! + * @param targetExpressions targetExpressions */ public void setTargetExpressions(final String[] targetExpressions) { this.targetExpressions = targetExpressions; } /** - * DOCUMENT ME! + * Getter for targetGroupkey. * - * @return DOCUMENT ME! + * @return targetGroupkey */ public String getTargetGroupkey() { return targetGroupkey; } /** - * DOCUMENT ME! + * Setter for targetGroupkey. * - * @param targetGroupkey DOCUMENT ME! + * @param targetGroupkey targetGroupkey */ public void setTargetGroupkey(final String targetGroupkey) { this.targetGroupkey = targetGroupkey; } /** - * DOCUMENT ME! + * Tests whether the String matches or not. * - * @param candidate DOCUMENT ME! + * @param candidate given String * - * @return DOCUMENT ME! + * @return true if it matches */ public boolean matches(final String candidate) { for (final String regex : targetExpressions) { diff --git a/src/main/java/de/cismet/netutil/tunnel/package.html b/src/main/java/de/cismet/netutil/tunnel/package.html new file mode 100644 index 0000000..243cea2 --- /dev/null +++ b/src/main/java/de/cismet/netutil/tunnel/package.html @@ -0,0 +1,8 @@ + + +de.cismet.netutil.tunnel + + + Includes TunnelTargetGroup Class + + diff --git a/src/main/java/de/cismet/remote/AbstractRESTRemoteControlMethod.java b/src/main/java/de/cismet/remote/AbstractRESTRemoteControlMethod.java index 7c684d3..f1d135e 100644 --- a/src/main/java/de/cismet/remote/AbstractRESTRemoteControlMethod.java +++ b/src/main/java/de/cismet/remote/AbstractRESTRemoteControlMethod.java @@ -8,7 +8,7 @@ package de.cismet.remote; /** - * DOCUMENT ME! + * AbstractRestRemoteControlMethod Class. * * @author Benjamin Friedrich (benjamin.friedrich@cismet.de) * @version $Revision$, $Date$ @@ -25,11 +25,11 @@ public abstract class AbstractRESTRemoteControlMethod implements RESTRemoteContr /** * Creates a new AbstractRestRemoteControlMethod object. * - * @param port DOCUMENT ME! - * @param path DOCUMENT ME! + * @param port port + * @param path path * - * @throws NullPointerException DOCUMENT ME! - * @throws IllegalArgumentException DOCUMENT ME! + * @throws NullPointerException "path must not be null" + * @throws IllegalArgumentException "path must not be empty" or "path has to start with '/'" */ public AbstractRESTRemoteControlMethod(final int port, final String path) { if (path == null) { @@ -50,16 +50,31 @@ public AbstractRESTRemoteControlMethod(final int port, final String path) { //~ Methods ---------------------------------------------------------------- + /** + * Getter for Port. + * + * @return port + */ @Override public int getPort() { return this.port; } + /** + * Getter for Path. + * + * @return path + */ @Override public String getPath() { return this.path; } + /** + * return as String. + * + * @return Class + name + " path: " + path + " port: " + port + */ @Override public String toString() { return this.getClass().getName() + " path: " + this.path + " port: " + this.port; diff --git a/src/main/java/de/cismet/remote/RESTRemoteControlMethod.java b/src/main/java/de/cismet/remote/RESTRemoteControlMethod.java index 2dfeef3..8f9e224 100644 --- a/src/main/java/de/cismet/remote/RESTRemoteControlMethod.java +++ b/src/main/java/de/cismet/remote/RESTRemoteControlMethod.java @@ -8,7 +8,7 @@ package de.cismet.remote; /** - * DOCUMENT ME! + * RestRemoteControlMethod Interface. * * @author Benjamin Friedrich (benjamin.friedrich@cismet.de) * @version $Revision$, $Date$ diff --git a/src/main/java/de/cismet/remote/RESTRemoteControlMethodRegistry.java b/src/main/java/de/cismet/remote/RESTRemoteControlMethodRegistry.java index 9cb6e8c..c603e0c 100644 --- a/src/main/java/de/cismet/remote/RESTRemoteControlMethodRegistry.java +++ b/src/main/java/de/cismet/remote/RESTRemoteControlMethodRegistry.java @@ -12,7 +12,7 @@ import java.util.*; /** - * DOCUMENT ME! + * RESTRemoteControlMethodRegistry Class. * * @author bfriedrich * @version $Revision$, $Date$ @@ -37,11 +37,12 @@ private RESTRemoteControlMethodRegistry() { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * caches RemoteMethods to portMapping. * - * @param defaultPort DOCUMENT ME! + * @param defaultPort default port * - * @throws IllegalStateException DOCUMENT ME! + * @throws IllegalStateException "RESTRemoteControlMethods have already been collected. " + "Call + * RESTRemoteControlMethodRegistry.clear() to enable new gathering" */ public static synchronized void gatherRemoteMethods(final int defaultPort) { if (!portMapping.isEmpty()) { @@ -75,11 +76,11 @@ public static synchronized void gatherRemoteMethods(final int defaultPort) { } /** - * DOCUMENT ME! + * Gets the Methods of specified Port. * - * @param port DOCUMENT ME! + * @param port port * - * @return DOCUMENT ME! + * @return method */ public static synchronized List getMethodsForPort(final int port) { final List methods = portMapping.get(port); @@ -87,25 +88,25 @@ public static synchronized List getMethodsForPort(final } /** - * DOCUMENT ME! + * Gettter for Methodports. * - * @return DOCUMENT ME! + * @return Methodports */ public static synchronized Set getMethodPorts() { return new HashSet(portMapping.keySet()); } /** - * DOCUMENT ME! + * Clears the Portmapping. */ public static synchronized void clear() { portMapping.clear(); } /** - * DOCUMENT ME! + * Tests whether the map is empty or not. * - * @return DOCUMENT ME! + * @return Trueif this map contains no key-value mappings */ public static synchronized boolean hasMethodsInformation() { return portMapping.isEmpty(); diff --git a/src/main/java/de/cismet/remote/RESTRemoteControlMethodsApplication.java b/src/main/java/de/cismet/remote/RESTRemoteControlMethodsApplication.java index 602b313..bb72806 100644 --- a/src/main/java/de/cismet/remote/RESTRemoteControlMethodsApplication.java +++ b/src/main/java/de/cismet/remote/RESTRemoteControlMethodsApplication.java @@ -18,7 +18,7 @@ import javax.ws.rs.core.Context; /** - * DOCUMENT ME! + * RESTRemoteControlMethodsApplication. * * @author bfriedrich * @version $Revision$, $Date$ @@ -49,9 +49,9 @@ public RESTRemoteControlMethodsApplication() { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * collects Service Classes. Collects all available classes for this port. * - * @param portAsString DOCUMENT ME! + * @param portAsString portasString */ private void collectServiceClasses(final String portAsString) { if (this.clazzes.isEmpty()) { @@ -64,6 +64,11 @@ private void collectServiceClasses(final String portAsString) { } } + /** + * Getter for Classes. + * + * @return class + */ @Override public synchronized Set> getClasses() { this.collectServiceClasses((String)rc.getProperty(PROP_PORT)); diff --git a/src/main/java/de/cismet/remote/RESTRemoteControlStarter.java b/src/main/java/de/cismet/remote/RESTRemoteControlStarter.java index 3f1ebb5..aaaa532 100644 --- a/src/main/java/de/cismet/remote/RESTRemoteControlStarter.java +++ b/src/main/java/de/cismet/remote/RESTRemoteControlStarter.java @@ -44,7 +44,7 @@ private RESTRemoteControlStarter() { * * @param defaultPort port which is used, if -1 is specified by an implementation * - * @throws Exception DOCUMENT ME! + * @throws Exception throws Exeption if anything went wrong */ public static void initRestRemoteControlMethods(final int defaultPort) throws Exception { RESTRemoteControlMethodRegistry.gatherRemoteMethods(defaultPort); diff --git a/src/main/java/de/cismet/remote/package.html b/src/main/java/de/cismet/remote/package.html new file mode 100644 index 0000000..ea08668 --- /dev/null +++ b/src/main/java/de/cismet/remote/package.html @@ -0,0 +1,8 @@ + + +de.cismet.remote + + + Package for remote control. + + diff --git a/src/main/java/de/cismet/tools/Base64.java b/src/main/java/de/cismet/tools/Base64.java index 38d49c6..335f5b5 100644 --- a/src/main/java/de/cismet/tools/Base64.java +++ b/src/main/java/de/cismet/tools/Base64.java @@ -8,7 +8,7 @@ package de.cismet.tools; /** - * DOCUMENT ME! + * Base64 Converter. * * @author martin.scholl@cismet.de * @version $Revision$, $Date$ @@ -57,7 +57,7 @@ private Base64() { * * @return the base64 encoded input array * - * @throws IllegalArgumentException DOCUMENT ME! + * @throws IllegalArgumentException if the given array has length null */ public static byte[] toBase64(final byte[] byteString, final boolean wipeInput) { if (byteString == null) { diff --git a/src/main/java/de/cismet/tools/BlacklistClassloading.java b/src/main/java/de/cismet/tools/BlacklistClassloading.java index 6af8d18..66c1567 100644 --- a/src/main/java/de/cismet/tools/BlacklistClassloading.java +++ b/src/main/java/de/cismet/tools/BlacklistClassloading.java @@ -13,7 +13,7 @@ import java.util.Map; /** - * DOCUMENT ME! + * Blacklist. * * @author srichter * @version $Revision$, $Date$ @@ -30,7 +30,7 @@ public final class BlacklistClassloading { /** * Creates a new BlacklistClassloading object. * - * @throws AssertionError DOCUMENT ME! + * @throws AssertionError Assertion failed */ private BlacklistClassloading() { throw new AssertionError(); @@ -39,9 +39,11 @@ private BlacklistClassloading() { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Tests whether the class is available or not. It sends messages to the Logger, if he can't find the class + * identity(additional he adds the identity on the blacklist), if he already has the class on the blacklist or if + * the classname was null * - * @param classname canonical classname to load + * @param classname classname to load * * @return the class to load or null if class is not found. */ diff --git a/src/main/java/de/cismet/tools/BrowserLauncher.java b/src/main/java/de/cismet/tools/BrowserLauncher.java index 3c41cc6..4121e5c 100644 --- a/src/main/java/de/cismet/tools/BrowserLauncher.java +++ b/src/main/java/de/cismet/tools/BrowserLauncher.java @@ -69,10 +69,8 @@ public class BrowserLauncher { * but some operating systems require us to switch on the VM. */ private static int jvm; - /** The browser for the system. */ private static Object browser; - /** * Caches whether any classes, methods, and fields that are not part of the JDK and need to be dynamically loaded at * runtime loaded successfully. @@ -80,110 +78,77 @@ public class BrowserLauncher { *

Note that if this is false, openURL() will always return an IOException.

*/ private static boolean loadedWithoutErrors; - /** The com.apple.mrj.MRJFileUtils class. */ private static Class mrjFileUtilsClass; - /** The com.apple.mrj.MRJOSType class. */ private static Class mrjOSTypeClass; - /** The com.apple.MacOS.AEDesc class. */ private static Class aeDescClass; - /** The (int) method of com.apple.MacOS.AETarget. */ private static Constructor aeTargetConstructor; - /** The (int, int, int) method of com.apple.MacOS.AppleEvent. */ private static Constructor appleEventConstructor; - /** The (String) method of com.apple.MacOS.AEDesc. */ private static Constructor aeDescConstructor; - /** The findFolder method of com.apple.mrj.MRJFileUtils. */ private static Method findFolder; - /** The getFileCreator method of com.apple.mrj.MRJFileUtils. */ private static Method getFileCreator; - /** The getFileType method of com.apple.mrj.MRJFileUtils. */ private static Method getFileType; - /** The openURL method of com.apple.mrj.MRJFileUtils. */ private static Method openURL; - /** The makeOSType method of com.apple.MacOS.OSUtils. */ private static Method makeOSType; - /** The putParameter method of com.apple.MacOS.AppleEvent. */ private static Method putParameter; - /** The sendNoReply method of com.apple.MacOS.AppleEvent. */ private static Method sendNoReply; - /** Actually an MRJOSType pointing to the System Folder on a Macintosh. */ private static Object kSystemFolderType; - /** The keyDirectObject AppleEvent parameter type. */ private static Integer keyDirectObject; - /** The kAutoGenerateReturnID AppleEvent code. */ private static Integer kAutoGenerateReturnID; - /** The kAnyTransactionID AppleEvent code. */ private static Integer kAnyTransactionID; - /** The linkage object required for JDirect 3 on Mac OS X. */ private static Object linkage; - /** The framework to reference on Mac OS X. */ private static final String JDirect_MacOSX = "/System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/HIToolbox"; // NOI18N - /** JVM constant for MRJ 2.0. */ private static final int MRJ_2_0 = 0; - /** JVM constant for MRJ 2.1 or later. */ private static final int MRJ_2_1 = 1; - /** JVM constant for Java on Mac OS X 10.0 (MRJ 3.0). */ private static final int MRJ_3_0 = 3; - /** JVM constant for MRJ 3.1. */ private static final int MRJ_3_1 = 4; - /** JVM constant for any Windows NT JVM. */ private static final int WINDOWS_NT = 5; - /** JVM constant for any Windows 9x JVM. */ private static final int WINDOWS_9x = 6; - /** JVM constant for any other platform. */ private static final int OTHER = -1; - /** * The file type of the Finder on a Macintosh. Hardcoding "Finder" would keep non-U.S. English systems from working * properly. */ private static final String FINDER_TYPE = "FNDR"; // NOI18N - /** The creator code of the Finder on a Macintosh, which is needed to send AppleEvents to the application. */ private static final String FINDER_CREATOR = "MACS"; // NOI18N - /** The name for the AppleEvent type corresponding to a GetURL event. */ private static final String GURL_EVENT = "GURL"; // NOI18N - /** The first parameter that needs to be passed into Runtime.exec() to open the default web browser on Windows. */ private static final String FIRST_WINDOWS_PARAMETER = "/c"; // NOI18N - /** The second parameter for Runtime.exec() on Windows. */ private static final String SECOND_WINDOWS_PARAMETER = "start"; // NOI18N - /** * The third parameter for Runtime.exec() on Windows. This is a "title" parameter that the command line expects. * Setting this parameter allows URLs containing spaces to work. */ private static final String THIRD_WINDOWS_PARAMETER = "\"\""; // NOI18N - /** * The shell parameters for Netscape that opens a given URL in an already-open copy of Netscape on many command-line * systems. @@ -191,7 +156,6 @@ public class BrowserLauncher { private static final String NETSCAPE_REMOTE_PARAMETER = "-remote"; // NOI18N private static final String NETSCAPE_OPEN_PARAMETER_START = "'openURL("; // NOI18N private static final String NETSCAPE_OPEN_PARAMETER_END = ")'"; // NOI18N - /** The message from any exception thrown throughout the initialization process. */ private static String errorMessage; @@ -199,45 +163,52 @@ public class BrowserLauncher { * An initialization block that determines the operating system and loads the necessary runtime data. */ static { - loadedWithoutErrors = true; - final String osName = System.getProperty("os.name"); // NOI18N - if (osName.startsWith("Mac OS")) { // NOI18N - final String mrjVersion = System.getProperty("mrj.version"); // NOI18N - final String majorMRJVersion = mrjVersion.substring(0, 3); + if (!Desktop.isDesktopSupported()) { try { - final double version = Double.valueOf(majorMRJVersion).doubleValue(); - if (version == 2) { - jvm = MRJ_2_0; - } else if ((version >= 2.1) && (version < 3)) { - // Assume that all 2.x versions of MRJ work the same. MRJ 2.1 actually - // works via Runtime.exec() and 2.2 supports that but has an openURL() method - // as well that we currently ignore. - jvm = MRJ_2_1; - } else if (version == 3.0) { - jvm = MRJ_3_0; - } else if (version >= 3.1) { - // Assume that all 3.1 and later versions of MRJ work the same. - jvm = MRJ_3_1; + loadedWithoutErrors = true; + final String osName = System.getProperty("os.name"); // NOI18N + if (osName.startsWith("Mac OS")) { // NOI18N + final String mrjVersion = System.getProperty("mrj.version"); // NOI18N + final String majorMRJVersion = mrjVersion.substring(0, 3); + try { + final double version = Double.valueOf(majorMRJVersion).doubleValue(); + if (version == 2) { + jvm = MRJ_2_0; + } else if ((version >= 2.1) && (version < 3)) { + // Assume that all 2.x versions of MRJ work the same. MRJ 2.1 actually + // works via Runtime.exec() and 2.2 supports that but has an openURL() method + // as well that we currently ignore. + jvm = MRJ_2_1; + } else if (version == 3.0) { + jvm = MRJ_3_0; + } else if (version >= 3.1) { + // Assume that all 3.1 and later versions of MRJ work the same. + jvm = MRJ_3_1; + } else { + loadedWithoutErrors = false; + errorMessage = "Unsupported MRJ version: " + version; // NOI18N + } + } catch (NumberFormatException nfe) { + loadedWithoutErrors = false; + errorMessage = "Invalid MRJ version: " + mrjVersion; // NOI18N + } + } else if (osName.startsWith("Windows")) { // NOI18N + if (osName.indexOf("9") != -1) { // NOI18N + jvm = WINDOWS_9x; + } else { + jvm = WINDOWS_NT; + } } else { - loadedWithoutErrors = false; - errorMessage = "Unsupported MRJ version: " + version; // NOI18N + jvm = OTHER; } - } catch (NumberFormatException nfe) { - loadedWithoutErrors = false; - errorMessage = "Invalid MRJ version: " + mrjVersion; // NOI18N - } - } else if (osName.startsWith("Windows")) { // NOI18N - if (osName.indexOf("9") != -1) { // NOI18N - jvm = WINDOWS_9x; - } else { - jvm = WINDOWS_NT; - } - } else { - jvm = OTHER; - } - if (loadedWithoutErrors) { // if we haven't hit any errors yet - loadedWithoutErrors = loadClasses(); + if (loadedWithoutErrors) { // if we haven't hit any errors yet + loadedWithoutErrors = loadClasses(); + } + } catch (Throwable t) { + log.warn("Problem with BrowserLauncher", t); + throw new RuntimeException(t); + } } } @@ -489,9 +460,10 @@ private static Object locateBrowser() { } /** - * DOCUMENT ME! + * Attempts to open the default web browser to the given URL. In the second attempt he tries to open the url as a + * file. * - * @param url DOCUMENT ME! + * @param url url */ public static void openURLorFile(final String url) { if (url == null) { @@ -513,28 +485,33 @@ public static void openURLorFile(final String url) { } /** - * Attempts to open the default web browser to the given URL. + * Attempts to open the given URL with the default web browser. * * @param url The URL to open * - * @throws Exception DOCUMENT ME! - * @throws IOException If the web browser could not be located or does not run + * @throws Exception throws Exeption if anything went wrong + * @throws IOException + *
    + *
  • If the web browser could not be located or does not run
  • + *
  • If it catches a InvocationTargetException
  • + *
  • If it catches a IllegalAccessExeption
  • + *
  • if it catches a InstantiationException
  • + *
*/ - public static void openURL(final String url) throws Exception { if (log.isDebugEnabled()) { - log.debug("BrowserLauncher.openUrl:" + url); // NOI18N + log.debug("BrowserLauncher.openUrl:" + url); // NOI18N } - if (StaticDebuggingTools.checkHomeForFile("cismetUseDesktopFeatureFromJDK6") && Desktop.isDesktopSupported()) { // NOI18N + if (Desktop.isDesktopSupported()) { // NOI18N final Desktop desktop = Desktop.getDesktop(); desktop.browse(new URI(url)); } else { if (!loadedWithoutErrors) { - throw new IOException("Exception in finding browser: " + errorMessage); // NOI18N + throw new IOException("Exception in finding browser: " + errorMessage); // NOI18N } Object browser = locateBrowser(); if (browser == null) { - throw new IOException("Unable to locate browser: " + errorMessage); // NOI18N + throw new IOException("Unable to locate browser: " + errorMessage); // NOI18N } switch (jvm) { @@ -654,32 +631,37 @@ public static void openURL(final String url) throws Exception { /** * Methods required for Mac OS X. The presence of native methods does not cause any problems on other platforms. + * //Placeholder * - * @param instance DOCUMENT ME! - * @param signature DOCUMENT ME! + * @param instance instance + * @param signature signature * - * @return DOCUMENT ME! + * @return int */ private static native int ICStart(int[] instance, int signature); + /** - * DOCUMENT ME! + * Methods required for Mac OS X. The presence of native methods does not cause any problems on other platforms. + * //Placeholder * - * @param instance DOCUMENT ME! + * @param instance instance * - * @return DOCUMENT ME! + * @return int */ private static native int ICStop(int[] instance); + /** - * DOCUMENT ME! + * Methods required for Mac OS X. The presence of native methods does not cause any problems on other platforms. + * //Placeholder * - * @param instance DOCUMENT ME! - * @param hint DOCUMENT ME! - * @param data DOCUMENT ME! - * @param len DOCUMENT ME! - * @param selectionStart DOCUMENT ME! - * @param selectionEnd DOCUMENT ME! + * @param instance intance + * @param hint hint + * @param data data + * @param len len + * @param selectionStart selectionStart + * @param selectionEnd selectiomEnd * - * @return DOCUMENT ME! + * @return int */ private static native int ICLaunchURL(int instance, byte[] hint, diff --git a/src/main/java/de/cismet/tools/CalculationCache.java b/src/main/java/de/cismet/tools/CalculationCache.java index ac676ff..9bf69a6 100644 --- a/src/main/java/de/cismet/tools/CalculationCache.java +++ b/src/main/java/de/cismet/tools/CalculationCache.java @@ -49,11 +49,11 @@ public CalculationCache(final Calculator calc) { /** * Calculates the value for the given key, if required and caches it. * - * @param key link query DOCUMENT ME! + * @param key link query * - * @return DOCUMENT ME! + * @return value * - * @throws Exception DOCUMENT ME! + * @throws Exception if any Exception is in {@link #exceptionCache} */ public VALUE calcValue(final KEY key) throws Exception { VALUE result = cache.get(key); @@ -118,16 +118,16 @@ public void run() { } /** - * DOCUMENT ME! + * Gets the time in milliseconds, the result should be cached. * - * @return the time in milliseconds, the result should be cached + * @return the time in milliseconds */ public long getTimeToCacheResults() { return timeToCacheResults; } /** - * set the time in milliseconds, the result should be cached. + * Sets the time in milliseconds, the result should be cached. * * @param timeToCacheResults the timeToCacheResults to set */ @@ -136,17 +136,16 @@ public void setTimeToCacheResults(final long timeToCacheResults) { } /** - * DOCUMENT ME! + * Gets the time in milliseconds, exceptions, which were thrown during the calculation of a value, should be cached. * - * @return the time in milliseconds, exceptions, which were thrown during the calculation of a value, should be - * cached + * @return the time in milliseconds */ public long getTimeToCacheExceptions() { return timeToCacheExceptions; } /** - * set the time in milliseconds, exceptions, which were thrown during the calculation of a value, should be cached. + * Sets the time in milliseconds, exceptions, which were thrown during the calculation of a value, should be cached. * * @param timeToCacheExceptions the timeToCacheException to set */ diff --git a/src/main/java/de/cismet/tools/Calculator.java b/src/main/java/de/cismet/tools/Calculator.java index fcd2d7e..91da595 100644 --- a/src/main/java/de/cismet/tools/Calculator.java +++ b/src/main/java/de/cismet/tools/Calculator.java @@ -8,7 +8,7 @@ package de.cismet.tools; /** - * DOCUMENT ME! + * Interface Calculator. * * @author therter * @version $Revision$, $Date$ @@ -18,13 +18,13 @@ public interface Calculator { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Interface Calculator Calculates with the given INPUT and returns an OUTPUT. * - * @param input DOCUMENT ME! + * @param input given INPUT * - * @return DOCUMENT ME! + * @return calculated OUTPUT * - * @throws Exception DOCUMENT ME! + * @throws Exception throws Exeption if anything went wrong */ OUTPUT calculate(INPUT input) throws Exception; } diff --git a/src/main/java/de/cismet/tools/CismetThreadPool.java b/src/main/java/de/cismet/tools/CismetThreadPool.java index ae908a9..af817d2 100644 --- a/src/main/java/de/cismet/tools/CismetThreadPool.java +++ b/src/main/java/de/cismet/tools/CismetThreadPool.java @@ -36,7 +36,7 @@ public final class CismetThreadPool { * Executes the given runnable in the applications common cached threadpool. Notice: It is smarter to pass plain * Runnables instead of Threads as arguments, as one purpose of this pool is minimizing thread creation overhead. * - * @param command DOCUMENT ME! + * @param command given runnable */ public static void execute(final Runnable command) { WORKER_POOL.execute(command); @@ -46,27 +46,28 @@ public static void execute(final Runnable command) { * Executes the given runnable in the applications threadpool. All threads, which will be started with this method * will be run sequentially. * - * @param command DOCUMENT ME! + * @param command given runnable */ public static void executeSequentially(final Runnable command) { SINGLE_WORKER_POOL.execute(command); } /** - * DOCUMENT ME! + * Submits the given runnable in the applications common cached threadpool. * - * @param command DOCUMENT ME! + * @param command given runnable * - * @return DOCUMENT ME! + * @return a Future representing pending completion of the runnable */ public static Future submit(final Runnable command) { return WORKER_POOL.submit(command); } /** - * DOCUMENT ME! + * Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the + * tasks that were awaiting execution. * - * @return DOCUMENT ME! + * @return list */ public static List shutdownNow() { final List list = SINGLE_WORKER_POOL.shutdownNow(); @@ -75,7 +76,8 @@ public static List shutdownNow() { } /** - * DOCUMENT ME! + * Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be + * accepted. */ public static void shutdown() { SINGLE_WORKER_POOL.shutdown(); diff --git a/src/main/java/de/cismet/tools/ConnectionInfo.java b/src/main/java/de/cismet/tools/ConnectionInfo.java index 562e748..1afa3f1 100644 --- a/src/main/java/de/cismet/tools/ConnectionInfo.java +++ b/src/main/java/de/cismet/tools/ConnectionInfo.java @@ -15,7 +15,7 @@ import org.jdom.Element; /** - * Bean Klasse zum speichern von Connection Infos. + * Bean Class to save Connection Infos. * * @author hell * @version $Revision$, $Date$ @@ -40,7 +40,7 @@ public ConnectionInfo() { /** * Creates a new ConnectionInfo object. * - * @param element DOCUMENT ME! + * @param element Elemtent */ public ConnectionInfo(final Element element) { // throws NullPointerException{ driver = element.getChild("driverClass").getTextTrim(); // NOI18N @@ -52,7 +52,7 @@ public ConnectionInfo(final Element element) { // throws NullPointe //~ Methods ---------------------------------------------------------------- /** - * Gibt die Driver Klasse zur\u00FCck. + * Returns the DriverClass. * * @return DriverClass */ @@ -61,7 +61,7 @@ public String getDriver() { } /** - * Setzt die Treiber Klasse. + * Sets the DriverClass. * * @param driver Driver Class */ @@ -70,7 +70,7 @@ public void setDriver(final String driver) { } /** - * Liefert die DB Url. + * Returns the DB Url. * * @return DB Url */ @@ -79,7 +79,7 @@ public String getUrl() { } /** - * Setzt die DB Url. + * Sets the DB Url. * * @param url DB Url */ @@ -88,16 +88,16 @@ public void setUrl(final String url) { } /** - * Liefert den User. + * Getter for User. * - * @return DB USer + * @return DB User */ public String getUser() { return user; } /** - * Setzt den User. + * Setter for User. * * @param user DB User */ @@ -106,9 +106,9 @@ public void setUser(final String user) { } /** - * Liefert Passwort. + * Returns Password. * - * @return Pass + * @return Password */ public String getPass() { if ((pass != null) && pass.startsWith(PasswordEncrypter.CRYPT_PREFIX)) { @@ -119,7 +119,7 @@ public String getPass() { } /** - * Setzt Passwort. + * Sets Password. * * @param pass Password */ @@ -128,9 +128,9 @@ public void setPass(final String pass) { } /** - * DOCUMENT ME! + * Getter for Element. * - * @return DOCUMENT ME! + * @return Element */ public Element getElement() { final Element e = new Element("dbConnectionInfo"); // NOI18N diff --git a/src/main/java/de/cismet/tools/Converter.java b/src/main/java/de/cismet/tools/Converter.java index 0c16ae1..35ef734 100644 --- a/src/main/java/de/cismet/tools/Converter.java +++ b/src/main/java/de/cismet/tools/Converter.java @@ -125,7 +125,7 @@ public static T deserialiseFromBase64(final byte[] bytes, final Class typ * * @return the base64 encoded bytes * - * @see Base64#encodeBase64(byte[]) + * @see org.apache.commons.codec.binary.Base64#encodeBase64(byte[]) */ public static byte[] toBase64(final byte[] bytes) { return Base64.encodeBase64(bytes); @@ -138,7 +138,7 @@ public static byte[] toBase64(final byte[] bytes) { * * @return the system encoded bytes or null if the given byte[] is null * - * @see Base64#decodeBase64(byte[]) + * @see org.apache.commons.codec.binary.Base64#decodeBase64(byte[]) */ public static byte[] fromBase64(final byte[] bytes) { if (bytes == null) { diff --git a/src/main/java/de/cismet/tools/CurrentStackTrace.java b/src/main/java/de/cismet/tools/CurrentStackTrace.java index 635649b..b4af662 100644 --- a/src/main/java/de/cismet/tools/CurrentStackTrace.java +++ b/src/main/java/de/cismet/tools/CurrentStackTrace.java @@ -12,7 +12,7 @@ package de.cismet.tools; /** - * DOCUMENT ME! + * Class for the Stack Trace of the currently executing thread. * * @author thorsten * @version $Revision$, $Date$ @@ -21,6 +21,11 @@ public class CurrentStackTrace extends Throwable { //~ Methods ---------------------------------------------------------------- + /** + * Returns an array of stack trace elements representing the stack dump of currently executing thread. + * + * @return array of stack trace elements + */ @Override public StackTraceElement[] getStackTrace() { return Thread.currentThread().getStackTrace(); diff --git a/src/main/java/de/cismet/tools/DebugSwitches.java b/src/main/java/de/cismet/tools/DebugSwitches.java index 6d8639a..fd0fc65 100644 --- a/src/main/java/de/cismet/tools/DebugSwitches.java +++ b/src/main/java/de/cismet/tools/DebugSwitches.java @@ -12,7 +12,7 @@ package de.cismet.tools; /** - * DOCUMENT ME! + * debug Switches. * * @author thorsten * @version $Revision$, $Date$ @@ -38,9 +38,9 @@ private DebugSwitches() { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Getter for Instance. * - * @return DOCUMENT ME! + * @return {@link #instance} */ public static DebugSwitches getInstance() { if (instance == null) { diff --git a/src/main/java/de/cismet/tools/Equals.java b/src/main/java/de/cismet/tools/Equals.java index 0aac037..dd55d6f 100644 --- a/src/main/java/de/cismet/tools/Equals.java +++ b/src/main/java/de/cismet/tools/Equals.java @@ -32,10 +32,10 @@ private Equals() { * Compares the bean properties of given objects. This operation is equivalent to calling * {@link #beanDeepEqual(java.lang.Object, java.lang.Object, java.lang.String[])} with a null String[]. * - * @param o DOCUMENT ME! - * @param o2 DOCUMENT ME! + * @param o object one + * @param o2 object two * - * @return DOCUMENT ME! + * @return true, if object one and object two deliver the same result for every bean getter * * @see #beanDeepEqual(java.lang.Object, java.lang.Object, java.lang.String[]) */ @@ -88,8 +88,8 @@ public static boolean beanDeepEqual(final Object o, final Object o2, final Strin /** * Tests if the given array contains the given name. * - * @param name DOCUMENT ME! - * @param array DOCUMENT ME! + * @param name searched name + * @param array given array * * @return true, if the array contains the name, false otherwise, also false if the array is null */ @@ -117,10 +117,9 @@ private static boolean contains(final String name, final String... array) { *
  • is not static
  • *
  • name starts with 'get' (or 'is' for boolean getters)
  • *
  • there exists a field with a corresponding name
  • - *
  • * * - * @param m DOCUMENT ME! + * @param m given method * * @return true if all the requirements listed above are met, false otherwise */ diff --git a/src/main/java/de/cismet/tools/FileUtils.java b/src/main/java/de/cismet/tools/FileUtils.java index dc0f7f7..2466d94 100644 --- a/src/main/java/de/cismet/tools/FileUtils.java +++ b/src/main/java/de/cismet/tools/FileUtils.java @@ -21,7 +21,7 @@ import java.util.jar.JarFile; /** - * DOCUMENT ME! + * FileUtils Class. * * @author mscholl * @version 1.3 @@ -30,12 +30,13 @@ public final class FileUtils { //~ Static fields/initializers --------------------------------------------- + /** integer for Mac_Meta. */ public static final int MAC_META = 1; - + /** integer for Unix_Meta. */ public static final int UNIX_META = 2; - + /** integer for Windows_Meta. */ public static final int WINDOWS_META = 3; - + /** integer for ALL_Meta. */ public static final int ALL_META = 4; private static final String[] MAC_META_ENTRIES = { ".DS_Store" }; // NOI18N @@ -53,34 +54,36 @@ private FileUtils() { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Tests whether the specified File is a MetaFiles or not. + * + * @param check File to be tested * - * @param check DOCUMENT ME! + * @return true if the tested File is a MetaFile * - * @return DOCUMENT ME! + * @see #isMetaFile(java.io.File, int) */ public static boolean isMetaFile(final File check) { return isMetaFile(check, getMode()); } /** - * DOCUMENT ME! + * Tests whether the specified File is a MetaFile of the tested OS or not. * - * @param check DOCUMENT ME! - * @param mode DOCUMENT ME! + * @param check File to be tested + * @param mode Number of OS to be tested * - * @return DOCUMENT ME! + * @return true if the tested File is a MetaFile of the tested OS */ public static boolean isMetaFile(final File check, final int mode) { return checkMeta(check.getName(), getMetaEntries(mode)); } /** - * DOCUMENT ME! + * Getter for MetaEntries of the specified Meta. * - * @param mode DOCUMENT ME! + * @param mode Metanumber * - * @return DOCUMENT ME! + * @return the MetaEntries;By default returns All_Meta_Entries */ private static String[] getMetaEntries(final int mode) { switch (mode) { @@ -116,12 +119,12 @@ private static String[] getMetaEntries(final int mode) { } /** - * DOCUMENT ME! + * Tests whether the specified File has the specified Metaentries or not. * - * @param filename DOCUMENT ME! - * @param meta DOCUMENT ME! + * @param filename name of the tested File + * @param meta Metaentries to be tested * - * @return DOCUMENT ME! + * @return true if the File has the tested Metaentries;false if it's not */ private static boolean checkMeta(final String filename, final String[] meta) { for (final String s : meta) { @@ -133,9 +136,9 @@ private static boolean checkMeta(final String filename, final String[] meta) { } /** - * DOCUMENT ME! + * Tests which OS the System is running. * - * @return DOCUMENT ME! + * @return Meta */ private static int getMode() { final String os = System.getProperty("os.name"); // NOI18N @@ -151,11 +154,11 @@ private static int getMode() { } /** - * DOCUMENT ME! + * Getter for the name of the specified File. * - * @param file DOCUMENT ME! + * @param file given File * - * @return DOCUMENT ME! + * @return FileName */ public static String getName(final File file) { final String nameExt = file.getName(); @@ -168,11 +171,11 @@ public static String getName(final File file) { } /** - * DOCUMENT ME! + * Getter for the Filestype of the specified File. * - * @param file DOCUMENT ME! + * @param file given file * - * @return DOCUMENT ME! + * @return Filetype as String */ public static String getExt(final File file) { final String nameExt = file.getName(); @@ -185,25 +188,31 @@ public static String getExt(final File file) { } /** - * DOCUMENT ME! + * Tests whether the specified File only contains MetaFiles of one type or not. * - * @param check DOCUMENT ME! + * @param check File to be tested * - * @return DOCUMENT ME! + * @return true, if it only contains MetaFiles + * + * @see #containsOnlyMetaFiles(java.io.File, int) */ public static boolean containsOnlyMetaFiles(final File check) { return containsOnlyMetaFiles(check, getMode()); } /** - * DOCUMENT ME! + * Tests whether the specified Directory only contains MetaFiles of the specified + * OS. + * + * @param check Directory, which is going to get tested. + * @param mode Os * - * @param check DOCUMENT ME! - * @param mode DOCUMENT ME! + * @return true, if it only contains MetaFiles of the tested Os * - * @return DOCUMENT ME! + * @throws IllegalArgumentException throws IllegalArgumentException if the File isn't a + * Directory * - * @throws IllegalArgumentException DOCUMENT ME! + * @see #isMetaFile(java.io.File, int) */ public static boolean containsOnlyMetaFiles(final File check, final int mode) { if (!check.isDirectory()) { @@ -219,14 +228,14 @@ public static boolean containsOnlyMetaFiles(final File check, final int mode) { return true; } /** - * exception thrown and not handled to avoid logger call if it is necessary to use logger in this class return - * boolean and handle exceptions. + * Copies the specified File Note: exception thrown and not handled to avoid logger call if it is + * necessary to use logger in this class return boolean and handle exceptions. * - * @param inFile DOCUMENT ME! - * @param outFile DOCUMENT ME! + * @param inFile input File + * @param outFile target File * - * @throws FileNotFoundException DOCUMENT ME! - * @throws IOException DOCUMENT ME! + * @throws FileNotFoundException FileNotFoundException + * @throws IOException IOException */ public static void copyFile(final File inFile, final File outFile) throws FileNotFoundException, IOException { FileInputStream fis = null; @@ -250,15 +259,22 @@ public static void copyFile(final File inFile, final File outFile) throws FileNo } /** - * DOCUMENT ME! - * - * @param srcDir DOCUMENT ME! - * @param destDir DOCUMENT ME! - * @param filter DOCUMENT ME! - * @param recursive DOCUMENT ME! - * - * @throws FileNotFoundException DOCUMENT ME! - * @throws IOException DOCUMENT ME! + * Copies the Content of the specified Directory. It uses {@link FilesFilter}. If it is a + * File, it copies the File and if it is a Directory, the method start recursive again with the + * found Directory + * + * @param srcDir Source Directory + * @param destDir Target Directory + * @param filter Filter + * @param recursive recursive + * + * @throws FileNotFoundException throws FileNotFoundException if: + * + *
      + *
    • the Source File is not a Directory
    • + *
    • the Target File is not a Directory
    • + *
    + * @throws IOException IOException */ public static void copyContent( final File srcDir, @@ -291,12 +307,18 @@ public static void copyContent( } /** - * DOCUMENT ME! + * Deletes the Content of the specified Directory. + * + * @param srcDir Directory + * @param recursive recursive * - * @param srcDir DOCUMENT ME! - * @param recursive DOCUMENT ME! + * @throws IOException IOException * - * @throws IOException DOCUMENT ME! + *
      + *
    • source dir is not a directory
    • + *
    • a File couldn't be deleted
    • + *
    • a Folder couldn't be deleted
    • + *
    */ public static void deleteContent(final File srcDir, final boolean recursive) throws IOException { if (!srcDir.isDirectory()) { @@ -325,11 +347,16 @@ public static void deleteContent(final File srcDir, final boolean recursive) thr } /** - * DOCUMENT ME! + * Deletes the Given Folder. * - * @param srcDir DOCUMENT ME! + * @param srcDir given Directory * - * @throws IOException DOCUMENT ME! + * @throws IOException IOException + * + *
      + *
    • Source Directory is not a Directory
    • + *
    • Could not delete File
    • + *
    */ public static void deleteDir(final File srcDir) throws IOException { if (!srcDir.isDirectory()) { @@ -346,13 +373,22 @@ public static void deleteDir(final File srcDir) throws IOException { } /** - * DOCUMENT ME! - * - * @param jar DOCUMENT ME! - * @param dest DOCUMENT ME! - * @param filter DOCUMENT ME! - * - * @throws IOException DOCUMENT ME! + * Extracts given Jar File to given Folder. + * + * @param jar Jar File + * @param dest Directory + * @param filter filter + * + * @throws IOException IOException + * + *
      + *
    • dest dir does not exist
    • + *
    • jar file does not exist
    • + *
    • dest dir is not a directory
    • + *
    • cannot write to dest directory
    • + *
    • cannot read jar file
    • + *
    • culd not create dir
    • + *
    */ public static void extractJar(final File jar, final File dest, final FileFilter filter) throws IOException { if (!dest.exists()) { @@ -410,7 +446,7 @@ public static void extractJar(final File jar, final File dest, final FileFilter //~ Inner Classes ---------------------------------------------------------- /** - * DOCUMENT ME! + * Filter for searching for .jar Files. * * @version $Revision$, $Date$ */ @@ -418,6 +454,13 @@ public static final class JarFilter implements FileFilter { //~ Methods ------------------------------------------------------------ + /** + * Tests whether the given File is .jar File or not. + * + * @param file given File + * + * @return true, if the File is a .jar File + */ @Override public boolean accept(final File file) { return getExt(file).equalsIgnoreCase("jar"); // NOI18N @@ -425,7 +468,7 @@ public boolean accept(final File file) { } /** - * DOCUMENT ME! + * Filter for searching for .jar Files and Directories. * * @version $Revision$, $Date$ */ @@ -433,6 +476,13 @@ public static final class DirAndJarFilter implements FileFilter { //~ Methods ------------------------------------------------------------ + /** + * Tests whether the File is a Directory or a .jar File. + * + * @param file given File + * + * @return true, if the File is a .jar File or a Directory + */ @Override public boolean accept(final File file) { return file.isDirectory() || getExt(file).equalsIgnoreCase("jar"); // NOI18N @@ -440,7 +490,7 @@ public boolean accept(final File file) { } /** - * DOCUMENT ME! + * Filter for searching for Directories. * * @version $Revision$, $Date$ */ @@ -448,6 +498,14 @@ public static final class DirectoryFilter implements FileFilter { //~ Methods ------------------------------------------------------------ + /** + * Tests whether the File is Directory or not. + * + * @param file given File + * + * @return true, if the File is a Directory + */ + @Override public boolean accept(final File file) { return file.isDirectory(); @@ -455,7 +513,7 @@ public boolean accept(final File file) { } /** - * DOCUMENT ME! + * Filter for searching for Files. * * @version $Revision$, $Date$ */ @@ -463,6 +521,15 @@ public static final class FilesFilter implements FileFilter { //~ Methods ------------------------------------------------------------ + /** + * Tests whether the File is Directory or not. + * + * @param file given File + * + * @return true, if the File is Not! a Directory, false if it is a + * Directory + */ + @Override public boolean accept(final File file) { return !file.isDirectory(); @@ -470,7 +537,7 @@ public boolean accept(final File file) { } /** - * DOCUMENT ME! + * Filter for searching for MetaFiles. * * @version $Revision$, $Date$ */ @@ -478,6 +545,13 @@ public static final class MetaInfFilter implements FileFilter { //~ Methods ------------------------------------------------------------ + /** + * Tests whether the File is Meta File or not. + * + * @param file given File + * + * @return true, if the File is a Meta File + */ @Override public boolean accept(final File file) { return !file.getAbsolutePath().contains(File.separator + "META-INF"); // NOI18N diff --git a/src/main/java/de/cismet/tools/JnlpTools.java b/src/main/java/de/cismet/tools/JnlpTools.java index 1d7f1d5..012a1d7 100644 --- a/src/main/java/de/cismet/tools/JnlpTools.java +++ b/src/main/java/de/cismet/tools/JnlpTools.java @@ -10,7 +10,7 @@ import java.util.Locale; /** - * DOCUMENT ME! + * JnlpTools Class. * * @author martin.scholl@cismet.de * @version $Revision$, $Date$ diff --git a/src/main/java/de/cismet/tools/LinkedProperties.java b/src/main/java/de/cismet/tools/LinkedProperties.java index 715edd9..e786a2c 100644 --- a/src/main/java/de/cismet/tools/LinkedProperties.java +++ b/src/main/java/de/cismet/tools/LinkedProperties.java @@ -13,6 +13,7 @@ import java.util.Collection; import java.util.Enumeration; +import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; @@ -20,7 +21,7 @@ import java.util.Set; /** - * DOCUMENT ME! + * Creates {@link LinkedHashMap} for Properties. * * @author thorsten * @version $Revision$, $Date$ @@ -33,96 +34,255 @@ public class LinkedProperties extends Properties { //~ Methods ---------------------------------------------------------------- + /** + * Associates a given value with a given key. Removes the previous associated + * value, if there is any. + * + * @param key The key for the given value + * @param value The value for the given key + * + * @return The previous value associated with key, or null if there was no + * mapping for key. (A null return can also indicate that the map previously + * associated null with key.) + * + * @see HashMap#put(java.lang.Object, java.lang.Object) + */ + @Override public synchronized Object put(final Object key, final Object value) { return map.put(key, value); } + /** + * Returns the value for the given key. + * + * @param key The key, whose value is searched + * + * @return the associated value. Returns null, if the is no mapping for this key. + * + * @see HashMap#get(java.lang.Object) + */ @Override public synchronized Object get(final Object key) { return map.get(key); } + /** + * Clears the map. (Removes every mapping for this map) + * + * @see HashMap#clear() + */ + @Override public synchronized void clear() { map.clear(); } + /** + * Not Supported. + * + * @return error + * + * @throws UnsupportedOperationException not supported + */ @Override public synchronized Object clone() { throw new UnsupportedOperationException(); } + /** + * Tests whether there is any key associated with this value or not. + * + * @param value searched value + * + * @return True, if there is a key with this value + * + * @see HashMap#containsValue(java.lang.Object) + */ @Override public boolean containsValue(final Object value) { return map.containsValue(value); } + /** + * Tests whether there is any key associated with this value or not. + * + * @param value searched value + * + * @return True, if there is a key with this value + * + * @see HashMap#containsValue(java.lang.Object) + */ + @Override public synchronized boolean contains(final Object value) { return containsValue(value); } + /** + * Tests whether the specified key is in the map or not. + * + * @param key searched key + * + * @return True, if there is this key + * + * @see HashMap#containsKey(java.lang.Object) + */ + @Override public synchronized boolean containsKey(final Object key) { return map.containsKey(key); } + /** + * Returns all values as Enumeration. Uses an Iterator over all elements. + * + * @return every value in this map as Enumeration + * + * @see IteratorEnumeration + */ @Override public synchronized Enumeration elements() { return new IteratorEnumeration(map.values().iterator()); } + /** + * Returns a Set view of the mappings contained in this map. + * + * @return Set + * + * @see HashMap#entrySet() + */ @Override public Set entrySet() { return map.entrySet(); } + /** + * Not Supported. + * + * @param o Object + * + * @return error + * + * @throws UnsupportedOperationException not supported + */ + @Override public synchronized boolean equals(final Object o) { throw new UnsupportedOperationException(); } + /** + * Tests whether there is any mapping on the map or not. + * + * @return true, if there is no mapping + * + * @see HashMap#isEmpty() + */ @Override public synchronized boolean isEmpty() { return map.isEmpty(); } + /** + * Returns all keys as Enumeration. Uses an Iterator over all elements. + * + * @return every key in this map as Enumeration. + * + * @see IteratorEnumeration + */ @Override public synchronized Enumeration keys() { return new IteratorEnumeration(map.keySet().iterator()); } + /** + * Returns a Set view of the keys contained in this map. + * + * @return Set + * + * @see HashMap#keySet() + */ @Override public Set keySet() { return map.keySet(); } + /** + * not supported. + * + * @return error + * + * @throws UnsupportedOperationException not supported + */ @Override public Enumeration propertyNames() { throw new UnsupportedOperationException(); } + /** + * Copies all of the mappings from the specified map to this map. These + * mappings will replace any mappings, that this map had for any of the + * keys currently in the specified map + * + * @param t map + * + * @see HashMap#putAll(java.util.Map) + */ @Override public synchronized void putAll(final Map t) { map.putAll(t); } + /** + * Removes specified key. + * + * @param key key + * + * @return the previous value associated with key, or null if there was no + * mapping for key. + * + * @see HashMap#remove(java.lang.Object) + */ @Override public synchronized Object remove(final Object key) { return map.remove(key); } + /** + * Returns the amount of mappings in this map. + * + * @return the amount of mappings in this map + * + * @see HashMap#size() + */ @Override public synchronized int size() { return map.size(); } + /** + * not supported. + * + * @return error + * + * @throws UnsupportedOperationException not supported! + */ @Override public Collection values() { throw new UnsupportedOperationException(); } + /** + * Searches for the property with the specified key in this property list. If the key is not found in this property + * list, the default property list, and its defaults, recursively, are then checked. The method returns + * null if the property is not found. + * + * @param key the property key + * + * @return the value in this property list with the specified key value. + */ @Override public String getProperty(final String key) { final Object oval = get(key); @@ -132,7 +292,7 @@ public String getProperty(final String key) { } /** - * DOCUMENT ME! + * IteratorEnumeration. * * @version $Revision$, $Date$ */ @@ -147,9 +307,9 @@ class IteratorEnumeration implements Enumeration { /** * Creates a new IteratorEnumeration object. * - * @param i DOCUMENT ME! + * @param i Iterator * - * @throws IllegalArgumentException DOCUMENT ME! + * @throws IllegalArgumentException Iterator is null */ public IteratorEnumeration(final Iterator i) { if (i == null) { @@ -160,11 +320,25 @@ public IteratorEnumeration(final Iterator i) { //~ Methods ---------------------------------------------------------------- + /** + * Tests whether the Iterator as more Elemtents or not. + * + * @return True, if the Iterator has more Elements. + * + * @see Iterator#hasNext() + */ @Override public boolean hasMoreElements() { return iterator.hasNext(); } + /** + * Returns the next element in the iteration. + * + * @return the next element in the iteration + * + * @see Iterator#next() + */ @Override public Object nextElement() { return iterator.next(); diff --git a/src/main/java/de/cismet/tools/NumberStringComparator.java b/src/main/java/de/cismet/tools/NumberStringComparator.java index 2b0f2f1..f4796d0 100644 --- a/src/main/java/de/cismet/tools/NumberStringComparator.java +++ b/src/main/java/de/cismet/tools/NumberStringComparator.java @@ -13,8 +13,8 @@ package de.cismet.tools; /** - * Comparator f\u00FCr Inhalte die Zahlen und Strings fassen k\u00F6nnen
    - * Es wird folgenderma\u00DFem sortiert:
    + * Comperator for Objects, which can contain Numbers and Strings.
    + * It will be sorted in the following form:
    * 1
    * 2
    * 3
    @@ -56,12 +56,12 @@ public NumberStringComparator() { //~ Methods ---------------------------------------------------------------- /** - * Vergleichsfunktion. + * Compare Methode. * - * @param o1 erstes Objekt - * @param o2 zweites Objekt + * @param o1 Object one + * @param o2 object two * - * @return Vergleichsergebniss + * @return value of the Comparation */ @Override public int compare(final Object o1, final Object o2) { diff --git a/src/main/java/de/cismet/tools/PasswordEncrypter.java b/src/main/java/de/cismet/tools/PasswordEncrypter.java index 80c34a5..2f685e9 100644 --- a/src/main/java/de/cismet/tools/PasswordEncrypter.java +++ b/src/main/java/de/cismet/tools/PasswordEncrypter.java @@ -38,7 +38,7 @@ import javax.swing.UIManager; /** - * DOCUMENT ME! + * Applet Password Encrypter. * * @author thorsten.hell@cismet.de * @author martin.scholl@cismet.de @@ -235,9 +235,9 @@ public void focusGained(final java.awt.event.FocusEvent evt) { } // //GEN-END:initComponents /** - * DOCUMENT ME! + * Focus Gained Password2. * - * @param evt DOCUMENT ME! + * @param evt Event */ private void pwfPassword2FocusGained(final java.awt.event.FocusEvent evt) { //GEN-FIRST:event_pwfPassword2FocusGained pwfPassword2.setSelectionStart(0); @@ -245,9 +245,9 @@ private void pwfPassword2FocusGained(final java.awt.event.FocusEvent evt) { //GE } //GEN-LAST:event_pwfPassword2FocusGained /** - * DOCUMENT ME! + * Focus Gained Password1. * - * @param evt DOCUMENT ME! + * @param evt Event */ private void pwfPassword1FocusGained(final java.awt.event.FocusEvent evt) { //GEN-FIRST:event_pwfPassword1FocusGained pwfPassword1.setSelectionStart(0); @@ -255,9 +255,9 @@ private void pwfPassword1FocusGained(final java.awt.event.FocusEvent evt) { //GE } //GEN-LAST:event_pwfPassword1FocusGained /** - * DOCUMENT ME! + * Starter. * - * @param evt DOCUMENT ME! + * @param evt Event */ private void cmdGoActionPerformed(final java.awt.event.ActionEvent evt) { //GEN-FIRST:event_cmdGoActionPerformed final String p1 = new String(pwfPassword1.getPassword()); @@ -299,11 +299,11 @@ private void cmdGoActionPerformed(final java.awt.event.ActionEvent evt) { } //GEN-LAST:event_cmdGoActionPerformed /** - * DOCUMENT ME! + * main program. * * @param args the command line arguments * - * @throws Exception DOCUMENT ME! + * @throws Exception throws Exeption if anything went wrong */ public static void main(final String[] args) throws Exception { java.awt.EventQueue.invokeLater(new Runnable() { @@ -321,13 +321,13 @@ public void run() { } /** - * DOCUMENT ME! + * Decrypts String with BlowfishEasy. * - * @param code DOCUMENT ME! + * @param code String that should get decrypted * - * @return DOCUMENT ME! + * @return Return decrypted code or null if code was set to null * - * @throws PasswordEncrypterException DOCUMENT ME! + * @throws PasswordEncrypterException throws PasswordEncrypterExeption if anything went wrong */ @Deprecated public static String decryptString(String code) throws PasswordEncrypterException { @@ -341,13 +341,13 @@ public static String decryptString(String code) throws PasswordEncrypterExceptio } /** - * DOCUMENT ME! + * Encrypts a specified String using BlowfishEasy. * - * @param pwd DOCUMENT ME! + * @param pwd String that shoudl get encrypted * - * @return DOCUMENT ME! + * @return encrypted String * - * @throws PasswordEncrypterException DOCUMENT ME! + * @throws PasswordEncrypterException throws PasswordEncrypterExeption if anything went wrong */ @Deprecated public static String encryptString(final String pwd) throws PasswordEncrypterException { @@ -429,10 +429,10 @@ public static char[] encrypt(final char[] string, final boolean wipeInput) throw } /** - * Decrypts a given string that was created by {@link #encrypt(char[])}. The caller is responsible for wiping the - * returned result himself. The given array can automatically be wiped by passing true to the - * wipeInput parameter. All temporary created data is immediately wiped, thus this implementation offers as - * little traces in memory as possible.
    + * Decrypts a given string that was created by {@link #encrypt(char[], boolean)}. The caller is responsible for + * wiping the returned result himself. The given array can automatically be wiped by passing true to + * the wipeInput parameter. All temporary created data is immediately wiped, thus this implementation + * offers as little traces in memory as possible.
    *
    * NOTE: this operation can decrypt strings created by {@link #decryptString(java.lang.String)}, too, for * compatibility reasons
    @@ -527,15 +527,15 @@ public static char[] decrypt(final char[] string, final boolean wipeInput) throw } /** - * DOCUMENT ME! + * Applies Cipher. * - * @param bytes string DOCUMENT ME! - * @param mode DOCUMENT ME! + * @param bytes string + * @param mode mode * - * @return DOCUMENT ME! + * @return byte * - * @throws IllegalArgumentException DOCUMENT ME! - * @throws PasswordEncrypterException DOCUMENT ME! + * @throws IllegalArgumentException given byte is null + * @throws PasswordEncrypterException cannot process String mode */ private static byte[] applyCipher(final byte[] bytes, final int mode) { if (bytes == null) { @@ -570,11 +570,15 @@ private static byte[] applyCipher(final byte[] bytes, final int mode) { } /** - * DOCUMENT ME! + * Getter for Master Password. * - * @return DOCUMENT ME! + * @return masterpassword as Char[] * - * @throws PasswordEncrypterException DOCUMENT ME! + * @throws PasswordEncrypterException + *
      + *
    • PasswordEncrypter properties not present.
    • + *
    • cannot read master password from properties, not set?
    • + *
    */ private static char[] getMasterPw() throws PasswordEncrypterException { final InputStream peStream = PasswordEncrypter.class.getResourceAsStream("PasswordEncrypter.properties"); // NOI18N @@ -604,11 +608,12 @@ private static char[] getMasterPw() throws PasswordEncrypterException { } /** - * Always 8 bytes. + * Get Salt.Always 8 bytes. Uses Default Salt, if Salt not set. If Salt is shorter then eight bytes the rest of the + * Salt will filled with default Salt. If Salt is too long, returns only the first eight bytes * - * @return DOCUMENT ME! + * @return salt * - * @throws PasswordEncrypterException DOCUMENT ME! + * @throws PasswordEncrypterException PasswordEncrypter properties not present */ private static byte[] getSalt() throws PasswordEncrypterException { final InputStream peStream = PasswordEncrypter.class.getResourceAsStream("PasswordEncrypter.properties"); // NOI18N @@ -767,7 +772,7 @@ public static byte getWipe() { * * @return the value of the property in a byte[] * - * @throws PasswordEncrypterException DOCUMENT ME! + * @throws PasswordEncrypterException throws PasswordEncrypterExeption if anything went wrong */ public static byte[] safeRead(final InputStream propertyStream, final char[] property) throws PasswordEncrypterException { @@ -839,7 +844,7 @@ public static byte[] safeRead(final InputStream propertyStream, final char[] pro //~ Inner Classes ---------------------------------------------------------- /** - * DOCUMENT ME! + * FocusTraversalOrder. * * @version $Revision$, $Date$ */ @@ -865,6 +870,15 @@ public FocusTraversalOrder() { //~ Methods ------------------------------------------------------------ + /** + * Returns the following Component of the specified Component If the specified + * Component is the Last, Returns the First Component. + * + * @param aContainer Container + * @param aComponent Component + * + * @return following Component + */ @Override public Component getComponentAfter(final Container aContainer, final Component aComponent) { final int index = (order.indexOf(aComponent) + 1) % order.size(); @@ -872,6 +886,15 @@ public Component getComponentAfter(final Container aContainer, final Component a return order.get(index); } + /** + * Returns the previous Component of the specified Component If the specified + * Component is the First, Returns the Last Component. + * + * @param aContainer Container + * @param aComponent Component + * + * @return previous Component + */ @Override public Component getComponentBefore(final Container aContainer, final Component aComponent) { int index = order.indexOf(aComponent) - 1; @@ -882,16 +905,37 @@ public Component getComponentBefore(final Container aContainer, final Component return order.get(index); } + /** + * Returns the First Component. + * + * @param aContainer Container + * + * @return Component + */ @Override public Component getFirstComponent(final Container aContainer) { return order.get(0); } + /** + * Returns the Last Component. + * + * @param aContainer Container + * + * @return Component + */ @Override public Component getLastComponent(final Container aContainer) { return order.get(order.size() - 1); } + /** + * Returns the First Component. + * + * @param aContainer Container + * + * @return Component + */ @Override public Component getDefaultComponent(final Container aContainer) { return order.get(0); @@ -899,7 +943,7 @@ public Component getDefaultComponent(final Container aContainer) { } /** - * DOCUMENT ME! + * Code Focus Listener. * * @version $Revision$, $Date$ */ @@ -912,6 +956,12 @@ private final class CodeFocusListener implements FocusListener { //~ Methods ------------------------------------------------------------ + /** + * Sets the Focus on txaCode from selStart to selEnd If the Selected Area + * is Empty, Selects all. + * + * @param e Event + */ @Override public void focusGained(final FocusEvent e) { if (selStart < selEnd) { @@ -923,6 +973,12 @@ public void focusGained(final FocusEvent e) { } } + /** + * Gets the Focus on txaCode and saves the Start to selStart and the End to + * selEnd. + * + * @param e Event + */ @Override public void focusLost(final FocusEvent e) { // preserve selection diff --git a/src/main/java/de/cismet/tools/PasswordEncrypterException.java b/src/main/java/de/cismet/tools/PasswordEncrypterException.java index 0a3652d..6e70ce3 100644 --- a/src/main/java/de/cismet/tools/PasswordEncrypterException.java +++ b/src/main/java/de/cismet/tools/PasswordEncrypterException.java @@ -8,7 +8,7 @@ package de.cismet.tools; /** - * DOCUMENT ME! + * Password Encrypter Exception. * * @author martin.scholl@cismet.de * @version $Revision$, $Date$ diff --git a/src/main/java/de/cismet/tools/PropertyEqualsProvider.java b/src/main/java/de/cismet/tools/PropertyEqualsProvider.java index f6beb13..852b690 100644 --- a/src/main/java/de/cismet/tools/PropertyEqualsProvider.java +++ b/src/main/java/de/cismet/tools/PropertyEqualsProvider.java @@ -24,7 +24,7 @@ package de.cismet.tools; /** - * DOCUMENT ME! + * Property Equals Provider. * * @author thorsten * @version $Revision$, $Date$ @@ -34,11 +34,11 @@ public interface PropertyEqualsProvider { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * PropertyEqualsProvider provids, that the Properties in the Object are Equal. * - * @param o DOCUMENT ME! + * @param o Object * - * @return DOCUMENT ME! + * @return True, if the Properties are equal */ boolean propertyEquals(Object o); } diff --git a/src/main/java/de/cismet/tools/PropertyReader.java b/src/main/java/de/cismet/tools/PropertyReader.java index 2bbe9e5..f9240d8 100644 --- a/src/main/java/de/cismet/tools/PropertyReader.java +++ b/src/main/java/de/cismet/tools/PropertyReader.java @@ -18,7 +18,7 @@ import java.util.Properties; /** - * DOCUMENT ME! + * Property Reader. * * @author srichter * @version $Revision$, $Date$ @@ -39,9 +39,9 @@ public class PropertyReader { /** * Creates a new PropertyReader object. * - * @param filename DOCUMENT ME! + * @param filename filename * - * @throws IllegalArgumentException DOCUMENT ME! + * @throws IllegalArgumentException If filename is Null */ public PropertyReader(final String filename) { if ((filename == null) || (filename.length() < 1)) { @@ -69,29 +69,29 @@ public PropertyReader(final String filename) { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Gets the Property. * - * @param key DOCUMENT ME! + * @param key key * - * @return DOCUMENT ME! + * @return the Property of the properties */ public final String getProperty(final String key) { return properties.getProperty(key); } /** - * DOCUMENT ME! + * Gets the Filename. * - * @return the filename + * @return filename */ public String getFilename() { return filename; } /** - * DOCUMENT ME! + * Gets the Internal Propeties. * - * @return DOCUMENT ME! + * @return properties */ public Properties getInternalProperties() { return properties; diff --git a/src/main/java/de/cismet/tools/ScriptRunner.java b/src/main/java/de/cismet/tools/ScriptRunner.java index 75f570c..e5c5c82 100644 --- a/src/main/java/de/cismet/tools/ScriptRunner.java +++ b/src/main/java/de/cismet/tools/ScriptRunner.java @@ -68,9 +68,9 @@ public class ScriptRunner { /** * Default constructor. * - * @param connection DOCUMENT ME! - * @param autoCommit DOCUMENT ME! - * @param stopOnError DOCUMENT ME! + * @param connection Connection + * @param autoCommit Enables/Disables autoCommit + * @param stopOnError Enables/Disables stopOnError */ public ScriptRunner(final Connection connection, final boolean autoCommit, final boolean stopOnError) { this.connection = connection; @@ -81,27 +81,27 @@ public ScriptRunner(final Connection connection, final boolean autoCommit, final //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Setter for delimiter property. * - * @param delimiter DOCUMENT ME! + * @param delimiter new vslue of the delimiter property */ public void setDelimiter(final String delimiter) { this.delimiter = delimiter; } /** - * Setter for logWriter property. + * Setter for logWriter property. * - * @param logWriter - the new value of the logWriter property + * @param logWriter - the new value of the logWriter property */ public void setLogWriter(final PrintWriter logWriter) { this.logWriter = logWriter; } /** - * Setter for errorLogWriter property. + * Setter for errorLogWriter property. * - * @param errorLogWriter - the new value of the errorLogWriter property + * @param errorLogWriter - the new value of the errorLogWriter property */ public void setErrorLogWriter(final PrintWriter errorLogWriter) { this.errorLogWriter = errorLogWriter; @@ -112,9 +112,9 @@ public void setErrorLogWriter(final PrintWriter errorLogWriter) { * * @param reader - the source of the script * - * @throws IOException DOCUMENT ME! - * @throws SQLException DOCUMENT ME! - * @throws RuntimeException DOCUMENT ME! + * @throws IOException if there is an error reading from the Reader + * @throws SQLException if any SQL errors occur + * @throws RuntimeException "Error running script. Cause: " */ public void runScript(final Reader reader) throws IOException, SQLException { try { @@ -289,11 +289,11 @@ private void runScript(final Connection conn, final Reader reader) throws IOExce } /** - * DOCUMENT ME! + * Counts the "'" in the specified String and tests whether the number is even or not. * - * @param s DOCUMENT ME! + * @param s String which should be tested * - * @return DOCUMENT ME! + * @return True, if the Number is even. */ private boolean evenQuotes(final String s) { int count = 0; @@ -307,20 +307,22 @@ private boolean evenQuotes(final String s) { } /** - * DOCUMENT ME! + * Gettter for delimiter. * - * @return DOCUMENT ME! + * @return delimiter */ private String getDelimiter() { return delimiter; } /** - * DOCUMENT ME! + * If logWriter is Empty print the Object in System Console. * *

    >>>>>>> .r4704

    * - * @param o DOCUMENT ME! + * @param o Object which is going to be printed + * + * @see PrintWriter#print(java.lang.Object) */ private void print(final Object o) { if (logWriter != null) { @@ -329,9 +331,12 @@ private void print(final Object o) { } /** - * DOCUMENT ME! + * If logWriter is Empty print the Object in logWriter.Does a Line Break and flushes. + * + * @param o Object which is going to be printed * - * @param o DOCUMENT ME! + * @see PrintWriter#println(java.lang.Object) + * @see PrintWriter#flush() */ private void println(final Object o) { if (logWriter != null) { @@ -341,9 +346,12 @@ private void println(final Object o) { } /** - * DOCUMENT ME! + * If errorLogWriter is Empty print the Object in errorLogWriter.Does a Line Break and flushes. * - * @param o DOCUMENT ME! + * @param o Object which is going to be printed + * + * @see PrintWriter#println(java.lang.Object) + * @see PrintWriter#flush() */ private void printlnError(final Object o) { if (errorLogWriter != null) { @@ -353,7 +361,9 @@ private void printlnError(final Object o) { } /** - * DOCUMENT ME! + * Flushes the Streams. + * + * @see PrintWriter#flush() */ private void flush() { if (logWriter != null) { diff --git a/src/main/java/de/cismet/tools/Sorter.java b/src/main/java/de/cismet/tools/Sorter.java index dcb8e8c..6b800b6 100644 --- a/src/main/java/de/cismet/tools/Sorter.java +++ b/src/main/java/de/cismet/tools/Sorter.java @@ -7,7 +7,7 @@ ****************************************************/ package de.cismet.tools; /** - * DOCUMENT ME! + * Sorter Tool. * * @version $Revision$, $Date$ */ @@ -17,11 +17,12 @@ public class Sorter { // ----------------------------------------------------------------------------------------------- /** - * ueberpruft ob das array sortiert ist. + * Tests whether the specified Array is sorted or not. Sorted Arrays are + * Arrays with only ONE Element. * - * @param array DOCUMENT ME! + * @param array Array, which is going to be tested. * - * @return DOCUMENT ME! + * @return True, if the Array is sorted. */ private static boolean isSorted(final Comparable[] array) { if (array.length < 2) { @@ -40,16 +41,24 @@ private static boolean isSorted(final Comparable[] array) { } /** - * ------------------------------------------------------------------------------- + * Sorts the specified Array with insertionSort. The Complete Array is + * searched. * - * @param array DOCUMENT ME! + * @param array Array, which is going to get sorted + * + * @see #insertionSort(java.lang.Comparable[], int, int) */ public static void insertionSort(final Comparable[] array) { insertionSort(array, 0, array.length - 1); } - /**InsertionSort*/ - + /** + * Sorts the specified Array with insertionSort. Sorts only a specified area. + * + * @param array Array, which is going to get sorted + * @param left left end of the area, which is going to get sorted + * @param right right end of the area, which is going to get sorted + */ public static void insertionSort(final Comparable[] array, final int left, final int right) { int in; int out; @@ -71,12 +80,17 @@ public static void insertionSort(final Comparable[] array, final int left, final //---------------------------------------------------------------------------------------------------------- /** - * Quicksort welches bei der Unterschreitung von partitionsize auf InsertionSort umschaltet. + * Sorts the specified Array with Quicksort.Sorts only a specified area. If the to be + * sorted area is smaller than or equal partitionSize, InsertionSort will be used. * - * @param array DOCUMENT ME! - * @param left DOCUMENT ME! - * @param right DOCUMENT ME! - * @param partitionSize DOCUMENT ME! + * @param array Array, which is going to get sorted. + * @param left left end of the area, which is going to get sorted + * @param right right end of the area, which is going to get sorted + * @param partitionSize minimal size for using Quicksort + * + * @see #insertionSort(java.lang.Comparable[], int, int) + * @see #partitionIt(java.lang.Comparable[], int, int, java.lang.Object) + * @see #swap(java.lang.Object[], int, int) */ private static void quickSort(final Comparable[] array, final int left, final int right, final int partitionSize) { @@ -98,23 +112,33 @@ private static void quickSort(final Comparable[] array, final int left, final in } /** - * ---------------------------------------------------------------------------------------------- + * Sorts the specified Array with Quicksort.Sorts the complete Array. If the + * to be sorted area is smaller than or equal 16, InsertionSort will be used. + * + * @param array Array, which is going to get sorted. * - * @param array DOCUMENT ME! + * @see #quickSort(java.lang.Comparable[], int, int, int) */ public static void quickSort(final Comparable[] array) { quickSort(array, 0, array.length - 1, 16); // no insertion when partition >=16 } /** - * --------------------------------------------------------------------------- nimmt die unterteilung in die Mengen - * S< u. S> vor wird von Quicksort verwendet* + * Divides into two Sets. + * + *
      + *
    1. all Elements which are smaller than the Rightmost
    2. + *
    3. all Elements which are bigger than the Rightmost
    4. + *
    * - * @param array DOCUMENT ME! - * @param left DOCUMENT ME! - * @param right DOCUMENT ME! - * @param pivot DOCUMENT ME! + * @param array Array, which is going to get Sorted + * @param left left end of the area, which is going to get sorted + * @param right right end of the area, which is going to get sorted + * @param pivot Rightmost * - * @return DOCUMENT ME! + * @return Location of the Rightmost after the Sorting + * + * @see #quickSort(java.lang.Comparable[], int, int, int) + * @see #swap(java.lang.Object[], int, int) */ private static int partitionIt(final Comparable[] array, final int left, final int right, final Object pivot) { int leftPtr = left - 1; @@ -144,11 +168,14 @@ private static int partitionIt(final Comparable[] array, final int left, final i //---------------------------------------------------------------------------------------------- /** - * tauscht 2 Elemente eines Arrays. + * Swaps two Elements of the specified Array. + * + * @param array Array, which is going to get sorted + * @param i Location of Element one + * @param j Location of Element two * - * @param array DOCUMENT ME! - * @param i DOCUMENT ME! - * @param j DOCUMENT ME! + * @see #quickSort(java.lang.Comparable[], int, int, int) + * @see #partitionIt(java.lang.Comparable[], int, int, java.lang.Object) */ private static void swap(final Object[] array, final int i, final int j) { diff --git a/src/main/java/de/cismet/tools/StaticDebuggingTools.java b/src/main/java/de/cismet/tools/StaticDebuggingTools.java index 1cdd589..222f171 100644 --- a/src/main/java/de/cismet/tools/StaticDebuggingTools.java +++ b/src/main/java/de/cismet/tools/StaticDebuggingTools.java @@ -18,7 +18,7 @@ import java.io.File; /** - * DOCUMENT ME! + * Tests whether the File exists in the User's Home Directory or not. * * @author cschmidt * @version $Revision$, $Date$ @@ -36,11 +36,11 @@ public StaticDebuggingTools() { //~ Methods ---------------------------------------------------------------- /** - * �berpr�ft ob eine Datei mit dem �bergebenen Dateiname im Home-Verzeichnis des Users existiert. + * Tests whether the specified Filename exists in the User's Home Directory or not. * - * @param filename Name der gesuchten Datei. + * @param filename Filename of the searched File * - * @return DOCUMENT ME! + * @return True, if the Filename is contained in the Home Directory */ public static boolean checkHomeForFile(final String filename) { try { diff --git a/src/main/java/de/cismet/tools/StaticDecimalTools.java b/src/main/java/de/cismet/tools/StaticDecimalTools.java index 8d1b379..6e89a5c 100644 --- a/src/main/java/de/cismet/tools/StaticDecimalTools.java +++ b/src/main/java/de/cismet/tools/StaticDecimalTools.java @@ -8,7 +8,7 @@ package de.cismet.tools; /** - * DOCUMENT ME! + * StaticDecimalTools. Rounds Double. * * @author thorsten.hell@cismet.de * @version $Revision$, $Date$ @@ -18,22 +18,24 @@ public class StaticDecimalTools { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Rounds Doubles to the Form "0.00" * - * @param d DOCUMENT ME! + * @param d Double which should be rounded * - * @return DOCUMENT ME! + * @return the rounded Double + * + * @see #round(java.lang.String, double) */ public static String round(final double d) { return round("0.00", d); // NOI18N } /** - * DOCUMENT ME! + * Rounds the Doubles to a specified Form. * - * @param pattern DOCUMENT ME! - * @param d DOCUMENT ME! + * @param pattern Form of the rounded Double as String + * @param d Double which should be rounded * - * @return DOCUMENT ME! + * @return the rounded Double */ public static String round(final String pattern, final double d) { final double dd = ((double)(Math.round(d * 100))) / 100; diff --git a/src/main/java/de/cismet/tools/StaticHtmlTools.java b/src/main/java/de/cismet/tools/StaticHtmlTools.java index 21292ec..4ff2b51 100644 --- a/src/main/java/de/cismet/tools/StaticHtmlTools.java +++ b/src/main/java/de/cismet/tools/StaticHtmlTools.java @@ -12,7 +12,7 @@ import java.net.URLEncoder; /** - * DOCUMENT ME! + * StaticHtmlTools. * * @author thorsten.hell@cismet.de * @version $Revision$, $Date$ @@ -22,11 +22,11 @@ public class StaticHtmlTools { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * converts HTTPReferences. * - * @param newString DOCUMENT ME! + * @param newString link * - * @return DOCUMENT ME! + * @return HTTPReference */ public static String convertHTTPReferences(String newString) { int hrefStartPos; @@ -95,11 +95,11 @@ public static String convertHTTPReferences(String newString) { } /** - * DOCUMENT ME! + * Strips Meta Tag. * - * @param text DOCUMENT ME! + * @param text String * - * @return DOCUMENT ME! + * @return Meta Tag */ public static String stripMetaTag(final String text) { // String used for searching, comparison and indexing @@ -122,9 +122,9 @@ public static String stripMetaTag(final String text) { } /** - * DOCUMENT ME! + * main program. * - * @param args DOCUMENT ME! + * @param args args */ public static void main(final String[] args) { final String test = "test http://www.google.de?quiery wer"; // NOI18N @@ -133,11 +133,11 @@ public static void main(final String[] args) { } /** - * DOCUMENT ME! + * Converts the specified String into a HTMLString. * - * @param string DOCUMENT ME! + * @param string String, which is going to get converted * - * @return DOCUMENT ME! + * @return HTMLString */ public static String stringToHTMLString(final String string) { if (string == null) { @@ -197,11 +197,11 @@ public static String stringToHTMLString(final String string) { } /** - * DOCUMENT ME! + * Encodes the specified String into UTF-8 Format. * - * @param parameter DOCUMENT ME! + * @param parameter String, which is going to be encoded * - * @return DOCUMENT ME! + * @return encoded String */ public static String encodeURLParameter(final String parameter) { try { diff --git a/src/main/java/de/cismet/tools/StaticXMLTools.java b/src/main/java/de/cismet/tools/StaticXMLTools.java index d501709..694b983 100644 --- a/src/main/java/de/cismet/tools/StaticXMLTools.java +++ b/src/main/java/de/cismet/tools/StaticXMLTools.java @@ -17,7 +17,7 @@ import java.awt.Font; /** - * DOCUMENT ME! + * Converter for Color to XML and XML to Color. * * @author thorsten * @version $Revision$, $Date$ @@ -39,9 +39,9 @@ private StaticXMLTools() { //~ Methods ---------------------------------------------------------------- /** - * Konvertiert eine Farbe zu folgendem XML-Code . + * Converts a Color into XML-Code . * - * @param c die in XML darzustellende Farbe + * @param c Color, which is going to be converted * * @return JDOM-Element */ @@ -55,11 +55,11 @@ public static Element convertColorToXML(final Color c) { } /** - * DOCUMENT ME! + * Converts the specified XMLElement into a Color. * - * @param xmlElement DOCUMENT ME! + * @param xmlElement xmlElemt, which is going to be converted * - * @return DOCUMENT ME! + * @return Color */ public static Color convertXMLElementToColor(final Element xmlElement) { int red = 0; @@ -89,9 +89,9 @@ public static Color convertXMLElementToColor(final Element xmlElement) { } /** - * Konvertiert eine Schrift zu folgendem XML-Code. + * Converts the Font into XML-Code. * - * @param f die zu konvertierende Schrift + * @param f Font, which is going to be converted * * @return JDOM-Element */ @@ -104,11 +104,11 @@ public static Element convertFontToXML(final Font f) { } /** - * DOCUMENT ME! + * Converts XMLElement into Font. * - * @param xmlElement DOCUMENT ME! + * @param xmlElement xmlElement, which is going to be converted * - * @return DOCUMENT ME! + * @return Font */ public static Font convertXMLElementToFont(final Element xmlElement) { String name = "sansserif"; // NOI18N @@ -132,9 +132,9 @@ public static Font convertXMLElementToFont(final Element xmlElement) { } /** - * DOCUMENT ME! + * Posts the specified XML on the Logger. * - * @param element DOCUMENT ME! + * @param element XML, which is going to be posted */ public static void logXML(final Element element) { final Document doc = new Document(); diff --git a/src/main/java/de/cismet/tools/StringTools.java b/src/main/java/de/cismet/tools/StringTools.java index d83f802..e67ce3f 100644 --- a/src/main/java/de/cismet/tools/StringTools.java +++ b/src/main/java/de/cismet/tools/StringTools.java @@ -13,7 +13,7 @@ package de.cismet.tools; /** - * DOCUMENT ME! + * Tool for deleting Whitespaces in Strings. * * @author schlob * @version $Revision$, $Date$ @@ -31,11 +31,11 @@ private StringTools() { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Deletes Whitspaces in the String. * - * @param string DOCUMENT ME! + * @param string String, which is going to get cleaned * - * @return DOCUMENT ME! + * @return cleaned String */ public static String deleteWhitespaces(final String string) { if (string == null) { diff --git a/src/main/java/de/cismet/tools/TextFromFile.java b/src/main/java/de/cismet/tools/TextFromFile.java index db6c523..bd19302 100644 --- a/src/main/java/de/cismet/tools/TextFromFile.java +++ b/src/main/java/de/cismet/tools/TextFromFile.java @@ -11,7 +11,7 @@ import java.util.*; /** - * DOCUMENT ME! + * Tool for extract Text from File. * * @version $Revision$, $Date$ */ @@ -26,16 +26,16 @@ public class TextFromFile { //~ Constructors ----------------------------------------------------------- /** - * ///////////////////////////////////////// + * Creates a Default TextFromFile object. */ public TextFromFile() { data = new byte[0]; } /** - * /////////////////////////////////////////// + * Creates a new TextFromFile object from file with specified filepath. * - * @param filepath DOCUMENT ME! + * @param filepath filepath */ public TextFromFile(final String filepath) { try { @@ -66,18 +66,18 @@ public TextFromFile(final String filepath) { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Getter for Text. Converts Byte to String * - * @return DOCUMENT ME! + * @return data */ public String getText() { return new String(data); } /** - * DOCUMENT ME! + * Getter for Text. * - * @return DOCUMENT ME! + * @return Vector words */ public Vector getWordVector() { final Vector words = new Vector(10, 10); diff --git a/src/main/java/de/cismet/tools/TimeoutThread.java b/src/main/java/de/cismet/tools/TimeoutThread.java index f65b399..a038884 100644 --- a/src/main/java/de/cismet/tools/TimeoutThread.java +++ b/src/main/java/de/cismet/tools/TimeoutThread.java @@ -45,10 +45,10 @@ public TimeoutThread() { * * @param timeInMillis the time to wait in milliseconds * - * @return DOCUMENT ME + * @return result * - * @throws Exception DOCUMENT ME! - * @throws TimeoutException DOCUMENT ME! + * @throws Exception an exception during the execution of the thread ocured + * @throws TimeoutException Execution is timeouted and interrupted. */ public T start(final long timeInMillis) throws Exception { final Thread t = new Thread(this); diff --git a/src/main/java/de/cismet/tools/URLSplitter.java b/src/main/java/de/cismet/tools/URLSplitter.java index 4fa5be6..8077d9c 100644 --- a/src/main/java/de/cismet/tools/URLSplitter.java +++ b/src/main/java/de/cismet/tools/URLSplitter.java @@ -8,7 +8,14 @@ package de.cismet.tools; /** - * DOCUMENT ME! + * Tool, that detects the following informations in a String url and saves them into single Strings. + * + *
      + *
    • prot_prefix
    • + *
    • server
    • + *
    • path
    • + *
    • object_name
    • + *
    * * @author thorsten.hell@cismet.de * @version $Revision$, $Date$ @@ -25,9 +32,10 @@ public class URLSplitter { //~ Constructors ----------------------------------------------------------- /** - * Creates a new URLSplitter object. + * Creates a new URLSplitter object from the url, detects the prot_prefix, server, path and object_name and saves + * these informations into new Strings. * - * @param url DOCUMENT ME! + * @param url given url */ public URLSplitter(final String url) { // Versuch den Protokoll Prefix zu f\u00FCllen @@ -85,41 +93,51 @@ private URLSplitter() { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Getter for prot_prefix. * - * @return DOCUMENT ME! + * @return prot_prefix */ public String getProt_prefix() { return prot_prefix; } /** - * DOCUMENT ME! + * Getter for server. * - * @return DOCUMENT ME! + * @return server */ public String getServer() { return server; } /** - * DOCUMENT ME! + * Getter for path. * - * @return DOCUMENT ME! + * @return path */ public String getPath() { return path; } /** - * DOCUMENT ME! + * Getter for object_name. * - * @return DOCUMENT ME! + * @return object_name */ public String getObject_name() { return object_name; } + /** + * returns a String, which has the following form
    + * Prot: {@link #prot_prefix}
    + * Server: {@link #server}
    + * Path: {@link #path}
    + * Objekt: {@link #object_name}
    + * + * @return String + */ + @Override public String toString() { return "Prot: " + prot_prefix + "\n" // NOI18N @@ -129,9 +147,9 @@ public String toString() { } /** - * DOCUMENT ME! + * main program. For testing. * - * @param args DOCUMENT ME! + * @param args args */ public static void main(final String[] args) { System.out.println("\n" + new URLSplitter("http://www.google.de/")); // NOI18N diff --git a/src/main/java/de/cismet/tools/collections/HashArrayList.java b/src/main/java/de/cismet/tools/collections/HashArrayList.java index 4b1947a..1730774 100644 --- a/src/main/java/de/cismet/tools/collections/HashArrayList.java +++ b/src/main/java/de/cismet/tools/collections/HashArrayList.java @@ -12,7 +12,7 @@ import java.util.HashSet; /** - * DOCUMENT ME! + * Modified {@link ArrayList} Class, which contains an additional Hashset. * * @author thorsten * @version $Revision$, $Date$ @@ -21,6 +21,9 @@ public class HashArrayList extends ArrayList { //~ Instance fields -------------------------------------------------------- + /** + * @see HashSet + */ HashSet containsMarkerSet = new HashSet(); //~ Constructors ----------------------------------------------------------- @@ -32,9 +35,9 @@ public HashArrayList() { } /** - * Creates a new HashArrayList object. + * Creates a new HashArrayList object from a specified Collection. * - * @param c DOCUMENT ME! + * @param c Collection */ public HashArrayList(final Collection c) { super(c); @@ -44,9 +47,9 @@ public HashArrayList(final Collection c) { } /** - * Creates a new HashArrayList object. + * Constructs an empty HashArrayList with the specified initial capacity. * - * @param initialCapacity DOCUMENT ME! + * @param initialCapacity the initial capacity of the list */ public HashArrayList(final int initialCapacity) { super(initialCapacity); @@ -54,59 +57,167 @@ public HashArrayList(final int initialCapacity) { //~ Methods ---------------------------------------------------------------- + /** + * Appends the specified Element to the end of Arraylist and adds the specified + * Element to the HashSet if it is not already present. + * + * @param e Element, which should get append + * + * @return True + * + * @see ArrayList#add(java.lang.Object) + * @see HashSet#add(java.lang.Object) + */ @Override public boolean add(final E e) { containsMarkerSet.add(e); return super.add(e); } + /** + * Appends the specified Element to the specified index.Shifts the element currently at + * that position (if any) and any subsequent elements to the right (adds one to their indices). Adds the specified + * element to the HashSet if it is not already present. + * + * @param index index, where the Element should be placed to + * @param element Element to be appended + * + * @see ArrayList#add(int, java.lang.Object) + * @see HashSet#add(java.lang.Object) + */ @Override public void add(final int index, final E element) { containsMarkerSet.add(element); super.add(index, element); } + /** + * This implementation iterates over the specified Collection, and adds each object + * returned by the iterator to this collection, in turn. Appends the new Objects to the + * end of the ArrayList + * + * @param c Collection + * + * @return true if this list changed as a result of the call + * + * @see ArrayList#addAll(java.util.Collection) + * @see HashSet#addAll(java.util.Collection) + */ @Override public boolean addAll(final Collection c) { containsMarkerSet.addAll(c); return super.addAll(c); } + /** + * This implementation iterates over the specified Collection, and adds each object + * returned by the iterator to this collection, in turn. Inserts all of the elements in + * the specified collection into the ArrayList, starting at the specified position. Shifts the element + * currently at that position. + * + * @param index startindex + * @param c Collection + * + * @return true if this list changed as a result of the call + * + * @see ArrayList#addAll(int, java.util.Collection) + * @see HashSet#addAll(java.util.Collection) + */ @Override public boolean addAll(final int index, final Collection c) { containsMarkerSet.addAll(c); return super.addAll(index, c); } + /** + * Removes all of the elements from this HashArrayList. The ArrayList and the + * HashSet will be empty after this call returns. + * + * @see ArrayList#clear() + * @see HashSet#clear() + */ @Override public void clear() { containsMarkerSet.clear(); super.clear(); } + /** + * Clones the HashArrayList. + * + * @return the cloned HashArrayList + */ @Override public Object clone() { return new HashArrayList(this); } + /** + * Tests whether the ArrayList contains the specified Object or not. + * + * @param o Object to be tested + * + * @return True, if the ArrayList contains the specified Object + * + * @see ArrayList#contains(java.lang.Object) + */ @Override public boolean contains(final Object o) { // return containsMarkerSet.contains(o); return super.contains(o); } + /** + * Removes the Object on the specified index. The ArrayList shifts any subsequent elements + * to the left.Removes the element associated with the index in the Hashmap //Note: If the deleted + * Object was multiple time inside the Arraylist, it could be possible that the Object is inside + * ArrayList, but not in the HashSet + * + * @param index index, whose Object to be deleted + * + * @return the Object, that was removed from the HashArrayList + * + * @see ArrayList#remove(int) + * @see HashSet#remove(java.lang.Object) + */ @Override public E remove(final int index) { containsMarkerSet.remove(get(index)); return super.remove(index); } + /** + * Removes the Object on the specified index. The ArrayList deletes the first occurrence + * of the specified Object and shifts any subsequent elements to the left.Removes the element associated with the + * index in the Hashmap //Note: If the deleted Object was multiple time inside the + * Arraylist, it could be possible that the Object is inside ArrayList, but not in the + * HashSet + * + * @param o Object to be deleted + * + * @return the Object, that was removed from the HashArrayList + * + * @see ArrayList#remove(java.lang.Object) + * @see HashSet#remove(java.lang.Object) + */ @Override public boolean remove(final Object o) { containsMarkerSet.remove(o); return super.remove(o); } + /** + * Removes the Object on the index within the specified range. The ArrayList shifts any + * subsequent elements to the left.Removes the element associated with the index in the Hashmap //Note: + * If the deleted Object was multiple time inside the Arraylist, it could be possible that the Object + * is inside ArrayList, but not in the HashSet + * + * @param fromIndex Start IndexRange + * @param toIndex End IndexRange + * + * @see ArrayList#removeRange(int, int) + * @see HashSet#remove(java.lang.Object) + */ @Override protected void removeRange(final int fromIndex, final int toIndex) { for (int i = fromIndex; i <= toIndex; ++i) { @@ -115,6 +226,17 @@ protected void removeRange(final int fromIndex, final int toIndex) { super.removeRange(fromIndex, toIndex); } + /** + * Replaces the element at the specified position in this ArrayList with the specified element. Removes + * the element associated with the index in the Hashmap and adds the element. + * + * @param index index, whose element to be replaced + * @param element element + * + * @return the element previously at the specified position + * + * @see ArrayList#set(int, java.lang.Object) + */ @Override public E set(final int index, final E element) { containsMarkerSet.remove(get(index)); @@ -122,6 +244,16 @@ public E set(final int index, final E element) { return super.set(index, element); } + /** + * Removes all elements contained in the specified Collection. + * + * @param c Collection + * + * @return true if this HashArrayList changed as a result of the call + * + * @see ArrayList#removeAll(java.util.Collection) + * @see HashSet#removeAll(java.util.Collection) + */ @Override public boolean removeAll(final Collection c) { containsMarkerSet.removeAll(c); diff --git a/src/main/java/de/cismet/tools/collections/MultiMap.java b/src/main/java/de/cismet/tools/collections/MultiMap.java index 48db6b1..9ebcb24 100644 --- a/src/main/java/de/cismet/tools/collections/MultiMap.java +++ b/src/main/java/de/cismet/tools/collections/MultiMap.java @@ -30,7 +30,7 @@ public MultiMap() { /** * ////////////////////////////////////////////// * - * @param size DOCUMENT ME! + * @param size size */ public MultiMap(final int size) { super(size); @@ -89,10 +89,10 @@ public void putAll(final Map t) { /** * HELL. * - * @param key DOCUMENT ME! - * @param value DOCUMENT ME! + * @param key key for he given value + * @param value value for the given key * - * @return DOCUMENT ME! + * @return true if the specified key with the specified mapping does exist */ public boolean contains(final Object key, final Object value) { return containsKey(key) && ((SyncLinkedList)get(key)).contains(value); diff --git a/src/main/java/de/cismet/tools/collections/SyncLinkedList.java b/src/main/java/de/cismet/tools/collections/SyncLinkedList.java index 5442aa2..00af810 100644 --- a/src/main/java/de/cismet/tools/collections/SyncLinkedList.java +++ b/src/main/java/de/cismet/tools/collections/SyncLinkedList.java @@ -14,7 +14,7 @@ import java.util.*; /** - * DOCUMENT ME! + * Deprecated. * * @author schlob * @version $Revision$, $Date$ diff --git a/src/main/java/de/cismet/tools/collections/package.html b/src/main/java/de/cismet/tools/collections/package.html new file mode 100644 index 0000000..e070dbc --- /dev/null +++ b/src/main/java/de/cismet/tools/collections/package.html @@ -0,0 +1,10 @@ + + + + de.cismet.tools.collections + + + + Collection of various Collection Tools. + + \ No newline at end of file diff --git a/src/main/java/de/cismet/tools/configuration/ConfigAttrProvider.java b/src/main/java/de/cismet/tools/configuration/ConfigAttrProvider.java index 96bf26d..6f01d30 100644 --- a/src/main/java/de/cismet/tools/configuration/ConfigAttrProvider.java +++ b/src/main/java/de/cismet/tools/configuration/ConfigAttrProvider.java @@ -8,7 +8,7 @@ package de.cismet.tools.configuration; /** - * DOCUMENT ME! + * ConfigAttriProvider Interface. * * @author martin.scholl@cismet.de * @version $Revision$, $Date$ @@ -18,29 +18,29 @@ public interface ConfigAttrProvider { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Getter for the UserConfig value with specified key. * - * @param key DOCUMENT ME! + * @param key key, which value is searched * - * @return DOCUMENT ME! + * @return value as String */ String getUserConfigAttr(final String key); /** - * DOCUMENT ME! + * Getter for the GroupConfig value with specified key. * - * @param key DOCUMENT ME! + * @param key key, which value is searched * - * @return DOCUMENT ME! + * @return value as String */ String getGroupConfigAttr(final String key); /** - * DOCUMENT ME! + * Getter for the DomainConfig value with specified key. * - * @param key DOCUMENT ME! + * @param key key, which value is searched * - * @return DOCUMENT ME! + * @return value as String */ String getDomainConfigAttr(final String key); } diff --git a/src/main/java/de/cismet/tools/configuration/Configurable.java b/src/main/java/de/cismet/tools/configuration/Configurable.java index fec9d73..aba2e2f 100644 --- a/src/main/java/de/cismet/tools/configuration/Configurable.java +++ b/src/main/java/de/cismet/tools/configuration/Configurable.java @@ -10,7 +10,7 @@ import org.jdom.Element; /** - * DOCUMENT ME! + * Configurable Interface. * * @author thorsten.hell@cismet.de * @version $Revision$, $Date$ @@ -20,23 +20,23 @@ public interface Configurable { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Configures the Local configuration.xml Always used after masterConfigure. * - * @param parent DOCUMENT ME! + * @param parent JDOM root */ void configure(Element parent); /** - * DOCUMENT ME! + * Configures the Server configuration.xml. * - * @param parent DOCUMENT ME! + * @param parent JDOM root */ void masterConfigure(Element parent); /** - * DOCUMENT ME! + * Gets the JDOM Root for this Configurable. * - * @return DOCUMENT ME! + * @return Configuration * - * @throws NoWriteError DOCUMENT ME! + * @throws NoWriteError throws NoWriteError if anything went wrong */ Element getConfiguration() throws NoWriteError; } diff --git a/src/main/java/de/cismet/tools/configuration/ConfigurationManager.java b/src/main/java/de/cismet/tools/configuration/ConfigurationManager.java index 4a4ad02..d44c7fe 100644 --- a/src/main/java/de/cismet/tools/configuration/ConfigurationManager.java +++ b/src/main/java/de/cismet/tools/configuration/ConfigurationManager.java @@ -35,7 +35,7 @@ import java.util.Set; /** - * DOCUMENT ME! + * Configuaration Manager. * * @author thorsten.hell@cismet.de * @version $Revision$, $Date$ @@ -93,89 +93,101 @@ public ConfigurationManager() { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * Appends specified Configurable to the list {@link #configurables}. * - * @param configurable DOCUMENT ME! + * @param configurable Configurable, which should get append to the List */ public void addConfigurable(final Configurable configurable) { configurables.add(configurable); } /** - * DOCUMENT ME! + * Removes specified Configurable from the list {@link #configurables}. * - * @param configurable DOCUMENT ME! + * @param configurable Configurable, which should get removed from the List */ public void removeConfigurable(final Configurable configurable) { configurables.remove(configurable); } /** - * DOCUMENT ME! + * Getter for fileName. * - * @return DOCUMENT ME! + * @return {@link #fileName} */ public String getFileName() { return fileName; } /** - * DOCUMENT ME! + * Setter for fileName. * - * @param fileName DOCUMENT ME! + * @param fileName {@link #fileName} */ public void setFileName(final String fileName) { this.fileName = fileName; } /** - * DOCUMENT ME! + * Getter for folder. * - * @return DOCUMENT ME! + * @return {@link #folder} */ public String getFolder() { return folder; } /** - * DOCUMENT ME! + * Setter for folder. * - * @param folder DOCUMENT ME! + * @param folder {@link #folder} */ public void setFolder(final String folder) { this.folder = folder; } /** - * DOCUMENT ME! + * Configures all Configurable in configuables; Uses the deafault Path to the local root + * Object. + * + * @see #configure(de.cismet.tools.configuration.Configurable) */ public void configure() { configure((Configurable)null); } /** - * DOCUMENT ME! + * Configures all Configurable in configuables; Uses a specified Path to the local root + * Object. + * + * @param path specified path * - * @param path DOCUMENT ME! + * @see #configure(de.cismet.tools.configuration.Configurable, java.lang.String) */ public void configure(final String path) { configure(null, path); } /** - * DOCUMENT ME! + * Configures the specified Configurable; Uses the default Path to the local root Object. + * + * @param singleConfig specified Configurable; if ==null: uses all Configurable in + * configurables. * - * @param singleConfig DOCUMENT ME! + * @see #configure(de.cismet.tools.configuration.Configurable, java.lang.String) */ public void configure(final Configurable singleConfig) { configure(singleConfig, home + fs + folder + fs + fileName); } /** - * DOCUMENT ME! + * Configures the specified Configurable; Uses a specified path to the local Object. * - * @param singleConfig DOCUMENT ME! - * @param path DOCUMENT ME! + * @param singleConfig specified Configurable; if ==null: uses all Configurable in + * configurables. + * @param path specified path to the local root Object. + * + * @see #pureConfigure(de.cismet.tools.configuration.Configurable, org.jdom.Element, org.jdom.Element) */ public void configure(final Configurable singleConfig, final String path) { Element rootObject = null; @@ -214,16 +226,22 @@ public void configure(final Configurable singleConfig, final String path) { } /** - * DOCUMENT ME! + * Configures all Configurable in configurables; Uses the Classpath to the local root + * Object. + * + * @see #configureFromClasspath(de.cismet.tools.configuration.Configurable) */ public void configureFromClasspath() { configureFromClasspath(null); } /** - * DOCUMENT ME! + * Configures the specified Configurable; Uses the Classpath to the local root Object. * - * @param singleConfig DOCUMENT ME! + * @param singleConfig specified Configurable; if ==null uses all Configurable in + * configurables. + * + * @see #pureConfigure(de.cismet.tools.configuration.Configurable, org.jdom.Element, org.jdom.Element) */ public void configureFromClasspath(final Configurable singleConfig) { final Element rootObject = getRootObjectFromClassPath(); @@ -231,12 +249,15 @@ public void configureFromClasspath(final Configurable singleConfig) { } /** - * DOCUMENT ME! + * Configures the specified Configurable; Uses the Classpath to the local root Object. + * + * @param url path + * @param singleConfig singleConfig specified Configurable; if ==null uses all + * Configurable in configurables. * - * @param url DOCUMENT ME! - * @param singleConfig DOCUMENT ME! + * @throws Exception Throws Excpetion if anything went wrong. * - * @throws Exception DOCUMENT ME! + * @see #pureConfigure(de.cismet.tools.configuration.Configurable, org.jdom.Element, org.jdom.Element) */ public void configureFromClasspath(final String url, final Configurable singleConfig) throws Exception { final Element rootObject = getObjectFromClassPath(url); @@ -244,7 +265,7 @@ public void configureFromClasspath(final String url, final Configurable singleCo } /** - * DOCUMENT ME! + * Initialises the Local Configuration Classpath. */ public void initialiseLocalConfigurationClasspath() { try { @@ -301,14 +322,14 @@ private Element getRootObjectFromClassPath() { } /** - * DOCUMENT ME! + * Loads the object from specified ClassPath. * - * @param classPathUrl DOCUMENT ME! + * @param classPathUrl Classpath as Url * - * @return DOCUMENT ME! + * @return Object * - * @throws JDOMException DOCUMENT ME! - * @throws IOException DOCUMENT ME! + * @throws JDOMException Error while building with JDOM + * @throws IOException IOException */ private Element getObjectFromClassPath(final String classPathUrl) throws JDOMException, IOException { final SAXBuilder builder = new SAXBuilder(false); @@ -318,11 +339,13 @@ private Element getObjectFromClassPath(final String classPathUrl) throws JDOMExc } /** - * DOCUMENT ME! + * Configures whether all Elements of the configurables if the given Configurable is null, + * or the specified Configurable. * - * @param singleConfig DOCUMENT ME! - * @param rootObject DOCUMENT ME! - * @param serverRootObject DOCUMENT ME! + * @param singleConfig if ==null all Configurable in configurables will be used, if + * !=null the specified Configurable will be used + * @param rootObject local root Object + * @param serverRootObject server root Object */ private void pureConfigure(final Configurable singleConfig, final Element rootObject, @@ -348,13 +371,13 @@ private void pureConfigure(final Configurable singleConfig, } /** - * DOCUMENT ME! + * Preprocesses the given Element. Resolves the Element with the configAttrProvider * - * @param e DOCUMENT ME! + * @param e Element * - * @return DOCUMENT ME! + * @return resolved Element * - * @throws IllegalStateException DOCUMENT ME! + * @throws IllegalStateException Error while resolving. */ private Element preprocessElement(final Element e) { if (e == null) { @@ -395,12 +418,12 @@ private Element preprocessElement(final Element e) { } /** - * DOCUMENT ME! + * Resolves the given Element with the given AttrResolver. * - * @param e DOCUMENT ME! - * @param resolver DOCUMENT ME! + * @param e Element to be resolved + * @param resolver the AttrResolver * - * @return DOCUMENT ME! + * @return resolved Element */ private Set resolveElement(final Element e, final AttrResolver resolver) { Set toResolve = new LinkedHashSet(); @@ -524,8 +547,8 @@ public String getSubstitutionAttr(final Element e) { } /** - * Creates a {@link Set} from the given xml snippet. This implementation assumes that there is a single - * root {@link Element} whose only purpose is to wrap the {@link Element}s to be created. In other words this + * Creates a {@link Set} from the given xml snippet. This implementation assumes that there is a single root + * {@link Element} whose only purpose is to wrap the {@link Element}s to be created. In other words this * implementation will return the child {@link Element}s of the {@link Document}'s root {@link Element}. The * returned {@link Element}s are detached from their root so they can be inserted into another {@link Document}. * @@ -615,7 +638,10 @@ private AttrResolver getAttrResolver(final AttrResolver resolver, final String k } /** - * DOCUMENT ME! + * Writes a new Configuration File into the LocalAbsouluteConfigurationFolder. + * + * @see #getLocalAbsoluteConfigurationFolder() + * @see #writeConfiguration(java.lang.String) */ public void writeConfiguration() { new File(getLocalAbsoluteConfigurationFolder()).mkdirs(); @@ -623,18 +649,18 @@ public void writeConfiguration() { } /** - * DOCUMENT ME! + * Returns the Url "~/.cismet/" * - * @return DOCUMENT ME! + * @return ~/.cismet/ */ public String getLocalAbsoluteConfigurationFolder() { return home + fs + folder + fs; } /** - * DOCUMENT ME! + * Writes a Configuration File in specified path. * - * @param path DOCUMENT ME! + * @param path path */ public void writeConfiguration(final String path) { try { @@ -672,90 +698,90 @@ public void writeConfiguration(final String path) { } /** - * DOCUMENT ME! + * Getter for {@link #defaultFileName}. * - * @return DOCUMENT ME! + * @return defaultFileName */ public String getDefaultFileName() { return defaultFileName; } /** - * DOCUMENT ME! + * Setter for {@link #defaultFileName}. * - * @param defaultFileName DOCUMENT ME! + * @param defaultFileName defaultFileName */ public void setDefaultFileName(final String defaultFileName) { this.defaultFileName = defaultFileName; } /** - * DOCUMENT ME! + * Getter for {@link #classPathFolder}. * - * @return DOCUMENT ME! + * @return classPathFolder */ public String getClassPathFolder() { return classPathFolder; } /** - * DOCUMENT ME! + * Setter for {@link #classPathFolder}. * - * @param classPathFolder DOCUMENT ME! + * @param classPathFolder classPathFolder */ public void setClassPathFolder(final String classPathFolder) { this.classPathFolder = classPathFolder; } /** - * DOCUMENT ME! + * Getter for {@link #home}. * - * @return DOCUMENT ME! + * @return home */ public String getHome() { return home; } /** - * DOCUMENT ME! + * Setter for {@link #home}. * - * @param home DOCUMENT ME! + * @param home home */ public void setHome(final String home) { this.home = home; } /** - * DOCUMENT ME! + * Getter for {@link #fs}. * - * @return DOCUMENT ME! + * @return file separator */ public String getFileSeperator() { return fs; } /** - * DOCUMENT ME! + * Setter for {@link #fs}. * - * @param fs DOCUMENT ME! + * @param fs file seperator */ public void setFileSeperator(final String fs) { this.fs = fs; } /** - * DOCUMENT ME! + * Getter for {@link #fallBackFileName}. * - * @return DOCUMENT ME! + * @return fallBackFileName */ public String getFallBackFileName() { return fallBackFileName; } /** - * DOCUMENT ME! + * Setter for {@link #fallBackFileName}. * - * @param fallBackFileName DOCUMENT ME! + * @param fallBackFileName fallBackFileName */ public void setFallBackFileName(final String fallBackFileName) { this.fallBackFileName = fallBackFileName; @@ -764,7 +790,7 @@ public void setFallBackFileName(final String fallBackFileName) { //~ Inner Interfaces ------------------------------------------------------- /** - * DOCUMENT ME! + * AttrResolver Interface. * * @version $Revision$, $Date$ */ @@ -773,9 +799,9 @@ private static interface AttrResolver { //~ Methods ------------------------------------------------------------ /** - * DOCUMENT ME! + * Getter for Attribute. * - * @return DOCUMENT ME! + * @return Attribute */ String getAttr(); } @@ -783,7 +809,7 @@ private static interface AttrResolver { //~ Inner Classes ---------------------------------------------------------- /** - * DOCUMENT ME! + * AttrResolver Implementation. * * @version $Revision$, $Date$ */ @@ -798,7 +824,7 @@ private abstract static class DefaultAttrResolver implements AttrResolver { /** * Creates a new DefaultAttrResolver object. * - * @param provider DOCUMENT ME! + * @param provider ConfigAttrProvider */ public DefaultAttrResolver(final ConfigAttrProvider provider) { this.provider = provider; @@ -806,7 +832,7 @@ public DefaultAttrResolver(final ConfigAttrProvider provider) { } /** - * DOCUMENT ME! + * Extended DefaultAttrResolver for Keys. * * @version $Revision$, $Date$ */ @@ -821,8 +847,8 @@ private abstract static class KeyAttrResolver extends DefaultAttrResolver { /** * Creates a new KeyAttrResolver object. * - * @param key DOCUMENT ME! - * @param provider DOCUMENT ME! + * @param key the given key + * @param provider the given ConfigAttrProvider */ public KeyAttrResolver(final String key, final ConfigAttrProvider provider) { super(provider); @@ -831,7 +857,7 @@ public KeyAttrResolver(final String key, final ConfigAttrProvider provider) { } /** - * DOCUMENT ME! + * Extended DefaultAttrResolver for Entrys. * * @version $Revision$, $Date$ */ @@ -842,7 +868,7 @@ private static final class EntryResolver extends DefaultAttrResolver { /** * Creates a new EntryResolver object. * - * @param provider DOCUMENT ME! + * @param provider given ConfigAttrProvider */ public EntryResolver(final ConfigAttrProvider provider) { super(provider); @@ -850,6 +876,11 @@ public EntryResolver(final ConfigAttrProvider provider) { //~ Methods ------------------------------------------------------------ + /** + * No Attributes. + * + * @return null + */ @Override public String getAttr() { return null; @@ -857,7 +888,7 @@ public String getAttr() { } /** - * DOCUMENT ME! + * Extended KeyAttrResolver for Users. * * @version $Revision$, $Date$ */ @@ -868,8 +899,8 @@ private static final class UserAttrResolver extends KeyAttrResolver { /** * Creates a new UserAttrResolver object. * - * @param key DOCUMENT ME! - * @param provider DOCUMENT ME! + * @param key given key + * @param provider given ConfigAttrProvider */ public UserAttrResolver(final String key, final ConfigAttrProvider provider) { super(key, provider); @@ -877,6 +908,11 @@ public UserAttrResolver(final String key, final ConfigAttrProvider provider) { //~ Methods ------------------------------------------------------------ + /** + * Getter for UserConfigAttr. + * + * @return userConfigAttr + */ @Override public String getAttr() { return provider.getUserConfigAttr(key); @@ -884,7 +920,7 @@ public String getAttr() { } /** - * DOCUMENT ME! + * Extended KeyAttrResolver for Groups. * * @version $Revision$, $Date$ */ @@ -895,8 +931,8 @@ private static final class GroupAttrResolver extends KeyAttrResolver { /** * Creates a new GroupAttrResolver object. * - * @param key DOCUMENT ME! - * @param provider DOCUMENT ME! + * @param key given key + * @param provider given ConfigAttrProvider */ public GroupAttrResolver(final String key, final ConfigAttrProvider provider) { super(key, provider); @@ -904,6 +940,11 @@ public GroupAttrResolver(final String key, final ConfigAttrProvider provider) { //~ Methods ------------------------------------------------------------ + /** + * Getter for GroupConfigAttr. + * + * @return GroupConfigAttr + */ @Override public String getAttr() { return provider.getGroupConfigAttr(key); @@ -911,7 +952,7 @@ public String getAttr() { } /** - * DOCUMENT ME! + * Extended KeyAttrResolver for Domains. * * @version $Revision$, $Date$ */ @@ -922,8 +963,8 @@ private static final class DomainAttrResolver extends KeyAttrResolver { /** * Creates a new DomainAttrResolver object. * - * @param key DOCUMENT ME! - * @param provider DOCUMENT ME! + * @param key given key + * @param provider given ConfigAttrProvider */ public DomainAttrResolver(final String key, final ConfigAttrProvider provider) { super(key, provider); @@ -931,6 +972,11 @@ public DomainAttrResolver(final String key, final ConfigAttrProvider provider) { //~ Methods ------------------------------------------------------------ + /** + * Getter for DomainConfigAttr. + * + * @return DomainConfigAttr + */ @Override public String getAttr() { return provider.getDomainConfigAttr(key); diff --git a/src/main/java/de/cismet/tools/configuration/NoWriteError.java b/src/main/java/de/cismet/tools/configuration/NoWriteError.java index 0a15f6d..ce4ff28 100644 --- a/src/main/java/de/cismet/tools/configuration/NoWriteError.java +++ b/src/main/java/de/cismet/tools/configuration/NoWriteError.java @@ -8,7 +8,7 @@ package de.cismet.tools.configuration; /** - * DOCUMENT ME! + * unnecessary class, another appropriate exception could be thrown. * * @author thorsten.hell@cismet.de * @version $Revision$, $Date$ diff --git a/src/main/java/de/cismet/tools/configuration/TakeoffHook.java b/src/main/java/de/cismet/tools/configuration/TakeoffHook.java index a3dac32..345158c 100644 --- a/src/main/java/de/cismet/tools/configuration/TakeoffHook.java +++ b/src/main/java/de/cismet/tools/configuration/TakeoffHook.java @@ -12,7 +12,7 @@ package de.cismet.tools.configuration; /** - * DOCUMENT ME! + * TakeoffHook. * * @author thorsten * @version $Revision$, $Date$ diff --git a/src/main/java/de/cismet/tools/configuration/package.html b/src/main/java/de/cismet/tools/configuration/package.html new file mode 100644 index 0000000..45e520a --- /dev/null +++ b/src/main/java/de/cismet/tools/configuration/package.html @@ -0,0 +1,8 @@ + + +de.cismet.tools.configuration + + + Includes the cismet configuration. + + diff --git a/src/main/java/de/cismet/tools/package.html b/src/main/java/de/cismet/tools/package.html new file mode 100644 index 0000000..f4814e8 --- /dev/null +++ b/src/main/java/de/cismet/tools/package.html @@ -0,0 +1,10 @@ + + + + de.cismet.tools + + + + Collection of various cismet Tools. + + \ No newline at end of file diff --git a/src/main/java/de/cismet/veto/VetoException.java b/src/main/java/de/cismet/veto/VetoException.java index bca44c1..3659c57 100644 --- a/src/main/java/de/cismet/veto/VetoException.java +++ b/src/main/java/de/cismet/veto/VetoException.java @@ -12,7 +12,7 @@ package de.cismet.veto; /** - * DOCUMENT ME! + * Veto Exception Class. * * @author spuhl * @version $Revision$, $Date$ @@ -30,7 +30,7 @@ public VetoException() { /** * Creates a new VetoException object. * - * @param message DOCUMENT ME! + * @param message the detail message */ public VetoException(final String message) { super(message); diff --git a/src/main/java/de/cismet/veto/VetoListener.java b/src/main/java/de/cismet/veto/VetoListener.java index 00ec84f..c525467 100644 --- a/src/main/java/de/cismet/veto/VetoListener.java +++ b/src/main/java/de/cismet/veto/VetoListener.java @@ -12,7 +12,7 @@ package de.cismet.veto; /** - * DOCUMENT ME! + * Veto Listener interface. * * @author spuhl * @version $Revision$, $Date$ @@ -22,9 +22,9 @@ public interface VetoListener { //~ Methods ---------------------------------------------------------------- /** - * DOCUMENT ME! + * throws Veto Exception. * - * @throws VetoException DOCUMENT ME! + * @throws VetoException Veto Exception. */ void veto() throws VetoException; } diff --git a/src/main/java/de/cismet/veto/package.html b/src/main/java/de/cismet/veto/package.html new file mode 100644 index 0000000..a3ff740 --- /dev/null +++ b/src/main/java/de/cismet/veto/package.html @@ -0,0 +1,10 @@ + + + + de.cismet.veto + + + + Includes {@link de.cismet.veto.VetoException}. + + \ No newline at end of file