Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2013-01-06 14:24:18 -0500
committerChristian W. Damus2013-01-07 08:56:48 -0500
commitf81041496d650d8dfb3410890fcdface9f3d07fb (patch)
tree287436cf8fe65696941a1defdce41e683d1a3049
parent5d6560c638d56707536fb0cd5beda2ca323b93b6 (diff)
downloadcdo-f81041496d650d8dfb3410890fcdface9f3d07fb.tar.gz
cdo-f81041496d650d8dfb3410890fcdface9f3d07fb.tar.xz
cdo-f81041496d650d8dfb3410890fcdface9f3d07fb.zip
Fix spurious diffs
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_280102_Test.java90
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/defs/TCPAcceptorDefImplTest.java226
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/defs/TCPConnectorDefImplTest.java252
-rw-r--r--plugins/org.gastro.server.web/src-gen/templates/MenuCardTemplate.java124
4 files changed, 346 insertions, 346 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_280102_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_280102_Test.java
index e5b4de3e10..16359b3cea 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_280102_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_280102_Test.java
@@ -1,45 +1,45 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Simon McDuff - initial API and implementation
- * Eike Stepper - maintenance
- */
-package org.eclipse.emf.cdo.tests.bugzilla;
-
-import org.eclipse.emf.cdo.eresource.CDOResource;
-import org.eclipse.emf.cdo.session.CDOSession;
-import org.eclipse.emf.cdo.tests.AbstractCDOTest;
-import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.cdo.view.CDOView;
-
-/**
- * 280102: CDOView.getRootResource() throws exception on an empty repository
- * <p>
- * See https://bugs.eclipse.org/280102
- *
- * @author Víctor Roldan Betancort
- */
-public class Bugzilla_280102_Test extends AbstractCDOTest
-{
- public void testRootResourceInTransaction() throws Exception
- {
- CDOSession session = openSession();
- CDOTransaction transaction = session.openTransaction();
- CDOResource root = transaction.getRootResource();
- assertEquals(true, root.isRoot());
- transaction.commit();
- }
-
- public void testRootResourceInReadOnlyView() throws Exception
- {
- CDOSession session = openSession();
- CDOView view = session.openView();
- CDOResource root = view.getRootResource();
- assertEquals(true, root.isRoot());
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Simon McDuff - initial API and implementation
+ * Eike Stepper - maintenance
+ */
+package org.eclipse.emf.cdo.tests.bugzilla;
+
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.view.CDOView;
+
+/**
+ * 280102: CDOView.getRootResource() throws exception on an empty repository
+ * <p>
+ * See https://bugs.eclipse.org/280102
+ *
+ * @author Víctor Roldan Betancort
+ */
+public class Bugzilla_280102_Test extends AbstractCDOTest
+{
+ public void testRootResourceInTransaction() throws Exception
+ {
+ CDOSession session = openSession();
+ CDOTransaction transaction = session.openTransaction();
+ CDOResource root = transaction.getRootResource();
+ assertEquals(true, root.isRoot());
+ transaction.commit();
+ }
+
+ public void testRootResourceInReadOnlyView() throws Exception
+ {
+ CDOSession session = openSession();
+ CDOView view = session.openView();
+ CDOResource root = view.getRootResource();
+ assertEquals(true, root.isRoot());
+ }
+}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/defs/TCPAcceptorDefImplTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/defs/TCPAcceptorDefImplTest.java
index d19a060a0b..2d80b220ce 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/defs/TCPAcceptorDefImplTest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/defs/TCPAcceptorDefImplTest.java
@@ -1,113 +1,113 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Andre Dietisheim - initial API and implementation
- * Eike Stepper - maintenance
- */
-package org.eclipse.net4j.tests.defs;
-
-import org.eclipse.net4j.defs.Net4jDefsFactory;
-import org.eclipse.net4j.defs.TCPAcceptorDef;
-import org.eclipse.net4j.internal.tcp.TCPConnector;
-import org.eclipse.net4j.tcp.ITCPAcceptor;
-import org.eclipse.net4j.util.defs.ChallengeNegotiatorDef;
-import org.eclipse.net4j.util.defs.Net4jUtilDefsFactory;
-import org.eclipse.net4j.util.defs.User;
-import org.eclipse.net4j.util.defs.UserManagerDef;
-import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
-import org.eclipse.net4j.util.tests.AbstractOMTest;
-
-/**
- * @author Andre Dietisheim
- */
-public class TCPAcceptorDefImplTest extends AbstractOMTest
-{
- private static final long TIMEOUT = 10000;
-
- private static final long DELAY = 500;
-
- private static final String HOST = "localhost"; //$NON-NLS-1$
-
- private static final int PORT = 2036;
-
- private static final String USERID = "André"; //$NON-NLS-1$
-
- private static final String PASSWORD = "aPassword"; //$NON-NLS-1$
-
- private TCPConnector tcpConnector;
-
- @Override
- protected void doSetUp() throws Exception
- {
- tcpConnector = Util.createTCPClientConnector(HOST, PORT, Util.createTCPSelector());
- }
-
- @Override
- protected void doTearDown() throws Exception
- {
- LifecycleUtil.deactivate(tcpConnector);
- }
-
- public void testAcceptorDefOpensConnection()
- {
- TCPAcceptorDef tcpAcceptorDef = createTCPAcceptorDef();
-
- ITCPAcceptor tcpAcceptor = (ITCPAcceptor)tcpAcceptorDef.getInstance();
-
- assertEquals(true, LifecycleUtil.isActive(tcpAcceptor));
-
- LifecycleUtil.activate(tcpConnector);
- tcpConnector.waitForConnection(DELAY + TIMEOUT);
- assertEquals(true, LifecycleUtil.isActive(tcpConnector));
-
- LifecycleUtil.deactivate(tcpAcceptor);
- }
-
- /**
- * Doesn't work yet: UserManager does not add its users yet
- */
- public void _testCredentialsProvider()
- {
- TCPAcceptorDef tcpAcceptorDef = createTCPAcceptorDef();
-
- User user = Net4jUtilDefsFactory.eINSTANCE.createUser();
- user.setUserID(USERID);
- user.setPassword(PASSWORD);
-
- UserManagerDef userManagerDef = Net4jUtilDefsFactory.eINSTANCE.createUserManagerDef();
- userManagerDef.getUser().add(user);
-
- ChallengeNegotiatorDef challengeNegotiatorDef = Net4jUtilDefsFactory.eINSTANCE.createChallengeNegotiatorDef();
- challengeNegotiatorDef.setRandomizer(Net4jUtilDefsFactory.eINSTANCE.createRandomizerDef());
- challengeNegotiatorDef.setUserManager(userManagerDef);
-
- tcpAcceptorDef.setNegotiator(challengeNegotiatorDef);
- ITCPAcceptor tcpAcceptor = (ITCPAcceptor)tcpAcceptorDef.getInstance();
- assertEquals(true, LifecycleUtil.isActive(tcpAcceptor));
-
- Util.addNegotiator(USERID, PASSWORD, tcpConnector);
- LifecycleUtil.activate(tcpConnector);
-
- tcpConnector.waitForConnection(DELAY + TIMEOUT);
- LifecycleUtil.deactivate(tcpConnector);
-
- Util.removeNegotiator(tcpConnector);
- LifecycleUtil.deactivate(tcpAcceptor);
- }
-
- private TCPAcceptorDef createTCPAcceptorDef()
- {
- TCPAcceptorDef tcpAcceptorDef = Net4jDefsFactory.eINSTANCE.createTCPAcceptorDef();
- tcpAcceptorDef.setHost(HOST);
- tcpAcceptorDef.setPort(PORT);
- tcpAcceptorDef.setBufferProvider(Net4jDefsFactory.eINSTANCE.createBufferPoolDef());
- tcpAcceptorDef.setExecutorService(Net4jUtilDefsFactory.eINSTANCE.createThreadPoolDef());
- tcpAcceptorDef.setTcpSelectorDef(Net4jDefsFactory.eINSTANCE.createTCPSelectorDef());
- return tcpAcceptorDef;
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andre Dietisheim - initial API and implementation
+ * Eike Stepper - maintenance
+ */
+package org.eclipse.net4j.tests.defs;
+
+import org.eclipse.net4j.defs.Net4jDefsFactory;
+import org.eclipse.net4j.defs.TCPAcceptorDef;
+import org.eclipse.net4j.internal.tcp.TCPConnector;
+import org.eclipse.net4j.tcp.ITCPAcceptor;
+import org.eclipse.net4j.util.defs.ChallengeNegotiatorDef;
+import org.eclipse.net4j.util.defs.Net4jUtilDefsFactory;
+import org.eclipse.net4j.util.defs.User;
+import org.eclipse.net4j.util.defs.UserManagerDef;
+import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+import org.eclipse.net4j.util.tests.AbstractOMTest;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class TCPAcceptorDefImplTest extends AbstractOMTest
+{
+ private static final long TIMEOUT = 10000;
+
+ private static final long DELAY = 500;
+
+ private static final String HOST = "localhost"; //$NON-NLS-1$
+
+ private static final int PORT = 2036;
+
+ private static final String USERID = "André"; //$NON-NLS-1$
+
+ private static final String PASSWORD = "aPassword"; //$NON-NLS-1$
+
+ private TCPConnector tcpConnector;
+
+ @Override
+ protected void doSetUp() throws Exception
+ {
+ tcpConnector = Util.createTCPClientConnector(HOST, PORT, Util.createTCPSelector());
+ }
+
+ @Override
+ protected void doTearDown() throws Exception
+ {
+ LifecycleUtil.deactivate(tcpConnector);
+ }
+
+ public void testAcceptorDefOpensConnection()
+ {
+ TCPAcceptorDef tcpAcceptorDef = createTCPAcceptorDef();
+
+ ITCPAcceptor tcpAcceptor = (ITCPAcceptor)tcpAcceptorDef.getInstance();
+
+ assertEquals(true, LifecycleUtil.isActive(tcpAcceptor));
+
+ LifecycleUtil.activate(tcpConnector);
+ tcpConnector.waitForConnection(DELAY + TIMEOUT);
+ assertEquals(true, LifecycleUtil.isActive(tcpConnector));
+
+ LifecycleUtil.deactivate(tcpAcceptor);
+ }
+
+ /**
+ * Doesn't work yet: UserManager does not add its users yet
+ */
+ public void _testCredentialsProvider()
+ {
+ TCPAcceptorDef tcpAcceptorDef = createTCPAcceptorDef();
+
+ User user = Net4jUtilDefsFactory.eINSTANCE.createUser();
+ user.setUserID(USERID);
+ user.setPassword(PASSWORD);
+
+ UserManagerDef userManagerDef = Net4jUtilDefsFactory.eINSTANCE.createUserManagerDef();
+ userManagerDef.getUser().add(user);
+
+ ChallengeNegotiatorDef challengeNegotiatorDef = Net4jUtilDefsFactory.eINSTANCE.createChallengeNegotiatorDef();
+ challengeNegotiatorDef.setRandomizer(Net4jUtilDefsFactory.eINSTANCE.createRandomizerDef());
+ challengeNegotiatorDef.setUserManager(userManagerDef);
+
+ tcpAcceptorDef.setNegotiator(challengeNegotiatorDef);
+ ITCPAcceptor tcpAcceptor = (ITCPAcceptor)tcpAcceptorDef.getInstance();
+ assertEquals(true, LifecycleUtil.isActive(tcpAcceptor));
+
+ Util.addNegotiator(USERID, PASSWORD, tcpConnector);
+ LifecycleUtil.activate(tcpConnector);
+
+ tcpConnector.waitForConnection(DELAY + TIMEOUT);
+ LifecycleUtil.deactivate(tcpConnector);
+
+ Util.removeNegotiator(tcpConnector);
+ LifecycleUtil.deactivate(tcpAcceptor);
+ }
+
+ private TCPAcceptorDef createTCPAcceptorDef()
+ {
+ TCPAcceptorDef tcpAcceptorDef = Net4jDefsFactory.eINSTANCE.createTCPAcceptorDef();
+ tcpAcceptorDef.setHost(HOST);
+ tcpAcceptorDef.setPort(PORT);
+ tcpAcceptorDef.setBufferProvider(Net4jDefsFactory.eINSTANCE.createBufferPoolDef());
+ tcpAcceptorDef.setExecutorService(Net4jUtilDefsFactory.eINSTANCE.createThreadPoolDef());
+ tcpAcceptorDef.setTcpSelectorDef(Net4jDefsFactory.eINSTANCE.createTCPSelectorDef());
+ return tcpAcceptorDef;
+ }
+}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/defs/TCPConnectorDefImplTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/defs/TCPConnectorDefImplTest.java
index 9e5f505a1e..f90d934e70 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/defs/TCPConnectorDefImplTest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/defs/TCPConnectorDefImplTest.java
@@ -1,126 +1,126 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Andre Dietisheim - initial API and implementation
- * Eike Stepper - maintenance
- */
-package org.eclipse.net4j.tests.defs;
-
-import org.eclipse.net4j.defs.Net4jDefsFactory;
-import org.eclipse.net4j.defs.TCPConnectorDef;
-import org.eclipse.net4j.internal.tcp.TCPAcceptor;
-import org.eclipse.net4j.tcp.ITCPConnector;
-import org.eclipse.net4j.tests.AbstractProtocolTest;
-import org.eclipse.net4j.util.defs.Net4jUtilDefsFactory;
-import org.eclipse.net4j.util.defs.PasswordCredentialsProviderDef;
-import org.eclipse.net4j.util.defs.ResponseNegotiatorDef;
-import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
-
-/**
- * @author Andre Dietisheim
- */
-public class TCPConnectorDefImplTest extends AbstractProtocolTest
-{
- private static final long DELAY = 500l;
-
- private static final int PORT = 2036;
-
- private static final long TIMEOUT = 10000l;
-
- private static final String USERID = "André"; //$NON-NLS-1$
-
- private static final String PASSWORD = "aPassword"; //$NON-NLS-1$
-
- private TCPAcceptor tcpAcceptor;
-
- @Override
- protected void doSetUp() throws Exception
- {
- tcpAcceptor = Util.createTCPAcceptor(HOST, PORT, DELAY);
- }
-
- @Override
- protected void doTearDown() throws Exception
- {
- LifecycleUtil.deactivate(tcpAcceptor);
- }
-
- public void testConnectorDefOpensConnection()
- {
- TCPConnectorDef tcpConnectorDef = Net4jDefsFactory.eINSTANCE.createTCPConnectorDef();
-
- tcpConnectorDef.setHost(HOST);
- tcpConnectorDef.setPort(PORT);
- tcpConnectorDef.setBufferProvider(Net4jDefsFactory.eINSTANCE.createBufferPoolDef());
- tcpConnectorDef.setExecutorService(Net4jUtilDefsFactory.eINSTANCE.createThreadPoolDef());
- tcpConnectorDef.setTcpSelectorDef(Net4jDefsFactory.eINSTANCE.createTCPSelectorDef());
-
- ITCPConnector tcpConnector = (ITCPConnector)tcpConnectorDef.getInstance();
-
- tcpConnector.waitForConnection(DELAY + TIMEOUT);
- assertEquals(true, LifecycleUtil.isActive(tcpConnector));
-
- LifecycleUtil.deactivate(tcpConnector);
- }
-
- public void testNewInstanceWhenTouched()
- {
- TCPConnectorDef tcpConnectorDef = Net4jDefsFactory.eINSTANCE.createTCPConnectorDef();
-
- tcpConnectorDef.setHost(HOST);
- tcpConnectorDef.setPort(PORT);
- tcpConnectorDef.setBufferProvider(Net4jDefsFactory.eINSTANCE.createBufferPoolDef());
- tcpConnectorDef.setExecutorService(Net4jUtilDefsFactory.eINSTANCE.createThreadPoolDef());
- tcpConnectorDef.setTcpSelectorDef(Net4jDefsFactory.eINSTANCE.createTCPSelectorDef());
-
- ITCPConnector thisTcpConnector = (ITCPConnector)tcpConnectorDef.getInstance();
- tcpConnectorDef.setPort(PORT + 1);
-
- assertEquals(true, tcpConnectorDef.isTouched());
-
- ITCPConnector thatTcpConnector = (ITCPConnector)tcpConnectorDef.getInstance();
-
- assertEquals(true, !LifecycleUtil.isActive(thisTcpConnector));
- assertEquals(true, !tcpConnectorDef.isTouched());
- assertEquals(true, thisTcpConnector != thatTcpConnector);
-
- LifecycleUtil.deactivate(thisTcpConnector);
- LifecycleUtil.deactivate(thatTcpConnector);
- }
-
- public void testCredentialsProvider()
- {
- Util.addNegotiator(USERID, PASSWORD, tcpAcceptor);
-
- TCPConnectorDef tcpConnectorDef = Net4jDefsFactory.eINSTANCE.createTCPConnectorDef();
-
- tcpConnectorDef.setHost(HOST);
- tcpConnectorDef.setPort(PORT);
- tcpConnectorDef.setBufferProvider(Net4jDefsFactory.eINSTANCE.createBufferPoolDef());
- tcpConnectorDef.setExecutorService(Net4jUtilDefsFactory.eINSTANCE.createThreadPoolDef());
- tcpConnectorDef.setTcpSelectorDef(Net4jDefsFactory.eINSTANCE.createTCPSelectorDef());
-
- PasswordCredentialsProviderDef credentialsProviderDef = Net4jUtilDefsFactory.eINSTANCE
- .createPasswordCredentialsProviderDef();
- credentialsProviderDef.setUserID(USERID);
- credentialsProviderDef.setPassword(PASSWORD);
-
- ResponseNegotiatorDef negotiatorDef = Net4jUtilDefsFactory.eINSTANCE.createResponseNegotiatorDef();
- negotiatorDef.setCredentialsProvider(credentialsProviderDef);
- tcpConnectorDef.setNegotiator(negotiatorDef);
-
- ITCPConnector tcpConnector = (ITCPConnector)tcpConnectorDef.getInstance();
-
- tcpConnector.waitForConnection(DELAY + TIMEOUT);
- assertEquals(true, LifecycleUtil.isActive(tcpConnector));
-
- LifecycleUtil.deactivate(tcpConnector);
-
- Util.removeNegotiator(tcpAcceptor);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andre Dietisheim - initial API and implementation
+ * Eike Stepper - maintenance
+ */
+package org.eclipse.net4j.tests.defs;
+
+import org.eclipse.net4j.defs.Net4jDefsFactory;
+import org.eclipse.net4j.defs.TCPConnectorDef;
+import org.eclipse.net4j.internal.tcp.TCPAcceptor;
+import org.eclipse.net4j.tcp.ITCPConnector;
+import org.eclipse.net4j.tests.AbstractProtocolTest;
+import org.eclipse.net4j.util.defs.Net4jUtilDefsFactory;
+import org.eclipse.net4j.util.defs.PasswordCredentialsProviderDef;
+import org.eclipse.net4j.util.defs.ResponseNegotiatorDef;
+import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class TCPConnectorDefImplTest extends AbstractProtocolTest
+{
+ private static final long DELAY = 500l;
+
+ private static final int PORT = 2036;
+
+ private static final long TIMEOUT = 10000l;
+
+ private static final String USERID = "André"; //$NON-NLS-1$
+
+ private static final String PASSWORD = "aPassword"; //$NON-NLS-1$
+
+ private TCPAcceptor tcpAcceptor;
+
+ @Override
+ protected void doSetUp() throws Exception
+ {
+ tcpAcceptor = Util.createTCPAcceptor(HOST, PORT, DELAY);
+ }
+
+ @Override
+ protected void doTearDown() throws Exception
+ {
+ LifecycleUtil.deactivate(tcpAcceptor);
+ }
+
+ public void testConnectorDefOpensConnection()
+ {
+ TCPConnectorDef tcpConnectorDef = Net4jDefsFactory.eINSTANCE.createTCPConnectorDef();
+
+ tcpConnectorDef.setHost(HOST);
+ tcpConnectorDef.setPort(PORT);
+ tcpConnectorDef.setBufferProvider(Net4jDefsFactory.eINSTANCE.createBufferPoolDef());
+ tcpConnectorDef.setExecutorService(Net4jUtilDefsFactory.eINSTANCE.createThreadPoolDef());
+ tcpConnectorDef.setTcpSelectorDef(Net4jDefsFactory.eINSTANCE.createTCPSelectorDef());
+
+ ITCPConnector tcpConnector = (ITCPConnector)tcpConnectorDef.getInstance();
+
+ tcpConnector.waitForConnection(DELAY + TIMEOUT);
+ assertEquals(true, LifecycleUtil.isActive(tcpConnector));
+
+ LifecycleUtil.deactivate(tcpConnector);
+ }
+
+ public void testNewInstanceWhenTouched()
+ {
+ TCPConnectorDef tcpConnectorDef = Net4jDefsFactory.eINSTANCE.createTCPConnectorDef();
+
+ tcpConnectorDef.setHost(HOST);
+ tcpConnectorDef.setPort(PORT);
+ tcpConnectorDef.setBufferProvider(Net4jDefsFactory.eINSTANCE.createBufferPoolDef());
+ tcpConnectorDef.setExecutorService(Net4jUtilDefsFactory.eINSTANCE.createThreadPoolDef());
+ tcpConnectorDef.setTcpSelectorDef(Net4jDefsFactory.eINSTANCE.createTCPSelectorDef());
+
+ ITCPConnector thisTcpConnector = (ITCPConnector)tcpConnectorDef.getInstance();
+ tcpConnectorDef.setPort(PORT + 1);
+
+ assertEquals(true, tcpConnectorDef.isTouched());
+
+ ITCPConnector thatTcpConnector = (ITCPConnector)tcpConnectorDef.getInstance();
+
+ assertEquals(true, !LifecycleUtil.isActive(thisTcpConnector));
+ assertEquals(true, !tcpConnectorDef.isTouched());
+ assertEquals(true, thisTcpConnector != thatTcpConnector);
+
+ LifecycleUtil.deactivate(thisTcpConnector);
+ LifecycleUtil.deactivate(thatTcpConnector);
+ }
+
+ public void testCredentialsProvider()
+ {
+ Util.addNegotiator(USERID, PASSWORD, tcpAcceptor);
+
+ TCPConnectorDef tcpConnectorDef = Net4jDefsFactory.eINSTANCE.createTCPConnectorDef();
+
+ tcpConnectorDef.setHost(HOST);
+ tcpConnectorDef.setPort(PORT);
+ tcpConnectorDef.setBufferProvider(Net4jDefsFactory.eINSTANCE.createBufferPoolDef());
+ tcpConnectorDef.setExecutorService(Net4jUtilDefsFactory.eINSTANCE.createThreadPoolDef());
+ tcpConnectorDef.setTcpSelectorDef(Net4jDefsFactory.eINSTANCE.createTCPSelectorDef());
+
+ PasswordCredentialsProviderDef credentialsProviderDef = Net4jUtilDefsFactory.eINSTANCE
+ .createPasswordCredentialsProviderDef();
+ credentialsProviderDef.setUserID(USERID);
+ credentialsProviderDef.setPassword(PASSWORD);
+
+ ResponseNegotiatorDef negotiatorDef = Net4jUtilDefsFactory.eINSTANCE.createResponseNegotiatorDef();
+ negotiatorDef.setCredentialsProvider(credentialsProviderDef);
+ tcpConnectorDef.setNegotiator(negotiatorDef);
+
+ ITCPConnector tcpConnector = (ITCPConnector)tcpConnectorDef.getInstance();
+
+ tcpConnector.waitForConnection(DELAY + TIMEOUT);
+ assertEquals(true, LifecycleUtil.isActive(tcpConnector));
+
+ LifecycleUtil.deactivate(tcpConnector);
+
+ Util.removeNegotiator(tcpAcceptor);
+ }
+}
diff --git a/plugins/org.gastro.server.web/src-gen/templates/MenuCardTemplate.java b/plugins/org.gastro.server.web/src-gen/templates/MenuCardTemplate.java
index bab6834d67..1ddb695ad9 100644
--- a/plugins/org.gastro.server.web/src-gen/templates/MenuCardTemplate.java
+++ b/plugins/org.gastro.server.web/src-gen/templates/MenuCardTemplate.java
@@ -1,62 +1,62 @@
-package templates;
-
-import org.gastro.inventory.*;
-import org.gastro.server.internal.web.*;
-
-public class MenuCardTemplate
-{
- protected static String nl;
- public static synchronized MenuCardTemplate create(String lineSeparator)
- {
- nl = lineSeparator;
- MenuCardTemplate result = new MenuCardTemplate();
- nl = null;
- return result;
- }
-
- public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
- protected final String TEXT_1 = "";
- protected final String TEXT_2 = NL + NL + "<html>" + NL + " <header>" + NL + "\t <title>" + NL + "\t\t\t";
- protected final String TEXT_3 = NL + "\t </title>" + NL + "\t\t<link media=\"screen\" href=\"gastro.css\" type=\"text/css\" rel=\"stylesheet\">" + NL + "\t<header>" + NL + "<body>" + NL + "" + NL + "<h1>";
- protected final String TEXT_4 = "</h1>" + NL + "<table border=\"0\" width=\"400\">";
- protected final String TEXT_5 = NL + "\t<tr><td colspan=\"3\"><h2>";
- protected final String TEXT_6 = "</h2></td></tr>" + NL + "\t<tr><td colspan=\"3\"><h4>";
- protected final String TEXT_7 = "</h4></td></tr>" + NL + "\t";
- protected final String TEXT_8 = NL + "\t\t<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td colspan=\"2\"><h3>";
- protected final String TEXT_9 = "</h3></td></tr>" + NL + "\t\t<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>";
- protected final String TEXT_10 = "</td>" + NL + "\t\t\t\t\t<td align=\"right\" valign=\"bottom\" width=\"80\">";
- protected final String TEXT_11 = " </td></tr>" + NL + "\t";
- protected final String TEXT_12 = NL + "</table>" + NL + "" + NL + "</body>" + NL + "</html>";
- protected final String TEXT_13 = NL;
-
- public String generate(Object argument)
- {
- final StringBuffer stringBuffer = new StringBuffer();
- stringBuffer.append(TEXT_1);
- MenuCard menuCard = (MenuCard)argument;
- stringBuffer.append(TEXT_2);
- stringBuffer.append(GastroServlet.html(menuCard.getTitle()));
- stringBuffer.append(TEXT_3);
- stringBuffer.append(GastroServlet.html(menuCard.getTitle()));
- stringBuffer.append(TEXT_4);
- for (Section section : menuCard.getSections()) {
- stringBuffer.append(TEXT_5);
- stringBuffer.append(GastroServlet.html(section.getTitle()));
- stringBuffer.append(TEXT_6);
- stringBuffer.append(GastroServlet.html(section.getText()));
- stringBuffer.append(TEXT_7);
- for (Offering offering : section.getOfferings()) {
- stringBuffer.append(TEXT_8);
- stringBuffer.append(GastroServlet.html(offering.getName()));
- stringBuffer.append(TEXT_9);
- stringBuffer.append(GastroServlet.html(offering.getDescription()));
- stringBuffer.append(TEXT_10);
- stringBuffer.append(GastroServlet.html(offering.getPrice()));
- stringBuffer.append(TEXT_11);
- }
- }
- stringBuffer.append(TEXT_12);
- stringBuffer.append(TEXT_13);
- return stringBuffer.toString();
- }
-}
+package templates;
+
+import org.gastro.inventory.*;
+import org.gastro.server.internal.web.*;
+
+public class MenuCardTemplate
+{
+ protected static String nl;
+ public static synchronized MenuCardTemplate create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ MenuCardTemplate result = new MenuCardTemplate();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "";
+ protected final String TEXT_2 = NL + NL + "<html>" + NL + " <header>" + NL + "\t <title>" + NL + "\t\t\t";
+ protected final String TEXT_3 = NL + "\t </title>" + NL + "\t\t<link media=\"screen\" href=\"gastro.css\" type=\"text/css\" rel=\"stylesheet\">" + NL + "\t<header>" + NL + "<body>" + NL + "" + NL + "<h1>";
+ protected final String TEXT_4 = "</h1>" + NL + "<table border=\"0\" width=\"400\">";
+ protected final String TEXT_5 = NL + "\t<tr><td colspan=\"3\"><h2>";
+ protected final String TEXT_6 = "</h2></td></tr>" + NL + "\t<tr><td colspan=\"3\"><h4>";
+ protected final String TEXT_7 = "</h4></td></tr>" + NL + "\t";
+ protected final String TEXT_8 = NL + "\t\t<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td colspan=\"2\"><h3>";
+ protected final String TEXT_9 = "</h3></td></tr>" + NL + "\t\t<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>";
+ protected final String TEXT_10 = "</td>" + NL + "\t\t\t\t\t<td align=\"right\" valign=\"bottom\" width=\"80\">";
+ protected final String TEXT_11 = " </td></tr>" + NL + "\t";
+ protected final String TEXT_12 = NL + "</table>" + NL + "" + NL + "</body>" + NL + "</html>";
+ protected final String TEXT_13 = NL;
+
+ public String generate(Object argument)
+ {
+ final StringBuffer stringBuffer = new StringBuffer();
+ stringBuffer.append(TEXT_1);
+ MenuCard menuCard = (MenuCard)argument;
+ stringBuffer.append(TEXT_2);
+ stringBuffer.append(GastroServlet.html(menuCard.getTitle()));
+ stringBuffer.append(TEXT_3);
+ stringBuffer.append(GastroServlet.html(menuCard.getTitle()));
+ stringBuffer.append(TEXT_4);
+ for (Section section : menuCard.getSections()) {
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append(GastroServlet.html(section.getTitle()));
+ stringBuffer.append(TEXT_6);
+ stringBuffer.append(GastroServlet.html(section.getText()));
+ stringBuffer.append(TEXT_7);
+ for (Offering offering : section.getOfferings()) {
+ stringBuffer.append(TEXT_8);
+ stringBuffer.append(GastroServlet.html(offering.getName()));
+ stringBuffer.append(TEXT_9);
+ stringBuffer.append(GastroServlet.html(offering.getDescription()));
+ stringBuffer.append(TEXT_10);
+ stringBuffer.append(GastroServlet.html(offering.getPrice()));
+ stringBuffer.append(TEXT_11);
+ }
+ }
+ stringBuffer.append(TEXT_12);
+ stringBuffer.append(TEXT_13);
+ return stringBuffer.toString();
+ }
+}

Back to the top