/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// java import
/**
* This class represents the contents of the <CODE>MLET</CODE> tag.
* It can be consulted by a subclass of {@link MLet} that overrides
* the {@link MLet#check MLet.check} method.
*
* @since 1.6
*/
public class MLetContent {
/**
* A map of the attributes of the <CODE>MLET</CODE> tag
* and their values.
*/
/**
* An ordered list of the TYPE attributes that appeared in nested
* <PARAM> tags.
*/
/**
* An ordered list of the VALUE attributes that appeared in nested
* <PARAM> tags.
*/
/**
* The MLet text file's base URL.
*/
/**
* The base URL.
*/
/**
* Creates an <CODE>MLet</CODE> instance initialized with attributes read
* from an <CODE>MLET</CODE> tag in an MLet text file.
*
* @param url The URL of the MLet text file containing the
* <CODE>MLET</CODE> tag.
* @param attributes A map of the attributes of the <CODE>MLET</CODE> tag.
* The keys in this map are the attribute names in lowercase, for
* example <code>codebase</code>. The values are the associated attribute
* values.
* @param types A list of the TYPE attributes that appeared in nested
* <PARAM> tags.
* @param values A list of the VALUE attributes that appeared in nested
* <PARAM> tags.
*/
this.documentURL = url;
// Initialize baseURL
//
att += "/";
}
try {
} catch (MalformedURLException e) {
// OK : Move to next block as baseURL could not be initialized.
}
}
try {
} catch (MalformedURLException e) {
// OK : Move to next block as baseURL could not be initialized.
}
}
}
}
// GETTERS AND SETTERS
//--------------------
/**
* Gets the attributes of the <CODE>MLET</CODE> tag. The keys in
* the returned map are the attribute names in lowercase, for
* example <code>codebase</code>. The values are the associated
* attribute values.
* @return A map of the attributes of the <CODE>MLET</CODE> tag
* and their values.
*/
return attributes;
}
/**
* Gets the MLet text file's base URL.
* @return The MLet text file's base URL.
*/
return documentURL;
}
/**
* Gets the code base URL.
* @return The code base URL.
*/
return baseURL;
}
/**
* Gets the list of <CODE>.jar</CODE> files specified by the <CODE>ARCHIVE</CODE>
* attribute of the <CODE>MLET</CODE> tag.
* @return A comma-separated list of <CODE>.jar</CODE> file names.
*/
return getParameter("archive");
}
/**
* Gets the value of the <CODE>CODE</CODE>
* attribute of the <CODE>MLET</CODE> tag.
* @return The value of the <CODE>CODE</CODE>
* attribute of the <CODE>MLET</CODE> tag.
*/
return getParameter("code");
}
/**
* Gets the value of the <CODE>OBJECT</CODE>
* attribute of the <CODE>MLET</CODE> tag.
* @return The value of the <CODE>OBJECT</CODE>
* attribute of the <CODE>MLET</CODE> tag.
*/
return getParameter("object");
}
/**
* Gets the value of the <CODE>NAME</CODE>
* attribute of the <CODE>MLET</CODE> tag.
* @return The value of the <CODE>NAME</CODE>
* attribute of the <CODE>MLET</CODE> tag.
*/
return getParameter("name");
}
/**
* Gets the value of the <CODE>VERSION</CODE>
* attribute of the <CODE>MLET</CODE> tag.
* @return The value of the <CODE>VERSION</CODE>
* attribute of the <CODE>MLET</CODE> tag.
*/
return getParameter("version");
}
/**
* Gets the list of values of the <code>TYPE</code> attribute in
* each nested <PARAM> tag within the <code>MLET</code>
* tag.
* @return the list of types.
*/
return types;
}
/**
* Gets the list of values of the <code>VALUE</code> attribute in
* each nested <PARAM> tag within the <code>MLET</code>
* tag.
* @return the list of values.
*/
return values;
}
/**
* Gets the value of the specified
* attribute of the <CODE>MLET</CODE> tag.
*
* @param name A string representing the name of the attribute.
* @return The value of the specified
* attribute of the <CODE>MLET</CODE> tag.
*/
}
}