tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r450922 - in /incubator/tuscany/sandbox/rfeng/samples/mortage/src: main/java/mortage/ main/java/mortgage/ test/java/mortage/ test/java/mortgage/
Date Thu, 28 Sep 2006 17:00:59 GMT
Author: rfeng
Date: Thu Sep 28 10:00:58 2006
New Revision: 450922

URL: http://svn.apache.org/viewvc?view=rev&rev=450922
Log:
Fix the typo in mortgage

Added:
    incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/
      - copied from r447651, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/
    incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/CreditCheck.java
      - copied, changed from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/CreditCheck.java
    incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/CreditCheckImpl.java
      - copied, changed from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/CreditCheckImpl.java
    incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/Customer.java
      - copied, changed from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/Customer.java
    incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/InterestRateQuote.java
      - copied, changed from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/InterestRateQuote.java
    incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/InterestRateQuoteImpl.java
      - copied, changed from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/InterestRateQuoteImpl.java
    incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/LoanApproval.java
      - copied, changed from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/LoanApproval.java
    incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/LoanApprovalImpl.java
      - copied, changed from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/LoanApprovalImpl.java
    incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/MortageCalculator.java
      - copied, changed from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/MortageCalculator.java
    incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/MortageCalculatorImpl.java
      - copied, changed from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/MortageCalculatorImpl.java
    incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/MortageClient.java
      - copied, changed from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/MortageClient.java
    incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/RiskAssessment.java
      - copied, changed from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/RiskAssessment.java
    incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/RiskAssessmentImpl.java
      - copied, changed from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/RiskAssessmentImpl.java
    incubator/tuscany/sandbox/rfeng/samples/mortage/src/test/java/mortgage/
      - copied from r447651, incubator/tuscany/sandbox/rfeng/samples/mortage/src/test/java/mortage/
    incubator/tuscany/sandbox/rfeng/samples/mortage/src/test/java/mortgage/MortageClientTestCase.java
      - copied, changed from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/test/java/mortage/MortageClientTestCase.java
Removed:
    incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/
    incubator/tuscany/sandbox/rfeng/samples/mortage/src/test/java/mortage/

Copied: incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/CreditCheck.java
(from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/CreditCheck.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/CreditCheck.java?view=diff&rev=450922&p1=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/CreditCheck.java&r1=447656&p2=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/CreditCheck.java&r2=450922
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/CreditCheck.java
(original)
+++ incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/CreditCheck.java
Thu Sep 28 10:00:58 2006
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.    
  */
-package mortage;
+package mortgage;
 
 public interface CreditCheck {
     int getCreditScore(String ssn);

Copied: incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/CreditCheckImpl.java
(from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/CreditCheckImpl.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/CreditCheckImpl.java?view=diff&rev=450922&p1=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/CreditCheckImpl.java&r1=447656&p2=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/CreditCheckImpl.java&r2=450922
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/CreditCheckImpl.java
(original)
+++ incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/CreditCheckImpl.java
Thu Sep 28 10:00:58 2006
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.    
  */
-package mortage;
+package mortgage;
 
 import org.osoa.sca.annotations.Scope;
 

Copied: incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/Customer.java
(from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/Customer.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/Customer.java?view=diff&rev=450922&p1=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/Customer.java&r1=447656&p2=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/Customer.java&r2=450922
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/Customer.java (original)
+++ incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/Customer.java Thu
Sep 28 10:00:58 2006
@@ -17,7 +17,7 @@
  * under the License.    
  */
 
-package mortage;
+package mortgage;
 
 /**
  *

Copied: incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/InterestRateQuote.java
(from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/InterestRateQuote.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/InterestRateQuote.java?view=diff&rev=450922&p1=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/InterestRateQuote.java&r1=447656&p2=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/InterestRateQuote.java&r2=450922
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/InterestRateQuote.java
(original)
+++ incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/InterestRateQuote.java
Thu Sep 28 10:00:58 2006
@@ -1,4 +1,4 @@
-package mortage;
+package mortgage;
 
 public interface InterestRateQuote {
     public float getRate(String state, double loanAmount, int termInYears);

Copied: incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/InterestRateQuoteImpl.java
(from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/InterestRateQuoteImpl.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/InterestRateQuoteImpl.java?view=diff&rev=450922&p1=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/InterestRateQuoteImpl.java&r1=447656&p2=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/InterestRateQuoteImpl.java&r2=450922
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/InterestRateQuoteImpl.java
(original)
+++ incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/InterestRateQuoteImpl.java
Thu Sep 28 10:00:58 2006
@@ -1,4 +1,4 @@
-package mortage;
+package mortgage;
 
 public class InterestRateQuoteImpl implements InterestRateQuote {
     public float getRate(String state, double loanAmount, int termInYears) {

Copied: incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/LoanApproval.java
(from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/LoanApproval.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/LoanApproval.java?view=diff&rev=450922&p1=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/LoanApproval.java&r1=447656&p2=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/LoanApproval.java&r2=450922
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/LoanApproval.java
(original)
+++ incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/LoanApproval.java
Thu Sep 28 10:00:58 2006
@@ -17,7 +17,7 @@
  * under the License.    
  */
 
-package mortage;
+package mortgage;
 
 /**
  *

Copied: incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/LoanApprovalImpl.java
(from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/LoanApprovalImpl.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/LoanApprovalImpl.java?view=diff&rev=450922&p1=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/LoanApprovalImpl.java&r1=447656&p2=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/LoanApprovalImpl.java&r2=450922
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/LoanApprovalImpl.java
(original)
+++ incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/LoanApprovalImpl.java
Thu Sep 28 10:00:58 2006
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.    
  */
-package mortage;
+package mortgage;
 
 import org.osoa.sca.annotations.Property;
 import org.osoa.sca.annotations.Reference;
@@ -63,7 +63,7 @@
     }
 
     /**
-     * @see mortage.LoanApproval#approve(mortage.Customer, double, int)
+     * @see mortgage.LoanApproval#approve(mortgage.Customer, double, int)
      */
     public boolean approve(Customer customer, double loanAmount, int years) {
         int score = creditCheck.getCreditScore(customer.getSsn());

Copied: incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/MortageCalculator.java
(from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/MortageCalculator.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/MortageCalculator.java?view=diff&rev=450922&p1=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/MortageCalculator.java&r1=447656&p2=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/MortageCalculator.java&r2=450922
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/MortageCalculator.java
(original)
+++ incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/MortageCalculator.java
Thu Sep 28 10:00:58 2006
@@ -16,11 +16,14 @@
  * specific language governing permissions and limitations
  * under the License.    
  */
-package mortage;
+package mortgage;
+
+import org.osoa.sca.annotations.Remotable;
 
 /**
  * The Calculator service interface.
  */
+@Remotable
 public interface MortageCalculator {
     public double getMonthlyPayment(double principal, int years, float interestRate);
 }

Copied: incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/MortageCalculatorImpl.java
(from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/MortageCalculatorImpl.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/MortageCalculatorImpl.java?view=diff&rev=450922&p1=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/MortageCalculatorImpl.java&r1=447656&p2=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/MortageCalculatorImpl.java&r2=450922
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/MortageCalculatorImpl.java
(original)
+++ incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/MortageCalculatorImpl.java
Thu Sep 28 10:00:58 2006
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.    
  */
-package mortage;
+package mortgage;
 
 import org.osoa.sca.annotations.Scope;
 
@@ -27,15 +27,11 @@
 public class MortageCalculatorImpl implements MortageCalculator {
 
     public double getMonthlyPayment(double principal, int years, float interestRate) {
-        double monthlyRate = interestRate / 12 / 100;
+        double monthlyRate = interestRate / 12.0 / 100.0;
         double p = Math.pow(1 + monthlyRate, years * 12);
         double q = p / (p - 1);
         double monthlyPayment = principal * monthlyRate * q;
         return monthlyPayment;
-    }
-
-    public static void main(String[] args) {
-        System.out.println(new MortageCalculatorImpl().getMonthlyPayment(300000d, 30, 3.5f));
     }
 
 }

Copied: incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/MortageClient.java
(from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/MortageClient.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/MortageClient.java?view=diff&rev=450922&p1=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/MortageClient.java&r1=447656&p2=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/MortageClient.java&r2=450922
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/MortageClient.java
(original)
+++ incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/MortageClient.java
Thu Sep 28 10:00:58 2006
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.    
  */
-package mortage;
+package mortgage;
 
 import org.osoa.sca.CompositeContext;
 import org.osoa.sca.CurrentCompositeContext;

Copied: incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/RiskAssessment.java
(from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/RiskAssessment.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/RiskAssessment.java?view=diff&rev=450922&p1=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/RiskAssessment.java&r1=447656&p2=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/RiskAssessment.java&r2=450922
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/RiskAssessment.java
(original)
+++ incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/RiskAssessment.java
Thu Sep 28 10:00:58 2006
@@ -17,7 +17,7 @@
  * under the License.    
  */
 
-package mortage;
+package mortgage;
 
 /**
  *

Copied: incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/RiskAssessmentImpl.java
(from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/RiskAssessmentImpl.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/RiskAssessmentImpl.java?view=diff&rev=450922&p1=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/RiskAssessmentImpl.java&r1=447656&p2=incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/RiskAssessmentImpl.java&r2=450922
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortage/RiskAssessmentImpl.java
(original)
+++ incubator/tuscany/sandbox/rfeng/samples/mortage/src/main/java/mortgage/RiskAssessmentImpl.java
Thu Sep 28 10:00:58 2006
@@ -17,7 +17,7 @@
  * under the License.    
  */
 
-package mortage;
+package mortgage;
 
 import org.osoa.sca.annotations.Scope;
 

Copied: incubator/tuscany/sandbox/rfeng/samples/mortage/src/test/java/mortgage/MortageClientTestCase.java
(from r447656, incubator/tuscany/sandbox/rfeng/samples/mortage/src/test/java/mortage/MortageClientTestCase.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/mortage/src/test/java/mortgage/MortageClientTestCase.java?view=diff&rev=450922&p1=incubator/tuscany/sandbox/rfeng/samples/mortage/src/test/java/mortage/MortageClientTestCase.java&r1=447656&p2=incubator/tuscany/sandbox/rfeng/samples/mortage/src/test/java/mortgage/MortageClientTestCase.java&r2=450922
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples/mortage/src/test/java/mortage/MortageClientTestCase.java
(original)
+++ incubator/tuscany/sandbox/rfeng/samples/mortage/src/test/java/mortgage/MortageClientTestCase.java
Thu Sep 28 10:00:58 2006
@@ -16,7 +16,10 @@
  * specific language governing permissions and limitations
  * under the License.    
  */
-package mortage;
+package mortgage;
+
+import mortgage.Customer;
+import mortgage.LoanApproval;
 
 import org.apache.tuscany.test.SCATestCase;
 import org.osoa.sca.CompositeContext;



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message