Commit 912f833c authored by Jody Garnett's avatar Jody Garnett
Browse files

crushing remaining errors

parent 0e5ae51a
......@@ -5,7 +5,6 @@
*/
package org.geoserver.monitor;
import java.io.File;
import java.io.IOException;
import java.util.Properties;
......@@ -43,7 +42,7 @@ public class MonitorConfig implements ApplicationContextAware {
public static enum Mode {
HISTORY, LIVE,
* @deprecated // use live
@Deprecated // use live
HYBRID;
}
......@@ -186,10 +185,9 @@ public class MonitorConfig implements ApplicationContextAware {
* Allows to retrieve a generic property from the configuration. Extensions and plugins are
* supposed to use the plugin.property naming convention, passing both a prefix and a name
*
* @param <T>
* @param prefix
* @param name
* @param target
* @param prefix namespace prefix
* @param name name
* @param target Class for conversion
*
*/
public <T> T getProperty(String prefix, String name, Class<T> target) {
......
......@@ -11,15 +11,15 @@ import java.util.Map;
/**
* Mangles service URL's based on teh presence of a {@link LocalWorkspace} and {@link LocalLayer}.
* <p>
* When the local workspace and layer are present this mangler will turns urls of the form:
* When the local workspace and layer are present this mangler will turns urls of the form:</p>
* <pre>
* /geoserver/wfs?...
* </pre>
* into:
* <pre>
* /geoserver/&lt;localWorkspace>/&lt;localLayer>/wfs?...
* /geoserver/&lt;localWorkspace&gt;/&lt;localLayer&gt;/wfs?...
* </pre>
* </p>
*
* @author Justin Deoliveira, OpenGeo
*
*/
......
......@@ -55,22 +55,20 @@ public interface CatalogFilter {
/**
* Return true to hide the specified workspace from the catalog
*
* @param layer
*
* @param workspace Workspace to hide
*/
boolean hideWorkspace(WorkspaceInfo workspace);
/**
* Return true to hide the specified resource from the catalog
*
* @param layer
*
* @param layer Resource (layer) to hide
*/
boolean hideResource(ResourceInfo resource);
/**
* Returns a Filter equivalent to this CatalogFilter when applied to an object of the specified type.
* @param clazz
* @param clazz CatalogInfo type to check against security filters
*/
Filter getSecurityFilter(final Class<? extends CatalogInfo> clazz);
}
......@@ -51,7 +51,7 @@ public class XCQL {
* </p>
* @param filter The ecql/cql string.
*
* @see ECQL#toFiter(String)
* @see ECQL#toFilter(String)
*/
public static Filter toFilter(String filter) throws CQLException {
try {
......
......@@ -48,8 +48,6 @@ import org.springframework.web.servlet.mvc.AbstractController;
* </code>
* </pre>
*
* </p>
*
* @author Justin Deoliveira, The Open Planning Project
* @author Andrea Aime - GeoSolutions
*/
......
......@@ -44,8 +44,6 @@ import org.springframework.web.servlet.mvc.AbstractController;
* </code>
* </pre>
*
* </p>
*
* @author Justin Deoliveira, The Open Planning Project
* @author Andrea Aime - GeoSolutions
*/
......
......@@ -73,23 +73,22 @@ import org.xmlpull.v1.XmlPullParserFactory;
* Dispatches an http request to an open web service (OWS).
* <p>
* An OWS request contains three bits of information:
* <ol>
* <li>The service being called
* <li>The operation of the service to execute
* <li>The version of the service ( optional )
* </ol>
* Additional, an OWS request can contain an arbitray number of additional
* parameters.
* </p>
* <ol>
* <li>The service being called
* <li>The operation of the service to execute
* <li>The version of the service ( optional )
* </ol>
* <p>
* An OWS request can be specified in two forms. The first form is known as "KVP"
* in which all the parameters come in the form of a set of key-value pairs.
* Commonly this type of request is made in an http "GET" request, the parameters
* being specified in the query string:
* Additional, an OWS request can contain an arbitray number of additional parameters.
* </p>
* <p>
* An OWS request can be specified in two forms. The first form is known as "KVP" in which all the parameters come in the form of a set of key-value
* pairs. Commonly this type of request is made in an http "GET" request, the parameters being specified in the query string:
*
* <pre>
* <code>http://www.xyz.com/geoserver?service=someService&request=someRequest&version=X.Y.Z&param1=...&param2=...
* </pre>
* <pre>
* <code>http://www.xyz.com/geoserver?service=someService&amp;request=someRequest&amp;version=X.Y.Z&amp;param1=...&amp;param2=...
* </pre>
*
* This type of request can also be made in a "POST" request in with a
* mime-type of "application/x-www-form-urlencoded".
......@@ -98,27 +97,21 @@ import org.xmlpull.v1.XmlPullParserFactory;
* The second form is known as "XML" in which all the parameters come in the
* form of an xml document. This type of request is made in an http "POST"
* request.
*
* <pre>
* <code>
* </p>
* <pre><code>
* &lt;?xml version="1.0" encoding="UTF-8"?&gt;
* &lt;SomeRequest service="someService" version="X.Y.Z"&gt;
* &lt;Param1&gt;...&lt;/Param1&gt;
* &lt;Param2&gt;...&lt;/Param2&gt;
* ...
* &lt;/SomeRequest&gt;
* </code>
* </pre>
* </p>
* </code></pre>
* <p>
* When a request is received, the <b>service</b> the <b>version</b> parameters
* are used to locate a service desciptor, an instance of {@link Service}. With
* the service descriptor, the <b>request</b> parameter is used to locate the
* operation of the service to call.
* When a request is received, the <b>service</b> the <b>version</b> parameters are used to locate a service desciptor, an instance of {@link Service}
* . With the service descriptor, the <b>request</b> parameter is used to locate the operation of the service to call.
* </p>
*
* @author Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
*
*/
public class Dispatcher extends AbstractController {
/**
......@@ -175,7 +168,7 @@ public class Dispatcher extends AbstractController {
* If set to <code>true</code>, the dispatcher with throw exceptions when
* it encounters something that is not 100% compliant with CITE standards.
* An example would be a request which specifies the servce in the context
* path: '.../geoserver/wfs?request=...' and not with the kvp '&service=wfs'.
* path: '.../geoserver/wfs?request=...' and not with the kvp '&amp;service=wfs'.
* </p>
*
* @param citeCompliant <code>true</code> to set compliance,
......
......@@ -10,15 +10,16 @@ import org.geoserver.platform.Service;
import org.geoserver.platform.ServiceException;
/**
* Provides callbacks for the life cycle of an ows request.
* Provides call backs for the life cycle of an ows request.
* <p>
* Instances of this interface should be registered in a spring application context like:
* </p>
*
* <pre>
* &lt;bean id="myCallback" class="org.acme.MyCallback"/>
* &lt;bean id="myCallback" class="org.acme.MyCallback"/&gt;
* </pre>
* </p>
*
* @author Justin Deoliveira, OpenGEO
*
*/
public interface DispatcherCallback {
......
......@@ -32,8 +32,7 @@ import org.springframework.web.servlet.mvc.AbstractController;
/**
* Controller which publishes files through a web interface.
* <p>
* To use this controller, it should be mapped to a particular url in the url mapping of the spring
* dispatcher servlet. Example:
* To use this controller, it should be mapped to a particular url in the url mapping of the spring dispatcher servlet. Example:
*
* <pre>
* <code>
......@@ -50,10 +49,8 @@ import org.springframework.web.servlet.mvc.AbstractController;
* </code>
* </pre>
*
* </p>
*
* @author Justin Deoliveira, The Open Planning Project
*
*/
public class FilePublisher extends AbstractURLPublisher {
/**
......
......@@ -14,26 +14,21 @@ import org.geoserver.ows.util.KvpUtils;
/**
* A kvp parser which parses a value consisting of tokens in a flat list.
* <p>
* A value in flat form is a list of tokens separated by a single delimiter.
* The default delimiter is a comma ( , ). Example:
* <pre>
* <code>
* key=token1,token2,...,tokenN
* </code>
* </pre>
* A value in flat form is a list of tokens separated by a single delimiter. The default delimiter is a comma ( , ). Example:
* </p>
*
* <pre><code>
* key=token1,token2,...,tokenN
* </code></pre>
* <p>
* Upon processing of each token, the token is parsed into an instance of
* {@link #getBinding()}. Subclasses should override the method
* Upon processing of each token, the token is parsed into an instance of {@link #getBinding()}. Subclasses should override the method
* {@link #parseToken(String)}.
* </p>
* <p>
* By default, the {@link #parse(String)} method returns an list which contains
* instances of {@link #getBinding()}. The {@link #parse(List)} method may
* be overidden to return a differnt type of object.
* By default, the {@link #parse(String)} method returns an list which contains instances of {@link #getBinding()}. The {@link #parse(List)} method
* may be overidden to return a differnt type of object.
* </p>
* @author Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
*
*/
public class FlatKvpParser extends KvpParser {
/**
......
......@@ -13,17 +13,20 @@ import org.geotools.util.Version;
/**
* Parses a key-value pair into a key-object pair.
* <p>
* This class is intended to be subclassed. Subclasses need declare the key in
* which they parse, and the type of object they parse into.
* This class is intended to be subclassed. Subclasses need declare the key in which they parse, and the type of object they parse into.
* </p>
* <p>
* Instances need to be declared in a spring context like the following:
* </p>
*
* <pre>
* <code>
* &lt;bean id="myKvpParser" class="org.xzy.MyKvpParser"/&gt;
* </code>
* </pre>
*
* Where <code>com.xzy.MyKvpParser</code> could be something like:
*
* <pre>
* <code>
* public class MyKvpParser extends KvpParser {
......@@ -38,35 +41,34 @@ import org.geotools.util.Version;
* }
* </code>
* </pre>
* </p>
* <p>
* <h4>Operation Binding</h4>
* In the normal case, a kvp parser is engaged when a request specifies a name
* which matches the name declared by the kvp parser. It is also possible to attach
* a kvp parser so that it only engages on a particular operation. This is done by
* declaring the one or more of the following:
* <p>
* In the normal case, a kvp parser is engaged when a request specifies a name which matches the name declared by the kvp
* parser. It is also possible to attach a kvp parser so that it only engages on a particular operation. This is done by declaring the one or more of
* the following:</p>
* <ul>
* <li>service
* <li>version
* <li>request
* </ul>
* When a kvp parser declares one or more of these properties, it will only
* be engaged if an incoming request specicfies matching values of the properties.
* <li>service</li>
* <li>version</li>
* <li>request</li>
* </ul>
* <p>
* When a kvp parser declares one or more of these properties, it will only be engaged if an incoming request specicfies matching values of the
* properties.
* </p>
* <p>
* The following bean declaration would create the above kvp parser so that it
* only engages when the service is "MyService", and the request is "MyRequest".
* The following bean declaration would create the above kvp parser so that it only engages when the service is "MyService", and the request is
* "MyRequest".
* </p>
* <pre>
* <code>
* &lt;bean id="myKvpParser" class="org.xzy.MyKvpParser">
* &lt;property name="service">MyService&lt;/property>
* &lt;property name="request">MyRequest&lt;/property>
* &lt;bean id="myKvpParser" class="org.xzy.MyKvpParser"&gt;
* &lt;property name="service">MyService&lt;/property&gt;
* &lt;property name="request">MyRequest&lt;/property&gt;
* &lt;bean>
* </code>
* </pre>
* </p>
*
* @author Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
*
*/
public abstract class KvpParser {
/**
......
......@@ -60,7 +60,6 @@ import org.geotools.util.Converters;
* }
* </code>
* </pre>
* </p>
*
* @author Justin Deoliveira, The Open Planning Project
*
......
......@@ -25,15 +25,12 @@ import org.geoserver.platform.ServiceException;
import org.geotools.xml.Encoder;
/**
* A default implementation of {@link ServiceExceptionHandler} which outputs
* as service exception in a <code>ows:ExceptionReport</code> document.
* A default implementation of {@link ServiceExceptionHandler} which outputs as service exception in a <code>ows:ExceptionReport</code> document.
* <p>
* This service exception handler will generate an OWS exception report,
* see {@linkplain "http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd"}.
* This service exception handler will generate an OWS exception report, see {@link "http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd"} .
* </p>
*
* @author Justin Deoliveira, The Open Planning Project
*
*/
public class OWS10ServiceExceptionHandler extends ServiceExceptionHandler {
protected boolean verboseExceptions = false;
......
......@@ -7,6 +7,9 @@ package org.geoserver.ows;
import java.util.Map;
/**
* Callback that can change the contents of the baseURL, the path or the KVP map.
*/
public interface URLMangler {
public enum URLType {
/** The link points outside Geoserver **/
......@@ -24,7 +27,7 @@ public interface URLMangler {
* @param baseURL the base URL, containing host, port and application
* @param path after the application name
* @param kvp the GET request parameters
* @param the URL type
* @param type URL type (External, resource or service) for consideration during mangling
*/
public void mangleURL(StringBuilder baseURL, StringBuilder path, Map<String, String> kvp, URLType type);
......
......@@ -79,7 +79,7 @@ public interface Resource extends Serializable {
*
* Registers listener with ResourceNotificationDispatcher.
*
* @See ResourceNotificationDispatcher.addListener
* @See {@link ResourceNotificationDispatcher#addListener(String, ResourceListener)}
*
*/
void addListener( ResourceListener listener);
......@@ -88,8 +88,7 @@ public interface Resource extends Serializable {
*
* Removes listener from ResourceNotificationDispatcher.
*
* @See ResourceNotificationDispatcher.addListener.addListener
*
* @see {@link ResourceNotificationDispatcher#removeListener(String, ResourceListener)}
*/
void removeListener( ResourceListener listener);
......
......@@ -20,12 +20,12 @@ import java.util.List;
* A listener to path="user_projections/epsg.properties" receive notification on change to the <b>epsg.properties</b> file. This notification will
* consist of of delta=<code>user_projections/epsg.properties</code></li>
* <li>Listeners on a directory will be notified on any resource change in the directory. The delta will include any modified directories.
*
* <br/>
* A listener on path="style" is notified on change to <b>style/pophatch.sld</b> and <b>style/icons/city.png</b>. The change to these two files is
* represented with delta consisting of delta=<code>style,style/icons,style/icons/city.png,style/pophatch.sld</code></li>
* </ul>
* <li>Removed resources may be represented in notification, but will have reverted to {@link Resource.Type#UNDEFINED} since the content is no longer
* present.</li> </ul>
* present.</li>
* </ul>
*
* @author Jody Garnett (Boundless)
*/
......@@ -50,9 +50,17 @@ public class ResourceNotification {
this.path = path;
this.kind = kind;
}
/**
* Nature of change
* @return nature of change
*/
public Kind getKind() {
return kind;
}
/**
* Resource path changed
* @return resource path changed
*/
public String getPath() {
return path;
}
......@@ -138,8 +146,9 @@ public class ResourceNotification {
/**
* Notification of a change to a single resource.
*
* @param store
* @param path
* @param path resource path changed
* @param kind nature of change
* @param timestamp local time stamp of change
*/
ResourceNotification(String path, Kind kind, long timestamp) {
this.path = path;
......@@ -151,9 +160,10 @@ public class ResourceNotification {
/**
* Notification changes to directory contents.
*
* @see #notification(ResourceStore, File, String, List, List, List)
* @param store
* @param delta
* @param path resource path changed
* @param kind nature of change
* @param timestamp local time stamp of change
* @param delta List of changes
*/
@SuppressWarnings("unchecked")
public ResourceNotification( String path, Kind kind, long timestamp, List<Event> delta ){
......
......@@ -49,7 +49,7 @@ public interface ResourceNotificationDispatcher {
* (Delete notifications are propagated to their children. All operations are propagated to their parents.)
* See {@link SimpleResourceNotificationDispatcher} for an example.
*
* @param notification
* @param notification notification of resource change (may be for a single resource or a directory)
*/
public void changed(ResourceNotification notification);
......
......@@ -43,7 +43,7 @@ public class Resources {
* Test if the file or directory denoted by this resource exists.
*
* @see File#exists()
* @param resource
* @param resource Resource indicated
* @return true If resource is not UNDEFINED
*/
public static boolean exists(Resource resource) {
......@@ -54,7 +54,7 @@ public class Resources {
* Test if the file or directory can be read.
*
* @see File#canRead()
* @param resource
* @param resource Resource indicated
* @return true If resource is not UNDEFINED
*/
public static boolean canRead(Resource resource) {
......@@ -75,7 +75,7 @@ public class Resources {
*
*
* @see File#isHidden()
* @param resource
* @param resource Resource indicated
* @return true If resource is hidden
*/
public static boolean isHidden(Resource resource) {
......@@ -98,7 +98,7 @@ public class Resources {
* @see Resource#dir()
* @see Resource#file()
*
* @param resource
* @param resource Resource indicated
* @return Existing file, or null for {@link Resource.Type#UNDEFINED}.
*/
public static File find(Resource resource) {
......@@ -119,14 +119,14 @@ public class Resources {
/**
* Checks {@link Resource#getType()} and returns existing dir() if available, or null for {@link Resource.Type#UNDEFINED} or
* {@link Resource.Type#FILE}.
* {@link Resource.Type#RESOURCE}.
*
* This approach is a reproduction of GeoServerDataDirectory findDataDir logic and will not create a new directory.
*
* @see Resource#dir()
*
* @param resource
* @return Existing directory, or null
* @param resource Resource indicated
* @return File reference to existing directory, or null for an existing file (or if directory does not exist)
*/
public static File directory(Resource resource) {
return directory(resource, false);
......@@ -137,9 +137,9 @@ public class Resources {
*
* @see Resource#dir()
*
* @param resource
* @param create
* @return directory, or null
* @param resource Resource indicated
* @param create true to create directory (if it does not exsist)
* @return File reference to (possibly new) directory
*/
public static File directory(Resource resource, boolean create) {
final File f;
......@@ -165,7 +165,7 @@ public class Resources {
*
* @see Resource#file()
*
* @param resource
* @param resource Resource indicated
* @return Existing file, or null
*/
public static File file(Resource resource) {
......@@ -177,8 +177,8 @@ public class Resources {
*
* @see Resource#file()
*
* @param resource
* @param create
* @param resource Resource indicated
* @param create true to create (if needed)
* @return file, or null
*/
public static File file(Resource resource, boolean create) {
......@@ -202,9 +202,9 @@ public class Resources {
*
* This approach is a reproduction of GeoServerResourceLoader createNewDirectory logic.
*
* @param resource
* @param resource Resource indicated
* @return newly created file
* @throws IOException
* @throws IOException If directory could not be created (as file or directory already exists)
*/
public static File createNewDirectory(Resource resource) throws IOException {
switch (resource.getType()) {
......@@ -226,9 +226,9 @@ public class Resources {
*
* This approach is a reproduction of GeoServerResourceLoader createNewFile logic.
*
* @param resource
* @param resource Resource indicated
* @return newly created file
* @throws IOException
* @throws IOException If path indicates a file (or directory) that already exists
*/
public static File createNewFile(Resource resource) throws IOException {
switch (resource.getType()) {
......@@ -246,9 +246,9 @@ public class Resources {
/**
* Search for resources using pattern and last modified time.
*
* @param resource
* @param lastModified
* @return list of modified resoruces
* @param resource Resource indicated
* @param lastModified time stamp to search from
* @return list of modified resources
*/
public static List<Resource> search(Resource resource, long lastModified) {
if (resource.getType() == Type.DIRECTORY) {
......@@ -274,7 +274,7 @@ public class Resources {
* Write the contents of a stream into a resource
* @param data data to write
* @param destination resource to write to