[jboss-svn-commits] JBL Code SVN: r25786 - in labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/src/main: resources and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Mar 23 07:04:08 EDT 2009
Author: lkrzyzanek
Date: 2009-03-23 07:04:08 -0400 (Mon, 23 Mar 2009)
New Revision: 25786
Added:
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/src/main/java/org/jboss/labs/clearspace/plugin/hfurl/struts/AdminHfURLAction.java
Removed:
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/src/main/java/org/jboss/labs/clearspace/plugin/hfurl/struts/ReindexHfURLAction.java
Modified:
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/src/main/resources/struts.xml
Log:
Admin action renamed
Copied: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/src/main/java/org/jboss/labs/clearspace/plugin/hfurl/struts/AdminHfURLAction.java (from rev 25784, labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/src/main/java/org/jboss/labs/clearspace/plugin/hfurl/struts/ReindexHfURLAction.java)
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/src/main/java/org/jboss/labs/clearspace/plugin/hfurl/struts/AdminHfURLAction.java (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/src/main/java/org/jboss/labs/clearspace/plugin/hfurl/struts/AdminHfURLAction.java 2009-03-23 11:04:08 UTC (rev 25786)
@@ -0,0 +1,95 @@
+/*
+ * JBoss.org http://jboss.org/
+ *
+ * Copyright (c) 2009 Red Hat Middleware, LLC. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT A WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License, v.2.1 along with this distribution; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * Red Hat Author(s): Libor Krzyzanek
+ */
+package org.jboss.labs.clearspace.plugin.hfurl.struts;
+
+import org.jboss.labs.clearspace.plugin.hfurl.HFURLManager;
+
+import com.jivesoftware.community.action.JiveActionSupport;
+import com.opensymphony.xwork2.Preparable;
+
+/**
+ * Action for manipulating with index of HF URLs
+ *
+ * @author <a href="mailto:lkrzyzan at redhat.com">Libor Krzyzanek</a>
+ *
+ */
+public class AdminHfURLAction extends JiveActionSupport implements Preparable {
+
+ private long indexedURLs = 0;
+
+ private HFURLManager hfURLManager;
+
+ private boolean enabled;
+
+ public void prepare() {
+ indexedURLs = hfURLManager.getIndexedURLsCount();
+ enabled = hfURLManager.isHFLinksEnabled();
+ }
+
+ @Override
+ public String execute() {
+ hfURLManager.updateIndex();
+
+ addActionMessage(getText("plugin.hfurl.admin.hf-urls.reindex.text.sucess"));
+
+ prepare();
+ return SUCCESS;
+ }
+
+ public String enable() {
+ changeEnabled(true);
+ addActionMessage(getText("plugin.hfurl.admin.hf-urls.enabled.text.enabled.sucess"));
+ return SUCCESS;
+ }
+
+ public String disable() {
+ changeEnabled(false);
+ addActionMessage(getText("plugin.hfurl.admin.hf-urls.enabled.text.disabled.sucess"));
+ return SUCCESS;
+ }
+
+ protected void changeEnabled(boolean status) {
+ hfURLManager.setHFLinksEnabled(status);
+ prepare();
+ }
+
+ public void setHfURLManager(HFURLManager hfURLManager) {
+ this.hfURLManager = hfURLManager;
+ }
+
+ public void setIndexedURLs(long indexedURLs) {
+ this.indexedURLs = indexedURLs;
+ }
+
+ public long getIndexedURLs() {
+ return indexedURLs;
+ }
+
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+}
Property changes on: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/src/main/java/org/jboss/labs/clearspace/plugin/hfurl/struts/AdminHfURLAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/src/main/java/org/jboss/labs/clearspace/plugin/hfurl/struts/ReindexHfURLAction.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/src/main/java/org/jboss/labs/clearspace/plugin/hfurl/struts/ReindexHfURLAction.java 2009-03-23 10:51:35 UTC (rev 25785)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/src/main/java/org/jboss/labs/clearspace/plugin/hfurl/struts/ReindexHfURLAction.java 2009-03-23 11:04:08 UTC (rev 25786)
@@ -1,95 +0,0 @@
-/*
- * JBoss.org http://jboss.org/
- *
- * Copyright (c) 2009 Red Hat Middleware, LLC. All rights reserved.
- *
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT A WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License, v.2.1 along with this distribution; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- *
- * Red Hat Author(s): Libor Krzyzanek
- */
-package org.jboss.labs.clearspace.plugin.hfurl.struts;
-
-import org.jboss.labs.clearspace.plugin.hfurl.HFURLManager;
-
-import com.jivesoftware.community.action.JiveActionSupport;
-import com.opensymphony.xwork2.Preparable;
-
-/**
- * Action for manipulating with index of HF URLs
- *
- * @author <a href="mailto:lkrzyzan at redhat.com">Libor Krzyzanek</a>
- *
- */
-public class ReindexHfURLAction extends JiveActionSupport implements Preparable {
-
- private long indexedURLs = 0;
-
- private HFURLManager hfURLManager;
-
- private boolean enabled;
-
- public void prepare() {
- indexedURLs = hfURLManager.getIndexedURLsCount();
- enabled = hfURLManager.isHFLinksEnabled();
- }
-
- @Override
- public String execute() {
- hfURLManager.updateIndex();
-
- addActionMessage(getText("plugin.hfurl.admin.hf-urls.reindex.text.sucess"));
-
- prepare();
- return SUCCESS;
- }
-
- public String enable() {
- changeEnabled(true);
- addActionMessage(getText("plugin.hfurl.admin.hf-urls.enabled.text.enabled.sucess"));
- return SUCCESS;
- }
-
- public String disable() {
- changeEnabled(false);
- addActionMessage(getText("plugin.hfurl.admin.hf-urls.enabled.text.disabled.sucess"));
- return SUCCESS;
- }
-
- protected void changeEnabled(boolean status) {
- hfURLManager.setHFLinksEnabled(status);
- prepare();
- }
-
- public void setHfURLManager(HFURLManager hfURLManager) {
- this.hfURLManager = hfURLManager;
- }
-
- public void setIndexedURLs(long indexedURLs) {
- this.indexedURLs = indexedURLs;
- }
-
- public long getIndexedURLs() {
- return indexedURLs;
- }
-
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- }
-
- public boolean isEnabled() {
- return enabled;
- }
-
-}
Modified: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/src/main/resources/struts.xml
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/src/main/resources/struts.xml 2009-03-23 10:51:35 UTC (rev 25785)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/src/main/resources/struts.xml 2009-03-23 11:04:08 UTC (rev 25786)
@@ -27,14 +27,14 @@
extends="community-admin-default">
<action name="human-friendly-urls-view"
- class="org.jboss.labs.clearspace.plugin.hfurl.struts.ReindexHfURLAction" method="input">
+ class="org.jboss.labs.clearspace.plugin.hfurl.struts.AdminHfURLAction" method="input">
<result name="input" type="freemarker">
/plugins/human-friendly-urls/admin/human-friendly-urls.ftl
</result>
</action>
<action name="human-friendly-urls-reindex"
- class="org.jboss.labs.clearspace.plugin.hfurl.struts.ReindexHfURLAction">
+ class="org.jboss.labs.clearspace.plugin.hfurl.struts.AdminHfURLAction">
<result name="input" type="freemarker">
/plugins/human-friendly-urls/admin/human-friendly-urls.ftl
</result>
@@ -44,7 +44,7 @@
</action>
<action name="human-friendly-urls-enable"
- class="org.jboss.labs.clearspace.plugin.hfurl.struts.ReindexHfURLAction" method="enable">
+ class="org.jboss.labs.clearspace.plugin.hfurl.struts.AdminHfURLAction" method="enable">
<result name="input" type="freemarker">
/plugins/human-friendly-urls/admin/human-friendly-urls.ftl
</result>
@@ -54,7 +54,7 @@
</action>
<action name="human-friendly-urls-disable"
- class="org.jboss.labs.clearspace.plugin.hfurl.struts.ReindexHfURLAction" method="disable">
+ class="org.jboss.labs.clearspace.plugin.hfurl.struts.AdminHfURLAction" method="disable">
<result name="input" type="freemarker">
/plugins/human-friendly-urls/admin/human-friendly-urls.ftl
</result>
More information about the jboss-svn-commits
mailing list