DNA SVN: r1080 - trunk/dna-jcr/src/test/java/org/jboss/dna/jcr.
by dna-commits@lists.jboss.org
Author: rhauch
Date: 2009-07-09 12:22:06 -0400 (Thu, 09 Jul 2009)
New Revision: 1080
Modified:
trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/SessionCacheTest.java
Log:
Correct several POM files to more accurately reflect direct dependencies and usage
Modified: trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/SessionCacheTest.java
===================================================================
--- trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/SessionCacheTest.java 2009-07-08 16:28:08 UTC (rev 1079)
+++ trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/SessionCacheTest.java 2009-07-09 16:22:06 UTC (rev 1080)
@@ -52,6 +52,7 @@
import org.jboss.dna.graph.Graph;
import org.jboss.dna.graph.Location;
import org.jboss.dna.graph.Node;
+import org.jboss.dna.graph.Graph.Children;
import org.jboss.dna.graph.connector.inmemory.InMemoryRepositorySource;
import org.jboss.dna.graph.property.Name;
import org.jboss.dna.graph.property.Path;
@@ -60,10 +61,6 @@
import org.jboss.dna.graph.property.ValueFactory;
import org.jboss.dna.jcr.SessionCache.NodeEditor;
import org.jboss.dna.jcr.Vehicles.Lexicon;
-import org.jboss.dna.jcr.cache.ChildNode;
-import org.jboss.dna.jcr.cache.Children;
-import org.jboss.dna.jcr.cache.NodeInfo;
-import org.jboss.dna.jcr.cache.PropertyInfo;
import org.junit.Before;
import org.junit.Test;
import org.mockito.MockitoAnnotations;
16 years, 6 months
DNA SVN: r1079 - in branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite: features and 2 other directories.
by dna-commits@lists.jboss.org
Author: elvisisking
Date: 2009-07-08 12:28:08 -0400 (Wed, 08 Jul 2009)
New Revision: 1079
Added:
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/.project
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/artifacts.xml
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/content.xml
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/features/
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/features/org.jboss.dna.web.jcr.rest.client.swt.feature_1.0.0.v20090708.jar
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/index.html
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/plugins/
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/plugins/org.jboss.dna.web.jcr.rest.client.swt_1.0.0.jar
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/site.xml
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/web/
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/web/site.css
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/web/site.xsl
Log:
First version of files needed for the update site plugin.
Added: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/.project
===================================================================
--- branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/.project (rev 0)
+++ branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/.project 2009-07-08 16:28:08 UTC (rev 1079)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.dna.web.jcr.rest.client.swt.updatesite</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.UpdateSiteBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.UpdateSiteNature</nature>
+ </natures>
+</projectDescription>
Property changes on: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/artifacts.xml
===================================================================
--- branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/artifacts.xml (rev 0)
+++ branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/artifacts.xml 2009-07-08 16:28:08 UTC (rev 1079)
@@ -0,0 +1,48 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?artifactRepository class='org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository' version='1.0.0'?>
+<repository name='JBoss DNA REST Eclipse SWT Client' type='org.eclipse.equinox.p2.artifact.repository.simpleRepository' version='1.0.0'>
+ <properties size='2'>
+ <property name='p2.compressed' value='false'/>
+ <property name='p2.timestamp' value='1247070330809'/>
+ </properties>
+ <mappings size='3'>
+ <rule filter='(& (classifier=osgi.bundle))' output='${repoUrl}/plugins/${id}_${version}.jar'/>
+ <rule filter='(& (classifier=binary))' output='${repoUrl}/binary/${id}_${version}'/>
+ <rule filter='(& (classifier=org.eclipse.update.feature))' output='${repoUrl}/features/${id}_${version}.jar'/>
+ </mappings>
+ <artifacts size='5'>
+ <artifact classifier='org.eclipse.update.feature' id='org.jboss.dna.web.jcr.rest.client.swt.feature' version='1.0.0.v20090708'>
+ <properties size='2'>
+ <property name='artifact.size' value='1859'/>
+ <property name='download.size' value='1859'/>
+ </properties>
+ </artifact>
+ <artifact classifier='osgi.bundle' id='org.jboss.dna.web.jcr.rest.client.swt' version='1.0.0'>
+ <properties size='3'>
+ <property name='artifact.size' value='85068'/>
+ <property name='download.size' value='85068'/>
+ <property name='download.contentType' value='application/zip'/>
+ </properties>
+ </artifact>
+ <artifact classifier='osgi.bundle' id='org.jboss.dna.web.jcr.rest.client.swt' version='1.0.0'>
+ <properties size='3'>
+ <property name='artifact.size' value='85010'/>
+ <property name='download.size' value='85010'/>
+ <property name='download.contentType' value='application/zip'/>
+ </properties>
+ </artifact>
+ <artifact classifier='org.eclipse.update.feature' id='org.jboss.dna.web.jcr.rest.client.swt.feature' version='1.0.0.v20090708'>
+ <properties size='2'>
+ <property name='artifact.size' value='1848'/>
+ <property name='download.size' value='1848'/>
+ </properties>
+ </artifact>
+ <artifact classifier='osgi.bundle' id='org.jboss.dna.web.jcr.rest.client.swt' version='1.0.0'>
+ <properties size='3'>
+ <property name='artifact.size' value='73732'/>
+ <property name='download.size' value='73732'/>
+ <property name='download.contentType' value='application/zip'/>
+ </properties>
+ </artifact>
+ </artifacts>
+</repository>
Property changes on: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/artifacts.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/content.xml
===================================================================
--- branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/content.xml (rev 0)
+++ branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/content.xml 2009-07-08 16:28:08 UTC (rev 1079)
@@ -0,0 +1,353 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?metadataRepository class='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1.0.0'?>
+<repository name='JBoss DNA REST Eclipse SWT Client' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1.0.0'>
+ <properties size='2'>
+ <property name='p2.compressed' value='false'/>
+ <property name='p2.timestamp' value='1247070330817'/>
+ </properties>
+ <units size='8'>
+ <unit id='org.jboss.dna.web.jcr.rest.client.swt.feature.feature.jar' version='1.0.0.v20090708'>
+ <update id='org.jboss.dna.web.jcr.rest.client.swt.feature.feature.jar' range='[0.0.0,1.0.0.v20090708)' severity='0'/>
+ <properties size='9'>
+ <property name='org.eclipse.equinox.p2.name' value='%featureName'/>
+ <property name='org.eclipse.equinox.p2.description' value='%description'/>
+ <property name='org.eclipse.equinox.p2.description.url' value='http://www.jboss.org/dna/'/>
+ <property name='org.eclipse.equinox.p2.provider' value='%featureProvider'/>
+ <property name='df_LT.featureName' value='JBoss DNA JCR REST Eclipse SWT Client'/>
+ <property name='df_LT.copyright' value='JBoss DNA JCR REST Eclipse SWT Client (http://www.jboss.org/dna/) is copyright of Red Hat, Inc.'/>
+ <property name='df_LT.featureProvider' value='Red Hat, Inc.'/>
+ <property name='df_LT.description' value='The JBoss DNA JCR REST Eclipse Client provides a resource publishing and unpublishing capability to DNA repositories.'/>
+ <property name='df_LT.license' value='This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which is available at http://www.eclipse.org/legal/epl-v10.html.

Some portions may be licensed to Red Hat, Inc. under one or more contributor license agreements.'/>
+ </properties>
+ <provides size='4'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='org.jboss.dna.web.jcr.rest.client.swt.feature.feature.jar' version='1.0.0.v20090708'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/>
+ <provided namespace='org.eclipse.update.feature' name='org.jboss.dna.web.jcr.rest.client.swt.feature' version='1.0.0.v20090708'/>
+ <provided namespace='org.eclipse.equinox.p2.localization' name='df_LT' version='1.0.0'/>
+ </provides>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ <artifacts size='1'>
+ <artifact classifier='org.eclipse.update.feature' id='org.jboss.dna.web.jcr.rest.client.swt.feature' version='1.0.0.v20090708'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='zipped'>
+ true
+ </instruction>
+ </instructions>
+ </touchpointData>
+ <licenses size='1'>
+ <license url='http://www.example.com/license'>
+ %license
+ </license>
+ </licenses>
+ <copyright url='http://www.example.com/copyright'>
+ %copyright
+ </copyright>
+ </unit>
+ <unit id='tooling.source.default' version='1.0.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='source' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ </properties>
+ <provides size='2'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='tooling.source.default' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.flavor' name='tooling' version='1.0.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='source' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='2'>
+ <instruction key='install'>
+ addSourceBundle(bundle:${artifact})
+ </instruction>
+ <instruction key='uninstall'>
+ removeSourceBundle(bundle:${artifact})
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='org.jboss.dna.web.jcr.rest.client.swt' version='1.0.0'>
+ <update id='org.jboss.dna.web.jcr.rest.client.swt' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='4'>
+ <property name='df_LT.bundleVendor' value='Red Hat, Inc.'/>
+ <property name='df_LT.bundleName' value='DNA Eclipse Publishing UI Plug-in'/>
+ <property name='org.eclipse.equinox.p2.name' value='%bundleName'/>
+ <property name='org.eclipse.equinox.p2.provider' value='%bundleVendor'/>
+ </properties>
+ <provides size='4'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='org.jboss.dna.web.jcr.rest.client.swt' version='1.0.0'/>
+ <provided namespace='osgi.bundle' name='org.jboss.dna.web.jcr.rest.client.swt' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.localization' name='df_LT' version='1.0.0'/>
+ </provides>
+ <requires size='3'>
+ <required namespace='osgi.bundle' name='org.eclipse.ui' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.core.runtime' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.core.resources' range='0.0.0'/>
+ </requires>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='org.jboss.dna.web.jcr.rest.client.swt' version='1.0.0'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-ManifestVersion: 2
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime,org.eclipse.core.resources
Bundle-Activator: org.jboss.dna.web.jcr.rest.client.swt.Activator
Bundle-Name: %bundleName
Bundle-Version: 1.0.0
Bundle-Vendor: %bundleVendor
Bundle-SymbolicName: org.jboss.dna.web.jcr.rest.client.swt;singleton:=true
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: dna-web-jcr-rest-client-0.6-SNAPSHOT.jar,dnaPublishUi.jar
Manifest-Version: 1.0
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='tooling.osgi.bundle.default' version='1.0.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' range='0.0.0' multiple='true' greedy='false'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ </properties>
+ <provides size='2'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='tooling.osgi.bundle.default' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.flavor' name='tooling' version='1.0.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' range='0.0.0' multiple='true' greedy='false'/>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='4'>
+ <instruction key='install'>
+ installBundle(bundle:${artifact})
+ </instruction>
+ <instruction key='uninstall'>
+ uninstallBundle(bundle:${artifact})
+ </instruction>
+ <instruction key='unconfigure'>
+
+ </instruction>
+ <instruction key='configure'>
+ setStartLevel(startLevel:4);
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='tooling.org.eclipse.update.feature.default' version='1.0.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ </properties>
+ <provides size='2'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='tooling.org.eclipse.update.feature.default' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.flavor' name='tooling' version='1.0.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ </requires>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ <touchpoint id='null' version='0.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='2'>
+ <instruction key='install'>
+ installFeature(feature:${artifact},featureId:default,featureVersion:default)
+ </instruction>
+ <instruction key='uninstall'>
+ uninstallFeature(feature:${artifact},featureId:default,featureVersion:default)
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='config.a.jre' version='1.6.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='a.jre' range='1.6.0'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='config.a.jre' version='1.6.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='a.jre' range='1.6.0'/>
+ </requires>
+ <touchpoint id='org.eclipse.equinox.p2.native' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='install'>
+
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='org.jboss.dna.web.jcr.rest.client.swt.feature.feature.group' version='1.0.0.v20090708' singleton='false'>
+ <update id='org.jboss.dna.web.jcr.rest.client.swt.feature.feature.group' range='[0.0.0,1.0.0.v20090708)' severity='0'/>
+ <properties size='10'>
+ <property name='org.eclipse.equinox.p2.name' value='%featureName'/>
+ <property name='org.eclipse.equinox.p2.description' value='%description'/>
+ <property name='org.eclipse.equinox.p2.description.url' value='http://www.jboss.org/dna/'/>
+ <property name='org.eclipse.equinox.p2.provider' value='%featureProvider'/>
+ <property name='org.eclipse.equinox.p2.type.group' value='true'/>
+ <property name='df_LT.featureName' value='JBoss DNA JCR REST Eclipse SWT Client'/>
+ <property name='df_LT.copyright' value='JBoss DNA JCR REST Eclipse SWT Client (http://www.jboss.org/dna/) is copyright of Red Hat, Inc.'/>
+ <property name='df_LT.featureProvider' value='Red Hat, Inc.'/>
+ <property name='df_LT.description' value='The JBoss DNA JCR REST Eclipse Client provides a resource publishing and unpublishing capability to DNA repositories.'/>
+ <property name='df_LT.license' value='This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which is available at http://www.eclipse.org/legal/epl-v10.html.

Some portions may be licensed to Red Hat, Inc. under one or more contributor license agreements.'/>
+ </properties>
+ <provides size='2'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='org.jboss.dna.web.jcr.rest.client.swt.feature.feature.group' version='1.0.0.v20090708'/>
+ <provided namespace='org.eclipse.equinox.p2.localization' name='df_LT' version='1.0.0'/>
+ </provides>
+ <requires size='5'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.ui' range='0.0.0'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.core.runtime' range='0.0.0'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.core.resources' range='0.0.0'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='org.jboss.dna.web.jcr.rest.client.swt' range='[1.0.0,1.0.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='org.jboss.dna.web.jcr.rest.client.swt.feature.feature.jar' range='[1.0.0.v20090708,1.0.0.v20090708]'>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ </required>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ <licenses size='1'>
+ <license url='http://www.example.com/license'>
+ %license
+ </license>
+ </licenses>
+ <copyright url='http://www.example.com/copyright'>
+ %copyright
+ </copyright>
+ </unit>
+ <unit id='a.jre' version='1.6.0' singleton='false'>
+ <provides size='117'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='a.jre' version='1.6.0'/>
+ <provided namespace='java.package' name='javax.accessibility' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.activity' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.crypto' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.crypto.interfaces' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.crypto.spec' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.event' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.metadata' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.plugins.bmp' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.plugins.jpeg' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.stream' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.loading' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.modelmbean' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.monitor' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.openmbean' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.relation' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.remote' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.remote.rmi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.timer' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming.directory' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming.event' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming.ldap' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.net' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.net.ssl' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.print' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.print.attribute' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.print.attribute.standard' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.print.event' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.rmi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.rmi.CORBA' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.rmi.ssl' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.callback' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.kerberos' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.login' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.x500' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.cert' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.sasl' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sound.midi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sound.midi.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sound.sampled' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sound.sampled.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sql' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sql.rowset' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sql.rowset.serial' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sql.rowset.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.border' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.colorchooser' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.event' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.filechooser' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf.basic' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf.metal' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf.multi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf.synth' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.table' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.text' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.text.html' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.text.html.parser' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.text.rtf' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.tree' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.undo' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.transaction' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.transaction.xa' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.datatype' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.namespace' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.parsers' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform.dom' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform.sax' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform.stream' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.validation' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.xpath' version='0.0.0'/>
+ <provided namespace='java.package' name='org.ietf.jgss' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA_2_3' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA_2_3.portable' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA.DynAnyPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA.ORBPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA.portable' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA.TypeCodePackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CosNaming' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CosNaming.NamingContextExtPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CosNaming.NamingContextPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.Dynamic' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.DynamicAny' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.DynamicAny.DynAnyFactoryPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.DynamicAny.DynAnyPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.IOP' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.IOP.CodecFactoryPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.IOP.CodecPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.Messaging' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableInterceptor' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableInterceptor.ORBInitInfoPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.CurrentPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.POAManagerPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.POAPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.portable' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.ServantLocatorPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.SendingContext' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.stub.java.rmi' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.bootstrap' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.events' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.ls' version='0.0.0'/>
+ <provided namespace='java.package' name='org.xml.sax' version='0.0.0'/>
+ <provided namespace='java.package' name='org.xml.sax.ext' version='0.0.0'/>
+ <provided namespace='java.package' name='org.xml.sax.helpers' version='0.0.0'/>
+ </provides>
+ <touchpoint id='org.eclipse.equinox.p2.native' version='1.0.0'/>
+ </unit>
+ </units>
+</repository>
Property changes on: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/content.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/features/org.jboss.dna.web.jcr.rest.client.swt.feature_1.0.0.v20090708.jar
===================================================================
(Binary files differ)
Property changes on: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/features/org.jboss.dna.web.jcr.rest.client.swt.feature_1.0.0.v20090708.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/index.html
===================================================================
--- branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/index.html (rev 0)
+++ branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/index.html 2009-07-08 16:28:08 UTC (rev 1079)
@@ -0,0 +1,60 @@
+<html>
+<head>
+<title>org.jboss.dna.web.jcr.rest.client.swt.updatesite</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<style>@import url("web/site.css");</style>
+<script type="text/javascript">
+ var returnval = 0;
+ var stylesheet, xmlFile, cache, doc;
+ function init(){
+ // NSCP 7.1+ / Mozilla 1.4.1+ / Safari
+ // Use the standard DOM Level 2 technique, if it is supported
+ if (document.implementation && document.implementation.createDocument) {
+ xmlFile = document.implementation.createDocument("", "", null);
+ stylesheet = document.implementation.createDocument("", "", null);
+ if (xmlFile.load){
+ xmlFile.load("site.xml");
+ stylesheet.load("web/site.xsl");
+ } else {
+ alert("Document could not be loaded by browser.");
+ }
+ xmlFile.addEventListener("load", transform, false);
+ stylesheet.addEventListener("load", transform, false);
+ }
+ //IE 6.0+ solution
+ else if (window.ActiveXObject) {
+ xmlFile = new ActiveXObject("msxml2.DOMDocument.3.0");
+ xmlFile.async = false;
+ xmlFile.load("site.xml");
+ stylesheet = new ActiveXObject("msxml2.FreeThreadedDOMDocument.3.0");
+ stylesheet.async = false;
+ stylesheet.load("web/site.xsl");
+ cache = new ActiveXObject("msxml2.XSLTemplate.3.0");
+ cache.stylesheet = stylesheet;
+ transformData();
+ }
+ }
+ // separate transformation function for IE 6.0+
+ function transformData(){
+ var processor = cache.createProcessor();
+ processor.input = xmlFile;
+ processor.transform();
+ data.innerHTML = processor.output;
+ }
+ // separate transformation function for NSCP 7.1+ and Mozilla 1.4.1+
+ function transform(){
+ returnval+=1;
+ if (returnval==2){
+ var processor = new XSLTProcessor();
+ processor.importStylesheet(stylesheet);
+ doc = processor.transformToDocument(xmlFile);
+ document.getElementById("data").innerHTML = doc.documentElement.innerHTML;
+ }
+ }
+</script>
+</head>
+<body onload="init();">
+<!--[insert static HTML here]-->
+<div id="data"><!-- this is where the transformed data goes --></div>
+</body>
+</html>
Property changes on: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/index.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/plugins/org.jboss.dna.web.jcr.rest.client.swt_1.0.0.jar
===================================================================
(Binary files differ)
Property changes on: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/plugins/org.jboss.dna.web.jcr.rest.client.swt_1.0.0.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/site.xml
===================================================================
--- branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/site.xml (rev 0)
+++ branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/site.xml 2009-07-08 16:28:08 UTC (rev 1079)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <feature url="features/org.jboss.dna.web.jcr.rest.client.swt.feature_1.0.0.v20090708.jar" id="org.jboss.dna.web.jcr.rest.client.swt.feature" version="1.0.0.v20090708"/>
+</site>
Property changes on: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/site.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/web/site.css
===================================================================
--- branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/web/site.css (rev 0)
+++ branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/web/site.css 2009-07-08 16:28:08 UTC (rev 1079)
@@ -0,0 +1,12 @@
+<STYLE type="text/css">
+td.spacer {padding-bottom: 10px; padding-top: 10px;}
+.title { font-family: sans-serif; color: #99AACC;}
+.bodyText { font-family: sans-serif; font-size: 9pt; color:#000000; }
+.sub-header { font-family: sans-serif; font-style: normal; font-weight: bold; font-size: 9pt; color: white;}
+.log-text {font-family: sans-serif; font-style: normal; font-weight: lighter; font-size: 8pt; color:black;}
+.big-header { font-family: sans-serif; font-style: normal; font-weight: bold; font-size: 9pt; color: white; border-top:10px solid white;}
+.light-row {background:#FFFFFF}
+.dark-row {background:#EEEEFF}
+.header {background:#99AADD}
+#indent {word-wrap : break-word;width :300px;text-indent:10px;}
+</STYLE>
Added: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/web/site.xsl
===================================================================
--- branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/web/site.xsl (rev 0)
+++ branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/web/site.xsl 2009-07-08 16:28:08 UTC (rev 1079)
@@ -0,0 +1,214 @@
+<xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl="urn:schemas-microsoft-com:xslt">
+<xsl:output method="html" encoding="UTF-8"/>
+<xsl:key name="cat" match="category" use="@name"/>
+<xsl:template match="/">
+<xsl:for-each select="site">
+ <html>
+ <head>
+ <title>org.jboss.dna.web.jcr.rest.client.swt.updatesite</title>
+ <style>@import url("web/site.css");</style>
+ </head>
+ <body>
+ <h1 class="title">org.jboss.dna.web.jcr.rest.client.swt.updatesite</h1>
+ <p class="bodyText"><xsl:value-of select="description"/></p>
+ <table width="100%" border="0" cellspacing="1" cellpadding="2">
+ <xsl:for-each select="category-def">
+ <xsl:sort select="@label" order="ascending" case-order="upper-first"/>
+ <xsl:sort select="@name" order="ascending" case-order="upper-first"/>
+ <xsl:if test="count(key('cat',@name)) != 0">
+ <tr class="header">
+ <td class="sub-header" width="30%">
+ <xsl:value-of select="@name"/>
+ </td>
+ <td class="sub-header" width="70%">
+ <xsl:value-of select="@label"/>
+ </td>
+ </tr>
+ <xsl:for-each select="key('cat',@name)">
+ <xsl:sort select="ancestor::feature//@version" order="ascending"/>
+ <xsl:sort select="ancestor::feature//@id" order="ascending" case-order="upper-first"/>
+ <tr>
+ <xsl:choose>
+ <xsl:when test="(position() mod 2 = 1)">
+ <xsl:attribute name="class">dark-row</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="class">light-row</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td class="log-text" id="indent">
+ <xsl:choose>
+ <xsl:when test="ancestor::feature//@label">
+ <a href="{ancestor::feature//@url}"><xsl:value-of select="ancestor::feature//@label"/></a>
+ <br/>
+ <div id="indent">
+ (<xsl:value-of select="ancestor::feature//@id"/> - <xsl:value-of select="ancestor::feature//@version"/>)
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="{ancestor::feature//@url}"><xsl:value-of select="ancestor::feature//@id"/> - <xsl:value-of select="ancestor::feature//@version"/></a>
+ </xsl:otherwise>
+ </xsl:choose>
+ <br />
+ </td>
+ <td>
+ <table>
+ <xsl:if test="ancestor::feature//@os">
+ <tr><td class="log-text" id="indent">Operating Systems:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@os"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="ancestor::feature//@ws">
+ <tr><td class="log-text" id="indent">Windows Systems:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@ws"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="ancestor::feature//@nl">
+ <tr><td class="log-text" id="indent">Languages:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@nl"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="ancestor::feature//@arch">
+ <tr><td class="log-text" id="indent">Architecture:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@arch"/></td>
+ </tr>
+ </xsl:if>
+ </table>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <tr><td class="spacer"><br/></td><td class="spacer"><br/></td></tr>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:if test="count(feature) > count(feature/category)">
+ <tr class="header">
+ <td class="sub-header" colspan="2">
+ Uncategorized
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="function-available('msxsl:node-set')">
+ <xsl:variable name="rtf-nodes">
+ <xsl:for-each select="feature[not(category)]">
+ <xsl:sort select="@id" order="ascending" case-order="upper-first"/>
+ <xsl:sort select="@version" order="ascending" />
+ <xsl:value-of select="."/>
+ <xsl:copy-of select="." />
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:variable name="myNodeSet" select="msxsl:node-set($rtf-nodes)/*"/>
+ <xsl:for-each select="$myNodeSet">
+ <tr>
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 1">
+ <xsl:attribute name="class">dark-row</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="class">light-row</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td class="log-text" id="indent">
+ <xsl:choose>
+ <xsl:when test="@label">
+ <a href="{@url}"><xsl:value-of select="@label"/></a>
+ <br />
+ <div id="indent">
+ (<xsl:value-of select="@id"/> - <xsl:value-of select="@version"/>)
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="{@url}"><xsl:value-of select="@id"/> - <xsl:value-of select="@version"/></a>
+ </xsl:otherwise>
+ </xsl:choose>
+ <br /><br />
+ </td>
+ <td>
+ <table>
+ <xsl:if test="@os">
+ <tr><td class="log-text" id="indent">Operating Systems:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="@os"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="@ws">
+ <tr><td class="log-text" id="indent">Windows Systems:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="@ws"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="@nl">
+ <tr><td class="log-text" id="indent">Languages:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="@nl"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="@arch">
+ <tr><td class="log-text" id="indent">Architecture:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="@arch"/></td>
+ </tr>
+ </xsl:if>
+ </table>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="feature[not(category)]">
+ <xsl:sort select="@id" order="ascending" case-order="upper-first"/>
+ <xsl:sort select="@version" order="ascending" />
+ <tr>
+ <xsl:choose>
+ <xsl:when test="count(preceding-sibling::feature[not(category)]) mod 2 = 1">
+ <xsl:attribute name="class">dark-row</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="class">light-row</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td class="log-text" id="indent">
+ <xsl:choose>
+ <xsl:when test="@label">
+ <a href="{@url}"><xsl:value-of select="@label"/></a>
+ <br />
+ <div id="indent">
+ (<xsl:value-of select="@id"/> - <xsl:value-of select="@version"/>)
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="{@url}"><xsl:value-of select="@id"/> - <xsl:value-of select="@version"/></a>
+ </xsl:otherwise>
+ </xsl:choose>
+ <br /><br />
+ </td>
+ <td>
+ <table>
+ <xsl:if test="@os">
+ <tr><td class="log-text" id="indent">Operating Systems:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="@os"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="@ws">
+ <tr><td class="log-text" id="indent">Windows Systems:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="@ws"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="@nl">
+ <tr><td class="log-text" id="indent">Languages:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="@nl"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="@arch">
+ <tr><td class="log-text" id="indent">Architecture:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="@arch"/></td>
+ </tr>
+ </xsl:if>
+ </table>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </table>
+ </body>
+ </html>
+</xsl:for-each>
+</xsl:template>
+</xsl:stylesheet>
Property changes on: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/web/site.xsl
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 6 months
DNA SVN: r1078 - branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature.
by dna-commits@lists.jboss.org
Author: elvisisking
Date: 2009-07-08 12:22:53 -0400 (Wed, 08 Jul 2009)
New Revision: 1078
Added:
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/.project
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/AUTHORS.txt
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/LEGAL.txt
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/build.properties
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/feature.png
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/feature.properties
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/feature.xml
Log:
First version of files in the feature plugin.
Added: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/.project
===================================================================
--- branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/.project (rev 0)
+++ branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/.project 2009-07-08 16:22:53 UTC (rev 1078)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.dna.web.jcr.rest.client.swt.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
Property changes on: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/AUTHORS.txt
===================================================================
--- branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/AUTHORS.txt (rev 0)
+++ branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/AUTHORS.txt 2009-07-08 16:22:53 UTC (rev 1078)
@@ -0,0 +1 @@
+Dan Florian (dflorian(a)redhat.com)
\ No newline at end of file
Property changes on: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/AUTHORS.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/LEGAL.txt
===================================================================
--- branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/LEGAL.txt (rev 0)
+++ branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/LEGAL.txt 2009-07-08 16:22:53 UTC (rev 1078)
@@ -0,0 +1,6 @@
+The DNA Eclipse JCR REST Client (http://www.jboss.org/dna/) is copyright 2000-2009 MetaMatrix, Inc. and Red Hat, Inc.
+
+This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which is
+available at http://www.eclipse.org/legal/epl-v10.html.
+
+Some portions may be licensed to Red Hat, Inc. under one or more contributor license agreements.
Property changes on: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/LEGAL.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/build.properties
===================================================================
--- branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/build.properties (rev 0)
+++ branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/build.properties 2009-07-08 16:22:53 UTC (rev 1078)
@@ -0,0 +1,5 @@
+bin.includes = feature.xml,\
+ feature.properties,\
+ LEGAL.txt,\
+ AUTHORS.txt
+src.includes = LEGAL.txt
Property changes on: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/feature.png
===================================================================
(Binary files differ)
Property changes on: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/feature.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/feature.properties
===================================================================
--- branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/feature.properties (rev 0)
+++ branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/feature.properties 2009-07-08 16:22:53 UTC (rev 1078)
@@ -0,0 +1,20 @@
+# JBoss, Home of Professional Open Source.
+#
+# See the LEGAL.txt file distributed with this work for information regarding copyright ownership and licensing.
+#
+# See the AUTHORS.txt file distributed with this work for a full listing of individual contributors.
+copyright = \
+JBoss DNA JCR REST Eclipse SWT Client (http://www.jboss.org/dna/) is copyright of Red Hat, Inc.
+
+license = \
+This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which is \
+available at http://www.eclipse.org/legal/epl-v10.html.\
+\n\n\
+Some portions may be licensed to Red Hat, Inc. under one or more contributor license agreements.
+
+# Feature Information Page properties
+description = The JBoss DNA JCR REST Eclipse Client provides a resource publishing and unpublishing capability to DNA repositories.
+
+# Feature Overview Page properties
+featureName = JBoss DNA JCR REST Eclipse SWT Client
+featureProvider = Red Hat, Inc.
\ No newline at end of file
Property changes on: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/feature.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/feature.xml
===================================================================
--- branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/feature.xml (rev 0)
+++ branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/feature.xml 2009-07-08 16:22:53 UTC (rev 1078)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.dna.web.jcr.rest.client.swt.feature"
+ label="%featureName"
+ version="1.0.0.v20090708"
+ provider-name="%featureProvider">
+
+ <description url="http://www.jboss.org/dna/">
+ %description
+ </description>
+
+ <copyright url="http://www.jboss.org/dna/">
+ %copyright
+ </copyright>
+
+ <license url="http://www.jboss.org/dna/license">
+ %license
+ </license>
+
+ <requires>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.eclipse.core.runtime"/>
+ <import plugin="org.eclipse.core.resources"/>
+ </requires>
+
+ <plugin
+ id="org.jboss.dna.web.jcr.rest.client.swt"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
Property changes on: branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/feature.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 6 months
DNA SVN: r1077 - branches/eclipse.
by dna-commits@lists.jboss.org
Author: elvisisking
Date: 2009-07-08 12:13:43 -0400 (Wed, 08 Jul 2009)
New Revision: 1077
Removed:
branches/eclipse/org.jboss.dna.publish/
Log:
This project has been converted to a Maven project.
16 years, 6 months
DNA SVN: r1076 - in branches/eclipse/org.jboss.dna.publish.ui.swt: META-INF and 14 other directories.
by dna-commits@lists.jboss.org
Author: elvisisking
Date: 2009-07-08 12:11:59 -0400 (Wed, 08 Jul 2009)
New Revision: 1076
Added:
branches/eclipse/org.jboss.dna.publish.ui.swt/AUTHORS.txt
branches/eclipse/org.jboss.dna.publish.ui.swt/LEGAL.txt
branches/eclipse/org.jboss.dna.publish.ui.swt/dna-web-jcr-rest-client-0.6-SNAPSHOT-sources.jar
branches/eclipse/org.jboss.dna.publish.ui.swt/dna-web-jcr-rest-client-0.6-SNAPSHOT.jar
branches/eclipse/org.jboss.dna.publish.ui.swt/icons/views/dna_window.png
branches/eclipse/org.jboss.dna.publish.ui.swt/icons/wizards/
branches/eclipse/org.jboss.dna.publish.ui.swt/icons/wizards/dna_wizard_banner.png
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Activator.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/I18n.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/IUiConstants.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Utils.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/dialogs/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/i18n.properties
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/views/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/
Removed:
branches/eclipse/org.jboss.dna.publish.ui.swt/slf4j-api-1.5.8-sources.jar
branches/eclipse/org.jboss.dna.publish.ui.swt/slf4j-api-1.5.8.jar
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Activator.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/I18n.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/IUiConstants.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Utils.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/dialogs/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/i18n.properties
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/views/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/.classpath
branches/eclipse/org.jboss.dna.publish.ui.swt/.project
branches/eclipse/org.jboss.dna.publish.ui.swt/META-INF/MANIFEST.MF
branches/eclipse/org.jboss.dna.publish.ui.swt/build.properties
branches/eclipse/org.jboss.dna.publish.ui.swt/plugin.xml
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/BasePublishingAction.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/DeleteServerAction.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/EditServerAction.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/NewServerAction.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/PublishAction.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/UnpublishAction.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/dialogs/DeleteServerDialog.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/views/ServerContentProvider.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/views/ServerView.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishOperation.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishPage.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishWizard.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/ServerPage.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/ServerWizard.java
Log:
Most changes due to project name and package name refactoring. The non-UI plugin project has been converted to a Maven project. Fixed some problems with the delete server dialog. Added tooltips to ServerView tree. Made PublishPage a server registry listener since new servers can be created from this page. Added images to wizards.
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/.classpath
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/.classpath 2009-07-08 15:59:30 UTC (rev 1075)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/.classpath 2009-07-08 16:11:59 UTC (rev 1076)
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry exported="true" kind="lib" path="dna-web-jcr-rest-client-0.6-SNAPSHOT.jar" sourcepath="dna-web-jcr-rest-client-0.6-SNAPSHOT-sources.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/.project
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/.project 2009-07-08 15:59:30 UTC (rev 1075)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/.project 2009-07-08 16:11:59 UTC (rev 1076)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.jboss.dna.publish.ui.swt.swt</name>
+ <name>org.jboss.dna.web.jcr.rest.client.swt</name>
<comment></comment>
<projects>
</projects>
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/AUTHORS.txt
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/AUTHORS.txt (rev 0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/AUTHORS.txt 2009-07-08 16:11:59 UTC (rev 1076)
@@ -0,0 +1 @@
+Dan Florian (dflorian(a)redhat.com)
\ No newline at end of file
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/AUTHORS.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/LEGAL.txt
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/LEGAL.txt (rev 0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/LEGAL.txt 2009-07-08 16:11:59 UTC (rev 1076)
@@ -0,0 +1,6 @@
+The DNA REST Eclipse SWT Client (http://www.jboss.org/dna/) is copyright 2000-2009 MetaMatrix, Inc. and Red Hat, Inc.
+
+This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which is
+available at http://www.eclipse.org/legal/epl-v10.html.
+
+Some portions may be licensed to Red Hat, Inc. under one or more contributor license agreements.
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/LEGAL.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/META-INF/MANIFEST.MF
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/META-INF/MANIFEST.MF 2009-07-08 15:59:30 UTC (rev 1075)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/META-INF/MANIFEST.MF 2009-07-08 16:11:59 UTC (rev 1076)
@@ -1,14 +1,15 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
-Bundle-SymbolicName: org.jboss.dna.publish.ui.swt;singleton:=true
+Bundle-SymbolicName: org.jboss.dna.web.jcr.rest.client.swt;singleton:=true
Bundle-Version: 1.0.0
-Bundle-Activator: org.jboss.dna.publish.ui.swt.Activator
+Bundle-Activator: org.jboss.dna.web.jcr.rest.client.swt.Activator
Bundle-Vendor: %bundleVendor
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.jboss.dna.publish,
org.eclipse.core.resources
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: dna-web-jcr-rest-client-0.6-SNAPSHOT.jar,
+ dnaPublishUi.jar
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/build.properties
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/build.properties 2009-07-08 15:59:30 UTC (rev 1075)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/build.properties 2009-07-08 16:11:59 UTC (rev 1076)
@@ -1,8 +1,18 @@
-source.. = src/
-output.. = bin/
+# JBoss, Home of Professional Open Source.
+#
+# See the LEGAL.txt file distributed with this work for information regarding copyright ownership and licensing.
+#
+# See the AUTHORS.txt file distributed with this work for a full listing of individual contributors.
+source.dnaPublishUi.jar = src/
+output.dnaPublishUi.jar = bin/
bin.includes = META-INF/,\
- .,\
+ dnaPublishUi.jar,\
plugin.properties,\
icons/,\
- plugin.xml
-src.includes = src/
+ plugin.xml,\
+ dna-web-jcr-rest-client-0.6-SNAPSHOT.jar,\
+ LEGAL.txt,\
+ AUTHORS.txt
+src.includes = src/,\
+ LEGAL.txt
+source.dnaPublishUi.jar = src/
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/dna-web-jcr-rest-client-0.6-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/dna-web-jcr-rest-client-0.6-SNAPSHOT-sources.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/dna-web-jcr-rest-client-0.6-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/dna-web-jcr-rest-client-0.6-SNAPSHOT.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/icons/views/dna_window.png
===================================================================
(Binary files differ)
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/icons/views/dna_window.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/icons/wizards/dna_wizard_banner.png
===================================================================
(Binary files differ)
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/icons/wizards/dna_wizard_banner.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/plugin.xml
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/plugin.xml 2009-07-08 15:59:30 UTC (rev 1075)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/plugin.xml 2009-07-08 16:11:59 UTC (rev 1076)
@@ -6,10 +6,10 @@
<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
- id="org.jboss.dna.publish.ui.swt.iresourcepopupmenucontribution"
+ id="org.jboss.dna.web.jcr.rest.client.swt.iresourcepopupmenucontribution"
objectClass="org.eclipse.core.resources.IResource">
<menu
- id="org.jboss.dna.publish.ui.swt.contextMenu"
+ id="org.jboss.dna.web.jcr.rest.client.swt.contextMenu"
label="%contextMenu.label"
path="additions">
<separator
@@ -19,10 +19,10 @@
<!-- Unpublish action -->
<action
- id="org.jboss.dna.publish.ui.swt.unpublishAction"
+ id="org.jboss.dna.web.jcr.rest.client.swt.unpublishAction"
label="%unpublishAction.label"
- class="org.jboss.dna.publish.ui.swt.actions.UnpublishAction"
- menubarPath="org.jboss.dna.publish.ui.swt.contextMenu/group1"
+ class="org.jboss.dna.web.jcr.rest.client.swt.actions.UnpublishAction"
+ menubarPath="org.jboss.dna.web.jcr.rest.client.swt.contextMenu/group1"
enablesFor="*">
<enablement>
<or>
@@ -38,10 +38,10 @@
<!-- Publish action -->
<action
- id="org.jboss.dna.publish.ui.swt.publishAction"
+ id="org.jboss.dna.web.jcr.rest.client.swt.publishAction"
label="%publishAction.label"
- class="org.jboss.dna.publish.ui.swt.actions.PublishAction"
- menubarPath="org.jboss.dna.publish.ui.swt.contextMenu/group1"
+ class="org.jboss.dna.web.jcr.rest.client.swt.actions.PublishAction"
+ menubarPath="org.jboss.dna.web.jcr.rest.client.swt.contextMenu/group1"
enablesFor="*">
<enablement>
<or>
@@ -70,7 +70,7 @@
id="serverView"
name="%serverView"
category="org.jboss.dna"
- class="org.jboss.dna.publish.ui.swt.views.ServerView"
+ class="org.jboss.dna.web.jcr.rest.client.swt.views.ServerView"
fastViewWidthRatio="0.25"
icon="icons/objects/server.gif">
</view>
Deleted: branches/eclipse/org.jboss.dna.publish.ui.swt/slf4j-api-1.5.8-sources.jar
===================================================================
(Binary files differ)
Deleted: branches/eclipse/org.jboss.dna.publish.ui.swt/slf4j-api-1.5.8.jar
===================================================================
(Binary files differ)
Deleted: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Activator.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Activator.java 2009-07-08 15:59:30 UTC (rev 1075)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Activator.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -1,285 +0,0 @@
-/*
- * JBoss DNA (http://www.jboss.org/dna)
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * See the AUTHORS.txt file in the distribution for a full listing of
- * individual contributors.
- *
- * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
- * is licensed to you under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * JBoss DNA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.publish.ui.swt;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.jboss.dna.publish.Logger;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.Status;
-import org.jboss.dna.publish.Status.Severity;
-import org.jboss.dna.publish.domain.IDnaObject;
-import org.jboss.dna.publish.domain.Repository;
-import org.jboss.dna.publish.domain.Server;
-import org.jboss.dna.publish.domain.Workspace;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle.
- *
- * @author Dan Florian
- * @since 0.6
- */
-public class Activator extends AbstractUIPlugin implements IUiConstants {
-
- // ===========================================================================================================================
- // Class Fields
- // ===========================================================================================================================
-
- /**
- * The shared plugin instance.
- *
- * @since 0.6
- */
- private static Activator plugin;
-
- // ===========================================================================================================================
- // Class Methods
- // ===========================================================================================================================
-
- /**
- * @return the shared instance or <code>null</code> if not constructed
- * @since 0.6
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- // ===========================================================================================================================
- // Fields
- // ===========================================================================================================================
-
- /**
- * The image used when the requested image cannot be found.
- *
- * @since 0.6
- */
- private Image missingImage;
-
- /**
- * The manager in charge of the server registry.
- *
- * @since 0.6
- */
- private ServerManager serverMgr;
-
- // ===========================================================================================================================
- // Methods
- // ===========================================================================================================================
-
- private ImageDescriptor createImageDescriptor( String key ) {
- try {
- URL url = new URL(getBundle().getEntry("/").toString() + key); //$NON-NLS-1$
- return ImageDescriptor.createFromURL(url);
- } catch (final MalformedURLException e) {
- log(new Status(Severity.ERROR, I18n.bind(I18n.MissingImage, key), e));
- return null;
- }
- }
-
- /**
- * @return the image to use when a requested image cannot be found
- * @since 0.6
- */
- private Image getMissingImage() {
- if (this.missingImage == null) {
- this.missingImage = ImageDescriptor.getMissingImageDescriptor().createImage();
- }
-
- return this.missingImage;
- }
-
- /**
- * @param imageId the shared image identifier
- * @return the image or <code>null</code>
- * @see ISharedImages
- * @since 0.6
- */
- public Image getSharedImage( String imageId ) {
- Image result = PlatformUI.getWorkbench().getSharedImages().getImage(imageId);
- return ((result == null) ? getMissingImage() : result);
- }
-
- /**
- * @param imageId the shared image identifier
- * @return the image descriptor or <code>null</code>
- * @see ISharedImages
- * @since 0.6
- */
- public ImageDescriptor getSharedImageDescriptor( String imageId ) {
- ImageDescriptor result = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(imageId);
-
- if (result != null) {
- return result;
- }
-
- return ImageDescriptor.getMissingImageDescriptor();
- }
-
- /**
- * @param object the object whose image is being requested (domain object or plugin-relative path)
- * @return the image or <code>null</code> if not found
- * @since 0.6
- */
- public Image getImage( Object object ) {
- String key = null;
-
- if (object instanceof Workspace) {
- key = WORKSPACE_IMAGE_PATH;
- } else if (object instanceof Repository) {
- key = REPOSITORY_IMAGE_PATH;
- } else if (object instanceof Server) {
- key = SERVER_IMAGE_PATH;
- } else if (object instanceof IDnaObject) {
- // should have an icon for every business object
- assert false;
- } else if (object instanceof String) {
- key = (String)object;
- }
-
- if (key != null) {
- ImageRegistry registry = getImageRegistry();
- Image image = registry.get(key);
-
- if (image == null) {
- ImageDescriptor descriptor = createImageDescriptor(key);
-
- if (descriptor == null) {
- return getMissingImage();
- }
-
- image = descriptor.createImage();
- registry.put(key, image);
- }
-
- return image;
- }
-
- return null;
- }
-
- /**
- * @param object the object whose image descriptor is being requested
- * @return the image descriptor or <code>null</code> if not found
- * @since 0.6
- */
- public ImageDescriptor getImageDescriptor( Object object ) {
- String key = null;
-
- if (object instanceof Workspace) {
- key = WORKSPACE_IMAGE_PATH;
- } else if (object instanceof Repository) {
- key = REPOSITORY_IMAGE_PATH;
- } else if (object instanceof Server) {
- key = SERVER_IMAGE_PATH;
- } else if (object instanceof IDnaObject) {
- // should have an icon for every business object
- assert false;
- } else if (object instanceof String) {
- key = (String)object;
- }
-
- if (key != null) {
- ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, ((String)object));
- return ((descriptor == null) ? ImageDescriptor.getMissingImageDescriptor() : descriptor);
- }
-
- return null;
- }
-
- /**
- * @return the server manager or <code>null</code> if activator has not been initialized or started
- * @see #start(BundleContext)
- * @since 0.6
- */
- public ServerManager getServerManager() {
- return this.serverMgr;
- }
-
- /**
- * @param status the status being logged
- * @since 0.6
- */
- public void log( Status status ) {
- IStatus eclipseStatus = new org.eclipse.core.runtime.Status(Utils.convertSeverity(status.getSeverity()),
- IUiConstants.PLUGIN_ID, status.getMessage(),
- status.getException());
- getLog().log(eclipseStatus);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- * @since 0.6
- */
- @Override
- public void start( BundleContext context ) throws Exception {
- super.start(context);
- plugin = this;
-
- this.serverMgr = new ServerManager(getStateLocation().toFile().getAbsolutePath());
- Status status = this.serverMgr.restoreState();
-
- // problem restoring server registry
- if (!status.isOk()) {
- Logger.log(getClass(), status);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- * @since 0.6
- */
- @Override
- public void stop( BundleContext context ) throws Exception {
- if (missingImage != null) {
- missingImage.dispose();
- }
-
- if (this.serverMgr != null) {
- Status status = this.serverMgr.saveState();
-
- if (!status.isOk()) {
- log(status);
- }
-
- this.serverMgr = null;
- }
-
- super.stop(context);
-
- plugin = null;
- }
-
-}
Deleted: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/I18n.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/I18n.java 2009-07-08 15:59:30 UTC (rev 1075)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/I18n.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -1,120 +0,0 @@
-/*
- * JBoss DNA (http://www.jboss.org/dna)
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * See the AUTHORS.txt file in the distribution for a full listing of
- * individual contributors.
- *
- * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
- * is licensed to you under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * JBoss DNA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.publish.ui.swt;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * The I18n class handles localization messages.
- *
- * @author Dan Florian
- * @since 0.6
- */
-public final class I18n extends NLS {
-
- public static String BasePublishingActionPublishingWizardErrorMsg;
- public static String BasePublishingActionUnpublishingWizardErrorMsg;
-
- public static String CollapseActionToolTip;
-
- public static String DeleteServerActionText;
- public static String DeleteServerActionToolTip;
-
- public static String DeleteServerDialogErrorsOccurredMsg;
- public static String DeleteServerDialogMultipleServersMsg;
- public static String DeleteServerDialogOneServerMsg;
- public static String DeleteServerDialogTitle;
-
- public static String EditServerActionText;
- public static String EditServerActionToolTip;
-
- public static String ErrorDialogTitle;
-
- public static String MissingImage;
-
- public static String NewServerActionText;
- public static String NewServerActionToolTip;
-
- public static String PublishOperationPublishTaskName;
- public static String PublishOperationPublishTitle;
- public static String PublishOperationUnpublishTaskName;
- public static String PublishOperationUnpublishTitle;
-
- public static String PublishPagePublishTitle;
- public static String PublishPageLocationGroupTitle;
- public static String PublishPageMissingRepositoryStatusMsg;
- public static String PublishPageMissingServerStatusMsg;
- public static String PublishPageMissingWorkspaceStatusMsg;
- public static String PublishPageNewServerButton;
- public static String PublishPageNoAvailableRepositoriesStatusMsg;
- public static String PublishPageNoAvailableServersStatusMsg;
- public static String PublishPageNoAvailableWorkspacesStatusMsg;
- public static String PublishPageNoResourcesToPublishStatusMsg;
- public static String PublishPageNoResourcesToUnpublishStatusMsg;
- public static String PublishPagePublishOkStatusMsg;
- public static String PublishPagePublishResourcesLabel;
- public static String PublishPageRecurseCheckBox;
- public static String PublishPageRecurseCheckBoxToolTip;
- public static String PublishPageRecurseProcessingErrorMsg;
- public static String PublishPageRepositoryLabel;
- public static String PublishPageRepositoryToolTip;
- public static String PublishPageServerLabel;
- public static String PublishPageServerToolTip;
- public static String PublishPageUnpublishOkStatusMsg;
- public static String PublishPageUnpublishResourcesLabel;
- public static String PublishPageUnpublishTitle;
- public static String PublishPageWorkspaceLabel;
- public static String PublishPageWorkspacePublishToolTip;
- public static String PublishPageWorkspaceUnpublishToolTip;
-
- public static String PublishWizardPublishErrorMsg;
- public static String PublishWizardPublishTitle;
- public static String PublishWizardUnpublishTitle;
- public static String PublishWizardUnpublishErrorMsg;
-
- public static String ServerPageAuthenticationGroupTitle;
- public static String ServerPageInvalidServerProperties;
- public static String ServerPageOkStatusMsg;
- public static String ServerPagePasswordLabel;
- public static String ServerPagePasswordToolTip;
- public static String ServerPageSavePasswordButton;
- public static String ServerPageSavePasswordLabel;
- public static String ServerPageSavePasswordToolTip;
- public static String ServerPageTitle;
- public static String ServerPageUrlLabel;
- public static String ServerPageUrlToolTip;
- public static String ServerPageUserLabel;
- public static String ServerPageUserToolTip;
-
- public static String ServerWizardEditServerErrorMsg;
- public static String ServerWizardEditServerTitle;
- public static String ServerWizardNewServerErrorMsg;
- public static String ServerWizardNewServerTitle;
-
- static {
- // load message bundle
- NLS.initializeMessages(I18n.class.getPackage().getName() + ".i18n", I18n.class); //$NON-NLS-1$
- }
-
-}
Deleted: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/IUiConstants.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/IUiConstants.java 2009-07-08 15:59:30 UTC (rev 1075)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/IUiConstants.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -1,65 +0,0 @@
-/*
- * JBoss DNA (http://www.jboss.org/dna)
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * See the AUTHORS.txt file in the distribution for a full listing of
- * individual contributors.
- *
- * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
- * is licensed to you under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * JBoss DNA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.publish.ui.swt;
-
-/**
- * @author Dan Florian
- * @since 0.6
- */
-public interface IUiConstants {
-
- /**
- * The Plug-in's identifier.
- *
- * @since 0.6
- */
- String PLUGIN_ID = "org.jboss.dna.publish.ui.swt"; //$NON-NLS-1$
-
- String ICON_PATH = "icons/"; //$NON-NLS-1$
-
- //
- // /icons/objects/
- //
-
- String OBJECT_ICONS_FOLDER = ICON_PATH + "objects/"; //$NON-NLS-1$
-
- String REPOSITORY_IMAGE_PATH = OBJECT_ICONS_FOLDER + "repository.gif"; //$NON-NLS-1$
-
- String SERVER_IMAGE_PATH = OBJECT_ICONS_FOLDER + "server.gif"; //$NON-NLS-1$
-
- String WORKSPACE_IMAGE_PATH = OBJECT_ICONS_FOLDER + "workspace.gif"; //$NON-NLS-1$
-
- //
- // /icons/views/
- //
-
- String VIEW_ICONS_FOLDER = ICON_PATH + "views/"; //$NON-NLS-1$
-
- String COLLAPSE_ALL_IMAGE_PATH = VIEW_ICONS_FOLDER + "collapse_all.gif"; //$NON-NLS-1$
-
- String EDIT_SERVER_IMAGE_PATH = VIEW_ICONS_FOLDER + "edit_server.gif"; //$NON-NLS-1$
-
- String NEW_SERVER_IMAGE_PATH = VIEW_ICONS_FOLDER + "new_server.gif"; //$NON-NLS-1$
-
-}
Deleted: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Utils.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Utils.java 2009-07-08 15:59:30 UTC (rev 1075)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Utils.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -1,86 +0,0 @@
-/*
- * JBoss DNA (http://www.jboss.org/dna)
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * See the AUTHORS.txt file in the distribution for a full listing of
- * individual contributors.
- *
- * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
- * is licensed to you under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * JBoss DNA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.publish.ui.swt;
-
-import org.eclipse.core.runtime.IStatus;
-import org.jboss.dna.publish.Status;
-import org.jboss.dna.publish.Status.Severity;
-
-/**
- * @author Dan Florian
- * @since 0.6
- */
-public final class Utils {
-
- // ===========================================================================================================================
- // Class Methods
- // ===========================================================================================================================
-
- /**
- * Converts the non-Eclipse status severity to an Eclipse severity level. An {@link Status.Severity#UNKNOWN unknown status} is
- * converted to {@link IStatus#CANCEL cancel}. A {@link Status.Severity} is
- *
- * @param severity the eclipse status severity level
- * @return the converted severity level
- * @see IStatus
- * @since 0.6
- */
- public static int convertSeverity( Severity severity ) {
- if (severity == Severity.OK) return IStatus.OK;
- if (severity == Severity.ERROR) return IStatus.ERROR;
- if (severity == Severity.WARNING) return IStatus.WARNING;
- if (severity == Severity.INFO) return IStatus.INFO;
- return IStatus.CANCEL;
- }
-
- /**
- * Converts the Eclipse status severity level to a non-Eclipse severity.
- *
- * @param severity the eclipse status severity level
- * @return the converted severity level
- * @see IStatus
- * @since 0.6
- */
- public static Severity convertSeverity( int severity ) {
- if (severity == IStatus.OK) return Severity.OK;
- if (severity == IStatus.ERROR) return Severity.ERROR;
- if (severity == IStatus.WARNING) return Severity.WARNING;
- if (severity == IStatus.INFO) return Severity.INFO;
- return Severity.UNKNOWN;
- }
-
- // ===========================================================================================================================
- // Constructors
- // ===========================================================================================================================
-
- /**
- * Don't allow construction.
- *
- * @since 0.6
- */
- public Utils() {
- // nothing to do
- }
-
-}
Deleted: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/i18n.properties
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/i18n.properties 2009-07-08 15:59:30 UTC (rev 1075)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/i18n.properties 2009-07-08 16:11:59 UTC (rev 1076)
@@ -1,101 +0,0 @@
-#
-# JBoss DNA (http://www.jboss.org/dna)
-# See the COPYRIGHT.txt file distributed with this work for information
-# regarding copyright ownership. Some portions may be licensed
-# to Red Hat, Inc. under one or more contributor license agreements.
-# See the AUTHORS.txt file in the distribution for a full listing of
-# individual contributors.
-#
-# JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
-# is licensed to you under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# JBoss DNA is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-#
-BasePublishingActionPublishingWizardErrorMsg = Unexpected error running the publishing wizard. See log for more details.
-BasePublishingActionUnpublishingWizardErrorMsg = Unexpected error running the unpublishing wizard. See log for more details.
-
-CollapseActionToolTip = Collapse All
-
-DeleteServerActionText = Delete Server
-DeleteServerActionToolTip = Delete server from the server registry
-
-DeleteServerDialogErrorsOccurredMsg = There were errors deleting servers from the server registry. See log for more details.
-DeleteServerDialogMultipleServersMsg = Are you sure you want to delete these {0} servers?
-DeleteServerDialogOneServerMsg = Are you sure you want to delete the "{0}" server?
-DeleteServerDialogTitle = Confirm Delete Server
-
-EditServerActionText = Edit Server
-EditServerActionToolTip = Edit server properties
-
-ErrorDialogTitle = Error
-
-MissingImage = The following image cannot be found "{0}"
-
-NewServerActionText = New Server
-NewServerActionToolTip = Create and register a new server
-
-PublishOperationPublishTaskName = Publishing resources
-PublishOperationPublishTitle = Publish
-PublishOperationUnpublishTaskName = Unpublishing resources
-PublishOperationUnpublishTitle = Unpublish
-
-PublishPagePublishTitle = Publish the selected resources
-PublishPageLocationGroupTitle = Location
-PublishPageMissingRepositoryStatusMsg = A repository must be selected
-PublishPageMissingServerStatusMsg = A server must be selected
-PublishPageMissingWorkspaceStatusMsg = A workspace must be selected
-PublishPageNewServerButton = New...
-PublishPageNoAvailableRepositoriesStatusMsg = There are no repositories available on that server
-PublishPageNoAvailableServersStatusMsg = A server must be created first
-PublishPageNoAvailableWorkspacesStatusMsg = There are no workspaces available on that server and repository
-PublishPageNoResourcesToPublishStatusMsg = There are no files that can be published
-PublishPageNoResourcesToUnpublishStatusMsg = There are no files that can be unpublished
-PublishPagePublishOkStatusMsg = Choose the server, repository, and workspace where the selected resources will be published.
-PublishPagePublishResourcesLabel = These resources will be published to the specified DNA repository:
-PublishPageRecurseCheckBox = Recurse folders and projects
-PublishPageRecurseCheckBoxToolTip = Add all files under folders recursively under selected projects and folders
-PublishPageRecurseProcessingErrorMsg = Unexpected error processing resources. See log for more details.
-PublishPageRepositoryLabel = Repository:
-PublishPageRepositoryToolTip = The repository where the workspace is located
-PublishPageServerLabel = Server:
-PublishPageServerToolTip = The server where the repository is located
-PublishPageUnpublishOkStatusMsg = Choose the server, repository, and workspace where the selected resources will be unpublished.
-PublishPageUnpublishResourcesLabel = These resources will be unpublished from the specified DNA repository:
-PublishPageUnpublishTitle = Unpublish the selected resources
-PublishPageWorkspaceLabel = Workspace:
-PublishPageWorkspacePublishToolTip = The workspace where the resources are being published
-PublishPageWorkspaceUnpublishToolTip = The workspace where the resources are being unpublished
-
-PublishWizardPublishErrorMsg = Error Publishing
-PublishWizardPublishTitle = Publish
-PublishWizardUnpublishErrorMsg = Error Unpublishing
-PublishWizardUnpublishTitle = Unpublish
-
-ServerPageAuthenticationGroupTitle = Authentication
-ServerPageInvalidServerProperties = Cannot construct a server because all server properties are not valid
-ServerPageOkStatusMsg = Define the server information where the DNA repositories are located.
-ServerPagePasswordLabel = Password:
-ServerPagePasswordToolTip = The password used to authenticate the user when connecting to the server
-ServerPageSavePasswordButton = Save password
-ServerPageSavePasswordLabel = Saved secret data is stored on your computer in a file that's difficult, but not impossible, for an intruder to read.
-ServerPageSavePasswordToolTip = Indicates if the clear text password should be stored on the local file system
-ServerPageTitle = Enter Server Information
-ServerPageUrlLabel = URL:
-ServerPageUrlToolTip = The URL used to connect to the server
-ServerPageUserLabel = User:
-ServerPageUserToolTip = The user login used when connecting to the server
-
-ServerWizardEditServerErrorMsg = There were errors editing a server. See log for more details.
-ServerWizardEditServerTitle = Edit Server
-ServerWizardNewServerErrorMsg = There were errors creating a new server. See log for more details.
-ServerWizardNewServerTitle = New Server
Copied: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Activator.java (from rev 1074, branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Activator.java)
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Activator.java (rev 0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Activator.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -0,0 +1,285 @@
+/*
+ * JBoss DNA (http://www.jboss.org/dna)
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * See the AUTHORS.txt file in the distribution for a full listing of
+ * individual contributors.
+ *
+ * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
+ * is licensed to you under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * JBoss DNA is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.web.jcr.rest.client.swt;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jboss.dna.web.jcr.rest.client.Logger;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.Status;
+import org.jboss.dna.web.jcr.rest.client.Status.Severity;
+import org.jboss.dna.web.jcr.rest.client.domain.IDnaObject;
+import org.jboss.dna.web.jcr.rest.client.domain.Repository;
+import org.jboss.dna.web.jcr.rest.client.domain.Server;
+import org.jboss.dna.web.jcr.rest.client.domain.Workspace;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ *
+ * @author Dan Florian
+ * @since 0.6
+ */
+public class Activator extends AbstractUIPlugin implements IUiConstants {
+
+ // ===========================================================================================================================
+ // Class Fields
+ // ===========================================================================================================================
+
+ /**
+ * The shared plugin instance.
+ *
+ * @since 0.6
+ */
+ private static Activator plugin;
+
+ // ===========================================================================================================================
+ // Class Methods
+ // ===========================================================================================================================
+
+ /**
+ * @return the shared instance or <code>null</code> if not constructed
+ * @since 0.6
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ // ===========================================================================================================================
+ // Fields
+ // ===========================================================================================================================
+
+ /**
+ * The image used when the requested image cannot be found.
+ *
+ * @since 0.6
+ */
+ private Image missingImage;
+
+ /**
+ * The manager in charge of the server registry.
+ *
+ * @since 0.6
+ */
+ private ServerManager serverMgr;
+
+ // ===========================================================================================================================
+ // Methods
+ // ===========================================================================================================================
+
+ private ImageDescriptor createImageDescriptor( String key ) {
+ try {
+ URL url = new URL(getBundle().getEntry("/").toString() + key); //$NON-NLS-1$
+ return ImageDescriptor.createFromURL(url);
+ } catch (final MalformedURLException e) {
+ log(new Status(Severity.ERROR, I18n.bind(I18n.MissingImage, key), e));
+ return null;
+ }
+ }
+
+ /**
+ * @return the image to use when a requested image cannot be found
+ * @since 0.6
+ */
+ private Image getMissingImage() {
+ if (this.missingImage == null) {
+ this.missingImage = ImageDescriptor.getMissingImageDescriptor().createImage();
+ }
+
+ return this.missingImage;
+ }
+
+ /**
+ * @param imageId the shared image identifier
+ * @return the image or <code>null</code>
+ * @see ISharedImages
+ * @since 0.6
+ */
+ public Image getSharedImage( String imageId ) {
+ Image result = PlatformUI.getWorkbench().getSharedImages().getImage(imageId);
+ return ((result == null) ? getMissingImage() : result);
+ }
+
+ /**
+ * @param imageId the shared image identifier
+ * @return the image descriptor or <code>null</code>
+ * @see ISharedImages
+ * @since 0.6
+ */
+ public ImageDescriptor getSharedImageDescriptor( String imageId ) {
+ ImageDescriptor result = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(imageId);
+
+ if (result != null) {
+ return result;
+ }
+
+ return ImageDescriptor.getMissingImageDescriptor();
+ }
+
+ /**
+ * @param object the object whose image is being requested (domain object or plugin-relative path)
+ * @return the image or <code>null</code> if not found
+ * @since 0.6
+ */
+ public Image getImage( Object object ) {
+ String key = null;
+
+ if (object instanceof Workspace) {
+ key = WORKSPACE_IMAGE_PATH;
+ } else if (object instanceof Repository) {
+ key = REPOSITORY_IMAGE_PATH;
+ } else if (object instanceof Server) {
+ key = SERVER_IMAGE_PATH;
+ } else if (object instanceof IDnaObject) {
+ // should have an icon for every business object
+ assert false;
+ } else if (object instanceof String) {
+ key = (String)object;
+ }
+
+ if (key != null) {
+ ImageRegistry registry = getImageRegistry();
+ Image image = registry.get(key);
+
+ if (image == null) {
+ ImageDescriptor descriptor = createImageDescriptor(key);
+
+ if (descriptor == null) {
+ return getMissingImage();
+ }
+
+ image = descriptor.createImage();
+ registry.put(key, image);
+ }
+
+ return image;
+ }
+
+ return null;
+ }
+
+ /**
+ * @param object the object whose image descriptor is being requested
+ * @return the image descriptor or <code>null</code> if not found
+ * @since 0.6
+ */
+ public ImageDescriptor getImageDescriptor( Object object ) {
+ String key = null;
+
+ if (object instanceof Workspace) {
+ key = WORKSPACE_IMAGE_PATH;
+ } else if (object instanceof Repository) {
+ key = REPOSITORY_IMAGE_PATH;
+ } else if (object instanceof Server) {
+ key = SERVER_IMAGE_PATH;
+ } else if (object instanceof IDnaObject) {
+ // should have an icon for every business object
+ assert false;
+ } else if (object instanceof String) {
+ key = (String)object;
+ }
+
+ if (key != null) {
+ ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, ((String)object));
+ return ((descriptor == null) ? ImageDescriptor.getMissingImageDescriptor() : descriptor);
+ }
+
+ return null;
+ }
+
+ /**
+ * @return the server manager or <code>null</code> if activator has not been initialized or started
+ * @see #start(BundleContext)
+ * @since 0.6
+ */
+ public ServerManager getServerManager() {
+ return this.serverMgr;
+ }
+
+ /**
+ * @param status the status being logged
+ * @since 0.6
+ */
+ public void log( Status status ) {
+ IStatus eclipseStatus = new org.eclipse.core.runtime.Status(Utils.convertSeverity(status.getSeverity()),
+ IUiConstants.PLUGIN_ID, status.getMessage(),
+ status.getException());
+ getLog().log(eclipseStatus);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ * @since 0.6
+ */
+ @Override
+ public void start( BundleContext context ) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ this.serverMgr = new ServerManager(getStateLocation().toFile().getAbsolutePath());
+ Status status = this.serverMgr.restoreState();
+
+ // problem restoring server registry
+ if (!status.isOk()) {
+ Logger.log(getClass(), status);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ * @since 0.6
+ */
+ @Override
+ public void stop( BundleContext context ) throws Exception {
+ if (missingImage != null) {
+ missingImage.dispose();
+ }
+
+ if (this.serverMgr != null) {
+ Status status = this.serverMgr.saveState();
+
+ if (!status.isOk()) {
+ log(status);
+ }
+
+ this.serverMgr = null;
+ }
+
+ super.stop(context);
+
+ plugin = null;
+ }
+
+}
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Activator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/I18n.java (from rev 1074, branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/I18n.java)
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/I18n.java (rev 0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/I18n.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -0,0 +1,122 @@
+/*
+ * JBoss DNA (http://www.jboss.org/dna)
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * See the AUTHORS.txt file in the distribution for a full listing of
+ * individual contributors.
+ *
+ * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
+ * is licensed to you under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * JBoss DNA is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.web.jcr.rest.client.swt;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * The I18n class handles localization messages.
+ *
+ * @author Dan Florian
+ * @since 0.6
+ */
+public final class I18n extends NLS {
+
+ public static String BasePublishingActionPublishingWizardErrorMsg;
+ public static String BasePublishingActionUnpublishingWizardErrorMsg;
+
+ public static String CollapseActionToolTip;
+
+ public static String DeleteServerActionText;
+ public static String DeleteServerActionToolTip;
+
+ public static String DeleteServerDialogErrorsOccurredMsg;
+ public static String DeleteServerDialogMultipleServersMsg;
+ public static String DeleteServerDialogOneServerMsg;
+ public static String DeleteServerDialogTitle;
+
+ public static String EditServerActionText;
+ public static String EditServerActionToolTip;
+
+ public static String ErrorDialogTitle;
+
+ public static String MissingImage;
+
+ public static String NewServerActionText;
+ public static String NewServerActionToolTip;
+
+ public static String PublishOperationPublishTaskName;
+ public static String PublishOperationPublishTitle;
+ public static String PublishOperationUnpublishTaskName;
+ public static String PublishOperationUnpublishTitle;
+
+ public static String PublishPagePublishTitle;
+ public static String PublishPageLocationGroupTitle;
+ public static String PublishPageMissingRepositoryStatusMsg;
+ public static String PublishPageMissingServerStatusMsg;
+ public static String PublishPageMissingWorkspaceStatusMsg;
+ public static String PublishPageNewServerButton;
+ public static String PublishPageNoAvailableRepositoriesStatusMsg;
+ public static String PublishPageNoAvailableServersStatusMsg;
+ public static String PublishPageNoAvailableWorkspacesStatusMsg;
+ public static String PublishPageNoResourcesToPublishStatusMsg;
+ public static String PublishPageNoResourcesToUnpublishStatusMsg;
+ public static String PublishPagePublishOkStatusMsg;
+ public static String PublishPagePublishResourcesLabel;
+ public static String PublishPageRecurseCheckBox;
+ public static String PublishPageRecurseCheckBoxToolTip;
+ public static String PublishPageRecurseProcessingErrorMsg;
+ public static String PublishPageRepositoryLabel;
+ public static String PublishPageRepositoryToolTip;
+ public static String PublishPageServerLabel;
+ public static String PublishPageServerToolTip;
+ public static String PublishPageUnpublishOkStatusMsg;
+ public static String PublishPageUnpublishResourcesLabel;
+ public static String PublishPageUnpublishTitle;
+ public static String PublishPageWorkspaceLabel;
+ public static String PublishPageWorkspacePublishToolTip;
+ public static String PublishPageWorkspaceUnpublishToolTip;
+
+ public static String PublishWizardPublishErrorMsg;
+ public static String PublishWizardPublishTitle;
+ public static String PublishWizardUnpublishTitle;
+ public static String PublishWizardUnpublishErrorMsg;
+
+ public static String ServerPageAuthenticationGroupTitle;
+ public static String ServerPageInvalidServerProperties;
+ public static String ServerPageOkStatusMsg;
+ public static String ServerPagePasswordLabel;
+ public static String ServerPagePasswordToolTip;
+ public static String ServerPageSavePasswordButton;
+ public static String ServerPageSavePasswordLabel;
+ public static String ServerPageSavePasswordToolTip;
+ public static String ServerPageTitle;
+ public static String ServerPageUrlLabel;
+ public static String ServerPageUrlToolTip;
+ public static String ServerPageUserLabel;
+ public static String ServerPageUserToolTip;
+
+ public static String ServerViewToolTip;
+
+ public static String ServerWizardEditServerErrorMsg;
+ public static String ServerWizardEditServerTitle;
+ public static String ServerWizardNewServerErrorMsg;
+ public static String ServerWizardNewServerTitle;
+
+ static {
+ // load message bundle
+ NLS.initializeMessages(I18n.class.getPackage().getName() + ".i18n", I18n.class); //$NON-NLS-1$
+ }
+
+}
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/I18n.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/IUiConstants.java (from rev 1074, branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/IUiConstants.java)
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/IUiConstants.java (rev 0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/IUiConstants.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -0,0 +1,75 @@
+/*
+ * JBoss DNA (http://www.jboss.org/dna)
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * See the AUTHORS.txt file in the distribution for a full listing of
+ * individual contributors.
+ *
+ * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
+ * is licensed to you under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * JBoss DNA is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.web.jcr.rest.client.swt;
+
+/**
+ * @author Dan Florian
+ * @since 0.6
+ */
+public interface IUiConstants {
+
+ /**
+ * The Plug-in's identifier.
+ *
+ * @since 0.6
+ */
+ String PLUGIN_ID = "org.jboss.dna.web.jcr.rest.client.swt"; //$NON-NLS-1$
+
+ String ICON_PATH = "icons/"; //$NON-NLS-1$
+
+ //
+ // /icons/objects/
+ //
+
+ String OBJECT_ICONS_FOLDER = ICON_PATH + "objects/"; //$NON-NLS-1$
+
+ String REPOSITORY_IMAGE_PATH = OBJECT_ICONS_FOLDER + "repository.gif"; //$NON-NLS-1$
+
+ String SERVER_IMAGE_PATH = OBJECT_ICONS_FOLDER + "server.gif"; //$NON-NLS-1$
+
+ String WORKSPACE_IMAGE_PATH = OBJECT_ICONS_FOLDER + "workspace.gif"; //$NON-NLS-1$
+
+ //
+ // /icons/views/
+ //
+
+ String VIEWS_ICON_FOLDER = ICON_PATH + "views/"; //$NON-NLS-1$
+
+ String COLLAPSE_ALL_IMAGE_PATH = VIEWS_ICON_FOLDER + "collapse_all.gif"; //$NON-NLS-1$
+
+ String DNA_WINDOW_IMAGE_PATH = VIEWS_ICON_FOLDER + "dna_window.png"; //$NON-NLS-1$
+
+ String EDIT_SERVER_IMAGE_PATH = VIEWS_ICON_FOLDER + "edit_server.gif"; //$NON-NLS-1$
+
+ String NEW_SERVER_IMAGE_PATH = VIEWS_ICON_FOLDER + "new_server.gif"; //$NON-NLS-1$
+
+ //
+ // /icons/wizards/
+ //
+
+ String WIZARD_ICONS_FOLDER = ICON_PATH + "wizards/"; //$NON-NLS-1$
+
+ String DNA_WIZARD_BANNER_IMAGE_PATH = WIZARD_ICONS_FOLDER + "dna_wizard_banner.png"; //$NON-NLS-1$
+
+}
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/IUiConstants.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Utils.java (from rev 1074, branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Utils.java)
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Utils.java (rev 0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Utils.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -0,0 +1,86 @@
+/*
+ * JBoss DNA (http://www.jboss.org/dna)
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * See the AUTHORS.txt file in the distribution for a full listing of
+ * individual contributors.
+ *
+ * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
+ * is licensed to you under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * JBoss DNA is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.web.jcr.rest.client.swt;
+
+import org.eclipse.core.runtime.IStatus;
+import org.jboss.dna.web.jcr.rest.client.Status;
+import org.jboss.dna.web.jcr.rest.client.Status.Severity;
+
+/**
+ * @author Dan Florian
+ * @since 0.6
+ */
+public final class Utils {
+
+ // ===========================================================================================================================
+ // Class Methods
+ // ===========================================================================================================================
+
+ /**
+ * Converts the non-Eclipse status severity to an Eclipse severity level. An {@link Status.Severity#UNKNOWN unknown status} is
+ * converted to {@link IStatus#CANCEL cancel}. A {@link Status.Severity} is
+ *
+ * @param severity the eclipse status severity level
+ * @return the converted severity level
+ * @see IStatus
+ * @since 0.6
+ */
+ public static int convertSeverity( Severity severity ) {
+ if (severity == Severity.OK) return IStatus.OK;
+ if (severity == Severity.ERROR) return IStatus.ERROR;
+ if (severity == Severity.WARNING) return IStatus.WARNING;
+ if (severity == Severity.INFO) return IStatus.INFO;
+ return IStatus.CANCEL;
+ }
+
+ /**
+ * Converts the Eclipse status severity level to a non-Eclipse severity.
+ *
+ * @param severity the eclipse status severity level
+ * @return the converted severity level
+ * @see IStatus
+ * @since 0.6
+ */
+ public static Severity convertSeverity( int severity ) {
+ if (severity == IStatus.OK) return Severity.OK;
+ if (severity == IStatus.ERROR) return Severity.ERROR;
+ if (severity == IStatus.WARNING) return Severity.WARNING;
+ if (severity == IStatus.INFO) return Severity.INFO;
+ return Severity.UNKNOWN;
+ }
+
+ // ===========================================================================================================================
+ // Constructors
+ // ===========================================================================================================================
+
+ /**
+ * Don't allow construction.
+ *
+ * @since 0.6
+ */
+ public Utils() {
+ // nothing to do
+ }
+
+}
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Utils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions (from rev 1074, branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions)
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/BasePublishingAction.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/BasePublishingAction.java 2009-07-07 18:53:08 UTC (rev 1074)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/BasePublishingAction.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -21,7 +21,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.actions;
+package org.jboss.dna.web.jcr.rest.client.swt.actions;
import java.util.Collections;
import java.util.List;
@@ -35,12 +35,12 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
-import org.jboss.dna.publish.Status;
-import org.jboss.dna.publish.Status.Severity;
-import org.jboss.dna.publish.ui.swt.Activator;
-import org.jboss.dna.publish.ui.swt.I18n;
-import org.jboss.dna.publish.ui.swt.wizards.PublishWizard;
-import org.jboss.dna.publish.ui.swt.wizards.PublishOperation.Type;
+import org.jboss.dna.web.jcr.rest.client.Status;
+import org.jboss.dna.web.jcr.rest.client.Status.Severity;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.swt.wizards.PublishWizard;
+import org.jboss.dna.web.jcr.rest.client.swt.wizards.PublishOperation.Type;
/**
* @author Dan Florian
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/DeleteServerAction.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/DeleteServerAction.java 2009-07-07 18:53:08 UTC (rev 1074)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/DeleteServerAction.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -21,7 +21,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.actions;
+package org.jboss.dna.web.jcr.rest.client.swt.actions;
import java.util.ArrayList;
import java.util.List;
@@ -32,12 +32,12 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.actions.BaseSelectionListenerAction;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.Status;
-import org.jboss.dna.publish.domain.Server;
-import org.jboss.dna.publish.ui.swt.Activator;
-import org.jboss.dna.publish.ui.swt.I18n;
-import org.jboss.dna.publish.ui.swt.dialogs.DeleteServerDialog;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.Status;
+import org.jboss.dna.web.jcr.rest.client.domain.Server;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.swt.dialogs.DeleteServerDialog;
/**
* The DeleteServerAction deletes one or more servers from the server registry.
@@ -108,7 +108,7 @@
public void run() {
Dialog dialog = new DeleteServerDialog(this.shell, this.serversToDelete);
- if (dialog.getReturnCode() == Window.OK) {
+ if (dialog.open() == Window.OK) {
boolean errorsOccurred = false;
for (Server server : this.serversToDelete) {
@@ -137,9 +137,11 @@
*/
@Override
protected boolean updateSelection( IStructuredSelection selection ) {
+ // reset selected server collection
+ this.serversToDelete.clear();
+
// disable if empty selection
if (selection.isEmpty()) {
- this.serversToDelete.clear();
return false;
}
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/EditServerAction.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/EditServerAction.java 2009-07-07 18:53:08 UTC (rev 1074)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/EditServerAction.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -21,18 +21,18 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.actions;
+package org.jboss.dna.web.jcr.rest.client.swt.actions;
-import static org.jboss.dna.publish.ui.swt.IUiConstants.EDIT_SERVER_IMAGE_PATH;
+import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.EDIT_SERVER_IMAGE_PATH;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.actions.BaseSelectionListenerAction;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.domain.Server;
-import org.jboss.dna.publish.ui.swt.Activator;
-import org.jboss.dna.publish.ui.swt.I18n;
-import org.jboss.dna.publish.ui.swt.wizards.ServerWizard;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.domain.Server;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.swt.wizards.ServerWizard;
/**
* @author Dan Florian
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/NewServerAction.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/NewServerAction.java 2009-07-07 18:53:08 UTC (rev 1074)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/NewServerAction.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -21,16 +21,16 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.actions;
+package org.jboss.dna.web.jcr.rest.client.swt.actions;
-import static org.jboss.dna.publish.ui.swt.IUiConstants.NEW_SERVER_IMAGE_PATH;
+import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.NEW_SERVER_IMAGE_PATH;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.actions.BaseSelectionListenerAction;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.ui.swt.Activator;
-import org.jboss.dna.publish.ui.swt.I18n;
-import org.jboss.dna.publish.ui.swt.wizards.ServerWizard;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.swt.wizards.ServerWizard;
/**
* @author Dan Florian
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/PublishAction.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/PublishAction.java 2009-07-07 18:53:08 UTC (rev 1074)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/PublishAction.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -21,9 +21,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.actions;
+package org.jboss.dna.web.jcr.rest.client.swt.actions;
-import org.jboss.dna.publish.ui.swt.wizards.PublishOperation.Type;
+import org.jboss.dna.web.jcr.rest.client.swt.wizards.PublishOperation.Type;
/**
* The PublishAction controls the publishing of one or more {@link org.eclipse.core.resources.IResource}s to a DNA repository.
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/UnpublishAction.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/UnpublishAction.java 2009-07-07 18:53:08 UTC (rev 1074)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/UnpublishAction.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -21,9 +21,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.actions;
+package org.jboss.dna.web.jcr.rest.client.swt.actions;
-import org.jboss.dna.publish.ui.swt.wizards.PublishOperation.Type;
+import org.jboss.dna.web.jcr.rest.client.swt.wizards.PublishOperation.Type;
/**
* The UnpublishAction controls the unpublishing of on or more {@link org.eclipse.core.resources.IResource}s from a DNA
Copied: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/dialogs (from rev 1074, branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/dialogs)
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/dialogs/DeleteServerDialog.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/dialogs/DeleteServerDialog.java 2009-07-07 18:53:08 UTC (rev 1074)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/dialogs/DeleteServerDialog.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -21,24 +21,27 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.dialogs;
+package org.jboss.dna.web.jcr.rest.client.swt.dialogs;
+import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.DNA_WINDOW_IMAGE_PATH;
import java.util.Collection;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Shell;
-import org.jboss.dna.publish.domain.IDnaObject;
-import org.jboss.dna.publish.domain.Server;
-import org.jboss.dna.publish.ui.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.domain.IDnaObject;
+import org.jboss.dna.web.jcr.rest.client.domain.Server;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
/**
- * The <code>DeleteServerDialog</code> class provides a UI for deleting a {@link org.jboss.dna.publish.domain.Server server}.
+ * The <code>DeleteServerDialog</code> class provides a UI for deleting a {@link Server server}.
*
* @author Dan Florian
* @since 0.6
@@ -67,9 +70,12 @@
*/
public DeleteServerDialog( Shell parentShell,
Collection<Server> serversBeingDeleted ) {
- super(parentShell, I18n.DeleteServerDialogTitle, null, null, MessageDialog.QUESTION, new String[] {
- IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL}, 0);
+ super(parentShell, I18n.DeleteServerDialogTitle, Activator.getDefault().getImage(DNA_WINDOW_IMAGE_PATH), null,
+ MessageDialog.QUESTION, new String[] {IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL}, 0);
this.serversBeingDeleted = serversBeingDeleted;
+
+ // make sure dialog is resizable
+ setShellStyle(getShellStyle() | SWT.RESIZE);
}
// ===========================================================================================================================
@@ -86,17 +92,17 @@
protected void configureShell( Shell shell ) {
super.configureShell(shell);
- // now set title
- String title;
+ // now set message
+ String msg;
if (this.serversBeingDeleted.size() == 1) {
IDnaObject server = this.serversBeingDeleted.iterator().next();
- title = NLS.bind(I18n.DeleteServerDialogOneServerMsg, server.getName());
+ msg = NLS.bind(I18n.DeleteServerDialogOneServerMsg, server.getName());
} else {
- title = NLS.bind(I18n.DeleteServerDialogMultipleServersMsg, this.serversBeingDeleted.size());
+ msg = NLS.bind(I18n.DeleteServerDialogMultipleServersMsg, this.serversBeingDeleted.size());
}
- shell.setText(title);
+ this.message = msg;
}
/**
@@ -110,6 +116,9 @@
if (this.serversBeingDeleted.size() != 1) {
List serverList = new List(parent, SWT.NONE);
serverList.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
+ GridData gd = new GridData(SWT.LEFT, SWT.CENTER, true, true);
+ gd.horizontalIndent = 40;
+ serverList.setLayoutData(gd);
for (IDnaObject server : this.serversBeingDeleted) {
serverList.add(server.getName());
Copied: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/i18n.properties (from rev 1074, branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/i18n.properties)
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/i18n.properties (rev 0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/i18n.properties 2009-07-08 16:11:59 UTC (rev 1076)
@@ -0,0 +1,103 @@
+#
+# JBoss DNA (http://www.jboss.org/dna)
+# See the COPYRIGHT.txt file distributed with this work for information
+# regarding copyright ownership. Some portions may be licensed
+# to Red Hat, Inc. under one or more contributor license agreements.
+# See the AUTHORS.txt file in the distribution for a full listing of
+# individual contributors.
+#
+# JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
+# is licensed to you under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# JBoss DNA is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this software; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+#
+BasePublishingActionPublishingWizardErrorMsg = Unexpected error running the publishing wizard. See log for more details.
+BasePublishingActionUnpublishingWizardErrorMsg = Unexpected error running the unpublishing wizard. See log for more details.
+
+CollapseActionToolTip = Collapse All
+
+DeleteServerActionText = Delete Server
+DeleteServerActionToolTip = Delete server from the server registry
+
+DeleteServerDialogErrorsOccurredMsg = There were errors deleting servers from the server registry. See log for more details.
+DeleteServerDialogMultipleServersMsg = Are you sure you want to delete these {0} servers?
+DeleteServerDialogOneServerMsg = Are you sure you want to delete the "{0}" server?
+DeleteServerDialogTitle = Confirm Delete Server
+
+EditServerActionText = Edit Server
+EditServerActionToolTip = Edit server properties
+
+ErrorDialogTitle = Error
+
+MissingImage = The following image cannot be found "{0}"
+
+NewServerActionText = New Server
+NewServerActionToolTip = Create and register a new server
+
+PublishOperationPublishTaskName = Publishing resources
+PublishOperationPublishTitle = Publish
+PublishOperationUnpublishTaskName = Unpublishing resources
+PublishOperationUnpublishTitle = Unpublish
+
+PublishPagePublishTitle = Publish the selected resources
+PublishPageLocationGroupTitle = Location
+PublishPageMissingRepositoryStatusMsg = A repository must be selected
+PublishPageMissingServerStatusMsg = A server must be selected
+PublishPageMissingWorkspaceStatusMsg = A workspace must be selected
+PublishPageNewServerButton = New...
+PublishPageNoAvailableRepositoriesStatusMsg = There are no repositories available on that server
+PublishPageNoAvailableServersStatusMsg = A server must be created first
+PublishPageNoAvailableWorkspacesStatusMsg = There are no workspaces available on that server and repository
+PublishPageNoResourcesToPublishStatusMsg = There are no files that can be published
+PublishPageNoResourcesToUnpublishStatusMsg = There are no files that can be unpublished
+PublishPagePublishOkStatusMsg = Choose the server, repository, and workspace where the selected resources will be published.
+PublishPagePublishResourcesLabel = These resources will be published to the specified DNA repository:
+PublishPageRecurseCheckBox = Recurse folders and projects
+PublishPageRecurseCheckBoxToolTip = Add all files under folders recursively under selected projects and folders
+PublishPageRecurseProcessingErrorMsg = Unexpected error processing resources. See log for more details.
+PublishPageRepositoryLabel = Repository:
+PublishPageRepositoryToolTip = The repository where the workspace is located
+PublishPageServerLabel = Server:
+PublishPageServerToolTip = The server where the repository is located
+PublishPageUnpublishOkStatusMsg = Choose the server, repository, and workspace where the selected resources will be unpublished.
+PublishPageUnpublishResourcesLabel = These resources will be unpublished from the specified DNA repository:
+PublishPageUnpublishTitle = Unpublish the selected resources
+PublishPageWorkspaceLabel = Workspace:
+PublishPageWorkspacePublishToolTip = The workspace where the resources are being published
+PublishPageWorkspaceUnpublishToolTip = The workspace where the resources are being unpublished
+
+PublishWizardPublishErrorMsg = Error Publishing
+PublishWizardPublishTitle = Publish
+PublishWizardUnpublishErrorMsg = Error Unpublishing
+PublishWizardUnpublishTitle = Unpublish
+
+ServerPageAuthenticationGroupTitle = Authentication
+ServerPageInvalidServerProperties = Cannot construct a server because all server properties are not valid
+ServerPageOkStatusMsg = Define the server information where the DNA repositories are located.
+ServerPagePasswordLabel = Password:
+ServerPagePasswordToolTip = The password used to authenticate the user when connecting to the server
+ServerPageSavePasswordButton = Save password
+ServerPageSavePasswordLabel = Saved secret data is stored on your computer in a file that's difficult, but not impossible, for an intruder to read.
+ServerPageSavePasswordToolTip = Indicates if the clear text password should be stored on the local file system
+ServerPageTitle = Enter Server Information
+ServerPageUrlLabel = URL:
+ServerPageUrlToolTip = The URL used to connect to the server
+ServerPageUserLabel = User:
+ServerPageUserToolTip = The user login used when connecting to the server
+
+ServerViewToolTip = Manages the DNA server registry
+
+ServerWizardEditServerErrorMsg = There were errors editing a server. See log for more details.
+ServerWizardEditServerTitle = Edit Server
+ServerWizardNewServerErrorMsg = There were errors creating a new server. See log for more details.
+ServerWizardNewServerTitle = New Server
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/i18n.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/views (from rev 1074, branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/views)
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/views/ServerContentProvider.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/views/ServerContentProvider.java 2009-07-07 18:53:08 UTC (rev 1074)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/views/ServerContentProvider.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -21,19 +21,19 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.views;
+package org.jboss.dna.web.jcr.rest.client.swt.views;
-import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.graphics.Image;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.domain.IDnaObject;
-import org.jboss.dna.publish.domain.Repository;
-import org.jboss.dna.publish.domain.Server;
-import org.jboss.dna.publish.domain.Workspace;
-import org.jboss.dna.publish.ui.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.domain.IDnaObject;
+import org.jboss.dna.web.jcr.rest.client.domain.Repository;
+import org.jboss.dna.web.jcr.rest.client.domain.Server;
+import org.jboss.dna.web.jcr.rest.client.domain.Workspace;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
/**
* The ServerContentProvider is a content and label provider for DNA repositories.
@@ -41,7 +41,7 @@
* @author Dan Florian
* @since 0.6
*/
-public final class ServerContentProvider implements ITreeContentProvider, ILabelProvider {
+public final class ServerContentProvider extends ColumnLabelProvider implements ITreeContentProvider {
// ===========================================================================================================================
// Fields
@@ -163,10 +163,47 @@
assert (element instanceof IDnaObject);
return ((IDnaObject)element).getName();
}
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipImage(java.lang.Object)
+ * @since 0.6
+ */
+ @Override
+ public Image getToolTipImage( Object object ) {
+ return getImage(object);
+ }
/**
* {@inheritDoc}
*
+ * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipText(java.lang.Object)
+ * @since 0.6
+ */
+ @Override
+ public String getToolTipText( Object element ) {
+ if (element instanceof IDnaObject) {
+ return ((IDnaObject)element).getShortDescription();
+ }
+
+ return super.getToolTipText(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipTimeDisplayed(java.lang.Object)
+ * @since 0.6
+ */
+ @Override
+ public int getToolTipTimeDisplayed( Object object ) {
+ return 3000;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
* @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
* @since 0.6
*/
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/views/ServerView.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/views/ServerView.java 2009-07-07 18:53:08 UTC (rev 1074)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/views/ServerView.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -21,13 +21,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.views;
+package org.jboss.dna.web.jcr.rest.client.swt.views;
-import static org.jboss.dna.publish.ui.swt.IUiConstants.COLLAPSE_ALL_IMAGE_PATH;
+import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.COLLAPSE_ALL_IMAGE_PATH;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.ColumnViewerToolTipSupport;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -40,15 +41,15 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.actions.BaseSelectionListenerAction;
import org.eclipse.ui.part.ViewPart;
-import org.jboss.dna.publish.IServerRegistryListener;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.ServerRegistryEvent;
-import org.jboss.dna.publish.domain.IDnaObject;
-import org.jboss.dna.publish.ui.swt.Activator;
-import org.jboss.dna.publish.ui.swt.I18n;
-import org.jboss.dna.publish.ui.swt.actions.DeleteServerAction;
-import org.jboss.dna.publish.ui.swt.actions.EditServerAction;
-import org.jboss.dna.publish.ui.swt.actions.NewServerAction;
+import org.jboss.dna.web.jcr.rest.client.IServerRegistryListener;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.ServerRegistryEvent;
+import org.jboss.dna.web.jcr.rest.client.domain.IDnaObject;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.swt.actions.DeleteServerAction;
+import org.jboss.dna.web.jcr.rest.client.swt.actions.EditServerAction;
+import org.jboss.dna.web.jcr.rest.client.swt.actions.NewServerAction;
/**
* The ServerView shows all defined servers and their DNA repositories.
@@ -170,8 +171,11 @@
private void constructTreeViewer( Composite parent ) {
this.provider = new ServerContentProvider(getServerManager());
this.viewer = new TreeViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);
+
this.viewer.setContentProvider(this.provider);
this.viewer.setLabelProvider(this.provider);
+ ColumnViewerToolTipSupport.enableFor(this.viewer);
+
this.viewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged( SelectionChangedEvent event ) {
@@ -202,6 +206,8 @@
constructToolBar();
constructContextMenu();
+ setTitleToolTip(I18n.ServerViewToolTip);
+
// register to receive changes to the server registry
getServerManager().addRegistryListener(this);
}
@@ -254,7 +260,7 @@
/**
* {@inheritDoc}
*
- * @see org.jboss.dna.publish.IServerRegistryListener#serverRegistryChanged(org.jboss.dna.publish.ServerRegistryEvent)
+ * @see org.jboss.dna.web.jcr.rest.client.IServerRegistryListener#serverRegistryChanged(org.jboss.dna.web.jcr.rest.client.ServerRegistryEvent)
* @since 0.6
*/
@Override
Copied: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards (from rev 1074, branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards)
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishOperation.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/PublishOperation.java 2009-07-07 18:53:08 UTC (rev 1074)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishOperation.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -21,7 +21,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.wizards;
+package org.jboss.dna.web.jcr.rest.client.swt.wizards;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
@@ -29,8 +29,8 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.jboss.dna.publish.domain.Workspace;
-import org.jboss.dna.publish.ui.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.domain.Workspace;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
/**
* @author Dan Florian
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishPage.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/PublishPage.java 2009-07-07 18:53:08 UTC (rev 1074)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishPage.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -21,7 +21,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.wizards;
+package org.jboss.dna.web.jcr.rest.client.swt.wizards;
import java.util.ArrayList;
import java.util.Collections;
@@ -52,22 +52,24 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.Status;
-import org.jboss.dna.publish.Status.Severity;
-import org.jboss.dna.publish.domain.Repository;
-import org.jboss.dna.publish.domain.Server;
-import org.jboss.dna.publish.domain.Workspace;
-import org.jboss.dna.publish.ui.swt.Activator;
-import org.jboss.dna.publish.ui.swt.I18n;
-import org.jboss.dna.publish.ui.swt.actions.NewServerAction;
-import org.jboss.dna.publish.ui.swt.wizards.PublishOperation.Type;
+import org.jboss.dna.web.jcr.rest.client.IServerRegistryListener;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.ServerRegistryEvent;
+import org.jboss.dna.web.jcr.rest.client.Status;
+import org.jboss.dna.web.jcr.rest.client.Status.Severity;
+import org.jboss.dna.web.jcr.rest.client.domain.Repository;
+import org.jboss.dna.web.jcr.rest.client.domain.Server;
+import org.jboss.dna.web.jcr.rest.client.domain.Workspace;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.swt.actions.NewServerAction;
+import org.jboss.dna.web.jcr.rest.client.swt.wizards.PublishOperation.Type;
/**
* @author Dan Florian
* @since 0.6
*/
-public final class PublishPage extends WizardPage implements ModifyListener {
+public final class PublishPage extends WizardPage implements IServerRegistryListener, ModifyListener {
// ===========================================================================================================================
// Constants
@@ -421,7 +423,6 @@
@Override
public void widgetSelected( SelectionEvent e ) {
action.run();
- refreshServers();
}
});
@@ -433,6 +434,9 @@
btnNewServer.removeSelectionListener(this);
}
});
+
+ // register to receive server registry events that will be generated when the new server dialog is run
+ getServerManager().addRegistryListener(this);
}
{ // row 2: repository row
@@ -546,6 +550,18 @@
}
/**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.dialogs.DialogPage#dispose()
+ * @since 0.6
+ */
+ @Override
+ public void dispose() {
+ getServerManager().removeRegistryListener(this);
+ super.dispose();
+ }
+
+ /**
* @return the file to publish or unpublish (never <code>null</code>)
* @since 0.6
*/
@@ -876,6 +892,24 @@
/**
* {@inheritDoc}
*
+ * @see org.jboss.dna.web.jcr.rest.client.IServerRegistryListener#serverRegistryChanged(org.jboss.dna.web.jcr.rest.client.ServerRegistryEvent)
+ * @since 0.6
+ */
+ @Override
+ public Exception[] serverRegistryChanged( ServerRegistryEvent event ) {
+ // should only be a new server event
+ if (event.isNew()) {
+ Server newServer = event.getServer();
+ this.servers.add(newServer);
+ this.cbxServer.add(newServer.getName());
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
* @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
* @since 0.6
*/
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishWizard.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/PublishWizard.java 2009-07-07 18:53:08 UTC (rev 1074)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishWizard.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -21,8 +21,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.wizards;
+package org.jboss.dna.web.jcr.rest.client.swt.wizards;
+import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.DNA_WIZARD_BANNER_IMAGE_PATH;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import org.eclipse.core.resources.IFile;
@@ -31,13 +32,13 @@
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.wizard.Wizard;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.Status;
-import org.jboss.dna.publish.Status.Severity;
-import org.jboss.dna.publish.domain.Workspace;
-import org.jboss.dna.publish.ui.swt.Activator;
-import org.jboss.dna.publish.ui.swt.I18n;
-import org.jboss.dna.publish.ui.swt.wizards.PublishOperation.Type;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.Status;
+import org.jboss.dna.web.jcr.rest.client.Status.Severity;
+import org.jboss.dna.web.jcr.rest.client.domain.Workspace;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.swt.wizards.PublishOperation.Type;
/**
* @author Dan Florian
@@ -89,6 +90,7 @@
this.serverManager = serverManager;
setWindowTitle((type == Type.PUBLISH) ? I18n.PublishWizardPublishTitle : I18n.PublishWizardUnpublishTitle);
+ setDefaultPageImageDescriptor(Activator.getDefault().getImageDescriptor(DNA_WIZARD_BANNER_IMAGE_PATH));
}
// ===========================================================================================================================
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/ServerPage.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerPage.java 2009-07-07 18:53:08 UTC (rev 1074)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/ServerPage.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -21,7 +21,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.wizards;
+package org.jboss.dna.web.jcr.rest.client.swt.wizards;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.wizard.WizardPage;
@@ -39,11 +39,11 @@
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.Status;
-import org.jboss.dna.publish.domain.Server;
-import org.jboss.dna.publish.domain.validation.ServerValidator;
-import org.jboss.dna.publish.ui.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.Status;
+import org.jboss.dna.web.jcr.rest.client.domain.Server;
+import org.jboss.dna.web.jcr.rest.client.domain.validation.ServerValidator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
/**
* @author Dan Florian
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/ServerWizard.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerWizard.java 2009-07-07 18:53:08 UTC (rev 1074)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/ServerWizard.java 2009-07-08 16:11:59 UTC (rev 1076)
@@ -21,15 +21,16 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.wizards;
+package org.jboss.dna.web.jcr.rest.client.swt.wizards;
+import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.DNA_WIZARD_BANNER_IMAGE_PATH;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.wizard.Wizard;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.Status;
-import org.jboss.dna.publish.domain.Server;
-import org.jboss.dna.publish.ui.swt.Activator;
-import org.jboss.dna.publish.ui.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.Status;
+import org.jboss.dna.web.jcr.rest.client.domain.Server;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
/**
* @author Dan Florian
@@ -75,6 +76,8 @@
public ServerWizard( ServerManager serverManager ) {
this.page = new ServerPage();
this.serverManager = serverManager;
+
+ setDefaultPageImageDescriptor(Activator.getDefault().getImageDescriptor(DNA_WIZARD_BANNER_IMAGE_PATH));
setWindowTitle(I18n.ServerWizardNewServerTitle);
}
16 years, 6 months
DNA SVN: r1075 - branches/eclipse.
by dna-commits@lists.jboss.org
Author: elvisisking
Date: 2009-07-08 11:59:30 -0400 (Wed, 08 Jul 2009)
New Revision: 1075
Added:
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.feature/
branches/eclipse/org.jboss.dna.web.jcr.rest.client.swt.updatesite/
Log:
Share project "org.jboss.dna.web.jcr.rest.client.swt.feature" into "https://svn.jboss.org/repos/dna"
Share project "org.jboss.dna.web.jcr.rest.client.swt.updatesite" into "https://svn.jboss.org/repos/dna"
16 years, 6 months
DNA SVN: r1074 - in branches/eclipse: org.jboss.dna.publish/src/org/jboss/dna/publish/domain and 2 other directories.
by dna-commits@lists.jboss.org
Author: elvisisking
Date: 2009-07-07 14:53:08 -0400 (Tue, 07 Jul 2009)
New Revision: 1074
Added:
branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/Utils.java
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/views/ServerView.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/PublishPage.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerPage.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerWizard.java
branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/Status.java
branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/IDnaObject.java
branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Repository.java
branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Server.java
branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Workspace.java
Log:
In PublishPage a fixed a bug with the combo listeners. In ServerView added a double-click to open dialog to edit server properties. Fixed equals in Server business object. Other miscellaneous changes (error messages, support utilities, minor change to IDnaObject API).
Modified: branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/Status.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/Status.java 2009-07-06 22:25:55 UTC (rev 1073)
+++ branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/Status.java 2009-07-07 18:53:08 UTC (rev 1074)
@@ -23,10 +23,13 @@
*/
package org.jboss.dna.publish;
+import net.jcip.annotations.Immutable;
+
/**
* @author Dan Florian
* @since 0.6
*/
+@Immutable
public class Status {
// ===========================================================================================================================
@@ -92,36 +95,29 @@
*
* @since 0.6
*/
- protected Throwable exception;
+ protected final Throwable exception;
/**
- * The localized message of this status (never <code>null</code>).
+ * The localized message of this status (can be <code>null</code>).
*
* @since 0.6
*/
- protected String message;
+ protected final String message;
/**
* The severity level of this status.
*
* @since 0.6
*/
- protected Severity severity;
+ protected final Severity severity;
// ===========================================================================================================================
// Constructors
// ===========================================================================================================================
/**
- * @since 0.6
- */
- protected Status() {
- // nothing to do
- }
-
- /**
- * @param severity the status severity (<code>null</code> will be converted to {@link Severity#UNKNOWN}.
- * @param message the status message or <code>null</code>
+ * @param severity the status severity (if <code>null</code> it will be converted to {@link Severity#UNKNOWN}.
+ * @param message the status message (if <code>null</code> it will be returned as an empty string)
* @param exception the status exception or <code>null</code>
* @since 0.6
*/
Added: branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/Utils.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/Utils.java (rev 0)
+++ branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/Utils.java 2009-07-07 18:53:08 UTC (rev 1074)
@@ -0,0 +1,66 @@
+/*
+ * JBoss DNA (http://www.jboss.org/dna)
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * See the AUTHORS.txt file in the distribution for a full listing of
+ * individual contributors.
+ *
+ * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
+ * is licensed to you under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * JBoss DNA is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.publish;
+
+/**
+ * @author Dan Florian
+ * @since 0.6
+ */
+public final class Utils {
+
+ // ===========================================================================================================================
+ // Class Methods
+ // ===========================================================================================================================
+
+ /**
+ * @param thisObj an object being compared
+ * @param thatObj the other object being compared
+ * @return <code>true</code> if both objects are null or both are not null and equal
+ * @since 0.6
+ */
+ public static boolean equivalent( Object thisObj,
+ Object thatObj ) {
+ // true if both objects are null
+ if (thisObj == null) {
+ return (thatObj == null);
+ }
+
+ if (thatObj == null) return false;
+ return thisObj.equals(thatObj);
+ }
+
+ // ===========================================================================================================================
+ // Constructors
+ // ===========================================================================================================================
+
+ /**
+ * Don't allow construction.
+ *
+ * @since 0.6
+ */
+ public Utils() {
+ // nothing to do
+ }
+
+}
Property changes on: branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/Utils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/IDnaObject.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/IDnaObject.java 2009-07-06 22:25:55 UTC (rev 1073)
+++ branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/IDnaObject.java 2009-07-07 18:53:08 UTC (rev 1074)
@@ -32,15 +32,6 @@
public interface IDnaObject {
/**
- * Compares all properties rather than just the properties that determine equality. Objects that are equal can be different.
- *
- * @param obj the object with which to compare
- * @return <code>true</code> if different
- * @since 0.6
- */
- boolean different( IDnaObject obj );
-
- /**
* @return the object name (never <code>null</code>)
* @since 0.6
*/
Modified: branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Repository.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Repository.java 2009-07-06 22:25:55 UTC (rev 1073)
+++ branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Repository.java 2009-07-07 18:53:08 UTC (rev 1074)
@@ -91,18 +91,6 @@
/**
* {@inheritDoc}
- *
- * @see org.jboss.dna.publish.domain.IDnaObject#different(org.jboss.dna.publish.domain.IDnaObject)
- * @since 0.6
- */
- @Override
- public boolean different( IDnaObject obj ) {
- // there are no fields not involved in equals check
- return !equals(obj);
- }
-
- /**
- * {@inheritDoc}
*
* @see java.lang.Object#equals(java.lang.Object)
* @since 0.6
Modified: branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Server.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Server.java 2009-07-06 22:25:55 UTC (rev 1073)
+++ branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Server.java 2009-07-07 18:53:08 UTC (rev 1074)
@@ -27,6 +27,7 @@
import net.jcip.annotations.Immutable;
import org.jboss.dna.publish.IConstants;
import org.jboss.dna.publish.Status;
+import org.jboss.dna.publish.Utils;
import org.jboss.dna.publish.domain.validation.RepositoryValidator;
import org.jboss.dna.publish.domain.validation.ServerValidator;
@@ -111,35 +112,6 @@
/**
* {@inheritDoc}
*
- * @see org.jboss.dna.publish.domain.IDnaObject#different(org.jboss.dna.publish.domain.IDnaObject)
- * @since 0.6
- */
- @Override
- public boolean different( IDnaObject obj ) {
- if (equals(obj)) {
- // check fields not involved in equals check
- Server otherServer = (Server)obj;
- boolean result = false;
-
- if (this.password == null) {
- result = (otherServer.password != null);
- } else {
- result = !this.password.equals(otherServer.password);
- }
-
- if (!result) {
- result = (this.persistPassword != otherServer.persistPassword);
- }
-
- return result;
- }
-
- return true;
- }
-
- /**
- * {@inheritDoc}
- *
* @see java.lang.Object#equals(java.lang.Object)
* @since 0.6
*/
@@ -150,7 +122,9 @@
// must have another server
Server otherServer = (Server)obj;
- return (this.url.equals(otherServer.url) && this.user.equals(otherServer.user));
+ return Utils.equivalent(this.url, otherServer.url) && Utils.equivalent(this.user, otherServer.user)
+ && Utils.equivalent(this.password, otherServer.password)
+ && Utils.equivalent(this.persistPassword, otherServer.persistPassword);
}
/**
@@ -210,7 +184,17 @@
public int hashCode() {
int hash = 7;
hash = 31 * hash + this.url.hashCode();
- hash = 31 * hash + this.user.hashCode();
+
+ if (this.user != null) {
+ hash = 31 * hash + this.user.hashCode();
+ }
+
+ if (this.password != null) {
+ hash = 31 * hash + this.password.hashCode();
+ }
+
+ hash = 31 * hash + Boolean.valueOf(this.persistPassword).hashCode();
+
return hash;
}
Modified: branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Workspace.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Workspace.java 2009-07-06 22:25:55 UTC (rev 1073)
+++ branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Workspace.java 2009-07-07 18:53:08 UTC (rev 1074)
@@ -89,18 +89,6 @@
/**
* {@inheritDoc}
- *
- * @see org.jboss.dna.publish.domain.IDnaObject#different(org.jboss.dna.publish.domain.IDnaObject)
- * @since 0.6
- */
- @Override
- public boolean different( IDnaObject obj ) {
- // there are no fields not involved in equals check
- return !equals(obj);
- }
-
- /**
- * {@inheritDoc}
*
* @see java.lang.Object#equals(java.lang.Object)
* @since 0.6
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/views/ServerView.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/views/ServerView.java 2009-07-06 22:25:55 UTC (rev 1073)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/views/ServerView.java 2009-07-07 18:53:08 UTC (rev 1074)
@@ -28,6 +28,8 @@
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
@@ -176,7 +178,13 @@
handleSelectionChanged(event);
}
});
-
+ this.viewer.addDoubleClickListener(new IDoubleClickListener() {
+ @Override
+ public void doubleClick( DoubleClickEvent arg0 ) {
+ handleDoubleClick();
+ }
+ });
+
// need to call this (doesn't matter what the param is) to bootstrap the provider.
this.viewer.setInput(this);
}
@@ -197,10 +205,10 @@
// register to receive changes to the server registry
getServerManager().addRegistryListener(this);
}
-
+
/**
* {@inheritDoc}
- *
+ *
* @see org.eclipse.ui.part.WorkbenchPart#dispose()
* @since 0.6
*/
@@ -227,6 +235,15 @@
}
/**
+ * Opens a dialog to edit server properties.
+ *
+ * @since 0.6
+ */
+ void handleDoubleClick() {
+ this.editAction.run();
+ }
+
+ /**
* @param event the event being processed
* @since 0.6
*/
@@ -242,13 +259,7 @@
*/
@Override
public Exception[] serverRegistryChanged( ServerRegistryEvent event ) {
- // FIXME viewer is not updating objects that have property changes that don't effect equality
- if (event.isUpdate()) {
- this.viewer.refresh(event.getUpdatedServer());
- } else {
- this.viewer.refresh();
- }
-
+ this.viewer.refresh();
return null;
}
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/PublishPage.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/PublishPage.java 2009-07-06 22:25:55 UTC (rev 1073)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/PublishPage.java 2009-07-07 18:53:08 UTC (rev 1074)
@@ -502,7 +502,7 @@
// load list with initial files
loadFiles();
}
-
+
{ // row 3
final Button chkRecurse = new Button(pnl, SWT.CHECK);
chkRecurse.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
@@ -543,7 +543,6 @@
setControl(pnlMain);
refreshServers();
- installLocationListeners(null);
}
/**
@@ -655,7 +654,6 @@
this.cbxRepository.addModifyListener(this);
this.cbxServer.addModifyListener(this);
this.cbxWorkspace.addModifyListener(this);
- this.listenerControlLock = listenerControlLock;
this.listenerControlLock = null;
}
}
@@ -886,11 +884,23 @@
super.setVisible(visible);
if (visible) {
- // set initial state
+ // set initial status
validate();
// set initial message
- setMessage((this.type == Type.PUBLISH) ? I18n.PublishPagePublishOkStatusMsg : I18n.PublishPageUnpublishOkStatusMsg);
+ String initialMsg = ((this.type == Type.PUBLISH) ? I18n.PublishPagePublishOkStatusMsg : I18n.PublishPageUnpublishOkStatusMsg);
+
+ // if no resources to publish set the message to that else set to initial message
+ if (!this.status.isOk()) {
+ if (I18n.PublishPageNoResourcesToPublishStatusMsg.equals(this.status.getMessage())
+ || I18n.PublishPageNoResourcesToUnpublishStatusMsg.equals(this.status.getMessage())) {
+ setErrorMessage(this.status.getMessage());
+ } else {
+ setMessage(initialMsg);
+ }
+ } else {
+ setMessage(initialMsg);
+ }
}
}
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerPage.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerPage.java 2009-07-06 22:25:55 UTC (rev 1073)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerPage.java 2009-07-07 18:53:08 UTC (rev 1074)
@@ -403,10 +403,11 @@
if (this.server == null) {
this.status = ServerValidator.isValid(this.url, this.user, this.password, this.savePassword, getServerManager());
} else {
+ // make sure all fields are valid without seeing if server exists in registry
this.status = ServerValidator.isValid(this.url, this.user, this.password, this.savePassword);
+ // if server is valid and is different from what we started with validate and check the registry
if (this.status.isOk() && !this.server.equals(getServer())) {
- // make sure changes don't make it equal to an existing server
this.status = ServerValidator.isValid(this.url, this.user, this.password, this.savePassword, getServerManager());
}
}
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerWizard.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerWizard.java 2009-07-06 22:25:55 UTC (rev 1073)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerWizard.java 2009-07-07 18:53:08 UTC (rev 1074)
@@ -133,7 +133,7 @@
if (status.isError()) {
MessageDialog.openError(getShell(), I18n.ErrorDialogTitle, I18n.ServerWizardEditServerErrorMsg);
}
- } else if (this.existingServer.different(server)) {
+ } else if (!this.existingServer.equals(server)) {
status = this.serverManager.updateServer(this.existingServer, server);
if (status.isError()) {
16 years, 6 months
DNA SVN: r1073 - in branches/eclipse: org.jboss.dna.publish/src/org/jboss/dna/publish/domain and 6 other directories.
by dna-commits@lists.jboss.org
Author: elvisisking
Date: 2009-07-06 18:25:55 -0400 (Mon, 06 Jul 2009)
New Revision: 1073
Added:
branches/eclipse/org.jboss.dna.publish.ui.swt/icons/views/collapse_all.gif
Removed:
branches/eclipse/org.jboss.dna.publish.ui.swt/icons/views/delete.gif
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Activator.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/I18n.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/IUiConstants.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/DeleteServerAction.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/EditServerAction.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/NewServerAction.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/i18n.properties
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/views/ServerView.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerPage.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerWizard.java
branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/ServerManager.java
branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/IDnaObject.java
branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Repository.java
branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Server.java
branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Workspace.java
branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/validation/ServerValidator.java
Log:
Got the save password stuff working and persisting. Images are working in views but will need to come up with some specialized images for the business objects. Finished making ServerManager thread safe.
Modified: branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/ServerManager.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/ServerManager.java 2009-07-05 00:16:52 UTC (rev 1072)
+++ branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/ServerManager.java 2009-07-06 22:25:55 UTC (rev 1073)
@@ -416,12 +416,13 @@
if (attributeMap == null) continue;
- for (int numAttrs = attributeMap.getLength(), j = 0; j < numAttrs; ++j) {
- Node urlNode = attributeMap.getNamedItem(URL_TAG);
- Node userNode = attributeMap.getNamedItem(USER_TAG);
- Node passwordNode = attributeMap.getNamedItem(PASSWORD_TAG);
- addServer(new Server(urlNode.getNodeValue(), userNode.getNodeValue(), passwordNode.getNodeValue()));
- }
+ Node urlNode = attributeMap.getNamedItem(URL_TAG);
+ Node userNode = attributeMap.getNamedItem(USER_TAG);
+ Node passwordNode = attributeMap.getNamedItem(PASSWORD_TAG);
+ String pswd = ((passwordNode == null) ? null : (String)passwordNode.getNodeValue());
+
+ // add server to registry
+ addServer(new Server(urlNode.getNodeValue(), userNode.getNodeValue(), pswd, (pswd != null)));
}
}
} catch (Exception e) {
@@ -458,7 +459,10 @@
serverElement.setAttribute(URL_TAG, server.getUrl());
serverElement.setAttribute(USER_TAG, server.getUser());
- serverElement.setAttribute(PASSWORD_TAG, server.getPassword());
+
+ if (server.isPasswordBeingPersisted()) {
+ serverElement.setAttribute(PASSWORD_TAG, server.getPassword());
+ }
}
DOMSource source = new DOMSource(doc);
@@ -503,23 +507,30 @@
*/
public Status updateServer( Server previousServerVersion,
Server newServerVersion ) {
- Status status = internalRemoveServer(previousServerVersion, false);
+ Status status = null;
- if (status.isOk()) {
- status = internalAddServer(newServerVersion, false);
+ try {
+ this.serverLock.writeLock().lock();
+ status = internalRemoveServer(previousServerVersion, false);
if (status.isOk()) {
- // all good so notify listeners
- Exception[] errors = notifyRegistryListeners(ServerRegistryEvent.createUpdateEvent(previousServerVersion,
- newServerVersion));
- return processRegistryListenerErrors(errors);
+ status = internalAddServer(newServerVersion, false);
+
+ if (status.isOk()) {
+ // all good so notify listeners
+ Exception[] errors = notifyRegistryListeners(ServerRegistryEvent.createUpdateEvent(previousServerVersion,
+ newServerVersion));
+ return processRegistryListenerErrors(errors);
+ }
+
+ // unexpected problem adding new version of server to registry
+ String pattern = MESSAGES.getString(ServerManagerRegistryUpdateAddError);
+ String msg = MessageFormat.format(pattern, status.getMessage());
+ status = new Status(Severity.ERROR, msg, status.getException());
+ return status;
}
-
- // unexpected problem adding new version of server to registry
- String pattern = MESSAGES.getString(ServerManagerRegistryUpdateAddError);
- String msg = MessageFormat.format(pattern, status.getMessage());
- status = new Status(Severity.ERROR, msg, status.getException());
- return status;
+ } finally {
+ this.serverLock.writeLock().unlock();
}
// unexpected problem removing server from registry
Modified: branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/IDnaObject.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/IDnaObject.java 2009-07-05 00:16:52 UTC (rev 1072)
+++ branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/IDnaObject.java 2009-07-06 22:25:55 UTC (rev 1073)
@@ -32,6 +32,15 @@
public interface IDnaObject {
/**
+ * Compares all properties rather than just the properties that determine equality. Objects that are equal can be different.
+ *
+ * @param obj the object with which to compare
+ * @return <code>true</code> if different
+ * @since 0.6
+ */
+ boolean different( IDnaObject obj );
+
+ /**
* @return the object name (never <code>null</code>)
* @since 0.6
*/
Modified: branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Repository.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Repository.java 2009-07-05 00:16:52 UTC (rev 1072)
+++ branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Repository.java 2009-07-06 22:25:55 UTC (rev 1073)
@@ -91,6 +91,18 @@
/**
* {@inheritDoc}
+ *
+ * @see org.jboss.dna.publish.domain.IDnaObject#different(org.jboss.dna.publish.domain.IDnaObject)
+ * @since 0.6
+ */
+ @Override
+ public boolean different( IDnaObject obj ) {
+ // there are no fields not involved in equals check
+ return !equals(obj);
+ }
+
+ /**
+ * {@inheritDoc}
*
* @see java.lang.Object#equals(java.lang.Object)
* @since 0.6
Modified: branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Server.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Server.java 2009-07-05 00:16:52 UTC (rev 1072)
+++ branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Server.java 2009-07-06 22:25:55 UTC (rev 1073)
@@ -51,6 +51,13 @@
private final String password;
/**
+ * Indicates if the password should be stored locally when the server is persisted.
+ *
+ * @since 0.6
+ */
+ private final boolean persistPassword;
+
+ /**
* The server URL.
*
* @since 0.6
@@ -74,15 +81,17 @@
* @param url the server URL
* @param user the server user
* @param password the server password
+ * @param persistPassword <code>true</code> if the password should be stored
* @see RepositoryValidator
* @throws RuntimeException if any of the input parameters are invalid
* @since 0.6
*/
public Server( String url,
String user,
- String password ) {
+ String password,
+ boolean persistPassword ) {
// valid inputs
- Status status = ServerValidator.isValid(url, user, password);
+ Status status = ServerValidator.isValid(url, user, password, persistPassword);
if (status.isError()) {
throw new RuntimeException(status.getMessage(), status.getException());
@@ -92,6 +101,7 @@
this.url = url;
this.user = user;
this.password = password;
+ this.persistPassword = persistPassword;
}
// ===========================================================================================================================
@@ -101,6 +111,35 @@
/**
* {@inheritDoc}
*
+ * @see org.jboss.dna.publish.domain.IDnaObject#different(org.jboss.dna.publish.domain.IDnaObject)
+ * @since 0.6
+ */
+ @Override
+ public boolean different( IDnaObject obj ) {
+ if (equals(obj)) {
+ // check fields not involved in equals check
+ Server otherServer = (Server)obj;
+ boolean result = false;
+
+ if (this.password == null) {
+ result = (otherServer.password != null);
+ } else {
+ result = !this.password.equals(otherServer.password);
+ }
+
+ if (!result) {
+ result = (this.persistPassword != otherServer.persistPassword);
+ }
+
+ return result;
+ }
+
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
* @see java.lang.Object#equals(java.lang.Object)
* @since 0.6
*/
@@ -175,4 +214,12 @@
return hash;
}
+ /**
+ * @return persistPassword <code>true</code> if the password is being persisted
+ * @since 0.6
+ */
+ public boolean isPasswordBeingPersisted() {
+ return this.persistPassword;
+ }
+
}
Modified: branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Workspace.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Workspace.java 2009-07-05 00:16:52 UTC (rev 1072)
+++ branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/Workspace.java 2009-07-06 22:25:55 UTC (rev 1073)
@@ -89,6 +89,18 @@
/**
* {@inheritDoc}
+ *
+ * @see org.jboss.dna.publish.domain.IDnaObject#different(org.jboss.dna.publish.domain.IDnaObject)
+ * @since 0.6
+ */
+ @Override
+ public boolean different( IDnaObject obj ) {
+ // there are no fields not involved in equals check
+ return !equals(obj);
+ }
+
+ /**
+ * {@inheritDoc}
*
* @see java.lang.Object#equals(java.lang.Object)
* @since 0.6
Modified: branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/validation/ServerValidator.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/validation/ServerValidator.java 2009-07-05 00:16:52 UTC (rev 1072)
+++ branches/eclipse/org.jboss.dna.publish/src/org/jboss/dna/publish/domain/validation/ServerValidator.java 2009-07-06 22:25:55 UTC (rev 1073)
@@ -85,15 +85,19 @@
}
/**
+ * This does not verify that a server with the same primary field values doesn't already exist.
+ *
* @param url the URL being validated
* @param user the user being validated
* @param password the password being validated
+ * @param persistPassword <code>true</code> if the password should be persisted
* @return a validation status (never <code>null</code>)
* @since 0.6
*/
public static Status isValid( String url,
String user,
- String password ) {
+ String password,
+ boolean persistPassword ) {
Status status = isUrlValid(url);
if (!status.isError()) {
@@ -108,23 +112,28 @@
}
/**
+ * Validates the server properties and makes sure no other exists in the server registry that also has the same primary field
+ * values.
+ *
* @param url the URL being validated
* @param user the user being validated
* @param password the password being validated
+ * @param persistPassword <code>true</code> if the password should be persisted
* @param serverManager the server manager controlling the server registry (may not be <code>null</code>)
* @return a validation status (never <code>null</code>)
- * @see #isValid(String, String, String)
+ * @see #isValid(String, String, String, boolean)
* @since 0.6
*/
public static Status isValid( String url,
String user,
String password,
+ boolean persistPassword,
ServerManager serverManager ) {
- Status status = isValid(url, user, password);
+ Status status = isValid(url, user, password, persistPassword);
// make sure a server with the same properties does not exist
if (!status.isError()) {
- Server newServer = new Server(url, user, password);
+ Server newServer = new Server(url, user, password, persistPassword);
if (serverManager.isRegistered(newServer)) {
String pattern = MESSAGES.getString(ServerExistsMsg);
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/icons/views/collapse_all.gif
===================================================================
(Binary files differ)
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/icons/views/collapse_all.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: branches/eclipse/org.jboss.dna.publish.ui.swt/icons/views/delete.gif
===================================================================
(Binary files differ)
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Activator.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Activator.java 2009-07-05 00:16:52 UTC (rev 1072)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Activator.java 2009-07-06 22:25:55 UTC (rev 1073)
@@ -23,14 +23,19 @@
*/
package org.jboss.dna.publish.ui.swt;
+import java.net.MalformedURLException;
+import java.net.URL;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.jboss.dna.publish.Logger;
import org.jboss.dna.publish.ServerManager;
import org.jboss.dna.publish.Status;
+import org.jboss.dna.publish.Status.Severity;
import org.jboss.dna.publish.domain.IDnaObject;
import org.jboss.dna.publish.domain.Repository;
import org.jboss.dna.publish.domain.Server;
@@ -73,6 +78,13 @@
// ===========================================================================================================================
/**
+ * The image used when the requested image cannot be found.
+ *
+ * @since 0.6
+ */
+ private Image missingImage;
+
+ /**
* The manager in charge of the server registry.
*
* @since 0.6
@@ -83,26 +95,55 @@
// Methods
// ===========================================================================================================================
- public Image getSharedImage(String imageId) {
- Image result = PlatformUI.getWorkbench().getSharedImages().getImage(imageId);
-
- if (result != null) {
- return result;
+ private ImageDescriptor createImageDescriptor( String key ) {
+ try {
+ URL url = new URL(getBundle().getEntry("/").toString() + key); //$NON-NLS-1$
+ return ImageDescriptor.createFromURL(url);
+ } catch (final MalformedURLException e) {
+ log(new Status(Severity.ERROR, I18n.bind(I18n.MissingImage, key), e));
+ return null;
}
-
- return ImageDescriptor.getMissingImageDescriptor().createImage();
}
- public ImageDescriptor getSharedImageDescriptor(String imageId) {
+ /**
+ * @return the image to use when a requested image cannot be found
+ * @since 0.6
+ */
+ private Image getMissingImage() {
+ if (this.missingImage == null) {
+ this.missingImage = ImageDescriptor.getMissingImageDescriptor().createImage();
+ }
+
+ return this.missingImage;
+ }
+
+ /**
+ * @param imageId the shared image identifier
+ * @return the image or <code>null</code>
+ * @see ISharedImages
+ * @since 0.6
+ */
+ public Image getSharedImage( String imageId ) {
+ Image result = PlatformUI.getWorkbench().getSharedImages().getImage(imageId);
+ return ((result == null) ? getMissingImage() : result);
+ }
+
+ /**
+ * @param imageId the shared image identifier
+ * @return the image descriptor or <code>null</code>
+ * @see ISharedImages
+ * @since 0.6
+ */
+ public ImageDescriptor getSharedImageDescriptor( String imageId ) {
ImageDescriptor result = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(imageId);
-
+
if (result != null) {
return result;
}
-
+
return ImageDescriptor.getMissingImageDescriptor();
}
-
+
/**
* @param object the object whose image is being requested (domain object or plugin-relative path)
* @return the image or <code>null</code> if not found
@@ -125,7 +166,21 @@
}
if (key != null) {
- return getImageRegistry().get(key);
+ ImageRegistry registry = getImageRegistry();
+ Image image = registry.get(key);
+
+ if (image == null) {
+ ImageDescriptor descriptor = createImageDescriptor(key);
+
+ if (descriptor == null) {
+ return getMissingImage();
+ }
+
+ image = descriptor.createImage();
+ registry.put(key, image);
+ }
+
+ return image;
}
return null;
@@ -153,7 +208,8 @@
}
if (key != null) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, ((String)object));
+ ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, ((String)object));
+ return ((descriptor == null) ? ImageDescriptor.getMissingImageDescriptor() : descriptor);
}
return null;
@@ -207,6 +263,10 @@
*/
@Override
public void stop( BundleContext context ) throws Exception {
+ if (missingImage != null) {
+ missingImage.dispose();
+ }
+
if (this.serverMgr != null) {
Status status = this.serverMgr.saveState();
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/I18n.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/I18n.java 2009-07-05 00:16:52 UTC (rev 1072)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/I18n.java 2009-07-06 22:25:55 UTC (rev 1073)
@@ -38,6 +38,7 @@
public static String CollapseActionToolTip;
+ public static String DeleteServerActionText;
public static String DeleteServerActionToolTip;
public static String DeleteServerDialogErrorsOccurredMsg;
@@ -45,10 +46,16 @@
public static String DeleteServerDialogOneServerMsg;
public static String DeleteServerDialogTitle;
+ public static String EditServerActionText;
public static String EditServerActionToolTip;
public static String ErrorDialogTitle;
+ public static String MissingImage;
+
+ public static String NewServerActionText;
+ public static String NewServerActionToolTip;
+
public static String PublishOperationPublishTaskName;
public static String PublishOperationPublishTitle;
public static String PublishOperationUnpublishTaskName;
@@ -104,8 +111,6 @@
public static String ServerWizardEditServerTitle;
public static String ServerWizardNewServerErrorMsg;
public static String ServerWizardNewServerTitle;
-
- public static String NewServerActionToolTip;
static {
// load message bundle
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/IUiConstants.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/IUiConstants.java 2009-07-05 00:16:52 UTC (rev 1072)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/IUiConstants.java 2009-07-06 22:25:55 UTC (rev 1073)
@@ -56,7 +56,7 @@
String VIEW_ICONS_FOLDER = ICON_PATH + "views/"; //$NON-NLS-1$
- String DELETE_SERVER_PATH = VIEW_ICONS_FOLDER + "delete.gif"; //$NON-NLS-1$
+ String COLLAPSE_ALL_IMAGE_PATH = VIEW_ICONS_FOLDER + "collapse_all.gif"; //$NON-NLS-1$
String EDIT_SERVER_IMAGE_PATH = VIEW_ICONS_FOLDER + "edit_server.gif"; //$NON-NLS-1$
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/DeleteServerAction.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/DeleteServerAction.java 2009-07-05 00:16:52 UTC (rev 1072)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/DeleteServerAction.java 2009-07-06 22:25:55 UTC (rev 1073)
@@ -83,10 +83,10 @@
*/
public DeleteServerAction( Shell shell,
ServerManager serverManager ) {
- super(""); //$NON-NLS-1$
+ super(I18n.DeleteServerActionText);
setToolTipText(I18n.DeleteServerActionToolTip);
- setImageDescriptor(Activator.getDefault().getSharedImageDescriptor(ISharedImages.IMG_ETOOL_DELETE));
- setDisabledImageDescriptor(Activator.getDefault().getSharedImageDescriptor(ISharedImages.IMG_ETOOL_DELETE_DISABLED));
+ setImageDescriptor(Activator.getDefault().getSharedImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
+ setDisabledImageDescriptor(Activator.getDefault().getSharedImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));
setEnabled(false);
this.serversToDelete = new ArrayList<Server>(5);
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/EditServerAction.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/EditServerAction.java 2009-07-05 00:16:52 UTC (rev 1072)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/EditServerAction.java 2009-07-06 22:25:55 UTC (rev 1073)
@@ -76,7 +76,7 @@
*/
public EditServerAction( Shell shell,
ServerManager serverManager ) {
- super(""); //$NON-NLS-1$
+ super(I18n.EditServerActionText);
setToolTipText(I18n.EditServerActionToolTip);
setImageDescriptor(Activator.getDefault().getImageDescriptor(EDIT_SERVER_IMAGE_PATH));
setEnabled(false);
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/NewServerAction.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/NewServerAction.java 2009-07-05 00:16:52 UTC (rev 1072)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/NewServerAction.java 2009-07-06 22:25:55 UTC (rev 1073)
@@ -26,7 +26,6 @@
import static org.jboss.dna.publish.ui.swt.IUiConstants.NEW_SERVER_IMAGE_PATH;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.actions.BaseSelectionListenerAction;
import org.jboss.dna.publish.ServerManager;
import org.jboss.dna.publish.ui.swt.Activator;
@@ -68,11 +67,9 @@
*/
public NewServerAction( Shell shell,
ServerManager serverManager ) {
- super(""); //$NON-NLS-1$
+ super(I18n.NewServerActionText);
setToolTipText(I18n.NewServerActionToolTip);
setImageDescriptor(Activator.getDefault().getImageDescriptor(NEW_SERVER_IMAGE_PATH));
- setImageDescriptor(Activator.getDefault().getSharedImageDescriptor(ISharedImages.IMG_ELCL_REMOVE));
-// setDisabledImageDescriptor(Activator.getDefault().getSharedImageDescriptor(ISharedImages.IMG_ETOOL_DELETE_DISABLED));
this.shell = shell;
this.serverManager = serverManager;
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/i18n.properties
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/i18n.properties 2009-07-05 00:16:52 UTC (rev 1072)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/i18n.properties 2009-07-06 22:25:55 UTC (rev 1073)
@@ -26,19 +26,24 @@
CollapseActionToolTip = Collapse All
-DeleteServerActionToolTip = Delete Server
+DeleteServerActionText = Delete Server
+DeleteServerActionToolTip = Delete server from the server registry
DeleteServerDialogErrorsOccurredMsg = There were errors deleting servers from the server registry. See log for more details.
DeleteServerDialogMultipleServersMsg = Are you sure you want to delete these {0} servers?
DeleteServerDialogOneServerMsg = Are you sure you want to delete the "{0}" server?
DeleteServerDialogTitle = Confirm Delete Server
-EditServerActionToolTip = Edit Server
+EditServerActionText = Edit Server
+EditServerActionToolTip = Edit server properties
ErrorDialogTitle = Error
-NewServerActionToolTip = New Server
+MissingImage = The following image cannot be found "{0}"
+NewServerActionText = New Server
+NewServerActionToolTip = Create and register a new server
+
PublishOperationPublishTaskName = Publishing resources
PublishOperationPublishTitle = Publish
PublishOperationUnpublishTaskName = Unpublishing resources
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/views/ServerView.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/views/ServerView.java 2009-07-05 00:16:52 UTC (rev 1072)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/views/ServerView.java 2009-07-06 22:25:55 UTC (rev 1073)
@@ -23,6 +23,7 @@
*/
package org.jboss.dna.publish.ui.swt.views;
+import static org.jboss.dna.publish.ui.swt.IUiConstants.COLLAPSE_ALL_IMAGE_PATH;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IToolBarManager;
@@ -35,7 +36,6 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.actions.BaseSelectionListenerAction;
import org.eclipse.ui.part.ViewPart;
import org.jboss.dna.publish.IServerRegistryListener;
@@ -117,7 +117,7 @@
};
this.collapseAllAction.setToolTipText(I18n.CollapseActionToolTip);
- this.collapseAllAction.setImageDescriptor(Activator.getDefault().getSharedImageDescriptor(ISharedImages.IMG_ELCL_COLLAPSEALL));
+ this.collapseAllAction.setImageDescriptor(Activator.getDefault().getImageDescriptor(COLLAPSE_ALL_IMAGE_PATH));
// the shell used for dialogs that the actions display
Shell shell = this.getSite().getShell();
@@ -167,7 +167,7 @@
*/
private void constructTreeViewer( Composite parent ) {
this.provider = new ServerContentProvider(getServerManager());
- this.viewer = new TreeViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL);
+ this.viewer = new TreeViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);
this.viewer.setContentProvider(this.provider);
this.viewer.setLabelProvider(this.provider);
this.viewer.addSelectionChangedListener(new ISelectionChangedListener() {
@@ -197,6 +197,18 @@
// register to receive changes to the server registry
getServerManager().addRegistryListener(this);
}
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.part.WorkbenchPart#dispose()
+ * @since 0.6
+ */
+ @Override
+ public void dispose() {
+ getServerManager().removeRegistryListener(this);
+ super.dispose();
+ }
/**
* @return the server manager being used by this view
@@ -230,7 +242,13 @@
*/
@Override
public Exception[] serverRegistryChanged( ServerRegistryEvent event ) {
- this.viewer.refresh();
+ // FIXME viewer is not updating objects that have property changes that don't effect equality
+ if (event.isUpdate()) {
+ this.viewer.refresh(event.getUpdatedServer());
+ } else {
+ this.viewer.refresh();
+ }
+
return null;
}
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerPage.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerPage.java 2009-07-05 00:16:52 UTC (rev 1072)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerPage.java 2009-07-06 22:25:55 UTC (rev 1073)
@@ -29,6 +29,8 @@
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
@@ -54,6 +56,13 @@
// ===========================================================================================================================
/**
+ * Indicates if the password should be persisted.
+ *
+ * @since 0.6
+ */
+ private boolean savePassword;
+
+ /**
* The user password needed to login to the server.
*
* @since 0.6
@@ -61,6 +70,13 @@
private String password;
/**
+ * The server being editor or <code>null</code> if creating a new server.
+ *
+ * @since 0.6
+ */
+ private Server server;
+
+ /**
* The current validation status.
*
* @since 0.6
@@ -106,10 +122,11 @@
super(ServerPage.class.getSimpleName());
setTitle(I18n.ServerPageTitle);
+ this.server = server;
this.url = server.getUrl();
this.user = server.getUser();
this.password = server.getPassword();
- setPageComplete(false);
+ this.savePassword = server.isPasswordBeingPersisted();
}
// ===========================================================================================================================
@@ -154,11 +171,12 @@
txtPassword.setToolTipText(I18n.ServerPagePasswordToolTip);
txtPassword.setEchoChar('*');
- // set initial value
+ // set initial value before hooking up listener
if (this.password != null) {
txtPassword.setText(this.password);
}
+ // listener for when value changes
txtPassword.addModifyListener(new ModifyListener() {
@Override
public void modifyText( ModifyEvent e ) {
@@ -167,13 +185,34 @@
});
}
- // FIXME implement save password
{ // save button row
- Button btn = new Button(pnl, SWT.CHECK | SWT.LEFT);
+ final Button btn = new Button(pnl, SWT.CHECK | SWT.LEFT);
btn.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
((GridData)btn.getLayoutData()).horizontalSpan = 2;
btn.setText(I18n.ServerPageSavePasswordButton);
btn.setToolTipText(I18n.ServerPageSavePasswordToolTip);
+
+ // set initial value before hooking up listeners
+ if (this.savePassword) {
+ btn.setSelection(true);
+ }
+
+ // listener for when value changes
+ btn.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected( SelectionEvent e ) {
+ handleSavePasswordChanged(((Button)e.widget).getSelection());
+ }
+ });
+
+ // update page message first time selected to get rid of initial message by forcing validation
+ btn.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected( SelectionEvent e ) {
+ updateInitialMessage();
+ btn.removeSelectionListener(this);
+ }
+ });
}
{ // save password message row
@@ -243,7 +282,7 @@
*/
public Server getServer() {
if (!this.status.isError()) {
- return new Server(this.url, this.user, this.password);
+ return new Server(this.url, this.user, this.password, this.savePassword);
}
// should never be called if error status
@@ -270,6 +309,14 @@
}
/**
+ * @param savePassword <code>true</code> if the password should be persisted on the local file system
+ * @since 0.6
+ */
+ void handleSavePasswordChanged( boolean savePassword ) {
+ this.savePassword = savePassword;
+ }
+
+ /**
* Handler for when the URL control value is modified
*
* @param newUrl the new URL value
@@ -292,6 +339,17 @@
}
/**
+ * If the initial message is being displayed do a validation.
+ *
+ * @since 0.6
+ */
+ void updateInitialMessage() {
+ if (I18n.ServerPageOkStatusMsg.equals(getMessage())) {
+ updateState();
+ }
+ }
+
+ /**
* {@inheritDoc}
*
* @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
@@ -342,7 +400,16 @@
* @since 0.6
*/
private void validate() {
- this.status = ServerValidator.isValid(this.url, this.user, this.password, getServerManager());
+ if (this.server == null) {
+ this.status = ServerValidator.isValid(this.url, this.user, this.password, this.savePassword, getServerManager());
+ } else {
+ this.status = ServerValidator.isValid(this.url, this.user, this.password, this.savePassword);
+
+ if (this.status.isOk() && !this.server.equals(getServer())) {
+ // make sure changes don't make it equal to an existing server
+ this.status = ServerValidator.isValid(this.url, this.user, this.password, this.savePassword, getServerManager());
+ }
+ }
}
}
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerWizard.java
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerWizard.java 2009-07-05 00:16:52 UTC (rev 1072)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerWizard.java 2009-07-06 22:25:55 UTC (rev 1073)
@@ -124,7 +124,7 @@
*/
@Override
public boolean performFinish() {
- Status status = null;
+ Status status = Status.OK_STATUS;
Server server = this.page.getServer();
if (this.existingServer == null) {
@@ -133,7 +133,7 @@
if (status.isError()) {
MessageDialog.openError(getShell(), I18n.ErrorDialogTitle, I18n.ServerWizardEditServerErrorMsg);
}
- } else {
+ } else if (this.existingServer.different(server)) {
status = this.serverManager.updateServer(this.existingServer, server);
if (status.isError()) {
16 years, 6 months
DNA SVN: r1072 - in trunk/extensions: dna-web-jcr-rest-war and 1 other directory.
by dna-commits@lists.jboss.org
Author: bcarothers
Date: 2009-07-04 20:16:52 -0400 (Sat, 04 Jul 2009)
New Revision: 1072
Modified:
trunk/extensions/dna-web-jcr-rest-war/pom.xml
trunk/extensions/dna-web-jcr-rest/pom.xml
Log:
DNA-473 Upgrade REST API to Latest Version of RESTEasy
Committed patch that upgrades RESTEasy version to 1.1.GA, adds separate HTTP servlet API dependency, and removes unused resteasy-client dependency.
Modified: trunk/extensions/dna-web-jcr-rest/pom.xml
===================================================================
--- trunk/extensions/dna-web-jcr-rest/pom.xml 2009-07-04 20:01:17 UTC (rev 1071)
+++ trunk/extensions/dna-web-jcr-rest/pom.xml 2009-07-05 00:16:52 UTC (rev 1072)
@@ -1,4 +1,5 @@
-<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">
+<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>
<artifactId>dna</artifactId>
@@ -15,12 +16,12 @@
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
- <version>1.1-RC2</version>
+ <version>1.1.GA</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxb-provider</artifactId>
- <version>1.1-RC2</version>
+ <version>1.1.GA</version>
<exclusions>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
@@ -29,8 +30,11 @@
</exclusions>
</dependency>
- <!-- This is only included as a temp. workaround. Current release of RESTEasy depends on 2.1.8, which is not in our repo at this time
- This should be removed after RESTEasy 1.1GA is released and added to this pom.
+ <!--
+ This is only included as a temp. workaround. Current release of
+ RESTEasy depends on 2.1.8, which is not in our repo at this time This
+ should be removed after RESTEasy 1.1GA is released and added to this
+ pom.
-->
<dependency>
<groupId>com.sun.xml.bind</groupId>
@@ -56,6 +60,13 @@
<artifactId>jcr</artifactId>
</dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>compile</scope>
+ </dependency>
+
<!-- TESTING DEPENDENCIES -->
<dependency>
<groupId>junit</groupId>
@@ -63,12 +74,6 @@
<version>4.4</version>
<scope>integration-test</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-client</artifactId>
- <version>1.0-beta-8</version>
- <scope>integration-test</scope>
- </dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
Modified: trunk/extensions/dna-web-jcr-rest-war/pom.xml
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/pom.xml 2009-07-04 20:01:17 UTC (rev 1071)
+++ trunk/extensions/dna-web-jcr-rest-war/pom.xml 2009-07-05 00:16:52 UTC (rev 1072)
@@ -32,12 +32,6 @@
<version>4.4</version>
<scope>integration-test</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-client</artifactId>
- <version>1.0-beta-8</version>
- <scope>integration-test</scope>
- </dependency>
</dependencies>
<build>
<finalName>resources</finalName>
16 years, 6 months
DNA SVN: r1071 - in trunk: dna-graph/src/main/java/org/jboss/dna/graph and 10 other directories.
by dna-commits@lists.jboss.org
Author: bcarothers
Date: 2009-07-04 16:01:17 -0400 (Sat, 04 Jul 2009)
New Revision: 1071
Modified:
trunk/dna-cnd/src/test/java/org/jboss/dna/cnd/CndImporterTest.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/Graph.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/connector/map/MapRequestProcessor.java
trunk/dna-graph/src/main/java/org/jboss/dna/graph/property/basic/GraphNamespaceRegistry.java
trunk/dna-graph/src/test/java/org/jboss/dna/graph/GraphTest.java
trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/federation/AbstractFederatedRepositorySourceIntegrationTest.java
trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/test/NotWritableConnectorTest.java
trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/test/WritableConnectorTest.java
trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrWorkspace.java
trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/RepositoryNodeTypeManager.java
trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/AbstractJcrAccessTest.java
trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/ImportExportTest.java
trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrSessionTest.java
trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrWorkspaceTest.java
trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/MixinTest.java
trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/RepositoryNodeTypeManagerTest.java
trunk/dna-repository/src/test/java/org/jboss/dna/repository/RepositoryServiceTest.java
trunk/dna-repository/src/test/java/org/jboss/dna/repository/sequencer/StreamSequencerAdapterTest.java
trunk/extensions/dna-connector-store-jpa/src/test/java/org/jboss/dna/connector/store/jpa/JpaConnectorWritingTest.java
Log:
DNA-448 The 'createIfMissing()' methods should be removed from the Graph API
Commited the DNA-448.patch patch to replace the existing Graph create and createIfMissing methods with a copy of the Graph.Batch create methods (modified to do direct writes, of course). This improves consistency between the direct and batched create methods, but forces the use of and() as a terminator to indicate that a set of create settings is complete and the request should be submitted.
The patch also removes the GetNodeConjunction class, which was only used by the now-deleted createIfMissing methods. It turns out that there was nowhere in the codebase that needed this functionality. As the previous implementation wasn't atomic anyway, the functionality can be replaced with an equivalent create call followed by a getNodeAt in non-batched mode.
Modified: trunk/dna-cnd/src/test/java/org/jboss/dna/cnd/CndImporterTest.java
===================================================================
--- trunk/dna-cnd/src/test/java/org/jboss/dna/cnd/CndImporterTest.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/dna-cnd/src/test/java/org/jboss/dna/cnd/CndImporterTest.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -82,7 +82,7 @@
// Set up the path where the content will go, and make sure that path exists in the repository ...
rootPath = context.getValueFactories().getPathFactory().create("/a");
- graph.create(rootPath);
+ graph.create(rootPath).and();
// Now set up the destination ...
destination = new GraphBatchDestination(graph.batch());
Modified: trunk/dna-graph/src/main/java/org/jboss/dna/graph/Graph.java
===================================================================
--- trunk/dna-graph/src/main/java/org/jboss/dna/graph/Graph.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/dna-graph/src/main/java/org/jboss/dna/graph/Graph.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -1037,229 +1037,145 @@
}
/**
- * Begin the request to create a node located at the supplied path. This request is submitted to the repository immediately.
+ * Begin the request to create a node located at the supplied path.
* <p>
- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient
- * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the
- * parent or new node.
+ * Like all other methods on the {@link Graph}, the request will be performed when the no-argument {@link Create#and()} method
+ * is called.
* </p>
*
* @param atPath the path to the node that is to be created.
- * @return an object that may be used to start another request
+ * @return the object that can be used to specify addition properties for the new node to be copied or the location of the
+ * node where the node is to be created
*/
- public Conjunction<Graph> create( String atPath ) {
- Path at = createPath(atPath);
- Path parent = at.getParent();
- Name child = at.getLastSegment().getName();
- requests.createNode(Location.create(parent), getCurrentWorkspaceName(), child, EMPTY_PROPERTIES);
- return nextGraph;
+ public Create<Graph> create( String atPath ) {
+ return create(createPath(atPath));
}
/**
- * Begin the request to create a node located at the supplied path. This request is submitted to the repository immediately.
+ * Begin the request to create a node located at the supplied path.
* <p>
- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient
- * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the
- * parent or new node.
+ * Like all other methods on the {@link Graph}, the request will be performed when the no-argument {@link Create#and()} method
+ * is called.
* </p>
*
- * @param at the path to the node that is to be created.
- * @return an object that may be used to start another request
+ * @param atPath the path to the node that is to be created.
+ * @param property a property for the new node
+ * @return the object that can be used to specify addition properties for the new node to be copied or the location of the
+ * node where the node is to be created
*/
- public Conjunction<Graph> create( final Path at ) {
- Path parent = at.getParent();
- Name child = at.getLastSegment().getName();
- requests.createNode(Location.create(parent), getCurrentWorkspaceName(), child, EMPTY_PROPERTIES);
- return nextGraph;
+ public Create<Graph> create( String atPath,
+ Property property ) {
+ return create(createPath(atPath)).with(property);
}
/**
- * Begin the request to create a node located at the supplied path. This request is submitted to the repository immediately.
+ * Begin the request to create a node located at the supplied path.
* <p>
- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient
- * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the
- * parent or new node.
+ * Like all other methods on the {@link Graph}, the request will be performed when the no-argument {@link Create#and()} method
+ * is called.
* </p>
*
* @param atPath the path to the node that is to be created.
- * @param properties the properties for the new node
- * @return an object that may be used to start another request
+ * @param firstProperty a property for the new node
+ * @param additionalProperties additional properties for the new node
+ * @return the object that can be used to specify addition properties for the new node to be copied or the location of the
+ * node where the node is to be created
*/
- public Conjunction<Graph> create( String atPath,
- Property... properties ) {
- Path at = createPath(atPath);
- Path parent = at.getParent();
- Name child = at.getLastSegment().getName();
- requests.createNode(Location.create(parent), getCurrentWorkspaceName(), child, properties);
- return nextGraph;
+ public Create<Graph> create( String atPath,
+ Property firstProperty,
+ Property... additionalProperties ) {
+ return create(createPath(atPath)).with(firstProperty, additionalProperties);
}
/**
- * Begin the request to create a node located at the supplied path. This request is submitted to the repository immediately.
+ * Begin the request to create a node located at the supplied path.
* <p>
- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient
- * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the
- * parent or new node.
+ * Like all other methods on the {@link Graph}, the request will be performed when the no-argument {@link Create#and()} method
+ * is called.
* </p>
*
* @param at the path to the node that is to be created.
- * @param properties the properties for the new node
- * @return an object that may be used to start another request
+ * @return the object that can be used to specify addition properties for the new node to be copied or the location of the
+ * node where the node is to be created
*/
- public Conjunction<Graph> create( Path at,
- Property... properties ) {
+ public final Create<Graph> create( Path at ) {
CheckArg.isNotNull(at, "at");
Path parent = at.getParent();
- Name child = at.getLastSegment().getName();
- requests.createNode(Location.create(parent), getCurrentWorkspaceName(), child, properties);
- return nextGraph;
+ Name name = at.getLastSegment().getName();
+ return create(Location.create(parent), name);
}
- /**
- * Begin the request to create a node located at the supplied path, if the node does not exist. This request is submitted to
- * the repository immediately.
- * <p>
- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient
- * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the
- * parent or new node.
- * </p>
- *
- * @param at the path to the node that is to be created.
- * @param properties the properties for the new node
- * @return an object that may be used to start another request
- */
- public Conjunction<Graph> create( Path at,
- Iterable<Property> properties ) {
- CheckArg.isNotNull(at, "at");
- Path parent = at.getParent();
- Name child = at.getLastSegment().getName();
- requests.createNode(Location.create(parent), getCurrentWorkspaceName(), child, properties.iterator());
- return nextGraph;
- }
+ protected final CreateAction<Graph> create( Location parent,
+ Name child ) {
+ return new CreateAction<Graph>(this, parent, getCurrentWorkspaceName(), child) {
+ @Override
+ protected Graph submit( Location parent,
+ String workspaceName,
+ Name childName,
+ Collection<Property> properties,
+ NodeConflictBehavior behavior ) {
+ requests.createNode(parent, workspaceName, childName, properties.iterator(), behavior);
+ return Graph.this;
+ }
- /**
- * Begin the request to create a node located at the supplied path, if the node does not exist. This request is submitted to
- * the repository immediately.
- * <p>
- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient
- * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the
- * parent or new node.
- * </p>
- *
- * @param atPath the path to the node that is to be created.
- * @return an object that may be used to start another request
- */
- public GetNodeConjunction<Graph> createIfMissing( String atPath ) {
- Path at = createPath(atPath);
- Path parent = at.getParent();
- Name child = at.getLastSegment().getName();
- Location location = requests.createNode(Location.create(parent),
- getCurrentWorkspaceName(),
- child,
- EMPTY_PROPERTIES,
- NodeConflictBehavior.UPDATE).getActualLocationOfNode();
- return new GetNodeOrReturnGraph(location);
+ };
}
/**
- * Begin the request to create a node located at the supplied path, if the node does not exist. This request is submitted to
- * the repository immediately.
+ * Begin the request to create a node located at the supplied path.
* <p>
- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient
- * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the
- * parent or new node.
+ * Like all other methods on the {@link Graph}, the request will be performed when the no-argument {@link Create#and()} method
+ * is called.
* </p>
*
* @param at the path to the node that is to be created.
- * @return an object that may be used to start another request
+ * @param properties the iterator over the properties for the new node
+ * @return the object that can be used to specify addition properties for the new node to be copied or the location of the
+ * node where the node is to be created
*/
- public GetNodeConjunction<Graph> createIfMissing( final Path at ) {
- Path parent = at.getParent();
- Name child = at.getLastSegment().getName();
- Location location = requests.createNode(Location.create(parent),
- getCurrentWorkspaceName(),
- child,
- EMPTY_PROPERTIES,
- NodeConflictBehavior.UPDATE).getActualLocationOfNode();
- return new GetNodeOrReturnGraph(location);
+ public Create<Graph> create( Path at,
+ Iterable<Property> properties ) {
+ Create<Graph> action = create(at);
+ for (Property property : properties) {
+ action.and(property);
+ }
+ return action;
}
/**
- * Begin the request to create a node located at the supplied path, if the node does not exist. This request is submitted to
- * the repository immediately.
+ * Begin the request to create a node located at the supplied path.
* <p>
- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient
- * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the
- * parent or new node.
+ * Like all other methods on the {@link Graph}, the request will be performed when the no-argument {@link Create#and()} method
+ * is called.
* </p>
*
- * @param atPath the path to the node that is to be created.
- * @param properties the properties for the new node
- * @return an object that may be used to start another request
- */
- public GetNodeConjunction<Graph> createIfMissing( String atPath,
- Property... properties ) {
- Path at = createPath(atPath);
- Path parent = at.getParent();
- Name child = at.getLastSegment().getName();
- Location location = requests.createNode(Location.create(parent),
- getCurrentWorkspaceName(),
- child,
- properties,
- NodeConflictBehavior.UPDATE).getActualLocationOfNode();
- return new GetNodeOrReturnGraph(location);
- }
-
- /**
- * Begin the request to create a node located at the supplied path, if the node does not exist. This request is submitted to
- * the repository immediately.
- * <p>
- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient
- * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the
- * parent or new node.
- * </p>
- *
* @param at the path to the node that is to be created.
- * @param properties the properties for the new node
- * @return an object that may be used to start another request
+ * @param property a property for the new node
+ * @return the object that can be used to specify addition properties for the new node to be copied or the location of the
+ * node where the node is to be created
*/
- public GetNodeConjunction<Graph> createIfMissing( Path at,
- Property... properties ) {
- CheckArg.isNotNull(at, "at");
- Path parent = at.getParent();
- Name child = at.getLastSegment().getName();
- Location location = requests.createNode(Location.create(parent),
- getCurrentWorkspaceName(),
- child,
- properties,
- NodeConflictBehavior.UPDATE).getActualLocationOfNode();
- return new GetNodeOrReturnGraph(location);
+ public Create<Graph> create( Path at,
+ Property property ) {
+ return create(at).with(property);
}
/**
- * Begin the request to create a node located at the supplied path, if the node does not exist. This request is submitted to
- * the repository immediately.
+ * Begin the request to create a node located at the supplied path.
* <p>
- * If you have the {@link Location} of the parent (for the new node) from a previous request, it is better and more efficient
- * to use {@link #createUnder(Location)}. However, this method work just as well if all you have is the {@link Path} to the
- * parent or new node.
+ * Like all other methods on the {@link Graph}, the request will be performed when the no-argument {@link Create#and()} method
+ * is called.
* </p>
*
* @param at the path to the node that is to be created.
- * @param properties the properties for the new node
- * @return an object that may be used to start another request
+ * @param firstProperty a property for the new node
+ * @param additionalProperties additional properties for the new node
+ * @return the object that can be used to specify addition properties for the new node to be copied or the location of the
+ * node where the node is to be created
*/
- public GetNodeConjunction<Graph> createIfMissing( Path at,
- Iterable<Property> properties ) {
- CheckArg.isNotNull(at, "at");
- Path parent = at.getParent();
- Name child = at.getLastSegment().getName();
- Location location = requests.createNode(Location.create(parent),
- getCurrentWorkspaceName(),
- child,
- properties.iterator(),
- NodeConflictBehavior.UPDATE).getActualLocationOfNode();
- return new GetNodeOrReturnGraph(location);
+ public Create<Graph> create( Path at,
+ Property firstProperty,
+ Property... additionalProperties ) {
+ return create(at).with(firstProperty, additionalProperties);
}
/**
@@ -3001,23 +2917,13 @@
requestQueue.createNode(parent, workspaceName, childName, properties.iterator(), behavior);
return Batch.this;
}
-
- /**
- * {@inheritDoc}
- *
- * @see org.jboss.dna.graph.Graph.Executable#execute()
- */
- public Results execute() {
- and();
- return Batch.this.execute();
- }
};
}
/**
* Begin the request to create a node located at the supplied path.
* <p>
- * Like all other methods on the {@link Batch}, the request will be performed when the {@link #execute()} method is
+ * Like all other methods on the {@link Batch}, the request will be performed when the {@link Batch#execute()} method is
* called.
* </p>
*
@@ -4389,7 +4295,7 @@
* @param <Next> The interface that is to be returned when this create request is completed
* @author Randall Hauch
*/
- public interface Create<Next> extends Conjunction<Next>, Executable<Node> {
+ public interface Create<Next> extends Conjunction<Next> {
/**
* Create the node only if there is no existing node with the same {@link Path.Segment#getName() name} (ignoring
* {@link Path.Segment#getIndex() same-name-sibling indexes}).
@@ -5442,33 +5348,6 @@
Node andReturn();
}
- protected class GetNodeOrReturnGraph implements GetNodeConjunction<Graph> {
- private final Location location;
-
- GetNodeOrReturnGraph( Location location ) {
- assert location != null;
- this.location = location;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.jboss.dna.graph.Graph.Conjunction#and()
- */
- public Graph and() {
- return Graph.this;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.jboss.dna.graph.Graph.GetNodeConjunction#andReturn()
- */
- public Node andReturn() {
- return and().getNodeAt(location);
- }
- }
-
// ----------------------------------------------------------------------------------------------------------------
// Node Implementation
// ----------------------------------------------------------------------------------------------------------------
@@ -6383,7 +6262,7 @@
*
* @see org.jboss.dna.graph.Graph.Create#ifAbsent()
*/
- public Create<T> ifAbsent() {
+ public CreateAction<T> ifAbsent() {
conflictBehavior = NodeConflictBehavior.DO_NOT_REPLACE;
return this;
}
@@ -6393,7 +6272,7 @@
*
* @see org.jboss.dna.graph.Graph.Create#orReplace()
*/
- public Create<T> orReplace() {
+ public CreateAction<T> orReplace() {
conflictBehavior = NodeConflictBehavior.REPLACE;
return this;
}
@@ -6403,7 +6282,7 @@
*
* @see org.jboss.dna.graph.Graph.Create#orUpdate()
*/
- public Create<T> orUpdate() {
+ public CreateAction<T> orUpdate() {
conflictBehavior = NodeConflictBehavior.UPDATE;
return this;
}
@@ -6413,7 +6292,7 @@
*
* @see org.jboss.dna.graph.Graph.Create#byAppending()
*/
- public Create<T> byAppending() {
+ public CreateAction<T> byAppending() {
conflictBehavior = NodeConflictBehavior.APPEND;
return this;
}
Modified: trunk/dna-graph/src/main/java/org/jboss/dna/graph/connector/map/MapRequestProcessor.java
===================================================================
--- trunk/dna-graph/src/main/java/org/jboss/dna/graph/connector/map/MapRequestProcessor.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/dna-graph/src/main/java/org/jboss/dna/graph/connector/map/MapRequestProcessor.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -201,9 +201,19 @@
}
switch (request.conflictBehavior()) {
case APPEND:
- case DO_NOT_REPLACE:
node = workspace.createNode(getExecutionContext(), parentNode, request.named(), uuid);
break;
+ case DO_NOT_REPLACE:
+ for (MapNode child : parentNode.getChildren()) {
+ if (request.named().equals(child.getName().getName())) {
+ node = child;
+ break;
+ }
+ }
+ if (node == null) {
+ node = workspace.createNode(getExecutionContext(), parentNode, request.named(), uuid);
+ }
+ break;
case REPLACE:
// See if the node already exists (this doesn't record an error on the request) ...
node = getTargetNode(workspace, null, Location.create(pathFactory.create(parent, request.named()), uuid));
Modified: trunk/dna-graph/src/main/java/org/jboss/dna/graph/property/basic/GraphNamespaceRegistry.java
===================================================================
--- trunk/dna-graph/src/main/java/org/jboss/dna/graph/property/basic/GraphNamespaceRegistry.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/dna-graph/src/main/java/org/jboss/dna/graph/property/basic/GraphNamespaceRegistry.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -88,7 +88,7 @@
this.store.getNodeAt(this.parentOfNamespaceNodes);
} catch (PathNotFoundException pnfe) {
// The node did not already exist - create it!
- this.store.create(parentOfNamespaceNodes);
+ this.store.create(parentOfNamespaceNodes).and();
this.store.set(JcrLexicon.PRIMARY_TYPE).on(parentOfNamespaceNodes).to(DnaLexicon.NAMESPACES);
}
}
@@ -314,9 +314,10 @@
Property uriProperty = store.getContext().getPropertyFactory().create(uriPropertyName, namespaceUri);
List<Property> props = new ArrayList<Property>(namespaceProperties);
props.add(uriProperty);
- Location actualLocation = store.createIfMissing(pathToNamespaceNode, props).andReturn().getLocation();
+ // Location actualLocation = store.createIfMissing(pathToNamespaceNode, props).andReturn().getLocation();
+ store.create(pathToNamespaceNode, props).ifAbsent().and();
- return getPrefixFor(actualLocation.getPath());
+ return getPrefixFor(pathToNamespaceNode);
}
} catch (PathNotFoundException e) {
Modified: trunk/dna-graph/src/test/java/org/jboss/dna/graph/GraphTest.java
===================================================================
--- trunk/dna-graph/src/test/java/org/jboss/dna/graph/GraphTest.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/dna-graph/src/test/java/org/jboss/dna/graph/GraphTest.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -432,32 +432,32 @@
@Test
public void shouldCreateNode() {
- graph.create(validPath);
+ graph.create(validPath).and();
assertThat(numberOfExecutions, is(1));
assertNextRequestIsCreate(Location.create(validPath.getParent()), "c");
assertNoMoreRequests();
- graph.create(validPath, validIdProperty1);
+ graph.create(validPath, validIdProperty1).and();
assertThat(numberOfExecutions, is(1));
assertNextRequestIsCreate(Location.create(validPath.getParent()), "c", validIdProperty1);
assertNoMoreRequests();
- graph.create(validPath, validIdProperty1, validIdProperty2);
+ graph.create(validPath, validIdProperty1, validIdProperty2).and();
assertThat(numberOfExecutions, is(1));
assertNextRequestIsCreate(Location.create(validPath.getParent()), "c", validIdProperty1, validIdProperty2);
assertNoMoreRequests();
- graph.create(validPathString);
+ graph.create(validPathString).and();
assertThat(numberOfExecutions, is(1));
assertNextRequestIsCreate(Location.create(validPath.getParent()), "c");
assertNoMoreRequests();
- graph.create(validPathString, validIdProperty1);
+ graph.create(validPathString, validIdProperty1).and();
assertThat(numberOfExecutions, is(1));
assertNextRequestIsCreate(Location.create(validPath.getParent()), "c", validIdProperty1);
assertNoMoreRequests();
- graph.create(validPathString, validIdProperty1, validIdProperty2);
+ graph.create(validPathString, validIdProperty1, validIdProperty2).and();
assertThat(numberOfExecutions, is(1));
assertNextRequestIsCreate(Location.create(validPath.getParent()), "c", validIdProperty1, validIdProperty2);
assertNoMoreRequests();
@@ -522,7 +522,7 @@
@Test
public void shouldCreateNodesWithBatch() {
graph.batch().create(validPath, validIdProperty1).and().remove("prop").on(validPathString).execute();
- graph.batch().move(validPath).and(validPath).into(validPathString).and().create(validPath).execute();
+ graph.batch().move(validPath).and(validPath).into(validPathString).and().create(validPath).and().execute();
graph.batch().createUnder(validLocation).nodeNamed("someName").and().delete(validLocation).execute();
}
Modified: trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/federation/AbstractFederatedRepositorySourceIntegrationTest.java
===================================================================
--- trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/federation/AbstractFederatedRepositorySourceIntegrationTest.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/federation/AbstractFederatedRepositorySourceIntegrationTest.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -94,10 +94,10 @@
configRepositorySource.setName("Configuration Repository");
configRepositorySource.setDefaultWorkspaceName(configurationWorkspaceName);
Graph config = Graph.create(configRepositorySource, context);
- config.create("/a");
- config.create("/a/b");
- config.create("/a/b/Test Repository");
- config.create("/a/b/Test Repository/dna:workspaces");
+ config.create("/a").and();
+ config.create("/a/b").and();
+ config.create("/a/b/Test Repository").and();
+ config.create("/a/b/Test Repository/dna:workspaces").and();
repositoryContext = new RepositoryContext() {
public ExecutionContext getExecutionContext() {
@@ -178,8 +178,8 @@
String projectionPath = wsPath + "/dna:projections/" + projectionName;
Graph config = Graph.create(configRepositorySource, context);
config.useWorkspace(configurationWorkspaceName);
- config.createIfMissing(wsPath);
- config.createIfMissing(wsPath + "/dna:projections");
+ config.create(wsPath).ifAbsent().and();
+ config.create(wsPath + "/dna:projections").ifAbsent().and();
config.createAt(projectionPath)
.with(DnaLexicon.PROJECTION_RULES, (Object[])projectionRules)
.with(DnaLexicon.SOURCE_NAME, sourceName)
Modified: trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/test/NotWritableConnectorTest.java
===================================================================
--- trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/test/NotWritableConnectorTest.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/test/NotWritableConnectorTest.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -75,7 +75,7 @@
@Test( expected = InvalidRequestException.class )
public void shouldNowAllowAddChildUnderRootNode() {
- graph.batch().create("/a").with("propB", "valueB").and("propC", "valueC").execute();
+ graph.batch().create("/a").with("propB", "valueB").and("propC", "valueC").and().execute();
}
@Test( expected = InvalidRequestException.class )
@@ -84,7 +84,7 @@
for (int i = 0; i != 100; ++i) {
create = create.with("property" + i, "value" + i);
}
- create.execute();
+ create.and().execute();
}
@Test( expected = InvalidRequestException.class )
Modified: trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/test/WritableConnectorTest.java
===================================================================
--- trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/test/WritableConnectorTest.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/dna-graph/src/test/java/org/jboss/dna/graph/connector/test/WritableConnectorTest.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -96,7 +96,7 @@
@Test
public void shouldAddChildUnderRootNode() {
- graph.batch().create("/a").with("propB", "valueB").and("propC", "valueC").execute();
+ graph.batch().create("/a").with("propB", "valueB").and("propC", "valueC").and().execute();
// Now look up the root node ...
Node root = graph.getNodeAt("/");
assertThat(root, is(notNullValue()));
@@ -115,7 +115,7 @@
public void shouldAddChildrenAndSettingProperties() {
graph.batch().set("propA").to("valueA").on("/").and().create("/a").with("propB", "valueB").and("propC", "valueC").and().create("/b").with("propD",
"valueD").and("propE",
- "valueE").execute();
+ "valueE").and().execute();
// Now look up the root node ...
Node root = graph.getNodeAt("/");
assertThat(root, is(notNullValue()));
@@ -159,7 +159,7 @@
for (int i = 0; i != 100; ++i) {
create = create.with("property" + i, "value" + i);
}
- create.execute();
+ create.and().execute();
// Now look up all the properties ...
Node nodeA = graph.getNodeAt("/a");
assertThat(nodeA, is(notNullValue()));
@@ -176,7 +176,7 @@
for (int i = 0; i != 10; ++i) {
create = create.with("property" + i, "value" + i);
}
- create.execute();
+ create.and().execute();
// Now look up all the properties ...
Node nodeA = graph.getNodeAt("/a");
@@ -217,7 +217,7 @@
}
create = create.with("largeProperty1", validLargeValues[0]);
create = create.with("largeProperty2", validLargeValues[1]);
- create.execute();
+ create.and().execute();
// Now look up all the properties ...
Node nodeA = graph.getNodeAt("/a");
@@ -828,7 +828,7 @@
graph.useWorkspace(defaultWorkspaceName);
- graph.create("/newUuids");
+ graph.create("/newUuids").and();
graph.copy("/node1").fromWorkspace(workspaceName).to("/newUuids/node1");
/*
@@ -865,7 +865,7 @@
graph.useWorkspace(defaultWorkspaceName);
- graph.create("/newUuids");
+ graph.create("/newUuids").and();
// Copy once to get the UUID into the default workspace
//graph.copy("/node1/node1/node1").failingIfUuidsMatch().fromWorkspace(workspaceName).to("/newUuids/node1");
graph.clone("/node1/node1/node1").fromWorkspace(workspaceName).as(name("node1")).into("/newUuids").failingIfAnyUuidsMatch();
@@ -902,7 +902,7 @@
graph.useWorkspace(defaultWorkspaceName);
- graph.create("/newUuids");
+ graph.create("/newUuids").and();
// Copy once to get the UUID into the default workspace
// graph.copy("/node1").replacingExistingNodesWithSameUuids().fromWorkspace(workspaceName).to("/newUuids/node1");
graph.clone("/node1").fromWorkspace(workspaceName).as(name("node1")).into("/newUuids").replacingExistingNodesWithSameUuids();
@@ -966,13 +966,13 @@
graph.useWorkspace(defaultWorkspaceName);
- graph.create("/segmentTestUuids");
+ graph.create("/segmentTestUuids").and();
// Copy once to get the UUID into the default workspace
graph.clone("/node1").fromWorkspace(workspaceName).as(name("node1")).into("/segmentTestUuids").failingIfAnyUuidsMatch();
// Create a new child node that in the target workspace that has no corresponding node in the source workspace
PropertyFactory propFactory = context.getPropertyFactory();
- graph.create("/segmentTestUuids/node1", propFactory.create(name("identifier"), "backup copy"));
+ graph.create("/segmentTestUuids/node1", propFactory.create(name("identifier"), "backup copy")).and();
// Copy again to test the behavior now that the UUIDs are already in the default workspace
// This should remove /newUuids/node1/shouldBeRemoved
Modified: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrWorkspace.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrWorkspace.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrWorkspace.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -159,7 +159,7 @@
Path root = pathFactory.createRootPath();
Path systemPath = pathFactory.create(root, JcrLexicon.SYSTEM);
Property systemPrimaryType = context.getPropertyFactory().create(JcrLexicon.PRIMARY_TYPE, DnaLexicon.SYSTEM);
- namespaceGraph.createIfMissing(systemPath, systemPrimaryType);
+ namespaceGraph.create(systemPath, systemPrimaryType).ifAbsent().and();
Name uriProperty = DnaLexicon.NAMESPACE_URI;
Path namespacesPath = pathFactory.create(systemPath, DnaLexicon.NAMESPACES);
Modified: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/RepositoryNodeTypeManager.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/RepositoryNodeTypeManager.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/RepositoryNodeTypeManager.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -927,7 +927,7 @@
PropertyFactory propertyFactory = context.getPropertyFactory();
graph.create(parentOfTypeNodes,
propertyFactory.create(JcrLexicon.PRIMARY_TYPE,
- DnaLexicon.NODE_TYPES.getString(context.getNamespaceRegistry())));
+ DnaLexicon.NODE_TYPES.getString(context.getNamespaceRegistry()))).and();
}
Graph.Batch batch = graph.batch();
Modified: trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/AbstractJcrAccessTest.java
===================================================================
--- trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/AbstractJcrAccessTest.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/AbstractJcrAccessTest.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -74,7 +74,7 @@
Graph graph = Graph.create(source, context);
// Make sure the path to the namespaces exists ...
- graph.create("/jcr:system"); // .and().create("/jcr:system/dna:namespaces");
+ graph.create("/jcr:system").and(); // .and().create("/jcr:system/dna:namespaces");
graph.set("jcr:primaryType").on("/jcr:system").to(DnaLexicon.SYSTEM);
// Stub out the connection factory ...
Modified: trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/ImportExportTest.java
===================================================================
--- trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/ImportExportTest.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/ImportExportTest.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -82,7 +82,7 @@
Graph graph = Graph.create(source, context);
// Make sure the path to the namespaces exists ...
- graph.create("/jcr:system"); // .and().create("/jcr:system/dna:namespaces");
+ graph.create("/jcr:system").and(); // .and().create("/jcr:system/dna:namespaces");
graph.set("jcr:primaryType").on("/jcr:system").to(DnaLexicon.SYSTEM);
// Stub out the connection factory ...
Modified: trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrSessionTest.java
===================================================================
--- trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrSessionTest.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrSessionTest.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -79,7 +79,7 @@
@Override
protected void initializeContent() {
- graph.create("/a").and().create("/a/b").and().create("/a/b/c");
+ graph.create("/a").and().create("/a/b").and().create("/a/b/c").and();
graph.set("booleanProperty").on("/a/b").to(true);
graph.set("stringProperty").on("/a/b/c").to("value");
graph.set("jcr:mixinTypes").on("/a").to("mix:lockable");
@@ -87,7 +87,7 @@
graph.set("multiLineProperty").on("/a/b/c").to(MULTI_LINE_VALUE);
// Make sure the path to the namespaces exists ...
- graph.create("/jcr:system").and().create("/jcr:system/dna:namespaces");
+ graph.create("/jcr:system").and().create("/jcr:system/dna:namespaces").and();
}
Modified: trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrWorkspaceTest.java
===================================================================
--- trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrWorkspaceTest.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrWorkspaceTest.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -64,13 +64,13 @@
@Override
protected void initializeContent() {
- graph.create("/a").and().create("/a/b").and().create("/a/b/c").and().create("/b");
+ graph.create("/a").and().create("/a/b").and().create("/a/b/c").and().create("/b").and();
graph.set("booleanProperty").on("/a/b").to(true);
graph.set("jcr:primaryType").on("/a/b").to("nt:unstructured");
graph.set("stringProperty").on("/a/b/c").to("value");
// Make sure the path to the namespaces exists ...
- graph.create("/jcr:system").and().create("/jcr:system/dna:namespaces");
+ graph.create("/jcr:system").and().create("/jcr:system/dna:namespaces").ifAbsent().and();
}
Modified: trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/MixinTest.java
===================================================================
--- trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/MixinTest.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/MixinTest.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -84,7 +84,7 @@
@Test( expected = IllegalArgumentException.class )
public void shouldNotAllowNullMixinTypeName() throws Exception {
- graph.create("/a");
+ graph.create("/a").and();
graph.set("jcr:primaryType").on("/a").to(PRIMARY_TYPE_A);
Node rootNode = session.getRootNode();
@@ -95,7 +95,7 @@
@Test( expected = IllegalArgumentException.class )
public void shouldNotAllowEmptyMixinTypeName() throws Exception {
- graph.create("/a");
+ graph.create("/a").and();
graph.set("jcr:primaryType").on("/a").to(PRIMARY_TYPE_A);
Node rootNode = session.getRootNode();
@@ -106,7 +106,7 @@
@Test( expected = NoSuchNodeTypeException.class )
public void shouldNotAllowInvalidMixinTypeName() throws Exception {
- graph.create("/a");
+ graph.create("/a").and();
graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(PRIMARY_TYPE_A);
Node rootNode = session.getRootNode();
@@ -126,7 +126,7 @@
@Test
public void shouldAllowAddingMixinIfNoConflict() throws Exception {
- graph.create("/a");
+ graph.create("/a").and();
graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(PRIMARY_TYPE_A);
graph.set(JcrLexicon.MIXIN_TYPES.getString(registry)).on("/a").to(JcrMixLexicon.REFERENCEABLE.getString(registry));
@@ -138,7 +138,7 @@
@Test
public void shouldNotAllowAddingMixinIfPrimaryTypeConflicts() throws Exception {
- graph.create("/a");
+ graph.create("/a").and();
graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(PRIMARY_TYPE_A);
graph.set(JcrLexicon.MIXIN_TYPES.getString(registry)).on("/a").to(JcrMixLexicon.REFERENCEABLE.getString(registry));
@@ -150,7 +150,7 @@
@Test
public void shouldNotAllowAddingMixinIfMixinTypeConflicts() throws Exception {
- graph.create("/a");
+ graph.create("/a").and();
graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(JcrNtLexicon.BASE.getString(registry));
graph.set(JcrLexicon.MIXIN_TYPES.getString(registry)).on("/a").to(MIXIN_TYPE_B);
@@ -162,7 +162,7 @@
@Test
public void shouldAutoCreateAutoCreatedPropertiesOnAddition() throws Exception {
- graph.create("/a");
+ graph.create("/a").and();
graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(JcrNtLexicon.BASE.getString(registry));
Node rootNode = session.getRootNode();
@@ -178,7 +178,7 @@
@Test
public void shouldAutoCreateAutoCreatedChildNodesOnAddition() throws Exception {
- graph.create("/a");
+ graph.create("/a").and();
graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(JcrNtLexicon.BASE.getString(registry));
Node rootNode = session.getRootNode();
@@ -194,7 +194,7 @@
@Test( expected = ConstraintViolationException.class )
public void shouldNotAllowAdditionIfResidualPropertyConflicts() throws Exception {
- graph.create("/a");
+ graph.create("/a").and();
graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(JcrNtLexicon.UNSTRUCTURED.getString(registry));
Node rootNode = session.getRootNode();
@@ -207,7 +207,7 @@
@Test
public void shouldAllowAdditionIfResidualPropertyDoesNotConflict() throws Exception {
- graph.create("/a");
+ graph.create("/a").and();
graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(JcrNtLexicon.UNSTRUCTURED.getString(registry));
Node rootNode = session.getRootNode();
@@ -220,7 +220,7 @@
@Test( expected = ConstraintViolationException.class )
public void shouldNotAllowAdditionIfResidualChildNodeConflicts() throws Exception {
- graph.create("/a").and().create("/a/" + CHILD_NODE_B);
+ graph.create("/a").and().create("/a/" + CHILD_NODE_B).and();
graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(JcrNtLexicon.UNSTRUCTURED.getString(registry));
graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a/" + CHILD_NODE_B).to(JcrNtLexicon.BASE.getString(registry));
@@ -233,7 +233,7 @@
@Test
public void shouldAllowAdditionIfResidualChildNodeDoesNotConflict() throws Exception {
- graph.create("/a").and().create("/a/" + CHILD_NODE_B);
+ graph.create("/a").and().create("/a/" + CHILD_NODE_B).and();
graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(JcrNtLexicon.UNSTRUCTURED.getString(registry));
graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a/" + CHILD_NODE_B).to(JcrNtLexicon.UNSTRUCTURED.getString(registry));
@@ -260,7 +260,7 @@
@Test
public void shouldAllowSettingNewPropertyAfterAddingMixin() throws Exception {
- graph.create("/a");
+ graph.create("/a").and();
graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(PRIMARY_TYPE_A);
graph.set(JcrLexicon.MIXIN_TYPES.getString(registry)).on("/a").to(JcrMixLexicon.REFERENCEABLE.getString(registry));
@@ -283,7 +283,7 @@
@Test
public void shouldAllowAddingNewChildNodeAfterAddingMixin() throws Exception {
- graph.create("/a");
+ graph.create("/a").and();
graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(PRIMARY_TYPE_A);
graph.set(JcrLexicon.MIXIN_TYPES.getString(registry)).on("/a").to(JcrMixLexicon.REFERENCEABLE.getString(registry));
@@ -370,7 +370,7 @@
@Test( expected = ConstraintViolationException.class )
public void shouldNotAllowRemovalIfExistingChildNodeWouldHaveNoDefinition() throws Exception {
- graph.create("/a").and().create("/a/nodeB");
+ graph.create("/a").and().create("/a/nodeB").and();
graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(PRIMARY_TYPE_A);
graph.set(JcrLexicon.MIXIN_TYPES.getString(registry)).on("/a").to(MIXIN_TYPE_B);
Modified: trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/RepositoryNodeTypeManagerTest.java
===================================================================
--- trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/RepositoryNodeTypeManagerTest.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/RepositoryNodeTypeManagerTest.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -65,10 +65,10 @@
@Override
protected void initializeContent() {
// Make sure the path to the namespaces exists ...
- graph.create("/jcr:system"); // .and().create("/jcr:system/dna:namespaces");
+ graph.create("/jcr:system").and(); // .and().create("/jcr:system/dna:namespaces");
graph.set("jcr:primaryType").on("/jcr:system").to(DnaLexicon.SYSTEM);
- graph.create("/a").and().create("/a/b").and().create("/a/b/c");
+ graph.create("/a").and().create("/a/b").and().create("/a/b/c").and();
graph.set("jcr:mixinTypes").on("/a").to(JcrMixLexicon.REFERENCEABLE);
}
Modified: trunk/dna-repository/src/test/java/org/jboss/dna/repository/RepositoryServiceTest.java
===================================================================
--- trunk/dna-repository/src/test/java/org/jboss/dna/repository/RepositoryServiceTest.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/dna-repository/src/test/java/org/jboss/dna/repository/RepositoryServiceTest.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -119,7 +119,7 @@
@Test
public void shouldStartUpUsingConfigurationRepositoryThatContainsNoSources() throws Exception {
// Set up the configuration repository to contain NO sources ...
- configRepository.create("/dna:sources");
+ configRepository.create("/dna:sources").and();
// Now, start up the service ...
service.getAdministrator().start();
@@ -132,8 +132,8 @@
public void shouldStartUpAndCreateRepositoryUsingConfigurationRepositoryThatContainsNoSources() {
// Set up the configuration repository ...
configRepository.useWorkspace("default");
- configRepository.create("/dna:sources");
- configRepository.create("/dna:sources/source A");
+ configRepository.create("/dna:sources").and();
+ configRepository.create("/dna:sources/source A").and();
final String className = InMemoryRepositorySource.class.getName();
configRepository.set(DnaLexicon.CLASSNAME).on("/dna:sources/source A").to(className);
@@ -141,13 +141,13 @@
configRepository.set("retryLimit").on("/dna:sources/source A").to(3);
String fedReposPath = "/dna:repositories/fed repos/";
- configRepository.create("/dna:repositories");
- configRepository.create("/dna:repositories/fed repos");
- configRepository.create("/dna:repositories/fed repos/dna:regions");
- configRepository.create("/dna:repositories/fed repos/dna:regions/source A");
- configRepository.create("/dna:repositories/fed repos/dna:regions/source B");
- configRepository.create("/dna:repositories/fed repos/dna:regions/source C");
- configRepository.create("/dna:repositories/fed repos/dna:regions/source D");
+ configRepository.create("/dna:repositories").and();
+ configRepository.create("/dna:repositories/fed repos").and();
+ configRepository.create("/dna:repositories/fed repos/dna:regions").and();
+ configRepository.create("/dna:repositories/fed repos/dna:regions/source A").and();
+ configRepository.create("/dna:repositories/fed repos/dna:regions/source B").and();
+ configRepository.create("/dna:repositories/fed repos/dna:regions/source C").and();
+ configRepository.create("/dna:repositories/fed repos/dna:regions/source D").and();
configRepository.set(DnaLexicon.TIME_TO_EXPIRE).on(fedReposPath).to(20000);
configRepository.set(DnaLexicon.PROJECTION_RULES).on(fedReposPath + "dna:regions/source A").to("/a/b/c => /sx/sy");
configRepository.set(DnaLexicon.PROJECTION_RULES).on(fedReposPath + "dna:regions/source B").to("/ => /");
@@ -193,9 +193,9 @@
// Set up the configuration repository ...
configRepository.useWorkspace("default");
- configRepository.create("/dna:system");
- configRepository.create("/dna:system/dna:sources");
- configRepository.create("/dna:system/dna:sources/source A");
+ configRepository.create("/dna:system").and();
+ configRepository.create("/dna:system/dna:sources").and();
+ configRepository.create("/dna:system/dna:sources/source A").and();
final String className = FakeRepositorySource.class.getName();
configRepository.set(DnaLexicon.CLASSNAME).on("/dna:system/dna:sources/source A").to(className);
Modified: trunk/dna-repository/src/test/java/org/jboss/dna/repository/sequencer/StreamSequencerAdapterTest.java
===================================================================
--- trunk/dna-repository/src/test/java/org/jboss/dna/repository/sequencer/StreamSequencerAdapterTest.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/dna-repository/src/test/java/org/jboss/dna/repository/sequencer/StreamSequencerAdapterTest.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -68,15 +68,15 @@
private StreamSequencer streamSequencer;
private StreamSequencerAdapter sequencer;
- private String[] validExpressions = {"/a/* => /output"};
- private SequencerConfig validConfig = new SequencerConfig("name", "desc", Collections.<String, Object>emptyMap(),
+ private final String[] validExpressions = {"/a/* => /output"};
+ private final SequencerConfig validConfig = new SequencerConfig("name", "desc", Collections.<String, Object>emptyMap(),
"something.class", null, validExpressions);
private SequencerOutputMap sequencerOutput;
- private String sampleData = "The little brown fox didn't something bad.";
+ private final String sampleData = "The little brown fox didn't something bad.";
private ExecutionContext context;
private SequencerContext seqContext;
- private String repositorySourceName = "repository";
- private String repositoryWorkspaceName = "";
+ private final String repositorySourceName = "repository";
+ private final String repositoryWorkspaceName = "";
private Problems problems;
private Graph graph;
private Property sequencedProperty;
@@ -124,8 +124,8 @@
};
StreamSequencerAdapter adapter = new StreamSequencerAdapter(streamSequencer);
- graph.create("/a").and().create("/a/b").and().create("/a/b/c");
- graph.create("/d").and().create("/d/e");
+ graph.create("/a").and().create("/a/b").and().create("/a/b/c").and();
+ graph.create("/d").and().create("/d/e").and();
graph.set("sequencedProperty").on("/a/b/c").to(new ByteArrayInputStream(sampleData.getBytes()));
Node inputNode = graph.getNodeAt("/a/b/c");
@@ -174,8 +174,8 @@
public void shouldExecuteSequencerOnExistingNodeAndOutputToExistingNode() throws Exception {
// Set up the repository for the test ...
- graph.create("/a").and().create("/a/b").and().create("/a/b/c");
- graph.create("/d").and().create("/d/e");
+ graph.create("/a").and().create("/a/b").and().create("/a/b/c").and();
+ graph.create("/d").and().create("/d/e").and();
graph.set("sequencedProperty").on("/a/b/c").to(new ByteArrayInputStream(sampleData.getBytes()));
Node nodeC = graph.getNodeAt("/a/b/c");
Node nodeE = graph.getNodeAt("/d/e");
@@ -209,8 +209,8 @@
public void shouldExecuteSequencerOnExistingNodeWithMissingSequencedPropertyAndOutputToExistingNode() throws Exception {
// Set up the repository for the test ...
- graph.create("/a").and().create("/a/b").and().create("/a/b/c");
- graph.create("/d").and().create("/d/e");
+ graph.create("/a").and().create("/a/b").and().create("/a/b/c").and();
+ graph.create("/d").and().create("/d/e").and();
Node nodeC = graph.getNodeAt("/a/b/c");
Node nodeE = graph.getNodeAt("/d/e");
assertThat(nodeC, is(notNullValue()));
@@ -245,8 +245,8 @@
public void shouldExecuteSequencerOnExistingNodeAndOutputToMultipleExistingNodes() throws Exception {
// Set up the repository for the test ...
- graph.create("/a").and().create("/a/b").and().create("/a/b/c");
- graph.create("/d").and().create("/d/e");
+ graph.create("/a").and().create("/a/b").and().create("/a/b/c").and();
+ graph.create("/d").and().create("/d/e").and();
// Set the property that will be sequenced ...
graph.set("sequencedProperty").on("/a/b/c").to(new ByteArrayInputStream(sampleData.getBytes()));
@@ -286,7 +286,7 @@
public void shouldExecuteSequencerOnExistingNodeAndOutputToNonExistingNode() throws Exception {
// Set up the repository for the test ...
- graph.create("/a").and().create("/a/b").and().create("/a/b/c");
+ graph.create("/a").and().create("/a/b").and().create("/a/b/c").and();
// Set the property that will be sequenced ...
graph.set("sequencedProperty").on("/a/b/c").to(new ByteArrayInputStream(sampleData.getBytes()));
@@ -325,7 +325,7 @@
public void shouldExecuteSequencerOnExistingNodeAndOutputToMultipleNonExistingNodes() throws Exception {
// Set up the repository for the test ...
- graph.create("/a").and().create("/a/b").and().create("/a/b/c");
+ graph.create("/a").and().create("/a/b").and().create("/a/b/c").and();
// Set the property that will be sequenced ...
graph.set("sequencedProperty").on("/a/b/c").to(new ByteArrayInputStream(sampleData.getBytes()));
@@ -430,7 +430,7 @@
@Test( expected = java.lang.AssertionError.class )
public void shouldNotAllowNullSequencedProperty() throws Exception {
- graph.create("/a");
+ graph.create("/a").and();
Node input = graph.getNodeAt("/a");
sequencer.createStreamSequencerContext(input, null, seqContext, problems);
}
@@ -439,7 +439,7 @@
public void shouldNotAllowNullExecutionContext() throws Exception {
this.sequencedProperty = mock(Property.class);
- graph.create("/a");
+ graph.create("/a").and();
Node input = graph.getNodeAt("/a");
sequencer.createStreamSequencerContext(input, sequencedProperty, null, problems);
}
@@ -448,7 +448,7 @@
public void shouldProvideNamespaceRegistry() throws Exception {
this.sequencedProperty = mock(Property.class);
- graph.create("/a").and().create("/a/b").and().create("/a/b/c");
+ graph.create("/a").and().create("/a/b").and().create("/a/b/c").and();
Node input = graph.getNodeAt("/a/b/c");
StreamSequencerContext sequencerContext = sequencer.createStreamSequencerContext(input,
sequencedProperty,
@@ -461,7 +461,7 @@
public void shouldProvideValueFactories() throws Exception {
this.sequencedProperty = mock(Property.class);
- graph.create("/a").and().create("/a/b").and().create("/a/b/c");
+ graph.create("/a").and().create("/a/b").and().create("/a/b/c").and();
Node input = graph.getNodeAt("/a/b/c");
StreamSequencerContext sequencerContext = sequencer.createStreamSequencerContext(input,
sequencedProperty,
@@ -474,7 +474,7 @@
public void shouldProvidePathToInput() throws Exception {
this.sequencedProperty = mock(Property.class);
- graph.create("/a").and().create("/a/b").and().create("/a/b/c");
+ graph.create("/a").and().create("/a/b").and().create("/a/b/c").and();
Node input = graph.getNodeAt("/a/b/c");
StreamSequencerContext sequencerContext = sequencer.createStreamSequencerContext(input,
sequencedProperty,
@@ -487,7 +487,7 @@
public void shouldNeverReturnNullInputProperties() throws Exception {
this.sequencedProperty = mock(Property.class);
- graph.create("/a").and().create("/a/b").and().create("/a/b/c");
+ graph.create("/a").and().create("/a/b").and().create("/a/b/c").and();
Node input = graph.getNodeAt("/a/b/c");
StreamSequencerContext sequencerContext = sequencer.createStreamSequencerContext(input,
sequencedProperty,
@@ -501,7 +501,7 @@
public void shouldProvideInputProperties() throws Exception {
this.sequencedProperty = mock(Property.class);
- graph.create("/a").and().create("/a/b").and().create("/a/b/c");
+ graph.create("/a").and().create("/a/b").and().create("/a/b/c").and();
graph.set("x").on("/a/b/c").to(true);
graph.set("y").on("/a/b/c").to(Arrays.asList(new String[] {"asdf", "xyzzy"}));
Node input = graph.getNodeAt("/a/b/c");
@@ -521,7 +521,7 @@
public void shouldCreateSequencerContextThatProvidesMimeType() throws Exception {
this.sequencedProperty = mock(Property.class);
- graph.create("/a").and().create("/a/b").and().create("/a/b/c");
+ graph.create("/a").and().create("/a/b").and().create("/a/b/c").and();
Node input = graph.getNodeAt("/a/b/c");
StreamSequencerContext sequencerContext = sequencer.createStreamSequencerContext(input,
sequencedProperty,
Modified: trunk/extensions/dna-connector-store-jpa/src/test/java/org/jboss/dna/connector/store/jpa/JpaConnectorWritingTest.java
===================================================================
--- trunk/extensions/dna-connector-store-jpa/src/test/java/org/jboss/dna/connector/store/jpa/JpaConnectorWritingTest.java 2009-07-04 13:16:05 UTC (rev 1070)
+++ trunk/extensions/dna-connector-store-jpa/src/test/java/org/jboss/dna/connector/store/jpa/JpaConnectorWritingTest.java 2009-07-04 20:01:17 UTC (rev 1071)
@@ -90,14 +90,14 @@
graph.useWorkspace(defaultWorkspaceName);
- graph.create("/newUuids");
+ graph.create("/newUuids").and();
// Copy once to get the UUID into the default workspace
//graph.copy("/node1").replacingExistingNodesWithSameUuids().fromWorkspace(workspaceName).to("/newUuids/node1");
graph.clone("/node1").fromWorkspace(workspaceName).as(name("node1")).into("/newUuids").replacingExistingNodesWithSameUuids();
// Create a new child node that in the target workspace that has no corresponding node in the source workspace
- graph.create("/newUuids/node1/shouldBeRemoved");
- graph.create("/refererringNode");
+ graph.create("/newUuids/node1/shouldBeRemoved").and();
+ graph.create("/refererringNode").and();
graph.set("refProp").on("/refererringNode").to(graph.getNodeAt("/newUuids/node1/shouldBeRemoved"));
// Now create a reference to this new node
16 years, 6 months