[jboss-svn-commits] JBL Code SVN: r31386 - in labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk: src/changes and 8 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Feb 3 11:59:17 EST 2010
Author: lkrzyzanek
Date: 2010-02-03 11:59:16 -0500 (Wed, 03 Feb 2010)
New Revision: 31386
Added:
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/assembly/
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/assembly/assembly-plugin.xml
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/cache-config.xml
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/plugin.xml
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/resources/
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/resources/templates/
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/resources/templates/admin/
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/resources/templates/navigation.ftl
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/resources/templates/notfound.ftl
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/schema.xml
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/spring.xml
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/struts.xml
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/plugin_i18n.properties
Removed:
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/cache-config.xml
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/plugin.xml
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/plugin_i18n.properties
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/schema.xml
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/spring.xml
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/struts.xml
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/web/admin/
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/web/navigation.ftl
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/web/notfound.ftl
Modified:
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/pom.xml
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/changes/changes.xml
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/java/org/jboss/labs/clearspace/plugin/hfurl/DbHFURLManager.java
labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/java/org/jboss/labs/clearspace/plugin/hfurl/HFURLPlugin.java
Log:
Changed to work with SBS 4.x
Modified: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/pom.xml
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/pom.xml 2010-02-03 16:05:01 UTC (rev 31385)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/pom.xml 2010-02-03 16:59:16 UTC (rev 31386)
@@ -5,9 +5,9 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.labs.clearspace.plugin</groupId>
<artifactId>human-friendly-urls</artifactId>
- <name>Clearspace plugin: Human friendly URLs</name>
- <description>Plugin offers human friendly URLs in Clearspace</description>
- <version>1.1.1</version>
+ <name>SBS plugin: Human friendly URLs</name>
+ <description>Plugin offers human friendly URLs in SBS</description>
+ <version>1.2.0-SNAPSHOT</version>
<parent>
<groupId>org.jboss.labs</groupId>
@@ -17,7 +17,9 @@
</parent>
<build>
+ <finalName>human-friendly-urls-plugin</finalName>
<plugins>
+ <!-- For compilation-->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
@@ -25,108 +27,156 @@
<target>1.6</target>
</configuration>
</plugin>
+ <!-- Weave transactions into the plugin -->
<plugin>
- <groupId>com.jivesoftware.maven</groupId>
- <artifactId>maven-clearspace-plugin-packager</artifactId>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>aspectj-maven-plugin</artifactId>
+ <version>1.1</version>
+ <configuration>
+ <aspectLibraries>
+ <aspectLibrary>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aspects</artifactId>
+ </aspectLibrary>
+ </aspectLibraries>
+ <source>1.6</source>
+ </configuration>
<executions>
<execution>
<goals>
- <goal>package-plugin</goal>
+ <goal>compile</goal>
</goals>
- <phase>package</phase>
</execution>
</executions>
</plugin>
+
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <finalName>tmp-classes</finalName>
- </configuration>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>${basedir}/src/main/assembly/assembly-plugin.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.1</version>
<executions>
<execution>
- <id>rename-exploded</id>
+ <!--
+ Unpackages this SBS plugin. That way it can be used in
+ conjunction with the -DpluginDirs= property, which
+ bypasses the standard plugin installation (which happens
+ via the admin console), by pointing to exploded plugin jar
+ created by this.
+ -->
+ <id>explode-sbs-plugin</id>
+ <phase>package</phase>
<goals>
<goal>run</goal>
</goals>
- <phase>package</phase>
<configuration>
<tasks>
- <delete>
- <fileset dir="target" includes="tmp-classes*" />
- </delete>
+ <mkdir dir="${basedir}/target/human-friendly-urls" />
+ <unjar
+ src="${basedir}/target/human-friendly-urls-plugin.jar"
+ dest="${basedir}/target/human-friendly-urls" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- For unit testing -->
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/selenium/*Test.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+
</plugins>
</build>
-
<dependencies>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.4</version>
- <scope>test</scope>
+ <groupId>com.jivesoftware</groupId>
+ <artifactId>jive-sbs-employee</artifactId>
+ <version>${sbs.version}</version>
+ <type>jar</type>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>com.jivesoftware</groupId>
- <artifactId>clearspace-all</artifactId>
- <version>2.5.0.rc</version>
+ <artifactId>jive-sbs-employee-all</artifactId>
+ <version>${sbs.version}</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.3</version>
+ <type>jar</type>
+ <scope>provided</scope>
+ </dependency>
+ <!-- The following dependencies are for unit testing-->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.4</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.objenesis</groupId>
+ <artifactId>objenesis</artifactId>
+ <version>1.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ <version>2.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jmock</groupId>
+ <artifactId>jmock-junit4</artifactId>
+ <version>2.4.0</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
+ <!--
+ This is where you set the Jive SBS version your plugin is compiled
+ against.
+ -->
+ <properties>
+ <sbs.version>4.0.3</sbs.version>
+ </properties>
- <pluginRepositories>
- <pluginRepository>
- <id>jive.ext.central</id>
- <name>Jive Repository</name>
- <url>http://maven.jivesoftware.com/archiva/repository/jive.internal/</url>
- </pluginRepository>
- <pluginRepository>
- <id>jive.ext.snapshots</id>
- <name>Jive Snapshot Repository</name>
- <url>http://maven.jivesoftware.com/archiva/repository/jive.snapshots/</url>
- </pluginRepository>
- </pluginRepositories>
- <repositories>
- <repository>
- <id>jive.ext.central</id>
- <name>Jive Repository</name>
- <url>http://maven.jivesoftware.com/archiva/repository/jive.internal/</url>
- </repository>
- <repository>
- <id>jive.ext.snapshots</id>
- <name>Jive Snapshot Repository</name>
- <url>http://maven.jivesoftware.com/archiva/repository/jive.snapshots/</url>
- </repository>
- </repositories>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-changes-plugin</artifactId>
- <reportSets>
- <reportSet>
- <reports>
- <report>changes-report</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
-
</project>
Modified: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/changes/changes.xml
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/changes/changes.xml 2010-02-03 16:05:01 UTC (rev 31385)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/changes/changes.xml 2010-02-03 16:59:16 UTC (rev 31386)
@@ -4,12 +4,15 @@
xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd">
<properties>
- <title>Clearspace plugin: Human friendly URL</title>
+ <title>SBS plugin: Human friendly URL</title>
<author email="lkrzyzan at redhat.com">Libor Krzyzanek</author>
</properties>
<body>
+ <release version="2.0.0" date="2009-02-XX" description="Upgrade to work with SBS 4.x">
+ </release>
+
<release version="1.1.1" date="2009-12-03" description="Upgrade to Java 6">
<action type="fix" dev="lkrzyzan" date="2009-12-03">
<fixes issue="ORG-353" />
Added: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/assembly/assembly-plugin.xml
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/assembly/assembly-plugin.xml (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/assembly/assembly-plugin.xml 2010-02-03 16:59:16 UTC (rev 31386)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<assembly>
+ <id>plugin</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>lib</outputDirectory>
+ <useProjectArtifact>false</useProjectArtifact>
+ <scope>runtime</scope>
+ </dependencySet>
+ </dependencySets>
+ <fileSets>
+ <fileSet>
+ <directory>${project.build.directory}</directory>
+ <includes>
+ <include>classes/</include>
+ </includes>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>src/main/plugin</directory>
+ <outputDirectory>/</outputDirectory>
+ <excludes>
+ <exclude>resources/templates/</exclude>
+ </excludes>
+ <filtered>true</filtered>
+ </fileSet>
+ <fileSet>
+ <directory>src/main/plugin/resources/templates</directory>
+ <outputDirectory>/resources/templates</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly>
Property changes on: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/assembly/assembly-plugin.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/java/org/jboss/labs/clearspace/plugin/hfurl/DbHFURLManager.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/java/org/jboss/labs/clearspace/plugin/hfurl/DbHFURLManager.java 2010-02-03 16:05:01 UTC (rev 31385)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/java/org/jboss/labs/clearspace/plugin/hfurl/DbHFURLManager.java 2010-02-03 16:59:16 UTC (rev 31386)
@@ -33,12 +33,13 @@
import org.jboss.labs.clearspace.plugin.hfurl.dao.HFURLDAO;
import org.springframework.dao.EmptyResultDataAccessException;
+import com.jivesoftware.base.event.v2.EventListener;
import com.jivesoftware.community.Document;
import com.jivesoftware.community.DocumentState;
import com.jivesoftware.community.JiveGlobals;
import com.jivesoftware.community.cache.Cache;
import com.jivesoftware.community.event.DocumentEvent;
-import com.jivesoftware.community.event.DocumentListener;
+import com.jivesoftware.community.event.listener.BaseDocumentEventListener;
/**
* DB Implementation of HF URL Manager
@@ -46,7 +47,8 @@
* @author <a href="mailto:lkrzyzan at redhat.com">Libor Krzyzanek</a>
*
*/
-public class DbHFURLManager implements HFURLManager, DocumentListener {
+public class DbHFURLManager extends BaseDocumentEventListener implements
+ HFURLManager, EventListener<DocumentEvent> {
private static final Logger log = LogManager.getLogger(DbHFURLManager.class);
@@ -248,14 +250,28 @@
// DOCUMENT LISTENER METHODS
- public void binaryBodyDownloaded(DocumentEvent event) {
+ @Override
+ public void handle(DocumentEvent e) {
+ switch (e.getType()) {
+ case DELETED:
+ documentDeleted(e);
+ break;
+ case ADDED:
+ documentAdded(e);
+ break;
+ case MODIFIED:
+ documentModified(e);
+ break;
+ case UNDELETED:
+ documentUndeleted(e);
+ }
}
public void documentAdded(DocumentEvent event) {
if (log.isDebugEnabled()) {
- log.debug("documentAdded: " + event.getDocument().getDocumentID());
+ log.debug("documentAdded: " + event.getDocID());
}
- Document doc = event.getDocument();
+ Document doc = getDocument(event);
String hfURLTitle = createHFURLTitle(doc.getSubject());
HFURLBean bean = new HFURLBean(doc.getDocumentID(), hfURLTitle);
hfURLDAO.createHFURL(bean);
@@ -263,28 +279,22 @@
public void documentDeleted(DocumentEvent event) {
if (log.isDebugEnabled()) {
- log.debug("documentDeleted: " + event.getDocument().getDocumentID());
+ log.debug("documentDeleted: " + event.getDocID());
}
// this notification is fired when administrator delete document.
// it's not fired when user mark document as deleted.
// This case is handled by document modified with document state = deleted
}
- public void documentExpired(DocumentEvent event) {
- }
-
- public void documentExpireWarning(DocumentEvent event) {
- }
-
public void documentModified(DocumentEvent event) {
+ Document doc = getDocument(event);
if (log.isDebugEnabled()) {
- log.debug("documentModified: " + event.getDocument().getDocumentID());
+ log.debug("documentModified: " + event.getDocID());
log.debug("event params: " + event.getParams());
- log.debug("Document state: " + event.getDocument().getDocumentState());
+ log.debug("Document state: " + doc.getDocumentState());
}
Map<String, ? extends Object> params = event.getParams();
- Document doc = event.getDocument();
// Title modify
if ("titleModify".equals(params.get("Type"))) {
@@ -303,8 +313,8 @@
if ("documentStateModify".equals(params.get("Type"))
&& doc.getDocumentState().equals(DocumentState.DELETED)) {
log.debug("State of document changed to DELETED");
- hfURLDAO.deleteHFURL(event.getDocument().getDocumentID());
- hfURLCache.remove(event.getDocument().getDocumentID());
+ hfURLDAO.deleteHFURL(event.getDocID());
+ hfURLCache.remove(event.getDocID());
}
// Here is one special case of changing title - when user restore version
@@ -314,23 +324,11 @@
// frequently
}
- public void documentMoved(DocumentEvent event) {
- }
-
- public void documentRated(DocumentEvent event) {
- }
-
- public void documentRelatedObjectAdded(DocumentEvent event) {
- }
-
- public void documentRelatedObjectDeleted(DocumentEvent event) {
- }
-
public void documentUndeleted(DocumentEvent event) {
if (log.isDebugEnabled()) {
- log.debug("documentUndeleted: " + event.getDocument().getDocumentID());
+ log.debug("documentUndeleted: " + event.getDocID());
}
- Document doc = event.getDocument();
+ Document doc = getDocument(event);
try {
hfURLDAO.getByDocumentId(doc.getDocumentID());
@@ -343,27 +341,6 @@
}
}
- public void documentViewed(DocumentEvent event) {
- }
-
- public void versionAdded(DocumentEvent event) {
- if (log.isDebugEnabled()) {
- log.debug("versionAdded: " + event.getDocument().getDocumentID());
- }
- }
-
- public void versionDeleting(DocumentEvent event) {
- if (log.isDebugEnabled()) {
- log.debug("versionDeleting: " + event.getDocument().getDocumentID());
- }
- }
-
- public void versionModified(DocumentEvent event) {
- if (log.isDebugEnabled()) {
- log.debug("versionModified: " + event.getDocument().getDocumentID());
- }
- }
-
public void setHfURLDAO(HFURLDAO hfURLDAO) {
this.hfURLDAO = hfURLDAO;
}
Modified: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/java/org/jboss/labs/clearspace/plugin/hfurl/HFURLPlugin.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/java/org/jboss/labs/clearspace/plugin/hfurl/HFURLPlugin.java 2010-02-03 16:05:01 UTC (rev 31385)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/java/org/jboss/labs/clearspace/plugin/hfurl/HFURLPlugin.java 2010-02-03 16:59:16 UTC (rev 31386)
@@ -25,10 +25,10 @@
import org.apache.log4j.Logger;
import org.jboss.labs.clearspace.plugin.hfurl.struts.mapping.HFURLMapping;
+import com.jivesoftware.base.event.v2.EventListenerRegistry;
import com.jivesoftware.base.plugin.Plugin;
import com.jivesoftware.community.JiveGlobals;
-import com.jivesoftware.community.event.DocumentEventDispatcher;
-import com.jivesoftware.community.web.struts.JiveActionMapper;
+import com.jivesoftware.community.web.struts.JiveRestfulActionMapper;
/**
* Plugin lifecycle definition<br>
@@ -47,6 +47,10 @@
private HFURLMapping hfURLMapping;
+ private EventListenerRegistry eventListenerRegistry;
+
+ private JiveRestfulActionMapper actionMapper;
+
/**
* Plugin name
*/
@@ -59,10 +63,10 @@
// cannot use urlmapping in plugin.xml - mapping class is not managed by
// spring
- JiveActionMapper.addURLMapping(dbHFURLManager.getHfULRPrefix(),
- hfURLMapping);
+ actionMapper.addURLMapping(dbHFURLManager.getHfULRPrefix(), hfURLMapping);
- DocumentEventDispatcher.getInstance().addListener(dbHFURLManager);
+ // Not needed - registered by AutoEventListenerRegistrar
+ //eventListenerRegistry.register(dbHFURLManager);
String enabledKey = JiveGlobals.getJiveProperty(HFURL_ENABLED_KEY);
if (enabledKey == null) {
@@ -73,9 +77,10 @@
}
public void destroy() {
- DocumentEventDispatcher.getInstance().removeListener(dbHFURLManager);
+ eventListenerRegistry.unregister(dbHFURLManager);
- JiveActionMapper.removeURLMapping(dbHFURLManager.getHfULRPrefix());
+ // Not needed - unregistered by AutoEventListenerRegistrar
+ // actionMapper.removeURLMapping(dbHFURLManager.getHfULRPrefix());
log.debug(PLUGIN_NAME + " destroyed");
}
@@ -88,4 +93,13 @@
this.hfURLMapping = hfURLMapping;
}
+ public void setEventListenerRegistry(
+ EventListenerRegistry eventListenerRegistry) {
+ this.eventListenerRegistry = eventListenerRegistry;
+ }
+
+ public void setActionMapper(JiveRestfulActionMapper actionMapper) {
+ this.actionMapper = actionMapper;
+ }
+
}
Copied: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/cache-config.xml (from rev 30968, labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/cache-config.xml)
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/cache-config.xml (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/cache-config.xml 2010-02-03 16:59:16 UTC (rev 31386)
@@ -0,0 +1,20 @@
+<cache-config>
+ <cache-mapping>
+ <cache-name>Human friendly URLs index</cache-name>
+ <scheme-name>default-near</scheme-name>
+ <init-params>
+ <init-param>
+ <param-name>back-size-high</param-name>
+ <param-value>131072</param-value>
+ </init-param>
+ <init-param>
+ <param-name>back-expiry</param-name>
+ <param-value>6h</param-value>
+ </init-param>
+ <init-param>
+ <param-name>back-size-low</param-name>
+ <param-value>117965</param-value>
+ </init-param>
+ </init-params>
+ </cache-mapping>
+</cache-config>
Property changes on: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/cache-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/plugin.xml (from rev 30968, labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/plugin.xml)
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/plugin.xml (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/plugin.xml 2010-02-03 16:59:16 UTC (rev 31386)
@@ -0,0 +1,44 @@
+<plugin xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://www.jivesoftware.com/schemas/clearspace/2_0/plugin.xsd">
+ <name>human-friendly-urls</name>
+ <description>Plugin offers human friendly URLs for documents based on their title</description>
+ <author>JBoss.org</author>
+ <version>2.0.0</version>
+ <minServerVersion>4.0.0</minServerVersion>
+
+ <!-- Plugin class -->
+ <class>org.jboss.labs.clearspace.plugin.hfurl.HFURLPlugin</class>
+
+ <!-- URL Mapping for human friendly URLs -->
+ <!--
+ Defined during initialization of plugin instead of this declaration:
+ Prefix is defined in spring.xml in bean hfURLManager, property
+ hfURLPrefix <urlmapping prefix="/wiki"
+ class="org.jboss.labs.clearspace.plugin.hfurl.struts.mapping.HFURLMapping"/>
+ -->
+
+
+ <sitemesh>
+ <decorator name="default" page="default/template.ftl">
+ <pattern>/wiki*</pattern>
+ </decorator>
+ <decorator name="doc-default" page="/template/decorator/default/template.ftl">
+ <pattern>/wiki*</pattern>
+ </decorator>
+ </sitemesh>
+
+ <databaseKey>humanFriendlyURL</databaseKey>
+ <databaseVersion>1</databaseVersion>
+
+ <components>
+ <component id="admin-console">
+ <tab id="system">
+ <section id="section-system">
+ <item id="system-hf-urls" name="plugin.hfurl.admin.hf-urls.name"
+ url="human-friendly-urls-view.jspa" description="plugin.hfurl.admin.hf-urls.description" />
+ </section>
+ </tab>
+ </component>
+ </components>
+
+</plugin>
Property changes on: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/plugin.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/resources/templates/admin (from rev 30968, labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/web/admin)
Copied: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/resources/templates/navigation.ftl (from rev 30968, labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/web/navigation.ftl)
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/resources/templates/navigation.ftl (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/resources/templates/navigation.ftl 2010-02-03 16:59:16 UTC (rev 31386)
@@ -0,0 +1,54 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <#assign title = action.getText("plugin.hfurl.navigation.name") />
+ <title>${title}</title>
+ <meta name="nosidebar" content="true" />
+
+ <content tag="breadcrumb">
+ </content>
+</head>
+<body class="jive-body-formpage">
+
+<!-- BEGIN header & intro -->
+<div id="jive-body-intro">
+ <div id="jive-body-intro-content">
+ <h1>${title}</h1>
+ </div>
+</div>
+<!-- END header & intro -->
+<!-- BEGIN main body -->
+<div id="jive-body-main">
+
+ <!-- BEGIN main body column -->
+ <div id="jive-body-maincol-container">
+ <div id="jive-body-maincol">
+
+ <p><@s.text name="plugin.hfurl.navigation.description" /></p>
+ <ul>
+ <#list documents as doc>
+ <li>
+ <#--
+ Beware - when it's enabled HF URL links then s.url tag with "/docs/..." value modify to HF URL back.
+ We need to avoid HF URL link now
+ -->
+ <a href="<@s.url value='/' includeParams='none' />docs/${doc.documentID}<#if pdfRequired?exists && "true" == pdfRequired?trim>.pdf</#if><#if urlSuffix?exists && "" != urlSuffix?trim>/${urlSuffix}</#if><#if decorator?exists>?decorator=${decorator}</#if>">
+ <#list doc.communities as comm>
+ ${comm.name} >
+ </#list>
+ ${doc.subject}
+ </a>
+ </li>
+ </#list>
+ </ul>
+
+ </div>
+ </div>
+ <!-- END main body column -->
+
+
+</div>
+<!-- END main body -->
+</body>
+</html>
Copied: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/resources/templates/notfound.ftl (from rev 30968, labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/web/notfound.ftl)
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/resources/templates/notfound.ftl (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/resources/templates/notfound.ftl 2010-02-03 16:59:16 UTC (rev 31386)
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <#assign title = action.getText("plugin.hfurl.notfound.name") />
+ <title>${title}</title>
+ <meta name="nosidebar" content="true" />
+
+ <content tag="breadcrumb">
+ </content>
+</head>
+<body class="jive-body-formpage">
+
+<!-- BEGIN header & intro -->
+<div id="jive-body-intro">
+ <div id="jive-body-intro-content">
+ <h1>${title}</h1>
+ </div>
+</div>
+<!-- END header & intro -->
+<!-- BEGIN main body -->
+<div id="jive-body-main">
+
+ <!-- BEGIN main body column -->
+ <div id="jive-body-maincol-container">
+ <div id="jive-body-maincol">
+ <p><@s.text name="plugin.hfurl.notfound.description" /></p>
+ <p>
+ <a href="javascript:history.go(-1)"><@s.text name="plugin.hfurl.notfound.link.back"/></a><br>
+ <a href="<@s.url value='/community/wiki'/>"><@s.text name="plugin.hfurl.notfound.link.wiki"/></a>
+ </p>
+ </div>
+ </div>
+ <!-- END main body column -->
+
+
+</div>
+<!-- END main body -->
+</body>
+</html>
\ No newline at end of file
Copied: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/schema.xml (from rev 30968, labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/schema.xml)
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/schema.xml (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/schema.xml 2010-02-03 16:59:16 UTC (rev 31386)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema name="humanFriendlyURL">
+ <table name="humanFriendlyURLMap" description="Table for human friendly URL map between HF Title and Doc ID">
+ <column name="id" type="bigint" nullable="false" description="Primary key"/>
+ <column name="documentID" type="varchar" size="255" nullable="false" constraint="unique" description="Document ID" />
+ <column name="hfTitle" type="varchar" size="255" nullable="false" description="Human friendly Title" />
+ <index type="primary" name="hfURLMap_pk" column="id" />
+ <index type="normal" name="hfURLMap_documentID_idx" column="documentID"/>
+ <index type="normal" name="hfURLMap_hfTitle_idx" column="hfTitle"/>
+ </table>
+</schema>
Property changes on: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/schema.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/spring.xml (from rev 30968, labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/spring.xml)
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/spring.xml (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/spring.xml 2010-02-03 16:59:16 UTC (rev 31386)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
+ xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
+http://www.directwebremoting.org/schema/spring-dwr http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd"
+ default-autowire="byName" default-init-method="init" default-destroy-method="destroy">
+
+ <bean id="hfURLPlugin" class="org.jboss.labs.clearspace.plugin.hfurl.HFURLPlugin">
+ <property name="dbHFURLManager" ref="hfURLManager" />
+ <property name="eventListenerRegistry" ref="eventListenerRegistry" />
+ <property name="hfURLMapping" ref="hfURLMapping" />
+ <property name="actionMapper" ref="jiveActionMapper" />
+ </bean>
+
+ <bean id="hfURLMapping"
+ class="org.jboss.labs.clearspace.plugin.hfurl.struts.mapping.HFURLMapping">
+ <property name="hfURLManager" ref="hfURLManager" />
+ </bean>
+
+ <bean id="hfURLCache" parent="cacheBean" depends-on="cacheFactoryManager">
+ <constructor-arg value="Human friendly URLs index" />
+ </bean>
+
+ <bean id="hfURLManager" class="org.jboss.labs.clearspace.plugin.hfurl.DbHFURLManager">
+ <property name="hfURLCache" ref="hfURLCache" />
+ <property name="hfULRPrefix" value="/wiki" />
+ <property name="docIdURLPrefix" value="/docs" />
+
+ <dwr:remote javascript="HFURLManager">
+ <dwr:include method="getHFURL" />
+ </dwr:remote>
+ </bean>
+
+ <bean id="hfURLDAO"
+ class="org.jboss.labs.clearspace.plugin.hfurl.dao.DbHFURLDAOImpl">
+ <property name="dataSource">
+ <util:property-path path="dataSourceFactory.dataSource" />
+ </property>
+ </bean>
+
+ <bean id="hfURLComponent"
+ class="org.jboss.labs.clearspace.plugin.hfurl.struts.components.HFURLComponent"
+ lazy-init="true" scope="prototype">
+ <constructor-arg index="0">
+ <null />
+ </constructor-arg>
+ <constructor-arg index="1">
+ <null />
+ </constructor-arg>
+ <constructor-arg index="2">
+ <null />
+ </constructor-arg>
+
+ <property name="hfURLManager" ref="hfURLManager" />
+ </bean>
+</beans>
Property changes on: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/spring.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/struts.xml (from rev 30968, labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/struts.xml)
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/struts.xml (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/struts.xml 2010-02-03 16:59:16 UTC (rev 31386)
@@ -0,0 +1,87 @@
+<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
+ "http://struts.apache.org/dtds/struts-2.0.dtd">
+<struts>
+ <package name="hfurl-actions" namespace="/hfurl" extends="community-actions">
+
+ <!--
+ wiki navigation - when there are more then one document relevant
+ to HF URL then show this page
+ -->
+ <action name="wikiNavigation"
+ class="org.jboss.labs.clearspace.plugin.hfurl.struts.NavigationAction">
+ <result name="success" type="freemarker">
+ /plugins/human-friendly-urls/resources/templates/navigation.ftl
+ </result>
+ </action>
+
+ <action name="wikiNotFound"
+ class="com.jivesoftware.community.action.JiveActionSupport">
+ <result name="success" type="freemarker">
+ /plugins/human-friendly-urls/resources/templates/notfound.ftl
+ </result>
+ </action>
+
+ <action name="redirectToHFURL"
+ class="org.jboss.labs.clearspace.plugin.hfurl.struts.RedirectToHFURLAction">
+ <result name="success" type="httpheader">
+ <param name="status">301</param>
+ <param name="headers.Location">${url}</param>
+ <param name="parse">true</param>
+ </result>
+ <result name="input" type="httpheader">
+ <param name="status">302</param>
+ <param name="headers.Location">${url}</param>
+ <param name="parse">true</param>
+ </result>
+ <result name="urlNotDefined" type="redirect">/</result>
+ </action>
+
+ </package>
+
+ <package name="hfurl-actions-admin" namespace="/admin"
+ extends="community-admin-default">
+
+ <action name="human-friendly-urls-view"
+ class="org.jboss.labs.clearspace.plugin.hfurl.struts.AdminHfURLAction"
+ method="input">
+ <result name="input" type="freemarker">
+ /plugins/human-friendly-urls/resources/templates/admin/human-friendly-urls.ftl
+ </result>
+ </action>
+
+ <action name="human-friendly-urls-reindex"
+ class="org.jboss.labs.clearspace.plugin.hfurl.struts.AdminHfURLAction">
+ <result name="input" type="freemarker">
+ /plugins/human-friendly-urls/resources/templates/admin/human-friendly-urls.ftl
+ </result>
+ <result name="success" type="freemarker">
+ /plugins/human-friendly-urls/resources/templates/admin/human-friendly-urls.ftl
+ </result>
+ </action>
+
+ <action name="human-friendly-urls-enable"
+ class="org.jboss.labs.clearspace.plugin.hfurl.struts.AdminHfURLAction"
+ method="enable">
+ <result name="input" type="freemarker">
+ /plugins/human-friendly-urls/resources/templates/admin/human-friendly-urls.ftl
+ </result>
+ <result name="success" type="freemarker">
+ /plugins/human-friendly-urls/resources/templates/admin/human-friendly-urls.ftl
+ </result>
+ </action>
+
+ <action name="human-friendly-urls-disable"
+ class="org.jboss.labs.clearspace.plugin.hfurl.struts.AdminHfURLAction"
+ method="disable">
+ <result name="input" type="freemarker">
+ /plugins/human-friendly-urls/resources/templates/admin/human-friendly-urls.ftl
+ </result>
+ <result name="success" type="freemarker">
+ /plugins/human-friendly-urls/resources/templates/admin/human-friendly-urls.ftl
+ </result>
+ </action>
+
+
+ </package>
+
+</struts>
Property changes on: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/plugin/struts.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/cache-config.xml
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/cache-config.xml 2010-02-03 16:05:01 UTC (rev 31385)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/cache-config.xml 2010-02-03 16:59:16 UTC (rev 31386)
@@ -1,20 +0,0 @@
-<cache-config>
- <cache-mapping>
- <cache-name>Human friendly URLs index</cache-name>
- <scheme-name>default-near</scheme-name>
- <init-params>
- <init-param>
- <param-name>back-size-high</param-name>
- <param-value>131072</param-value>
- </init-param>
- <init-param>
- <param-name>back-expiry</param-name>
- <param-value>6h</param-value>
- </init-param>
- <init-param>
- <param-name>back-size-low</param-name>
- <param-value>117965</param-value>
- </init-param>
- </init-params>
- </cache-mapping>
-</cache-config>
Deleted: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/plugin.xml
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/plugin.xml 2010-02-03 16:05:01 UTC (rev 31385)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/plugin.xml 2010-02-03 16:59:16 UTC (rev 31386)
@@ -1,50 +0,0 @@
-<plugin xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://www.jivesoftware.com/schemas/clearspace/2_0/plugin.xsd">
- <name>human-friendly-urls</name>
- <description>Plugin offers human friendly URLs for documents based on their title</description>
- <author>JBoss.org</author>
- <version>1.1.1</version>
- <minServerVersion>2.5.0</minServerVersion>
-
- <!-- Plugin class -->
- <class>org.jboss.labs.clearspace.plugin.hfurl.HFURLPlugin</class>
-
- <!-- URL Mapping for human friendly URLs -->
- <!--
- Defined during initialization of plugin instead of this declaration:
- <urlmapping prefix="/wiki"
- class="org.jboss.labs.clearspace.plugin.hfurl.struts.mapping.HFURLMapping"/>
-
- Prefix is defined in spring.xml in bean hfURLManager, property hfURLPrefix
- -->
-
- <!--
- Sitemesh tag doesn't work. Should be fixed in version 2.5.9.
- For earlier versions this definition must be put in clearspace war/WEB-INF/templates.xml:
- <decorator name="default" page="default/template.ftl">
- <pattern>/wiki*</pattern>
- </decorator>
- <sitemesh>
- <decorator name="doc-default" page="/template/decorator/default/template.ftl">
- <pattern>/wiki*</pattern>
- </decorator>
- </sitemesh>
- -->
-
- <databaseKey>humanFriendlyURL</databaseKey>
- <databaseVersion>1</databaseVersion>
-
- <components>
- <component id="admin-console">
- <tab id="system">
- <section id="section-system">
- <item id="system-hf-urls"
- name="plugin.hfurl.admin.hf-urls.name"
- url="human-friendly-urls-view.jspa"
- description="plugin.hfurl.admin.hf-urls.description"/>
- </section>
- </tab>
- </component>
- </components>
-
-</plugin>
Deleted: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/plugin_i18n.properties
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/plugin_i18n.properties 2010-02-03 16:05:01 UTC (rev 31385)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/plugin_i18n.properties 2010-02-03 16:59:16 UTC (rev 31386)
@@ -1,24 +0,0 @@
-# Administration
-plugin.hfurl.admin.hf-urls.name=Human friendly URLs
-plugin.hfurl.admin.hf-urls.description=Click to manage human frineldy URLs
-plugin.hfurl.admin.hf-urls.indexedURLs=Count of indexed articles
-plugin.hfurl.admin.hf-urls.reindex.description=Create new index of human friendly URLs for published articles
-plugin.hfurl.admin.hf-urls.reindex.submit=Update index
-plugin.hfurl.admin.hf-urls.reindex.text.sucess=Index was sucessfuly updated
-
-plugin.hfurl.admin.hf-urls.enabled.description=Enable or disable human friendly links
-plugin.hfurl.admin.hf-urls.enabled.status.change2enabled=Enable
-plugin.hfurl.admin.hf-urls.enabled.status.change2disabled=Disable
-plugin.hfurl.admin.hf-urls.enabled.text.enabled.sucess=Human friendly links was sucessfuly enabled.
-plugin.hfurl.admin.hf-urls.enabled.text.disabled.sucess=Human friendly links was sucessfuly disabled.
-
-
-# Navigation
-plugin.hfurl.navigation.name=Article navigation
-plugin.hfurl.navigation.description=More then one document matches your request. Please choose from the following options:
-
-# Article not found
-plugin.hfurl.notfound.name=Article not found
-plugin.hfurl.notfound.description=An article with that name does not exist. It may have been renamed or deleted.
-plugin.hfurl.notfound.link.back=Go back
-plugin.hfurl.notfound.link.wiki=Go to JBoss Community Wiki
Added: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/plugin_i18n.properties
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/plugin_i18n.properties (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/plugin_i18n.properties 2010-02-03 16:59:16 UTC (rev 31386)
@@ -0,0 +1,24 @@
+# Administration
+plugin.hfurl.admin.hf-urls.name=Human friendly URLs
+plugin.hfurl.admin.hf-urls.description=Click to manage human frineldy URLs
+plugin.hfurl.admin.hf-urls.indexedURLs=Count of indexed articles
+plugin.hfurl.admin.hf-urls.reindex.description=Create new index of human friendly URLs for published articles
+plugin.hfurl.admin.hf-urls.reindex.submit=Update index
+plugin.hfurl.admin.hf-urls.reindex.text.sucess=Index was sucessfuly updated
+
+plugin.hfurl.admin.hf-urls.enabled.description=Enable or disable human friendly links
+plugin.hfurl.admin.hf-urls.enabled.status.change2enabled=Enable
+plugin.hfurl.admin.hf-urls.enabled.status.change2disabled=Disable
+plugin.hfurl.admin.hf-urls.enabled.text.enabled.sucess=Human friendly links was sucessfuly enabled.
+plugin.hfurl.admin.hf-urls.enabled.text.disabled.sucess=Human friendly links was sucessfuly disabled.
+
+
+# Navigation
+plugin.hfurl.navigation.name=Article navigation
+plugin.hfurl.navigation.description=More then one document matches your request. Please choose from the following options:
+
+# Article not found
+plugin.hfurl.notfound.name=Article not found
+plugin.hfurl.notfound.description=An article with that name does not exist. It may have been renamed or deleted.
+plugin.hfurl.notfound.link.back=Go back
+plugin.hfurl.notfound.link.wiki=Go to JBoss Community Wiki
Deleted: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/schema.xml
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/schema.xml 2010-02-03 16:05:01 UTC (rev 31385)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/schema.xml 2010-02-03 16:59:16 UTC (rev 31386)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema name="humanFriendlyURL">
- <table name="humanFriendlyURLMap" description="Table for human friendly URL map between HF Title and Doc ID">
- <column name="id" type="bigint" nullable="false" description="Primary key"/>
- <column name="documentID" type="varchar" size="255" nullable="false" constraint="unique" description="Document ID" />
- <column name="hfTitle" type="varchar" size="255" nullable="false" description="Human friendly Title" />
- <index type="primary" name="hfURLMap_pk" column="id" />
- <index type="normal" name="hfURLMap_documentID_idx" column="documentID"/>
- <index type="normal" name="hfURLMap_hfTitle_idx" column="hfTitle"/>
- </table>
-</schema>
Deleted: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/spring.xml
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/spring.xml 2010-02-03 16:05:01 UTC (rev 31385)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/spring.xml 2010-02-03 16:59:16 UTC (rev 31386)
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
- xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr"
- xsi:schemaLocation="
-http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
-http://www.directwebremoting.org/schema/spring-dwr http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd">
-
- <bean id="hfURLPlugin" class="org.jboss.labs.clearspace.plugin.hfurl.HFURLPlugin">
- <property name="dbHFURLManager" ref="hfURLManager" />
- <property name="hfURLMapping" ref="hfURLMapping" />
- </bean>
-
- <bean id="hfURLMapping"
- class="org.jboss.labs.clearspace.plugin.hfurl.struts.mapping.HFURLMapping">
- <property name="hfURLManager" ref="hfURLManager" />
- </bean>
-
- <bean id="hfURLCache" parent="cacheBean" depends-on="cacheFactoryManager">
- <constructor-arg value="Human friendly URLs index" />
- </bean>
-
- <bean id="hfURLManager" class="org.jboss.labs.clearspace.plugin.hfurl.DbHFURLManager">
- <property name="hfURLCache" ref="hfURLCache">
- </property>
- <property name="hfURLDAO" ref="hfURLDAO" />
- <property name="hfULRPrefix" value="/wiki" />
- <property name="docIdURLPrefix" value="/docs" />
-
- <dwr:remote javascript="HFURLManager">
- <dwr:include method="getHFURL" />
- </dwr:remote>
- </bean>
-
- <bean id="hfURLDAO"
- class="org.jboss.labs.clearspace.plugin.hfurl.dao.DbHFURLDAOImpl">
- <property name="dataSource">
- <util:property-path path="dataSourceFactory.dataSource" />
- </property>
- </bean>
-
- <bean id="hfURLComponent"
- class="org.jboss.labs.clearspace.plugin.hfurl.struts.components.HFURLComponent"
- lazy-init="true" scope="prototype">
- <constructor-arg index="0">
- <null />
- </constructor-arg>
- <constructor-arg index="1">
- <null />
- </constructor-arg>
- <constructor-arg index="2">
- <null />
- </constructor-arg>
-
- <property name="hfURLManager" ref="hfURLManager" />
- </bean>
-</beans>
Deleted: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/struts.xml
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/struts.xml 2010-02-03 16:05:01 UTC (rev 31385)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/resources/struts.xml 2010-02-03 16:59:16 UTC (rev 31386)
@@ -1,87 +0,0 @@
-<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
- "http://struts.apache.org/dtds/struts-2.0.dtd">
-<struts>
- <package name="hfurl-actions" namespace="/hfurl" extends="community-actions">
-
- <!--
- wiki navigation - when there are more then one document relevant
- to HF URL then show this page
- -->
- <action name="wikiNavigation"
- class="org.jboss.labs.clearspace.plugin.hfurl.struts.NavigationAction">
- <result name="success" type="freemarker">
- /plugins/human-friendly-urls/navigation.ftl
- </result>
- </action>
-
- <action name="wikiNotFound"
- class="com.jivesoftware.community.action.JiveActionSupport">
- <result name="success" type="freemarker">
- /plugins/human-friendly-urls/notfound.ftl
- </result>
- </action>
-
- <action name="redirectToHFURL"
- class="org.jboss.labs.clearspace.plugin.hfurl.struts.RedirectToHFURLAction">
- <result name="success" type="httpheader">
- <param name="status">301</param>
- <param name="headers.Location">${url}</param>
- <param name="parse">true</param>
- </result>
- <result name="input" type="httpheader">
- <param name="status">302</param>
- <param name="headers.Location">${url}</param>
- <param name="parse">true</param>
- </result>
- <result name="urlNotDefined" type="redirect">/</result>
- </action>
-
- </package>
-
- <package name="hfurl-actions-admin" namespace="/admin"
- extends="community-admin-default">
-
- <action name="human-friendly-urls-view"
- 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.AdminHfURLAction">
- <result name="input" type="freemarker">
- /plugins/human-friendly-urls/admin/human-friendly-urls.ftl
- </result>
- <result name="success" type="freemarker">
- /plugins/human-friendly-urls/admin/human-friendly-urls.ftl
- </result>
- </action>
-
- <action name="human-friendly-urls-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>
- <result name="success" type="freemarker">
- /plugins/human-friendly-urls/admin/human-friendly-urls.ftl
- </result>
- </action>
-
- <action name="human-friendly-urls-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>
- <result name="success" type="freemarker">
- /plugins/human-friendly-urls/admin/human-friendly-urls.ftl
- </result>
- </action>
-
-
- </package>
-
-</struts>
Deleted: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/web/navigation.ftl
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/web/navigation.ftl 2010-02-03 16:05:01 UTC (rev 31385)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/web/navigation.ftl 2010-02-03 16:59:16 UTC (rev 31386)
@@ -1,54 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <#assign title = action.getText("plugin.hfurl.navigation.name") />
- <title>${title}</title>
- <meta name="nosidebar" content="true" />
-
- <content tag="breadcrumb">
- </content>
-</head>
-<body class="jive-body-formpage">
-
-<!-- BEGIN header & intro -->
-<div id="jive-body-intro">
- <div id="jive-body-intro-content">
- <h1>${title}</h1>
- </div>
-</div>
-<!-- END header & intro -->
-<!-- BEGIN main body -->
-<div id="jive-body-main">
-
- <!-- BEGIN main body column -->
- <div id="jive-body-maincol-container">
- <div id="jive-body-maincol">
-
- <p><@s.text name="plugin.hfurl.navigation.description" /></p>
- <ul>
- <#list documents as doc>
- <li>
- <#--
- Beware - when it's enabled HF URL links then s.url tag with "/docs/..." value modify to HF URL back.
- We need to avoid HF URL link now
- -->
- <a href="<@s.url value='/' includeParams='none' />docs/${doc.documentID}<#if pdfRequired?exists && "true" == pdfRequired?trim>.pdf</#if><#if urlSuffix?exists && "" != urlSuffix?trim>/${urlSuffix}</#if><#if decorator?exists>?decorator=${decorator}</#if>">
- <#list doc.communities as comm>
- ${comm.name} >
- </#list>
- ${doc.subject}
- </a>
- </li>
- </#list>
- </ul>
-
- </div>
- </div>
- <!-- END main body column -->
-
-
-</div>
-<!-- END main body -->
-</body>
-</html>
Deleted: labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/web/notfound.ftl
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/web/notfound.ftl 2010-02-03 16:05:01 UTC (rev 31385)
+++ labs/jbosslabs/labs-3.0-build/integration/cs-hfurl/trunk/src/main/web/notfound.ftl 2010-02-03 16:59:16 UTC (rev 31386)
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <#assign title = action.getText("plugin.hfurl.notfound.name") />
- <title>${title}</title>
- <meta name="nosidebar" content="true" />
-
- <content tag="breadcrumb">
- </content>
-</head>
-<body class="jive-body-formpage">
-
-<!-- BEGIN header & intro -->
-<div id="jive-body-intro">
- <div id="jive-body-intro-content">
- <h1>${title}</h1>
- </div>
-</div>
-<!-- END header & intro -->
-<!-- BEGIN main body -->
-<div id="jive-body-main">
-
- <!-- BEGIN main body column -->
- <div id="jive-body-maincol-container">
- <div id="jive-body-maincol">
- <p><@s.text name="plugin.hfurl.notfound.description" /></p>
- <p>
- <a href="javascript:history.go(-1)"><@s.text name="plugin.hfurl.notfound.link.back"/></a><br>
- <a href="<@s.url value='/community/wiki'/>"><@s.text name="plugin.hfurl.notfound.link.wiki"/></a>
- </p>
- </div>
- </div>
- <!-- END main body column -->
-
-
-</div>
-<!-- END main body -->
-</body>
-</html>
\ No newline at end of file
More information about the jboss-svn-commits
mailing list