summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Liebig2008-02-12 05:19:42 (EST)
committerStefan Liebig2008-02-12 05:19:42 (EST)
commit09d5cb7c90e14838a9f3cdbe08fcfcc9072e1be3 (patch)
tree21370b01812a9335a4bd08f31d5d57d544eeb265
parent85487faa5753d0ed9d485b4432f4015859b5dc97 (diff)
downloadorg.eclipse.riena-09d5cb7c90e14838a9f3cdbe08fcfcc9072e1be3.zip
org.eclipse.riena-09d5cb7c90e14838a9f3cdbe08fcfcc9072e1be3.tar.gz
org.eclipse.riena-09d5cb7c90e14838a9f3cdbe08fcfcc9072e1be3.tar.bz2
the contract package has been removed
-rw-r--r--org.eclipse.riena.core/META-INF/MANIFEST.MF1
-rw-r--r--org.eclipse.riena.core/src/org/eclipse/riena/core/contract/PostCondition.java228
-rw-r--r--org.eclipse.riena.core/src/org/eclipse/riena/core/contract/PostConditionException.java35
-rw-r--r--org.eclipse.riena.core/src/org/eclipse/riena/core/contract/PreCondition.java102
-rw-r--r--org.eclipse.riena.core/src/org/eclipse/riena/core/contract/PreConditionException.java35
5 files changed, 0 insertions, 401 deletions
diff --git a/org.eclipse.riena.core/META-INF/MANIFEST.MF b/org.eclipse.riena.core/META-INF/MANIFEST.MF
index 14187e1..5db3dd8 100644
--- a/org.eclipse.riena.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.riena.core/META-INF/MANIFEST.MF
@@ -11,7 +11,6 @@ Import-Package: org.osgi.framework;version="1.3.0",
Export-Package: org.eclipse.riena.core,
org.eclipse.riena.core.cache,
org.eclipse.riena.core.config,
- org.eclipse.riena.core.contract,
org.eclipse.riena.core.exception,
org.eclipse.riena.core.extension.util,
org.eclipse.riena.core.logging,
diff --git a/org.eclipse.riena.core/src/org/eclipse/riena/core/contract/PostCondition.java b/org.eclipse.riena.core/src/org/eclipse/riena/core/contract/PostCondition.java
deleted file mode 100644
index ef7ea09..0000000
--- a/org.eclipse.riena.core/src/org/eclipse/riena/core/contract/PostCondition.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 compeople AG 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:
- * compeople AG - initial API and implementation
- *******************************************************************************/
-package org.eclipse.riena.core.contract;
-
-/**
- * Collection of static methods to perform postcondition checks due to design by
- * contract conventions.
- *
- */
-@Deprecated
-public final class PostCondition {
-
- /**
- * version ID (controlled by CVS).
- */
- public static final String VERSION_ID = "$Id$";
-
- private PostCondition() {
- // Utility
- }
-
- /**
- * check a given boolean condition and throw an exception if the condition
- * is false.
- *
- * Example: assertTrue("Age is lower than 18",age >= 18);
- *
- * @param message
- * the message text to be inserted into the exception.
- * @param condition
- * the condition.
- *
- * @throws PostConditionException
- * thrown if condition is false.
- *
- * @see de.compeople.spirit.core.base.contract.PostConditionException
- */
- @Deprecated
- public static void assertTrue(String message, boolean condition) {
- if (!condition) {
- throw new PostConditionException(message);
- }
- }
-
- /**
- * check a given boolean condition and throw an exception if the condition
- * is false. If the condition is true return with the object reference
- * passed.
- *
- * Example: return assertTrueAndReturn("Age is lower than
- * 18",person.getAge() >= 18,person);
- *
- * @param message
- * the message text to be inserted into the exception.
- * @param condition
- * the condition.
- * @param returnValue
- * any return value.
- *
- * @return return with the <code>retObj</code> passed.
- *
- * @throws PostConditionException
- * thrown if condition is false.
- *
- * @see de.compeople.spirit.core.base.contract.PostConditionException
- */
- @Deprecated
- public static <T> T assertTrueAndReturn(String message, boolean condition, T returnValue) {
- assertTrue(message, condition);
- return returnValue;
- }
-
- // /**
- // * check a given boolean condition and throw an exception if the condition
- // is false. If the condition is true return with the object reference
- // passed.
- // *
- // * Example: return assertTrueAndReturn("Age is lower than 18",age >=
- // 18,age);
- // *
- // * @param message the message text to be inserted into the exception.
- // * @param condition the condition.
- // * @param returnValue any return value.
- // *
- // * @return return with the <code>retVal</code> passed.
- // *
- // * @throws PostConditionException thrown if condition is false.
- // *
- // * @see de.compeople.spirit.core.base.contract.PostConditionException
- // */
- // public static int assertTrueAndReturn( String message, boolean condition,
- // int returnValue ) {
- // assertTrue( message, condition );
- // return returnValue;
- // }
- //
- // /**
- // * check a given boolean condition and throw an exception if the condition
- // is false. If the condition is true return with the object reference
- // passed.
- // *
- // * Example: return assertTrueAndReturn("Age is lower than 18",age >=
- // 18,age);
- // *
- // * @param message the message text to be inserted into the exception.
- // * @param condition the condition.
- // * @param returnValue any return value.
- // *
- // * @return return with the <code>retVal</code> passed.
- // *
- // * @throws PostConditionException thrown if condition is false.
- // *
- // * @see de.compeople.spirit.core.base.contract.PostConditionException
- // */
- // public static long assertTrueAndReturn( String message, boolean
- // condition, long returnValue ) {
- // assertTrue( message, condition );
- // return returnValue;
- // }
-
- /**
- * check an object reference for not null and throw an exception if it is
- * null.
- *
- * Example: assertNotNull("Customer", customer);
- *
- * @param objectName
- * the parameter name to be used in the error message.
- * @param objectToCheck
- * the object to check.
- *
- * @throws PostConditionException
- * thrown if condition is false.
- *
- * @see de.compeople.spirit.core.base.contract.PostConditionException
- */
- @Deprecated
- public static void assertNotNull(String objectName, Object objectToCheck) {
- // Optimized in order to concatenate Strings only if necessary.
- // See problem #278
- if (objectToCheck == null) {
- throw new PostConditionException("Object reference is null: " + objectName);
- }
- }
-
- /**
- * check an object reference for not null and throw an exception if it is
- * null. If the object isn't null return with the object reference.
- *
- * Example: return assertNotNullAndReturn("Customer",customer);
- *
- * @param objectName
- * the parameter name to be used in the error message.
- * @param objectToCheck
- * the object to check.
- *
- * @return return with the <code>objectToCheck</code> passed and checked.
- *
- * @throws PostConditionException
- * thrown if condition is false.
- *
- * @see de.compeople.spirit.core.base.contract.PostConditionException
- */
- @Deprecated
- public static <T> T assertNotNullAndReturn(String objectName, T objectToCheck) {
- assertNotNull(objectName, objectToCheck);
- return objectToCheck;
- }
-
- /**
- * Check a string reference for not null and not zero length. throw an
- * exception if the string reference doesn't fulfill this requirements.
- *
- * Example: assertNotNullAndNotZeroLength("Customer name", custName);
- *
- * @param objectName
- * the parameter name to be used in the error message.
- * @param objectToCheck
- * the object to check.
- *
- * @throws PostConditionException
- * thrown if condition is false.
- *
- * @see de.compeople.spirit.core.base.contract.PostConditionException
- */
- @Deprecated
- public static void assertNotNullAndNotZeroLength(String objectName, String objectToCheck) {
- // Optimized in order to concatenate Strings only if necessary.
- // See problem #278
- if ((objectToCheck == null) || (objectToCheck.trim().length() == 0)) {
- throw new PostConditionException("String is null or has zero-length: " + objectName);
- }
- }
-
- /**
- * Check a string reference for not null and not zero length. throw an
- * exception if the string reference doesn't fulfill this requirements. If
- * the String has been checked successful it's reference will be returned.
- *
- * Example: return assertNotNullAndNotZeroLengthAndReturn("Customer
- * name",custName);
- *
- * @param objectName
- * the parameter name to be used in the error message.
- * @param objectToCheck
- * the object to check.
- *
- * @return the reference of the string just checked.
- *
- * @throws PostConditionException
- * thrown if condition is false.
- *
- * @see de.compeople.spirit.core.base.contract.PostConditionException
- */
- @Deprecated
- public static String assertNotNullAndNotZeroLengthAndReturn(String objectName, String objectToCheck) {
- assertNotNullAndNotZeroLength(objectName, objectToCheck);
- return objectToCheck;
- }
-} \ No newline at end of file
diff --git a/org.eclipse.riena.core/src/org/eclipse/riena/core/contract/PostConditionException.java b/org.eclipse.riena.core/src/org/eclipse/riena/core/contract/PostConditionException.java
deleted file mode 100644
index 9ac9af0..0000000
--- a/org.eclipse.riena.core/src/org/eclipse/riena/core/contract/PostConditionException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 compeople AG 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:
- * compeople AG - initial API and implementation
- *******************************************************************************/
-package org.eclipse.riena.core.contract;
-
-/**
- * Runtime exception which indicates post condition violation.
- *
- */
-@Deprecated
-public class PostConditionException extends RuntimeException {
-
- /**
- * version ID (controlled by CVS).
- */
- public static final String VERSION_ID = "$Id$";
-
- /**
- * constructor.
- *
- * @param msgText
- * the message text.
- */
- @Deprecated
- public PostConditionException(String msgText) {
- super(msgText);
- }
-} \ No newline at end of file
diff --git a/org.eclipse.riena.core/src/org/eclipse/riena/core/contract/PreCondition.java b/org.eclipse.riena.core/src/org/eclipse/riena/core/contract/PreCondition.java
deleted file mode 100644
index 7780172..0000000
--- a/org.eclipse.riena.core/src/org/eclipse/riena/core/contract/PreCondition.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 compeople AG 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:
- * compeople AG - initial API and implementation
- *******************************************************************************/
-package org.eclipse.riena.core.contract;
-
-/**
- * Collection of static methods to perform precondition check due to design by
- * contract conventions.
- *
- */
-@Deprecated
-public final class PreCondition {
-
- /**
- * version ID (controlled by CVS).
- */
- public static final String VERSION_ID = "$Id$";
-
- private PreCondition() {
- // utility class
- }
-
- /**
- * check a given boolean condition and throw an exception if the condition
- * is false.
- *
- * Example: assertTrue("Age is lower than 18",age >= 18);
- *
- * @param message
- * the message text to be inserted into the exception.
- * @param condition
- * the condition to check.
- *
- * @throws PreConditionException
- * thrown if condition is false.
- *
- * @see de.compeople.spirit.core.base.contract.PreConditionException
- */
- @Deprecated
- public static void assertTrue(String message, boolean condition) {
- if (!condition) {
- throw new PreConditionException(message);
- }
- }
-
- /**
- * check an object reference for not null and throw an exception if it is
- * null.
- *
- * Example: assertNotNull("Customer",customer);
- *
- * @param objectName
- * the parameter name to be used in the error message.
- * @param objectToCheck
- * the object to check.
- *
- * @throws PreConditionException
- * thrown if condition is false.
- *
- * @see de.compeople.spirit.core.base.contract.PreConditionException
- */
- @Deprecated
- public static void assertNotNull(String objectName, Object objectToCheck) {
- // Optimized in order to concatenate Strings only if necessary.
- // See problem #278
- if (objectToCheck == null) {
- throw new PreConditionException("Object reference is null: " + objectName);
- }
- }
-
- /**
- * Check an string reference for not null and not zero length. throw an
- * exception if the string reference doesn't fulfill this requirements.
- *
- * Example: assertNotNullAndNotZeroLength("Customer name",custName);
- *
- * @param objectName
- * the parameter name to be used in the error message.
- * @param objectToCheck
- * the string to check.
- *
- * @throws PreConditionException
- * thrown if condition is false.
- *
- * @see de.compeople.spirit.core.base.contract.PreConditionException
- */
- @Deprecated
- public static void assertNotNullAndNotZeroLength(String objectName, String objectToCheck) {
- // Optimized in order to concatenate Strings only if necessary.
- // See problem #278
- if ((objectToCheck == null) || (objectToCheck.trim().length() == 0)) {
- throw new PreConditionException("String argument is null or has zero-length: " + objectName);
- }
- }
-}
diff --git a/org.eclipse.riena.core/src/org/eclipse/riena/core/contract/PreConditionException.java b/org.eclipse.riena.core/src/org/eclipse/riena/core/contract/PreConditionException.java
deleted file mode 100644
index 43a8c36..0000000
--- a/org.eclipse.riena.core/src/org/eclipse/riena/core/contract/PreConditionException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 compeople AG 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:
- * compeople AG - initial API and implementation
- *******************************************************************************/
-package org.eclipse.riena.core.contract;
-
-/**
- * Runtime exception which indicates pre condition violation.
- *
- */
-@Deprecated
-public class PreConditionException extends RuntimeException {
-
- /**
- * version ID (controlled by CVS).
- */
- public static final String VERSION_ID = "$Id$";
-
- /**
- * constructor.
- *
- * @param msgText
- * the message text.
- */
- @Deprecated
- public PreConditionException(String msgText) {
- super(msgText);
- }
-} \ No newline at end of file