first round of NRPA changes:
- added color customization in render-config.xml - added ability to scale size of Venice logo in footer - added ability to customize size of site logo, as well as add a hyperlink - moved to use of LOG4J 1.1.3, LOG4J now installed in Venice lib directory instead of in JRE extensions directory (only Java extensions should go in JRE extensions directory) - close to requiring JAXP 1.1 (will still work with 1.0 though)
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Venice Web Community System.
|
||||
* The Original Code is the Venice Web Communities System.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
|
||||
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
|
||||
@@ -21,19 +21,28 @@ import org.w3c.dom.*;
|
||||
|
||||
public class DOMElementHelper
|
||||
{
|
||||
/*--------------------------------------------------------------------------------
|
||||
* Attributes
|
||||
*--------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
private Element elt; // element housed by this helper class
|
||||
|
||||
/*--------------------------------------------------------------------------------
|
||||
* Constructor
|
||||
*--------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
public DOMElementHelper(Element elt)
|
||||
{
|
||||
this.elt = elt;
|
||||
|
||||
} // end constructor
|
||||
|
||||
protected void finalize()
|
||||
{
|
||||
elt = null;
|
||||
|
||||
} // end finalize
|
||||
/*--------------------------------------------------------------------------------
|
||||
* Internal static operations
|
||||
*--------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
private static String getTextOfElement(Element e)
|
||||
{
|
||||
@@ -64,6 +73,11 @@ public class DOMElementHelper
|
||||
|
||||
} // end getTextOfElement
|
||||
|
||||
/*--------------------------------------------------------------------------------
|
||||
* External operations
|
||||
*--------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
public Element getElement()
|
||||
{
|
||||
return elt;
|
||||
@@ -110,6 +124,24 @@ public class DOMElementHelper
|
||||
|
||||
} // end hasChildElement
|
||||
|
||||
public Integer getAttributeInt(String name)
|
||||
{
|
||||
String tmp = elt.getAttribute(name);
|
||||
if (StringUtil.isStringEmpty(tmp))
|
||||
return null;
|
||||
try
|
||||
{ // convert to an Integer
|
||||
return new Integer(tmp);
|
||||
|
||||
} // end try
|
||||
catch (NumberFormatException nfe)
|
||||
{ // return a null value on error
|
||||
return null;
|
||||
|
||||
} // end catch
|
||||
|
||||
} // end getAttributeInt
|
||||
|
||||
} // end DOMElementHelper
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user