summaryrefslogtreecommitdiffstats
path: root/tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile
diff options
context:
space:
mode:
Diffstat (limited to 'tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile')
-rw-r--r--tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/AccountLoginServiceImpl.java50
-rw-r--r--tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/LoginService.java30
-rw-r--r--tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/ProfileService.java36
-rw-r--r--tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/ProfileServiceImpl.java67
-rw-r--r--tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/SimpleLoginServiceImpl.java49
5 files changed, 0 insertions, 232 deletions
diff --git a/tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/AccountLoginServiceImpl.java b/tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/AccountLoginServiceImpl.java
deleted file mode 100644
index 0de0ef85c3..0000000000
--- a/tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/AccountLoginServiceImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package bigbank.webclient.services.profile;
-
-import java.rmi.RemoteException;
-
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Service;
-
-import com.bigbank.account.AccountService;
-import com.bigbank.account.CustomerProfileData;
-
-@Service(LoginService.class)
-public class AccountLoginServiceImpl implements LoginService {
- @Reference
- public AccountService accountService;
-
- @Reference
- public ProfileService profileService;
-
- public int login(String userName, String password) throws RemoteException {
-
- CustomerProfileData profileData = accountService.getCustomerProfile(userName);
-
- if (!password.equals(profileData.getPassword())) {
- return INVALID_PASSWORD;
- }
-
- profileService.setLoggedIn(true);
- profileService.setFirstName(profileData.getFirstName());
- profileService.setLastName(profileData.getLastName());
- profileService.setId(profileData.getId());
-
- return SUCCESS;
- }
-}
diff --git a/tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/LoginService.java b/tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/LoginService.java
deleted file mode 100644
index 465c1b3e7e..0000000000
--- a/tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/LoginService.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package bigbank.webclient.services.profile;
-
-import java.rmi.RemoteException;
-
-public interface LoginService {
-
- public static final int SUCCESS = 1;
-
- public static final int INVALID_LOGIN = -1;
-
- public static final int INVALID_PASSWORD = -2;
-
- public int login(String userName, String password) throws RemoteException;
-}
diff --git a/tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/ProfileService.java b/tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/ProfileService.java
deleted file mode 100644
index 2cbfbf489a..0000000000
--- a/tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/ProfileService.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package bigbank.webclient.services.profile;
-
-public interface ProfileService {
-
- public String getFirstName();
-
- public void setFirstName(String pName);
-
- public String getLastName();
-
- public void setLastName(String pName);
-
- public boolean isLoggedIn();
-
- public void setLoggedIn(boolean pStatus);
-
- public int getId();
-
- public void setId(int pId);
-}
diff --git a/tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/ProfileServiceImpl.java b/tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/ProfileServiceImpl.java
deleted file mode 100644
index 4ae808f31a..0000000000
--- a/tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/ProfileServiceImpl.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package bigbank.webclient.services.profile;
-
-import org.osoa.sca.annotations.Property;
-import org.osoa.sca.annotations.Scope;
-import org.osoa.sca.annotations.Service;
-
-@Service(ProfileService.class)
-@Scope("session")
-public class ProfileServiceImpl implements ProfileService {
-
- private String firstName;
-
- public String getFirstName() {
- return firstName;
- }
-
- @Property
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- private String lastName;
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
- private boolean loggedIn;
-
- public boolean isLoggedIn() {
- return loggedIn;
- }
-
- public void setLoggedIn(boolean status) {
- loggedIn = status;
- }
-
- private int id;
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-}
diff --git a/tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/SimpleLoginServiceImpl.java b/tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/SimpleLoginServiceImpl.java
deleted file mode 100644
index a8d57fb506..0000000000
--- a/tags/java-M1-20060518/java/sampleapps/bigbank/webclient/src/main/java/bigbank/webclient/services/profile/SimpleLoginServiceImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package bigbank.webclient.services.profile;
-
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Service;
-
-@Service(LoginService.class)
-public class SimpleLoginServiceImpl implements LoginService {
-
- public ProfileService profileService;
-
- @Reference
- public void setProfileService(ProfileService profileService) {
- this.profileService = profileService;
- }
-
- public int login(String userName, String password) {
-
- if (!"test".equals(userName)) {
- return INVALID_LOGIN;
- }
-
- if (!"password".equals(password)) {
- return INVALID_PASSWORD;
- }
-
- profileService.setLoggedIn(true);
- profileService.setFirstName("John");
- profileService.setLastName("Doe");
- profileService.setId(12345);
-
- return SUCCESS;
- }
-}