summaryrefslogtreecommitdiffstats
path: root/sandbox/travelsample/contributions/payment-java-policy
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-08-31 16:28:21 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-08-31 16:28:21 +0000
commit9e3ff0e8b2032a3240095c6f3fa4e336d2b13557 (patch)
treedb8883ebcafc41b39f5b106c2bb270e59372916f /sandbox/travelsample/contributions/payment-java-policy
parent81505d21ce27cd4d17483df4bbba5280cfcc5ced (diff)
Add intents to the policy contributions and remove from the ordinary contribution
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@809652 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/travelsample/contributions/payment-java-policy')
-rw-r--r--sandbox/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java9
-rw-r--r--sandbox/travelsample/contributions/payment-java-policy/src/main/resources/payment.composite4
2 files changed, 8 insertions, 5 deletions
diff --git a/sandbox/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java b/sandbox/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java
index e47102f9ac..16e91d7284 100644
--- a/sandbox/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java
+++ b/sandbox/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java
@@ -25,6 +25,7 @@ import javax.annotation.security.RunAs;
import org.osoa.sca.annotations.Authentication;
import org.osoa.sca.annotations.Property;
import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Requires;
import org.osoa.sca.annotations.Service;
import com.tuscanyscatours.customer.Customer;
@@ -33,22 +34,22 @@ import com.tuscanyscatours.customer.CustomerRegistry;
import com.tuscanyscatours.emailgateway.EmailGateway;
import com.tuscanyscatours.payment.Payment;
import com.tuscanyscatours.payment.creditcard.AuthorizeFault_Exception;
-import com.tuscanyscatours.payment.creditcard.CreditCardDetailsType;
import com.tuscanyscatours.payment.creditcard.CreditCardPayment;
/**
* The payment implementation
*/
@Service(Payment.class)
-@RolesAllowed({"Admin", "Billing"})
-@RunAs("Billing")
+//@RolesAllowed({"Admin", "Billing"})
+//@RunAs("Billing")
public class PaymentImpl implements Payment {
@Reference
protected CustomerRegistry customerRegistry;
@Reference
- @Authentication
+ //@Authentication - not supported
+ @Requires("{http://www.osoa.org/xmlns/sca/1.0}authentication")
protected CreditCardPayment creditCardPayment;
@Reference
diff --git a/sandbox/travelsample/contributions/payment-java-policy/src/main/resources/payment.composite b/sandbox/travelsample/contributions/payment-java-policy/src/main/resources/payment.composite
index 90e16b2293..710583ae5d 100644
--- a/sandbox/travelsample/contributions/payment-java-policy/src/main/resources/payment.composite
+++ b/sandbox/travelsample/contributions/payment-java-policy/src/main/resources/payment.composite
@@ -28,7 +28,9 @@
<binding.ws uri="http://localhost:8081/Payment"/>
</service>
<reference name="customerRegistry" target="CustomerRegistry"/>
- <reference name="creditCardPayment" requires="">
+ <!-- reference name="creditCardPayment" policySets="BasicAuthenticationPolicySet"-->
+ <!-- reference name="creditCardPayment" requires="authentication"-->
+ <reference name="creditCardPayment">
<binding.ws uri="http://localhost:8082/CreditCardPayment"/>
</reference>
<reference name="emailGateway" target="EmailGateway"/>