mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	Fix whitespace errors.
This commit is contained in:
		| @@ -26,7 +26,7 @@ import java.util.Collection; | |||||||
|  * Describes a protocol and all parameters associated with it, as required by |  * Describes a protocol and all parameters associated with it, as required by | ||||||
|  * a protocol plugin for guacd. This class allows known parameters for a |  * a protocol plugin for guacd. This class allows known parameters for a | ||||||
|  * protocol to be exposed to the user as friendly fields. |  * protocol to be exposed to the user as friendly fields. | ||||||
|  *  |  * | ||||||
|  * @author Michael Jumper |  * @author Michael Jumper | ||||||
|  */ |  */ | ||||||
| public class ProtocolInfo { | public class ProtocolInfo { | ||||||
| @@ -46,10 +46,10 @@ public class ProtocolInfo { | |||||||
|      */ |      */ | ||||||
|     private Collection<ProtocolParameter> parameters = |     private Collection<ProtocolParameter> parameters = | ||||||
|             new ArrayList<ProtocolParameter>(); |             new ArrayList<ProtocolParameter>(); | ||||||
|      |  | ||||||
|     /** |     /** | ||||||
|      * Returns the human-readable title associated with this protocol. |      * Returns the human-readable title associated with this protocol. | ||||||
|      *  |      * | ||||||
|      * @return The human-readable title associated with this protocol. |      * @return The human-readable title associated with this protocol. | ||||||
|      */ |      */ | ||||||
|     public String getTitle() { |     public String getTitle() { | ||||||
| @@ -58,7 +58,7 @@ public class ProtocolInfo { | |||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Sets the human-readable title associated with this protocol. |      * Sets the human-readable title associated with this protocol. | ||||||
|      *  |      * | ||||||
|      * @param title The human-readable title to associate with this protocol. |      * @param title The human-readable title to associate with this protocol. | ||||||
|      */ |      */ | ||||||
|     public void setTitle(String title) { |     public void setTitle(String title) { | ||||||
| @@ -68,7 +68,7 @@ public class ProtocolInfo { | |||||||
|     /** |     /** | ||||||
|      * Returns the unique name of this protocol. The protocol name is the |      * Returns the unique name of this protocol. The protocol name is the | ||||||
|      * value required by the corresponding protocol plugin for guacd. |      * value required by the corresponding protocol plugin for guacd. | ||||||
|      *  |      * | ||||||
|      * @return The unique name of this protocol. |      * @return The unique name of this protocol. | ||||||
|      */ |      */ | ||||||
|     public String getName() { |     public String getName() { | ||||||
| @@ -78,7 +78,7 @@ public class ProtocolInfo { | |||||||
|     /** |     /** | ||||||
|      * Sets the unique name of this protocol. The protocol name is the value |      * Sets the unique name of this protocol. The protocol name is the value | ||||||
|      * required by the corresponding protocol plugin for guacd. |      * required by the corresponding protocol plugin for guacd. | ||||||
|      *  |      * | ||||||
|      * @param name The unique name of this protocol. |      * @param name The unique name of this protocol. | ||||||
|      */ |      */ | ||||||
|     public void setName(String name) { |     public void setName(String name) { | ||||||
| @@ -89,7 +89,7 @@ public class ProtocolInfo { | |||||||
|      * Returns a mutable collection of the protocol parameters associated with |      * Returns a mutable collection of the protocol parameters associated with | ||||||
|      * this protocol. Changes to this collection affect the parameters exposed |      * this protocol. Changes to this collection affect the parameters exposed | ||||||
|      * to the user. |      * to the user. | ||||||
|      *  |      * | ||||||
|      * @return A mutable collection of protocol parameters. |      * @return A mutable collection of protocol parameters. | ||||||
|      */ |      */ | ||||||
|     public Collection<ProtocolParameter> getParameters() { |     public Collection<ProtocolParameter> getParameters() { | ||||||
|   | |||||||
| @@ -24,7 +24,7 @@ import java.util.Collection; | |||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Represents a parameter of a protocol. |  * Represents a parameter of a protocol. | ||||||
|  *  |  * | ||||||
|  * @author Michael Jumper |  * @author Michael Jumper | ||||||
|  */ |  */ | ||||||
| public class ProtocolParameter { | public class ProtocolParameter { | ||||||
| @@ -60,7 +60,7 @@ public class ProtocolParameter { | |||||||
|          */ |          */ | ||||||
|         ENUM |         ENUM | ||||||
|     } |     } | ||||||
|      |  | ||||||
|     /** |     /** | ||||||
|      * The unique name that identifies this parameter to the protocol plugin. |      * The unique name that identifies this parameter to the protocol plugin. | ||||||
|      */ |      */ | ||||||
| @@ -75,18 +75,18 @@ public class ProtocolParameter { | |||||||
|      * The type of this field. |      * The type of this field. | ||||||
|      */ |      */ | ||||||
|     private Type type; |     private Type type; | ||||||
|      |  | ||||||
|     /** |     /** | ||||||
|      * The value of this parameter, for boolean parameters. |      * The value of this parameter, for boolean parameters. | ||||||
|      */ |      */ | ||||||
|     private String value; |     private String value; | ||||||
|      |  | ||||||
|     /** |     /** | ||||||
|      * A collection of all associated parameter options. |      * A collection of all associated parameter options. | ||||||
|      */ |      */ | ||||||
|     private Collection<ProtocolParameterOption> options = |     private Collection<ProtocolParameterOption> options = | ||||||
|             new ArrayList<ProtocolParameterOption>(); |             new ArrayList<ProtocolParameterOption>(); | ||||||
|      |  | ||||||
|     /** |     /** | ||||||
|      * Returns the name associated with this protocol parameter. |      * Returns the name associated with this protocol parameter. | ||||||
|      * @return The name associated with this protocol parameter. |      * @return The name associated with this protocol parameter. | ||||||
| @@ -99,7 +99,7 @@ public class ProtocolParameter { | |||||||
|      * Sets the name associated with this protocol parameter. This name must |      * Sets the name associated with this protocol parameter. This name must | ||||||
|      * uniquely identify this parameter among the others accepted by the |      * uniquely identify this parameter among the others accepted by the | ||||||
|      * corresponding protocol. |      * corresponding protocol. | ||||||
|      *  |      * | ||||||
|      * @param name The name to assign to this protocol parameter. |      * @param name The name to assign to this protocol parameter. | ||||||
|      */ |      */ | ||||||
|     public void setName(String name) { |     public void setName(String name) { | ||||||
| @@ -117,7 +117,7 @@ public class ProtocolParameter { | |||||||
|     /** |     /** | ||||||
|      * Sets the title associated with this protocol parameter. The title must |      * Sets the title associated with this protocol parameter. The title must | ||||||
|      * be a human-readable string which describes accurately this parameter. |      * be a human-readable string which describes accurately this parameter. | ||||||
|      *  |      * | ||||||
|      * @param title A human-readable string describing this parameter. |      * @param title A human-readable string describing this parameter. | ||||||
|      */ |      */ | ||||||
|     public void setTitle(String title) { |     public void setTitle(String title) { | ||||||
| @@ -135,7 +135,7 @@ public class ProtocolParameter { | |||||||
|     /** |     /** | ||||||
|      * Sets the value associated with this protocol parameter. The value must |      * Sets the value associated with this protocol parameter. The value must | ||||||
|      * be a human-readable string which describes accurately this parameter. |      * be a human-readable string which describes accurately this parameter. | ||||||
|      *  |      * | ||||||
|      * @param value A human-readable string describing this parameter. |      * @param value A human-readable string describing this parameter. | ||||||
|      */ |      */ | ||||||
|     public void setValue(String value) { |     public void setValue(String value) { | ||||||
| @@ -161,7 +161,7 @@ public class ProtocolParameter { | |||||||
|     /** |     /** | ||||||
|      * Returns a mutable collection of protocol parameter options. Changes to |      * Returns a mutable collection of protocol parameter options. Changes to | ||||||
|      * this collection directly affect the available options. |      * this collection directly affect the available options. | ||||||
|      *  |      * | ||||||
|      * @return A mutable collection of parameter options. |      * @return A mutable collection of parameter options. | ||||||
|      */ |      */ | ||||||
|     public Collection<ProtocolParameterOption> getOptions() { |     public Collection<ProtocolParameterOption> getOptions() { | ||||||
|   | |||||||
| @@ -21,7 +21,7 @@ package net.sourceforge.guacamole.net.basic; | |||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Describes an available legal value for an enumerated protocol parameter. |  * Describes an available legal value for an enumerated protocol parameter. | ||||||
|  *  |  * | ||||||
|  * @author Michael Jumper |  * @author Michael Jumper | ||||||
|  */ |  */ | ||||||
| public class ProtocolParameterOption { | public class ProtocolParameterOption { | ||||||
| @@ -31,16 +31,16 @@ public class ProtocolParameterOption { | |||||||
|      * chosen. |      * chosen. | ||||||
|      */ |      */ | ||||||
|     private String value; |     private String value; | ||||||
|     |  | ||||||
|     /** |     /** | ||||||
|      * A human-readable title describing the effect of the value. |      * A human-readable title describing the effect of the value. | ||||||
|      */ |      */ | ||||||
|     private String title; |     private String title; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Returns the value that will be sent to the client plugin if this option  |      * Returns the value that will be sent to the client plugin if this option | ||||||
|      * is chosen. |      * is chosen. | ||||||
|      *  |      * | ||||||
|      * @return The value that will be sent if this option is chosen. |      * @return The value that will be sent if this option is chosen. | ||||||
|      */ |      */ | ||||||
|     public String getValue() { |     public String getValue() { | ||||||
| @@ -50,7 +50,7 @@ public class ProtocolParameterOption { | |||||||
|     /** |     /** | ||||||
|      * Sets the value that will be sent to the client plugin if this option is |      * Sets the value that will be sent to the client plugin if this option is | ||||||
|      * chosen. |      * chosen. | ||||||
|      *  |      * | ||||||
|      * @param value The value to send if this option is chosen. |      * @param value The value to send if this option is chosen. | ||||||
|      */ |      */ | ||||||
|     public void setValue(String value) { |     public void setValue(String value) { | ||||||
| @@ -72,5 +72,5 @@ public class ProtocolParameterOption { | |||||||
|     public void setTitle(String title) { |     public void setTitle(String title) { | ||||||
|         this.title = title; |         this.title = title; | ||||||
|     } |     } | ||||||
|      |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -99,7 +99,7 @@ public class List extends AuthenticatingHttpServlet { | |||||||
|         // Sys-admin permission |         // Sys-admin permission | ||||||
|         Permission systemPermission = |         Permission systemPermission = | ||||||
|                 new SystemPermission(SystemPermission.Type.ADMINISTER); |                 new SystemPermission(SystemPermission.Type.ADMINISTER); | ||||||
|          |  | ||||||
|         // Write actual XML |         // Write actual XML | ||||||
|         try { |         try { | ||||||
|  |  | ||||||
|   | |||||||
| @@ -66,10 +66,10 @@ public class List extends AuthenticatingHttpServlet { | |||||||
|      */ |      */ | ||||||
|     private static final String[] KNOWN_PROTOCOLS = new String[]{ |     private static final String[] KNOWN_PROTOCOLS = new String[]{ | ||||||
|         "vnc", "rdp", "ssh"}; |         "vnc", "rdp", "ssh"}; | ||||||
|      |  | ||||||
|     /** |     /** | ||||||
|      * Parses the given XML file, returning the parsed ProtocolInfo. |      * Parses the given XML file, returning the parsed ProtocolInfo. | ||||||
|      *  |      * | ||||||
|      * @param input An input stream containing XML describing the parameters |      * @param input An input stream containing XML describing the parameters | ||||||
|      *              associated with a protocol supported by Guacamole. |      *              associated with a protocol supported by Guacamole. | ||||||
|      * @return A new ProtocolInfo object which contains the parameters described |      * @return A new ProtocolInfo object which contains the parameters described | ||||||
| @@ -115,7 +115,7 @@ public class List extends AuthenticatingHttpServlet { | |||||||
|     /** |     /** | ||||||
|      * Given an XML stream and a fully-populated ProtocolInfo object, writes |      * Given an XML stream and a fully-populated ProtocolInfo object, writes | ||||||
|      * out the corresponding protocol XML describing all available parameters. |      * out the corresponding protocol XML describing all available parameters. | ||||||
|      *  |      * | ||||||
|      * @param xml The XMLStreamWriter to use to write the XML. |      * @param xml The XMLStreamWriter to use to write the XML. | ||||||
|      * @param protocol The ProtocolInfo object to read parameters and protocol |      * @param protocol The ProtocolInfo object to read parameters and protocol | ||||||
|      *                 information from. |      *                 information from. | ||||||
| @@ -124,7 +124,7 @@ public class List extends AuthenticatingHttpServlet { | |||||||
|     private void writeProtocol(XMLStreamWriter xml, ProtocolInfo protocol) |     private void writeProtocol(XMLStreamWriter xml, ProtocolInfo protocol) | ||||||
|             throws XMLStreamException { |             throws XMLStreamException { | ||||||
|  |  | ||||||
|         // Write protocol  |         // Write protocol | ||||||
|         xml.writeStartElement("protocol"); |         xml.writeStartElement("protocol"); | ||||||
|         xml.writeAttribute("name", protocol.getName()); |         xml.writeAttribute("name", protocol.getName()); | ||||||
|         xml.writeAttribute("title", protocol.getTitle()); |         xml.writeAttribute("title", protocol.getTitle()); | ||||||
| @@ -170,9 +170,9 @@ public class List extends AuthenticatingHttpServlet { | |||||||
|                 default: |                 default: | ||||||
|                     throw new UnsupportedOperationException( |                     throw new UnsupportedOperationException( | ||||||
|                         "Parameter type not supported: " + param.getType()); |                         "Parameter type not supported: " + param.getType()); | ||||||
|                      |  | ||||||
|             } |             } | ||||||
|              |  | ||||||
|             // Write options |             // Write options | ||||||
|             for (ProtocolParameterOption option : param.getOptions()) { |             for (ProtocolParameterOption option : param.getOptions()) { | ||||||
|                 xml.writeStartElement("option"); |                 xml.writeStartElement("option"); | ||||||
| @@ -183,14 +183,14 @@ public class List extends AuthenticatingHttpServlet { | |||||||
|  |  | ||||||
|             // End parameter |             // End parameter | ||||||
|             xml.writeEndElement(); |             xml.writeEndElement(); | ||||||
|              |  | ||||||
|         } |         } | ||||||
|          |  | ||||||
|         // End protocol  |         // End protocol | ||||||
|         xml.writeEndElement(); |         xml.writeEndElement(); | ||||||
|  |  | ||||||
|     } |     } | ||||||
|      |  | ||||||
|     @Override |     @Override | ||||||
|     protected void authenticatedService( |     protected void authenticatedService( | ||||||
|             UserContext context, |             UserContext context, | ||||||
| @@ -241,7 +241,7 @@ public class List extends AuthenticatingHttpServlet { | |||||||
|                 } |                 } | ||||||
|  |  | ||||||
|             } |             } | ||||||
|              |  | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         // If known protocols are not already defined, read from classpath |         // If known protocols are not already defined, read from classpath | ||||||
| @@ -261,7 +261,7 @@ public class List extends AuthenticatingHttpServlet { | |||||||
|             } |             } | ||||||
|  |  | ||||||
|         } |         } | ||||||
|         |  | ||||||
|         // Write actual XML |         // Write actual XML | ||||||
|         try { |         try { | ||||||
|             // Write XML content type |             // Write XML content type | ||||||
| @@ -277,7 +277,7 @@ public class List extends AuthenticatingHttpServlet { | |||||||
|             // Write all protocols |             // Write all protocols | ||||||
|             for (ProtocolInfo protocol : protocols.values()) |             for (ProtocolInfo protocol : protocols.values()) | ||||||
|                 writeProtocol(xml, protocol); |                 writeProtocol(xml, protocol); | ||||||
|             |  | ||||||
|             // End document |             // End document | ||||||
|             xml.writeEndElement(); |             xml.writeEndElement(); | ||||||
|             xml.writeEndDocument(); |             xml.writeEndDocument(); | ||||||
|   | |||||||
| @@ -113,7 +113,7 @@ public class DocumentHandler extends DefaultHandler { | |||||||
|  |  | ||||||
|         // Initialize handler |         // Initialize handler | ||||||
|         handler.init(attributes); |         handler.init(attributes); | ||||||
|          |  | ||||||
|         // Append new element state to stack |         // Append new element state to stack | ||||||
|         stack.addLast(new DocumentHandlerState(handler)); |         stack.addLast(new DocumentHandlerState(handler)); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -45,13 +45,13 @@ public interface TagHandler { | |||||||
|     /** |     /** | ||||||
|      * Called when the element corresponding to this TagHandler is first seen, |      * Called when the element corresponding to this TagHandler is first seen, | ||||||
|      * just after an instance is created. |      * just after an instance is created. | ||||||
|      *  |      * | ||||||
|      * @param attributes The attributes of the element seen. |      * @param attributes The attributes of the element seen. | ||||||
|      * @throws SAXException If an error prevents a the TagHandler from being |      * @throws SAXException If an error prevents a the TagHandler from being | ||||||
|      *                      from being initialized. |      *                      from being initialized. | ||||||
|      */ |      */ | ||||||
|     public void init(Attributes attributes) throws SAXException; |     public void init(Attributes attributes) throws SAXException; | ||||||
|      |  | ||||||
|     /** |     /** | ||||||
|      * Called when this element, and all child elements, have been fully parsed, |      * Called when this element, and all child elements, have been fully parsed, | ||||||
|      * and the entire text content of this element (if any) is available. |      * and the entire text content of this element (if any) is available. | ||||||
|   | |||||||
| @@ -25,8 +25,8 @@ import org.xml.sax.SAXException; | |||||||
|  |  | ||||||
| /** | /** | ||||||
|  * TagHandler for the "option" element. |  * TagHandler for the "option" element. | ||||||
|  *  |  * | ||||||
|  * @author Mike Jumper  |  * @author Mike Jumper | ||||||
|  */ |  */ | ||||||
| public class OptionTagHandler implements TagHandler { | public class OptionTagHandler implements TagHandler { | ||||||
|  |  | ||||||
| @@ -34,12 +34,12 @@ public class OptionTagHandler implements TagHandler { | |||||||
|      * The option backing this option tag. |      * The option backing this option tag. | ||||||
|      */ |      */ | ||||||
|     private ProtocolParameterOption option = new ProtocolParameterOption(); |     private ProtocolParameterOption option = new ProtocolParameterOption(); | ||||||
|      |  | ||||||
|     @Override |     @Override | ||||||
|     public void init(Attributes attributes) throws SAXException { |     public void init(Attributes attributes) throws SAXException { | ||||||
|         option.setValue(attributes.getValue("value")); |         option.setValue(attributes.getValue("value")); | ||||||
|     } |     } | ||||||
|     |  | ||||||
|     @Override |     @Override | ||||||
|     public TagHandler childElement(String localName) throws SAXException { |     public TagHandler childElement(String localName) throws SAXException { | ||||||
|         throw new SAXException("The 'param' tag can contain no elements."); |         throw new SAXException("The 'param' tag can contain no elements."); | ||||||
| @@ -57,5 +57,5 @@ public class OptionTagHandler implements TagHandler { | |||||||
|     public ProtocolParameterOption asProtocolParameterOption() { |     public ProtocolParameterOption asProtocolParameterOption() { | ||||||
|         return option; |         return option; | ||||||
|     } |     } | ||||||
|      |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -25,8 +25,8 @@ import org.xml.sax.SAXException; | |||||||
|  |  | ||||||
| /** | /** | ||||||
|  * TagHandler for the "param" element. |  * TagHandler for the "param" element. | ||||||
|  *  |  * | ||||||
|  * @author Mike Jumper  |  * @author Mike Jumper | ||||||
|  */ |  */ | ||||||
| public class ParamTagHandler implements TagHandler { | public class ParamTagHandler implements TagHandler { | ||||||
|  |  | ||||||
| @@ -34,7 +34,7 @@ public class ParamTagHandler implements TagHandler { | |||||||
|      * The ProtocolParameter backing this tag handler. |      * The ProtocolParameter backing this tag handler. | ||||||
|      */ |      */ | ||||||
|     private ProtocolParameter protocolParameter = new ProtocolParameter(); |     private ProtocolParameter protocolParameter = new ProtocolParameter(); | ||||||
|      |  | ||||||
|     @Override |     @Override | ||||||
|     public void init(Attributes attributes) throws SAXException { |     public void init(Attributes attributes) throws SAXException { | ||||||
|  |  | ||||||
| @@ -64,7 +64,7 @@ public class ParamTagHandler implements TagHandler { | |||||||
|         // Boolean field |         // Boolean field | ||||||
|         else if ("boolean".equals(type)) { |         else if ("boolean".equals(type)) { | ||||||
|             protocolParameter.setType(ProtocolParameter.Type.BOOLEAN); |             protocolParameter.setType(ProtocolParameter.Type.BOOLEAN); | ||||||
|              |  | ||||||
|             if(protocolParameter.getValue() == null) |             if(protocolParameter.getValue() == null) | ||||||
|                 throw new SAXException |                 throw new SAXException | ||||||
|                         ("A value is required for the boolean parameter type."); |                         ("A value is required for the boolean parameter type."); | ||||||
| @@ -73,15 +73,15 @@ public class ParamTagHandler implements TagHandler { | |||||||
|         // Otherwise, fail with unrecognized type |         // Otherwise, fail with unrecognized type | ||||||
|         else |         else | ||||||
|             throw new SAXException("Invalid parameter type: " + type); |             throw new SAXException("Invalid parameter type: " + type); | ||||||
|          |  | ||||||
|     } |     } | ||||||
|      |  | ||||||
|     @Override |     @Override | ||||||
|     public TagHandler childElement(String localName) throws SAXException { |     public TagHandler childElement(String localName) throws SAXException { | ||||||
|  |  | ||||||
|         // Start parsing of option tags  |         // Start parsing of option tags | ||||||
|         if (localName.equals("option")) { |         if (localName.equals("option")) { | ||||||
|             |  | ||||||
|             // Get tag handler for option tag |             // Get tag handler for option tag | ||||||
|             OptionTagHandler tagHandler = new OptionTagHandler(); |             OptionTagHandler tagHandler = new OptionTagHandler(); | ||||||
|  |  | ||||||
| @@ -89,7 +89,7 @@ public class ParamTagHandler implements TagHandler { | |||||||
|             protocolParameter.getOptions().add( |             protocolParameter.getOptions().add( | ||||||
|                 tagHandler.asProtocolParameterOption()); |                 tagHandler.asProtocolParameterOption()); | ||||||
|             return tagHandler; |             return tagHandler; | ||||||
|              |  | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         return null; |         return null; | ||||||
|   | |||||||
| @@ -25,8 +25,8 @@ import org.xml.sax.SAXException; | |||||||
|  |  | ||||||
| /** | /** | ||||||
|  * TagHandler for the "protocol" element. |  * TagHandler for the "protocol" element. | ||||||
|  *  |  * | ||||||
|  * @author Mike Jumper  |  * @author Mike Jumper | ||||||
|  */ |  */ | ||||||
| public class ProtocolTagHandler implements TagHandler { | public class ProtocolTagHandler implements TagHandler { | ||||||
|  |  | ||||||
| @@ -35,30 +35,30 @@ public class ProtocolTagHandler implements TagHandler { | |||||||
|      * handler. |      * handler. | ||||||
|      */ |      */ | ||||||
|     private ProtocolInfo info = new ProtocolInfo(); |     private ProtocolInfo info = new ProtocolInfo(); | ||||||
|      |  | ||||||
|     @Override |     @Override | ||||||
|     public void init(Attributes attributes) throws SAXException { |     public void init(Attributes attributes) throws SAXException { | ||||||
|         info.setName(attributes.getValue("name")); |         info.setName(attributes.getValue("name")); | ||||||
|         info.setTitle(attributes.getValue("title")); |         info.setTitle(attributes.getValue("title")); | ||||||
|     } |     } | ||||||
|      |  | ||||||
|     @Override |     @Override | ||||||
|     public TagHandler childElement(String localName) throws SAXException { |     public TagHandler childElement(String localName) throws SAXException { | ||||||
|  |  | ||||||
|         // Start parsing of param tags, add to list of all parameters  |         // Start parsing of param tags, add to list of all parameters | ||||||
|         if (localName.equals("param")) { |         if (localName.equals("param")) { | ||||||
|             |  | ||||||
|             // Get tag handler for param tag |             // Get tag handler for param tag | ||||||
|             ParamTagHandler tagHandler = new ParamTagHandler(); |             ParamTagHandler tagHandler = new ParamTagHandler(); | ||||||
|  |  | ||||||
|             // Store stub in parameters collection |             // Store stub in parameters collection | ||||||
|             info.getParameters().add(tagHandler.asProtocolParameter()); |             info.getParameters().add(tagHandler.asProtocolParameter()); | ||||||
|             return tagHandler; |             return tagHandler; | ||||||
|              |  | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         return null; |         return null; | ||||||
|          |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|   | |||||||
| @@ -49,18 +49,18 @@ public class AuthorizeTagHandler implements TagHandler { | |||||||
|      * The UserMapping this authorization belongs to. |      * The UserMapping this authorization belongs to. | ||||||
|      */ |      */ | ||||||
|     private UserMapping parent; |     private UserMapping parent; | ||||||
|      |  | ||||||
|     /** |     /** | ||||||
|      * Creates a new AuthorizeTagHandler that parses an Authorization owned |      * Creates a new AuthorizeTagHandler that parses an Authorization owned | ||||||
|      * by the given UserMapping. |      * by the given UserMapping. | ||||||
|      *  |      * | ||||||
|      * @param parent The UserMapping that owns the Authorization this handler |      * @param parent The UserMapping that owns the Authorization this handler | ||||||
|      *               will parse. |      *               will parse. | ||||||
|      */ |      */ | ||||||
|     public AuthorizeTagHandler(UserMapping parent) { |     public AuthorizeTagHandler(UserMapping parent) { | ||||||
|         this.parent = parent; |         this.parent = parent; | ||||||
|     } |     } | ||||||
|      |  | ||||||
|     @Override |     @Override | ||||||
|     public void init(Attributes attributes) throws SAXException { |     public void init(Attributes attributes) throws SAXException { | ||||||
|  |  | ||||||
| @@ -88,7 +88,7 @@ public class AuthorizeTagHandler implements TagHandler { | |||||||
|         } |         } | ||||||
|  |  | ||||||
|         parent.addAuthorization(this.asAuthorization()); |         parent.addAuthorization(this.asAuthorization()); | ||||||
|          |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|   | |||||||
| @@ -45,18 +45,18 @@ public class ConnectionTagHandler implements TagHandler { | |||||||
|      * The Authorization this connection belongs to. |      * The Authorization this connection belongs to. | ||||||
|      */ |      */ | ||||||
|     private Authorization parent; |     private Authorization parent; | ||||||
|      |  | ||||||
|     /** |     /** | ||||||
|      * Creates a new ConnectionTagHandler that parses a Connection owned by |      * Creates a new ConnectionTagHandler that parses a Connection owned by | ||||||
|      * the given Authorization. |      * the given Authorization. | ||||||
|      *  |      * | ||||||
|      * @param parent The Authorization that will own this Connection once |      * @param parent The Authorization that will own this Connection once | ||||||
|      *               parsed. |      *               parsed. | ||||||
|      */ |      */ | ||||||
|     public ConnectionTagHandler(Authorization parent) { |     public ConnectionTagHandler(Authorization parent) { | ||||||
|         this.parent = parent; |         this.parent = parent; | ||||||
|     } |     } | ||||||
|      |  | ||||||
|     @Override |     @Override | ||||||
|     public void init(Attributes attributes) throws SAXException { |     public void init(Attributes attributes) throws SAXException { | ||||||
|         name = attributes.getValue("name"); |         name = attributes.getValue("name"); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user