You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by ev...@apache.org on 2005/12/22 17:46:11 UTC
svn commit: r358586 - in /maven/continuum/trunk/continuum-webapp/src/main:
java/org/apache/maven/continuum/web/view/
java/org/apache/maven/continuum/web/view/projectview/
resources/localization/ webapp/
Author: evenisse
Date: Thu Dec 22 08:46:01 2005
New Revision: 358586
URL: http://svn.apache.org/viewcvs?rev=358586&view=rev
Log:
Add notifiers and dependencies
Added:
maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/
maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierEventCell.java (with props)
maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierFromCell.java (with props)
maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierRecipientCell.java (with props)
Modified:
maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildCell.java
maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp
Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildCell.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildCell.java?rev=358586&r1=358585&r2=358586&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildCell.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildCell.java Thu Dec 22 08:46:01 2005
@@ -23,8 +23,6 @@
import org.extremecomponents.table.cell.DisplayCell;
import org.extremecomponents.table.core.BaseModel;
-import javax.servlet.http.HttpServletRequest;
-
/**
* Used in Summary view
*
Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierEventCell.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierEventCell.java?rev=358586&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierEventCell.java (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierEventCell.java Thu Dec 22 08:46:01 2005
@@ -0,0 +1,66 @@
+package org.apache.maven.continuum.web.view.projectview;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.continuum.model.project.ProjectNotifier;
+
+import org.extremecomponents.table.bean.Column;
+import org.extremecomponents.table.cell.DisplayCell;
+import org.extremecomponents.table.core.BaseModel;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Used in Project view
+ *
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public class NotifierEventCell
+ extends DisplayCell
+{
+ public void init(BaseModel model, Column column)
+ {
+ super.init(model, column);
+
+ ProjectNotifier notifier = (ProjectNotifier) model.getCurrentCollectionBean();
+
+ String event = "";
+
+ if ( notifier.isSendOnSuccess() )
+ {
+ event += "Success ";
+ }
+
+ if ( notifier.isSendOnFailure() )
+ {
+ event += "Failures ";
+ }
+
+ if ( notifier.isSendOnWarning() )
+ {
+ event += "Warnings ";
+ }
+
+ if ( notifier.isSendOnError() )
+ {
+ event += "Errors";
+ }
+
+ column.setValue( event );
+ }
+}
\ No newline at end of file
Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierEventCell.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierEventCell.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierFromCell.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierFromCell.java?rev=358586&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierFromCell.java (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierFromCell.java Thu Dec 22 08:46:01 2005
@@ -0,0 +1,51 @@
+package org.apache.maven.continuum.web.view.projectview;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.continuum.model.project.ProjectNotifier;
+
+import org.extremecomponents.table.bean.Column;
+import org.extremecomponents.table.cell.DisplayCell;
+import org.extremecomponents.table.core.BaseModel;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Used in Project view
+ *
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public class NotifierFromCell
+ extends DisplayCell
+{
+ public void init(BaseModel model, Column column)
+ {
+ super.init(model, column);
+
+ ProjectNotifier notifier = (ProjectNotifier) model.getCurrentCollectionBean();
+
+ if ( notifier.isFromProject() )
+ {
+ column.setValue( "Project" );
+ }
+ else
+ {
+ column.setValue( "User" );
+ }
+ }
+}
Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierFromCell.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierFromCell.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierRecipientCell.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierRecipientCell.java?rev=358586&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierRecipientCell.java (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierRecipientCell.java Thu Dec 22 08:46:01 2005
@@ -0,0 +1,67 @@
+package org.apache.maven.continuum.web.view.projectview;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.continuum.model.project.ProjectNotifier;
+
+import org.extremecomponents.table.bean.Column;
+import org.extremecomponents.table.cell.DisplayCell;
+import org.extremecomponents.table.core.BaseModel;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Used in Project view
+ *
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public class NotifierRecipientCell
+ extends DisplayCell
+{
+ public void init(BaseModel model, Column column)
+ {
+ super.init(model, column);
+
+ ProjectNotifier notifier = (ProjectNotifier) model.getCurrentCollectionBean();
+
+ if ( "irc".equals( notifier.getType() ) )
+ {
+ String address = "";
+
+ if ( notifier.getConfiguration().get( "host" ) != null )
+ {
+ address += notifier.getConfiguration().get( "host" ) + ":";
+ }
+
+ if ( notifier.getConfiguration().get( "port" ) != null )
+ {
+ }
+
+ if ( notifier.getConfiguration().get( "channel" ) != null )
+ {
+ address += notifier.getConfiguration().get( "channel" );
+ }
+
+ column.setValue( address );
+ }
+ else
+ {
+ column.setValue( notifier.getConfiguration().get( "address" ) );
+ }
+ }
+}
Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierRecipientCell.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/projectview/NotifierRecipientCell.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=358586&r1=358585&r2=358586&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties Thu Dec 22 08:46:01 2005
@@ -151,7 +151,12 @@
projectView.buildDefinition.schedule = Schedule
projectView.buildDefinition.from = From
projectView.notifiers = Notifiers
+projectView.notifier.type = Type
+projectView.notifier.recipient = Recipient
+projectView.notifier.events = Events
+projectView.notifier.from = From
projectView.dependencies = Dependencies
+projectView.dependency.name = Name
projectView.usedBy= Used By
projectView.developers = Developers
projectView.developer.name = Name
Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp?rev=358586&r1=358585&r2=358586&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp Thu Dec 22 08:46:01 2005
@@ -56,8 +56,37 @@
</ec:table>
<h3><ww:text name="projectView.notifiers"/></h3>
+ <ww:set name="notifiers" value="project.notifiers" scope="request"/>
+ <ec:table items="notifiers"
+ showExports="false"
+ showPagination="false"
+ showStatusBar="false"
+ filterable="false">
+ <ec:row highlightRow="true">
+ <ec:column property="type" title="projectView.notifier.type"/>
+ <ec:column property="recipient" title="projectView.notifier.recipient" cell="org.apache.maven.continuum.web.view.projectview.NotifierRecipientCell"/>
+ <ec:column property="events" title="projectView.notifier.events" cell="org.apache.maven.continuum.web.view.projectview.NotifierEventCell"/>
+ <ec:column property="from" title="projectView.notifier.from" cell="org.apache.maven.continuum.web.view.projectview.NotifierFromCell"/>
+ <ec:column property="actions" title=" ">
+ Edit Delete
+ </ec:column>
+ </ec:row>
+ </ec:table>
<h3><ww:text name="projectView.dependencies"/></h3>
+ <ww:set name="dependencies" value="project.dependencies" scope="request"/>
+ <ec:table items="dependencies"
+ var="dependency"
+ showExports="false"
+ showPagination="false"
+ showStatusBar="false"
+ filterable="false">
+ <ec:row highlightRow="true">
+ <ec:column property="name" title="projectView.dependency.name">
+ ${pageScope.dependency.groupId}:${pageScope.dependency.artifactId}:${pageScope.dependency.version}
+ </ec:column>
+ </ec:row>
+ </ec:table>
<h3><ww:text name="projectView.developers"/></h3>
<ww:set name="developers" value="project.developers" scope="request"/>