From: <jma...@rh...> - 2008-11-27 01:49:59
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><style type="text/css"><!-- #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } --></style> <title>[rhq-project.org rhq] [2128] add copyright message and author tags to new JSF component, converter, and renderer; </title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>2128</dd> <dt>Author</dt> <dd>jmarques</dd> <dt>Date</dt> <dd>2008-11-26 19:49:57 -0600 (Wed, 26 Nov 2008)</dd> </dl> <h3>Log Message</h3> <pre>add copyright message and author tags to new JSF component, converter, and renderer; </pre> <h3>Modified Paths</h3> <ul> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguicommontimeDurationComponentjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/time/DurationComponent.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguicommontimeDurationRendererjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/time/DurationRenderer.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguicommontimeconverterDurationConverterjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/time/converter/DurationConverter.java</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguicommontimeDurationComponentjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/time/DurationComponent.java (2127 => 2128)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/time/DurationComponent.java 2008-11-26 20:47:07 UTC (rev 2127) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/time/DurationComponent.java 2008-11-27 01:49:57 UTC (rev 2128) </span><span class="lines">@@ -1,3 +1,21 @@ </span><span class="add">+/* + * RHQ Management Platform + * Copyright (C) 2005-2008 Red Hat, Inc. + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation version 2 of the License. + * + * This program 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ </span><span class="cx"> package org.rhq.enterprise.gui.common.time; import javax.faces.component.UIComponentBase; </span><span class="lines">@@ -5,6 +23,9 @@ </span><span class="cx"> import org.rhq.core.gui.util.FacesComponentUtility; </span><span class="add">+/** + * @author Joseph Marques + */ </span><span class="cx"> public class DurationComponent extends UIComponentBase { public final static String VALUE = "durationComponentValue"; </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguicommontimeDurationRendererjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/time/DurationRenderer.java (2127 => 2128)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/time/DurationRenderer.java 2008-11-26 20:47:07 UTC (rev 2127) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/time/DurationRenderer.java 2008-11-27 01:49:57 UTC (rev 2128) </span><span class="lines">@@ -1,3 +1,21 @@ </span><span class="add">+/* + * RHQ Management Platform + * Copyright (C) 2005-2008 Red Hat, Inc. + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation version 2 of the License. + * + * This program 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ </span><span class="cx"> package org.rhq.enterprise.gui.common.time; import java.io.IOException; </span><span class="lines">@@ -12,6 +30,9 @@ </span><span class="cx"> import org.rhq.core.gui.util.FacesContextUtility; import org.rhq.enterprise.gui.common.time.DurationComponent.TimeUnit; </span><span class="add">+/** + * @author Joseph Marques + */ </span><span class="cx"> public class DurationRenderer extends Renderer { @Override </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguicommontimeconverterDurationConverterjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/time/converter/DurationConverter.java (2127 => 2128)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/time/converter/DurationConverter.java 2008-11-26 20:47:07 UTC (rev 2127) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/time/converter/DurationConverter.java 2008-11-27 01:49:57 UTC (rev 2128) </span><span class="lines">@@ -1,3 +1,21 @@ </span><span class="add">+/* + * RHQ Management Platform + * Copyright (C) 2005-2008 Red Hat, Inc. + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation version 2 of the License. + * + * This program 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ </span><span class="cx"> package org.rhq.enterprise.gui.common.time.converter; import java.text.DecimalFormat; </span><span class="lines">@@ -6,6 +24,9 @@ </span><span class="cx"> import javax.faces.context.FacesContext; import javax.faces.convert.Converter; </span><span class="add">+/** + * @author Joseph Marques + */ </span><span class="cx"> public class DurationConverter implements Converter { private static final long MILLIS_IN_HOUR = 3600000L; </span><span class="lines">@@ -17,7 +38,7 @@ </span><span class="cx"> public Object getAsObject(FacesContext context, UIComponent component, String value) { long millis = 0; if (value != null) { </span><span class="rem">- String[] parts = value.split(";"); </span><span class="add">+ String[] parts = value.split(":"); </span><span class="cx"> millis += (Integer.parseInt(parts[0]) * MILLIS_IN_HOUR); millis += (Integer.parseInt(parts[1]) * MILLIS_IN_MINUTE); millis += (Integer.parseInt(parts[2]) * MILLIS_IN_SECOND); </span> </pre> </div> </div> </body> </html> |