Revision: 58810 Author: jhoffman Date: 2017-04-24 11:06:49 +0200 (Mon, 24 Apr 2017) Log Message: ----------- HIPFORGE-99 move rating-field code back from GitHub to SVN attic. Plugin is unmaintained after all.
Added Paths: ----------- attic/forge/rating-field/trunk/addon/ attic/forge/rating-field/trunk/addon/pom.xml attic/forge/rating-field/trunk/addon/src/ attic/forge/rating-field/trunk/addon/src/main/ attic/forge/rating-field/trunk/addon/src/main/java/ attic/forge/rating-field/trunk/addon/src/main/java/org/ attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/ attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/forge/ attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/forge/rating/ attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/forge/rating/RatingPlugin.html attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/forge/rating/RatingPlugin.java attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/forge/rating/model/ attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/forge/rating/model/Rating.java attic/forge/rating-field/trunk/addon/src/main/resources/ attic/forge/rating-field/trunk/addon/src/main/resources/hippoecm-extension.xml attic/forge/rating-field/trunk/addon/src/main/resources/type-rating.xml attic/forge/rating-field/trunk/addon/src/test/ attic/forge/rating-field/trunk/addon/src/test/java/ attic/forge/rating-field/trunk/addon/src/test/java/org/ attic/forge/rating-field/trunk/addon/src/test/java/org/onehippo/ attic/forge/rating-field/trunk/addon/src/test/java/org/onehippo/forge/ attic/forge/rating-field/trunk/addon/src/test/java/org/onehippo/forge/rating/ attic/forge/rating-field/trunk/addon/src/test/java/org/onehippo/forge/rating/model/ attic/forge/rating-field/trunk/addon/src/test/java/org/onehippo/forge/rating/model/RatingTest.java attic/forge/rating-field/trunk/cms/ attic/forge/rating-field/trunk/cms/README.txt attic/forge/rating-field/trunk/cms/clean.sh attic/forge/rating-field/trunk/cms/eclipse.sh attic/forge/rating-field/trunk/cms/jetty/ attic/forge/rating-field/trunk/cms/jetty/atomikos-util-3.1.4.jar attic/forge/rating-field/trunk/cms/jetty/geronimo-jta_1.1_spec-1.1.jar attic/forge/rating-field/trunk/cms/jetty/transactions-3.1.4.jar attic/forge/rating-field/trunk/cms/jetty/transactions-api-3.1.4.jar attic/forge/rating-field/trunk/cms/jetty/transactions-jta-3.1.4.jar attic/forge/rating-field/trunk/cms/pom.xml attic/forge/rating-field/trunk/cms/src/ attic/forge/rating-field/trunk/cms/src/main/ attic/forge/rating-field/trunk/cms/src/main/webapp/ attic/forge/rating-field/trunk/cms/src/main/webapp/WEB-INF/ attic/forge/rating-field/trunk/cms/src/main/webapp/WEB-INF/web.xml attic/forge/rating-field/trunk/pom.xml Removed Paths: ------------- attic/forge/rating-field/trunk/MOVED.txt Deleted: attic/forge/rating-field/trunk/MOVED.txt =================================================================== --- attic/forge/rating-field/trunk/MOVED.txt 2017-03-03 08:46:31 UTC (rev 58809) +++ attic/forge/rating-field/trunk/MOVED.txt 2017-04-24 09:06:49 UTC (rev 58810) @@ -1 +0,0 @@ -Moved to https://github.com/onehippo-forge/rating-field Added: attic/forge/rating-field/trunk/addon/pom.xml =================================================================== --- attic/forge/rating-field/trunk/addon/pom.xml (rev 0) +++ attic/forge/rating-field/trunk/addon/pom.xml 2017-04-24 09:06:49 UTC (rev 58810) @@ -0,0 +1,148 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onehippo.forge</groupId> + <artifactId>rating</artifactId> + <version>1.01.00-SNAPSHOT</version> + </parent> + + <name>Rating Editor Plugin</name> + <description>Rating Editor Plugin</description> + <groupId>org.onehippo.forge</groupId> + <artifactId>rating-addon</artifactId> + <packaging>jar</packaging> + + <dependencies> + <dependency> + <groupId>org.hippoecm</groupId> + <artifactId>hippo-ecm-addon-editor-frontend</artifactId> + </dependency> + <dependency> + <groupId>org.hippoecm</groupId> + <artifactId>hippo-ecm-frontend-engine</artifactId> + </dependency> + + <!-- testing --> + <dependency> + <groupId>org.hippoecm</groupId> + <artifactId>hippo-ecm-frontend-engine-test</artifactId> + <version>${hippoecm.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.hippoecm</groupId> + <artifactId>hippo-ecm-repository-engine</artifactId> + <version>${hippoecm.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.4</version> + <scope>test</scope> + </dependency> + + <!-- provided --> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <scope>provided</scope> + </dependency> + + <!-- Testing needs a JTA implementation --> + <dependency> + <groupId>com.atomikos</groupId> + <artifactId>transactions-api</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.atomikos</groupId> + <artifactId>transactions</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.atomikos</groupId> + <artifactId>transactions-jta</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.atomikos</groupId> + <artifactId>atomikos-util</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.geronimo.specs</groupId> + <artifactId>geronimo-jta_1.1_spec</artifactId> + <scope>provided</scope> + </dependency> + </dependencies> + + <build> + <defaultGoal>install</defaultGoal> + <resources> + <resource> + <filtering>false</filtering> + <directory>${basedir}/src/main/java</directory> + <includes> + <include>**/*.html</include> + <include>**/*.css</include> + </includes> + </resource> + <resource> + <filtering>false</filtering> + <directory>${basedir}/src/main/resources</directory> + <includes> + <include>**/*.xml</include> + </includes> + </resource> + </resources> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + </plugins> + </build> + + + <profiles> + <profile> + <id>tests</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <dependencies> + <dependency> + <groupId>org.hippoecm</groupId> + <artifactId>hippo-ecm-frontend-engine-test</artifactId> + <version>${hippoecm.version}</version> + <type>jar</type> + <classifier>tests</classifier> + <scope>test</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.hippoecm</groupId> + <artifactId>hippo-ecm-repository-engine</artifactId> + <version>${hippoecm.version}</version> + <type>jar</type> + <classifier>tests</classifier> + <scope>test</scope> + <optional>true</optional> + </dependency> + </dependencies> + </profile> + </profiles> + +</project> Property changes on: attic/forge/rating-field/trunk/addon/pom.xml ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/forge/rating/RatingPlugin.html =================================================================== --- attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/forge/rating/RatingPlugin.html (rev 0) +++ attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/forge/rating/RatingPlugin.html 2017-04-24 09:06:49 UTC (rev 58810) @@ -0,0 +1,22 @@ +<!-- + * Copyright 2007 Hippo + * + * 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. +--> +<html xmlns:wicket="http://wicket.apache.org/"> + <wicket:panel> + <div class="hippo-editor-field-value"> + <span wicket:id="value"></span> + </div> + </wicket:panel> +</html> \ No newline at end of file Property changes on: attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/forge/rating/RatingPlugin.html ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/forge/rating/RatingPlugin.java =================================================================== --- attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/forge/rating/RatingPlugin.java (rev 0) +++ attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/forge/rating/RatingPlugin.java 2017-04-24 09:06:49 UTC (rev 58810) @@ -0,0 +1,69 @@ +/* + * Copyright 2008 Hippo. + * + * 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. + */ +package org.onehippo.forge.rating; + +import org.apache.wicket.markup.html.basic.Label; +import org.apache.wicket.model.Model; +import org.apache.wicket.model.PropertyModel; +import org.hippoecm.frontend.editor.ITemplateEngine; +import org.hippoecm.frontend.model.properties.JcrPropertyValueModel; +import org.hippoecm.frontend.plugin.IPluginContext; +import org.hippoecm.frontend.plugin.config.IPluginConfig; +import org.hippoecm.frontend.service.render.RenderPlugin; +import org.hippoecm.frontend.widgets.TextFieldWidget; +import org.onehippo.forge.rating.model.Rating; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class RatingPlugin extends RenderPlugin { + @SuppressWarnings("unused") + private final static String SVN_ID = "$Id$"; + + private static final long serialVersionUID = 1L; + + static final Logger log = LoggerFactory.getLogger(RatingPlugin.class); + + private Rating rating; + + public RatingPlugin(IPluginContext context, IPluginConfig config) { + super(context, config); + + this.rating = new Rating((JcrPropertyValueModel) getModel()); + + String mode = config.getString("mode", "view"); + if (ITemplateEngine.EDIT_MODE.equals(mode)) { + TextFieldWidget widget = new TextFieldWidget("value", + new PropertyModel(rating, "rating")); + if (config.getString("size") != null) { + widget.setSize(config.getString("size")); + } + add(widget); + } else { + String value = ""; + for (long i = 0; i < rating.getRating(); i++) { + value = value + "*"; + } + add(new Label("value", new Model(value))); + } + } + + @Override + protected void onDetach() { + rating.detach(); + super.onDetach(); + } + +} Property changes on: attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/forge/rating/RatingPlugin.java ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/forge/rating/model/Rating.java =================================================================== --- attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/forge/rating/model/Rating.java (rev 0) +++ attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/forge/rating/model/Rating.java 2017-04-24 09:06:49 UTC (rev 58810) @@ -0,0 +1,42 @@ +/* + * Copyright 2008 Hippo. + * + * 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. + */ +package org.onehippo.forge.rating.model; + +import org.apache.wicket.model.IDetachable; +import org.hippoecm.frontend.model.properties.JcrPropertyValueModel; + +public class Rating implements IDetachable { + private static final long serialVersionUID = 1L; + + private JcrPropertyValueModel valueModel; + + public Rating(JcrPropertyValueModel model) { + this.valueModel = model; + } + + public long getRating() { + return (Long) valueModel.getObject(); + } + + public void setRating(long value) { + valueModel.setObject(value); + } + + public void detach() { + valueModel.detach(); + } + +} Property changes on: attic/forge/rating-field/trunk/addon/src/main/java/org/onehippo/forge/rating/model/Rating.java ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: attic/forge/rating-field/trunk/addon/src/main/resources/hippoecm-extension.xml =================================================================== --- attic/forge/rating-field/trunk/addon/src/main/resources/hippoecm-extension.xml (rev 0) +++ attic/forge/rating-field/trunk/addon/src/main/resources/hippoecm-extension.xml 2017-04-24 09:06:49 UTC (rev 58810) @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" + xmlns:nt="http://www.jcp.org/jcr/nt/1.0" + xmlns:jcr="http://www.jcp.org/jcr/1.0" + xmlns:rep="internal" + xmlns:fn_old="http://www.w3.org/2004/10/xpath-functions" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:mix="http://www.jcp.org/jcr/mix/1.0" + xmlns:hippo="http://www.onehippo.org/jcr/hippo/nt/2.0" + xmlns:fn="http://www.w3.org/2005/xpath-functions" + sv:name="hippo:initialize"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>hippo:initializefolder</sv:value> + </sv:property> + + <sv:node sv:name="rating-type"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>hippo:initializeitem</sv:value> + </sv:property> + <sv:property sv:name="hippo:sequence" sv:type="Double"> + <sv:value>10051</sv:value> + </sv:property> + <sv:property sv:name="hippo:contentresource" sv:type="String"> + <sv:value>type-rating.xml</sv:value> + </sv:property> + <sv:property sv:name="hippo:contentroot" sv:type="String"> + <sv:value>/hippo:namespaces/system</sv:value> + </sv:property> + </sv:node> +</sv:node> Property changes on: attic/forge/rating-field/trunk/addon/src/main/resources/hippoecm-extension.xml ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: attic/forge/rating-field/trunk/addon/src/main/resources/type-rating.xml =================================================================== --- attic/forge/rating-field/trunk/addon/src/main/resources/type-rating.xml (rev 0) +++ attic/forge/rating-field/trunk/addon/src/main/resources/type-rating.xml 2017-04-24 09:06:49 UTC (rev 58810) @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<sv:node xmlns:hippo="http://www.onehippo.org/jcr/hippo/nt/2.0" xmlns:editor="http://www.hippoecm.org/editor/nt/1.0" xmlns:frontend="http://www.hippoecm.org/frontend/nt/1.4" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:hipposysedit="http://www.onehippo.org/jcr/hipposysedit/nt/1.0" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="Rating"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>hipposysedit:templatetype</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name"> + <sv:value>mix:referenceable</sv:value> + <sv:value>editor:editable</sv:value> + <sv:value>hippo:translated</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>98941086-b4c2-42da-ab65-d3d009e2a89f</sv:value> + </sv:property> + <sv:node sv:name="hippo:translation"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>hippo:translation</sv:value> + </sv:property> + <sv:property sv:name="hippo:language" sv:type="String"> + <sv:value>nl</sv:value> + </sv:property> + <sv:property sv:name="hippo:message" sv:type="String"> + <sv:value>Waardering</sv:value> + </sv:property> + </sv:node> + <sv:node sv:name="hippo:translation"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>hippo:translation</sv:value> + </sv:property> + <sv:property sv:name="hippo:language" sv:type="String"> + <sv:value>en</sv:value> + </sv:property> + <sv:property sv:name="hippo:message" sv:type="String"> + <sv:value>Rating</sv:value> + </sv:property> + </sv:node> + <sv:node sv:name="hipposysedit:nodetype"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>hippo:handle</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name"> + <sv:value>hippo:hardhandle</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>12b5e14c-4ea3-4aed-9f8b-d473a90c3e25</sv:value> + </sv:property> + <sv:node sv:name="hipposysedit:nodetype"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>hipposysedit:nodetype</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name"> + <sv:value>hipposysedit:remodel</sv:value> + </sv:property> + <sv:property sv:name="hipposysedit:node" sv:type="Boolean"> + <sv:value>false</sv:value> + </sv:property> + <sv:property sv:name="hipposysedit:uri" sv:type="String"> + <sv:value>internal</sv:value> + </sv:property> + <sv:property sv:name="hipposysedit:type" sv:type="String"> + <sv:value>Long</sv:value> + </sv:property> + </sv:node> + </sv:node> + <sv:node sv:name="editor:templates"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>editor:templateset</sv:value> + </sv:property> + <sv:node sv:name="_default_"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>frontend:plugincluster</sv:value> + </sv:property> + <sv:property sv:name="frontend:properties" sv:type="String"> + <sv:value>mode</sv:value> + </sv:property> + <sv:property sv:name="frontend:references" sv:type="String"> + <sv:value>wicket.model</sv:value> + </sv:property> + <sv:property sv:name="frontend:services" sv:type="String"> + <sv:value>wicket.id</sv:value> + </sv:property> + <sv:node sv:name="root"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>frontend:plugin</sv:value> + </sv:property> + <sv:property sv:name="mode" sv:type="String"> + <sv:value>${mode}</sv:value> + </sv:property> + <sv:property sv:name="plugin.class" sv:type="String"> + <sv:value>org.onehippo.forge.rating.RatingPlugin</sv:value> + </sv:property> + <sv:property sv:name="wicket.id" sv:type="String"> + <sv:value>${wicket.id}</sv:value> + </sv:property> + <sv:property sv:name="wicket.model" sv:type="String"> + <sv:value>${wicket.model}</sv:value> + </sv:property> + </sv:node> + </sv:node> + </sv:node> +</sv:node> Property changes on: attic/forge/rating-field/trunk/addon/src/main/resources/type-rating.xml ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: attic/forge/rating-field/trunk/addon/src/test/java/org/onehippo/forge/rating/model/RatingTest.java =================================================================== --- attic/forge/rating-field/trunk/addon/src/test/java/org/onehippo/forge/rating/model/RatingTest.java (rev 0) +++ attic/forge/rating-field/trunk/addon/src/test/java/org/onehippo/forge/rating/model/RatingTest.java 2017-04-24 09:06:49 UTC (rev 58810) @@ -0,0 +1,57 @@ +/* + * Copyright 2008 Hippo. + * + * 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. + */ +package org.onehippo.forge.rating.model; + +import static org.junit.Assert.assertEquals; + +import javax.jcr.Node; +import javax.jcr.Property; + +import org.hippoecm.frontend.PluginTest; +import org.hippoecm.frontend.model.properties.JcrPropertyModel; +import org.hippoecm.frontend.model.properties.JcrPropertyValueModel; +import org.junit.Before; +import org.junit.Test; + +public class RatingTest extends PluginTest { + + JcrPropertyValueModel model; + + @Before + public void setUp() throws Exception { + super.setUp(); + Node node = root.addNode("test"); + Property prop = node.setProperty("rating", 4); + model = new JcrPropertyValueModel(new JcrPropertyModel(prop)); + } + + @Test + public void testGetRatingReturnsPropertyValue() throws Exception { + Rating rating = new Rating(model); + assertEquals(4, rating.getRating()); + } + + @Test + public void testSetRatingPersistsValue() throws Exception { + Rating rating = new Rating(model); + rating.setRating(2); + + Node node = root.getNode("test"); + Property prop = node.getProperty("rating"); + assertEquals(2, prop.getLong()); + } + +} Property changes on: attic/forge/rating-field/trunk/addon/src/test/java/org/onehippo/forge/rating/model/RatingTest.java ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: attic/forge/rating-field/trunk/cms/README.txt =================================================================== --- attic/forge/rating-field/trunk/cms/README.txt (rev 0) +++ attic/forge/rating-field/trunk/cms/README.txt 2017-04-24 09:06:49 UTC (rev 58810) @@ -0,0 +1,65 @@ +HOWTO run the rating field cms in eclipse + +Prerequisites: + + [ eclipse ] + - run-jetty-run plugin (http://code.google.com/p/run-jetty-run/) + add http://run-jetty-run.googlecode.com/svn/trunk/updatesite + as an update site, and install the Run Jetty Run feature + + +Prepare project: + + [ command line ] + - in rating-field root project + mvn eclipse:eclipse + + * edit the version number in the eclipse.sh script + + * Run the eclipse.sh script + + [ eclipse ] + - in Project -> Properties -> Java Build Path -> Source + - remove existing source folders + - enable "Allow output folders for source folders" + - add source folders + src/main/webapp/WEB-INF (output: target/classes/WEB-INF) + quickstart/layout (output: target/classes/layout) + quickstart/skin (output: target/classes/skin) + quickstart/xinha (output: target/classes/xinha) + + * in Project -> Properties -> Java Build Path -> Libraries + - remove all jars and class folders from the build path + - add all libraries from the lib/ and jetty/ folders + - add the classes/ folder as a Class folder + + +Create launch configuration: + + [ eclipse ] + - navigate to Run -> Debug Configurations + - add new Jetty Webapp + - clear HTTPS port number + - set Context to "/cms" + - set WebApp dir to "target/classes" + + +Cleanup: + + [ command line ] + * run clean.sh + - in rating-field root project + mvn eclipse:clean + + +Keeping up: + + When a new version of the quickstart-war is used, the project can + be updated with a small number of steps. Execute the steps marked + with a "*", in the order + - run clean.sh + - edit the version number in eclipse.sh script + - run eclipse.sh + - update library dependencies + + Property changes on: attic/forge/rating-field/trunk/cms/README.txt ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: attic/forge/rating-field/trunk/cms/clean.sh =================================================================== --- attic/forge/rating-field/trunk/cms/clean.sh (rev 0) +++ attic/forge/rating-field/trunk/cms/clean.sh 2017-04-24 09:06:49 UTC (rev 58810) @@ -0,0 +1,4 @@ +#!/bin/sh + +base=`dirname $0` +rm -rf $base/lib/ $base/classes/ $base/quickstart/ Property changes on: attic/forge/rating-field/trunk/cms/clean.sh ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: attic/forge/rating-field/trunk/cms/eclipse.sh =================================================================== --- attic/forge/rating-field/trunk/cms/eclipse.sh (rev 0) +++ attic/forge/rating-field/trunk/cms/eclipse.sh 2017-04-24 09:06:49 UTC (rev 58810) @@ -0,0 +1,32 @@ +#!/bin/sh + +m2home=${HOME}/.m2/repository +version=2.07.00 + +###################################################### + +cwd=`pwd` +base=`dirname $0` +if [ -d "$base/lib" -o -d "$base/classes" ] +then + echo "removing lib and classes folders" + rm -rf $base/lib/ $base/classes/ +fi + +if [ ! -d "$base/quickstart" ] +then + echo "creating quickstart folder..." + mkdir $base/quickstart +fi + +echo "copying hippo-ecm-quickstart-war-${version}.war..." +cp ${m2home}/org/hippoecm/hippo-ecm-quickstart-war/${version}/hippo-ecm-quickstart-war-${version}.war $base/quickstart/quickstart.war || exit 1 "Could not find quickstart ${version}" + +echo "extracting quickstart war..." +chdir $base/quickstart +jar xf quickstart.war || exit 1 +chdir $cwd + +echo "moving lib and classes folders..." +mv $base/quickstart/WEB-INF/lib $base/ +mv $base/quickstart/WEB-INF/classes $base/ Property changes on: attic/forge/rating-field/trunk/cms/eclipse.sh ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: attic/forge/rating-field/trunk/cms/jetty/atomikos-util-3.1.4.jar =================================================================== (Binary files differ) Index: attic/forge/rating-field/trunk/cms/jetty/atomikos-util-3.1.4.jar =================================================================== --- attic/forge/rating-field/trunk/cms/jetty/atomikos-util-3.1.4.jar 2017-03-03 08:46:31 UTC (rev 58809) +++ attic/forge/rating-field/trunk/cms/jetty/atomikos-util-3.1.4.jar 2017-04-24 09:06:49 UTC (rev 58810) Property changes on: attic/forge/rating-field/trunk/cms/jetty/atomikos-util-3.1.4.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: attic/forge/rating-field/trunk/cms/jetty/geronimo-jta_1.1_spec-1.1.jar =================================================================== (Binary files differ) Index: attic/forge/rating-field/trunk/cms/jetty/geronimo-jta_1.1_spec-1.1.jar =================================================================== --- attic/forge/rating-field/trunk/cms/jetty/geronimo-jta_1.1_spec-1.1.jar 2017-03-03 08:46:31 UTC (rev 58809) +++ attic/forge/rating-field/trunk/cms/jetty/geronimo-jta_1.1_spec-1.1.jar 2017-04-24 09:06:49 UTC (rev 58810) Property changes on: attic/forge/rating-field/trunk/cms/jetty/geronimo-jta_1.1_spec-1.1.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: attic/forge/rating-field/trunk/cms/jetty/transactions-3.1.4.jar =================================================================== (Binary files differ) Index: attic/forge/rating-field/trunk/cms/jetty/transactions-3.1.4.jar =================================================================== --- attic/forge/rating-field/trunk/cms/jetty/transactions-3.1.4.jar 2017-03-03 08:46:31 UTC (rev 58809) +++ attic/forge/rating-field/trunk/cms/jetty/transactions-3.1.4.jar 2017-04-24 09:06:49 UTC (rev 58810) Property changes on: attic/forge/rating-field/trunk/cms/jetty/transactions-3.1.4.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: attic/forge/rating-field/trunk/cms/jetty/transactions-api-3.1.4.jar =================================================================== (Binary files differ) Index: attic/forge/rating-field/trunk/cms/jetty/transactions-api-3.1.4.jar =================================================================== --- attic/forge/rating-field/trunk/cms/jetty/transactions-api-3.1.4.jar 2017-03-03 08:46:31 UTC (rev 58809) +++ attic/forge/rating-field/trunk/cms/jetty/transactions-api-3.1.4.jar 2017-04-24 09:06:49 UTC (rev 58810) Property changes on: attic/forge/rating-field/trunk/cms/jetty/transactions-api-3.1.4.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: attic/forge/rating-field/trunk/cms/jetty/transactions-jta-3.1.4.jar =================================================================== (Binary files differ) Index: attic/forge/rating-field/trunk/cms/jetty/transactions-jta-3.1.4.jar =================================================================== --- attic/forge/rating-field/trunk/cms/jetty/transactions-jta-3.1.4.jar 2017-03-03 08:46:31 UTC (rev 58809) +++ attic/forge/rating-field/trunk/cms/jetty/transactions-jta-3.1.4.jar 2017-04-24 09:06:49 UTC (rev 58810) Property changes on: attic/forge/rating-field/trunk/cms/jetty/transactions-jta-3.1.4.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: attic/forge/rating-field/trunk/cms/pom.xml =================================================================== --- attic/forge/rating-field/trunk/cms/pom.xml (rev 0) +++ attic/forge/rating-field/trunk/cms/pom.xml 2017-04-24 09:06:49 UTC (rev 58810) @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onehippo.forge</groupId> + <artifactId>rating</artifactId> + <version>1.01.00-SNAPSHOT</version> + </parent> + + <name>Rating Editor CMS</name> + <description>Rating Editor test and development CMS</description> + <groupId>org.onehippo.forge</groupId> + <artifactId>rating-cms</artifactId> + <packaging>war</packaging> + + <dependencies> + <dependency> + <groupId>org.onehippo.forge</groupId> + <artifactId>rating-addon</artifactId> + <version>${version}</version> + </dependency> + <dependency> + <groupId>org.hippoecm</groupId> + <artifactId>hippo-ecm-quickstart-war</artifactId> + <type>war</type> + <scope>compile</scope> + </dependency> + + <!-- atomikos dependecies for running jetty:run[-war|-exploded] --> + <dependency> + <groupId>com.atomikos</groupId> + <artifactId>transactions-api</artifactId> + <version>3.1.4</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.atomikos</groupId> + <artifactId>transactions-jta</artifactId> + <version>3.1.4</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.atomikos</groupId> + <artifactId>transactions</artifactId> + <version>3.1.4</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.atomikos</groupId> + <artifactId>atomikos-util</artifactId> + <version>3.1.4</version> + <scope>test</scope> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + <version>2.1-alpha-1</version> + <configuration> + <!-- webappDirectory>maven-generated</webappDirectory --> + <overlays> + <overlay> + <groupId>org.hippoecm</groupId> + <artifactId>hippo-ecm-quickstart-war</artifactId> + </overlay> + </overlays> + </configuration> + </plugin> + <plugin> + <groupId>org.mortbay.jetty</groupId> + <artifactId>maven-jetty-plugin</artifactId> + <version>6.1.10</version> + <configuration> + <scanIntervalSeconds>5</scanIntervalSeconds> + <connectors> + <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> + <port>8080</port> + </connector> + </connectors> + <contextPath>/cms</contextPath> + </configuration> + <dependencies> + <!-- atomikos dependecies for running jetty:run[-war|-exploded] --> + <dependency> + <groupId>com.atomikos</groupId> + <artifactId>transactions-api</artifactId> + <version>3.1.4</version> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>com.atomikos</groupId> + <artifactId>transactions-jta</artifactId> + <version>3.1.4</version> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>com.atomikos</groupId> + <artifactId>transactions</artifactId> + <version>3.1.4</version> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>com.atomikos</groupId> + <artifactId>atomikos-util</artifactId> + <version>3.1.4</version> + <scope>runtime</scope> + </dependency> + + </dependencies> + </plugin> + </plugins> + </build> + +</project> Property changes on: attic/forge/rating-field/trunk/cms/pom.xml ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: attic/forge/rating-field/trunk/cms/src/main/webapp/WEB-INF/web.xml =================================================================== --- attic/forge/rating-field/trunk/cms/src/main/webapp/WEB-INF/web.xml (rev 0) +++ attic/forge/rating-field/trunk/cms/src/main/webapp/WEB-INF/web.xml 2017-04-24 09:06:49 UTC (rev 58810) @@ -0,0 +1,159 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> +<!-- + * Copyright 2007 Hippo + * + * 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. +--> +<web-app id="hippo-ecm"> + + <!-- General configuration --> + <display-name>Hippo ECM WAR package</display-name> + <description>Hippo ECM WAR package</description> + + <context-param> + <param-name>repository-address</param-name> + <param-value>rmi://localhost:1099/hipporepository</param-value> + <description>The address of the repository</description> + </context-param> + + <!--Default application--> + <filter> + <filter-name>ConcurrentLogin</filter-name> + <filter-class>org.hippoecm.frontend.plugins.login.ConcurrentLoginFilter</filter-class> + </filter> + <filter> + <filter-name>CMS</filter-name> + <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class> + <init-param> + <param-name>applicationClassName</param-name> + <param-value>org.hippoecm.frontend.Main</param-value> + </init-param> + <init-param> + <param-name>filterMappingUrlPattern</param-name> + <param-value>/*</param-value> + </init-param> + <init-param> + <param-name>configuration</param-name> + <param-value>development</param-value> + </init-param> + <init-param> + <param-name>repository-address</param-name> + <param-value>vm://</param-value> + </init-param> + <init-param> + <param-name>upload-limit</param-name> + <param-value>4096k</param-value> + </init-param> + </filter> + + <!--Builtin console--> + <filter> + <filter-name>Console</filter-name> + <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class> + <init-param> + <param-name>applicationClassName</param-name> + <param-value>org.hippoecm.frontend.Main</param-value> + </init-param> + <init-param> + <param-name>config</param-name> + <param-value>builtin</param-value> + </init-param> + <init-param> + <param-name>configuration</param-name> + <param-value>development</param-value> + </init-param> + <init-param> + <param-name>repository-address</param-name> + <param-value>vm://</param-value> + </init-param> + </filter> + + <filter-mapping> + <filter-name>ConcurrentLogin</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + <filter-mapping> + <filter-name>CMS</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + <filter-mapping> + <filter-name>Console</filter-name> + <url-pattern>/console/*</url-pattern> + </filter-mapping> + + <listener> + <listener-class>org.hippoecm.frontend.plugins.login.ConcurrentLoginListener</listener-class> + </listener> + + <servlet> + <servlet-name>StatusServlet</servlet-name> + <servlet-class>org.hippoecm.repository.StatusServlet</servlet-class> + <load-on-startup>2</load-on-startup> + </servlet> + + <servlet> + <servlet-name>LoggingServlet</servlet-name> + <servlet-class>org.hippoecm.repository.LoggingServlet</servlet-class> + <load-on-startup>3</load-on-startup> + </servlet> + + <!-- Repository --> + <servlet> + <servlet-name>Repository</servlet-name> + <servlet-class>org.hippoecm.repository.RepositoryServlet</servlet-class> + <init-param> + <param-name>repository-directory</param-name> + <param-value>WEB-INF/storage</param-value> + <description>The (relative) location where to store files</description> + </init-param> + <init-param> + <param-name>repository-config</param-name> + <param-value>repository.xml</param-value> + <description>The location of the repository configuration file. Unless the location + starts with file://, the location is retrieved from within the application package as + resource.</description> + </init-param> + <load-on-startup>4</load-on-startup> + </servlet> + + <servlet-mapping> + <servlet-name>StatusServlet</servlet-name> + <url-pattern>/status/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>LoggingServlet</servlet-name> + <url-pattern>/logging/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>Repository</servlet-name> + <url-pattern>/repository/*</url-pattern> + </servlet-mapping> + + <!-- Timeout in minutes --> + <session-config> + <session-timeout>60</session-timeout> + </session-config> + + <!-- + <resource-ref> + <res-ref-name>jdbc/hreptwo</res-ref-name> + <res-type>javax.sql.DataSource</res-type> + <res-auth>Container</res-auth> + </resource-ref> + --> + +</web-app> Property changes on: attic/forge/rating-field/trunk/cms/src/main/webapp/WEB-INF/web.xml ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: attic/forge/rating-field/trunk/pom.xml =================================================================== --- attic/forge/rating-field/trunk/pom.xml (rev 0) +++ attic/forge/rating-field/trunk/pom.xml 2017-04-24 09:06:49 UTC (rev 58810) @@ -0,0 +1,140 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <name>Rating Field</name> + <description>Project</description> + <groupId>org.onehippo.forge</groupId> + <artifactId>rating</artifactId> + <version>1.01.00-SNAPSHOT</version> + <packaging>pom</packaging> + + <properties> + <hippoecm.version>2.07.00</hippoecm.version> + <atomikos.version>3.1.4</atomikos.version> + <geronimo.jta.version>1.1</geronimo.jta.version> + <slf4j.version>1.4.3</slf4j.version> + <javax.servlet.version>2.3</javax.servlet.version> + </properties> + + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-eclipse-plugin</artifactId> + <version>2.5</version> + <configuration> + <downloadSources>true</downloadSources> + <downloadJavadocs>true</downloadJavadocs> + </configuration> + </plugin> + </plugins> + </build> + + <repositories> + <repository> + <id>hippoecm</id> + <name>Hippo ECM maven 2 repository.</name> + <url>http://repository.hippocms.org/maven2/</url> + <snapshots> + <enabled>true</enabled> + </snapshots> + <releases> + <updatePolicy>never</updatePolicy> + </releases> + <layout>default</layout> + </repository> + </repositories> + + <pluginRepositories> + <pluginRepository> + <id>hippoecm</id> + <name>Hippo ECM maven 2 repository.</name> + <url>http://repository.hippocms.org/maven2/</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + <releases> + <updatePolicy>never</updatePolicy> + </releases> + <layout>default</layout> + </pluginRepository> + </pluginRepositories> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.hippoecm</groupId> + <artifactId>hippo-ecm-frontend-engine</artifactId> + <version>${hippoecm.version}</version> + </dependency> + <dependency> + <groupId>org.hippoecm</groupId> + <artifactId>hippo-ecm-addon-editor-frontend</artifactId> + <version>${hippoecm.version}</version> + </dependency> + <dependency> + <groupId>org.hippoecm</groupId> + <artifactId>hippo-ecm-quickstart-war</artifactId> + <version>${hippoecm.version}</version> + <type>war</type> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>${slf4j.version}</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>${slf4j.version}</version> + </dependency> + <dependency> + <groupId>org.apache.geronimo.specs</groupId> + <artifactId>geronimo-jta_1.1_spec</artifactId> + <version>${geronimo.jta.version}</version> + <exclusions> + <exclusion> + <groupId>geronimo-spec</groupId> + <artifactId>geronimo-spec-jta</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>${javax.servlet.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.atomikos</groupId> + <artifactId>transactions-api</artifactId> + <version>${atomikos.version}</version> + </dependency> + <dependency> + <groupId>com.atomikos</groupId> + <artifactId>transactions</artifactId> + <version>${atomikos.version}</version> + </dependency> + <dependency> + <groupId>com.atomikos</groupId> + <artifactId>transactions-jta</artifactId> + <version>${atomikos.version}</version> + </dependency> + <dependency> + <groupId>com.atomikos</groupId> + <artifactId>atomikos-util</artifactId> + <version>${atomikos.version}</version> + </dependency> + </dependencies> + </dependencyManagement> + + <modules> + <module>addon</module> + <module>cms</module> + </modules> + +</project> Property changes on: attic/forge/rating-field/trunk/pom.xml ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property _______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn