summaryrefslogtreecommitdiffstats
path: root/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/restfull/ExpertRegistryImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/restfull/ExpertRegistryImpl.java')
-rw-r--r--sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/restfull/ExpertRegistryImpl.java92
1 files changed, 0 insertions, 92 deletions
diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/restfull/ExpertRegistryImpl.java b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/restfull/ExpertRegistryImpl.java
deleted file mode 100644
index 800dc101a0..0000000000
--- a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/restfull/ExpertRegistryImpl.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 org.apache.tuscany.expertise.restfull;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.tuscany.expertise.Expert;
-import org.oasisopen.sca.annotation.Init;
-import org.oasisopen.sca.annotation.Service;
-
-@Service(ExpertRegistry.class)
-public class ExpertRegistryImpl implements ExpertRegistry {
- private List<Expert> experts = new ArrayList<Expert>();
-
- public ExpertRegistryImpl() {
-
- }
-
- @Init
- public void init() {
- Expert expert;
-
- expert = new Expert();
- expert.setId("1");
- expert.setName("John Smith");
- expert.setLocation("CA");
- expert.getExpertise().add("SOA");
- expert.getExpertise().add("SCA");
- expert.getExpertise().add("WAS");
-
- experts.add(expert);
-
- expert = new Expert();
- expert.setId("2");
- expert.setName("Ken Johnson");
- expert.setLocation("NY");
- expert.getExpertise().add("Search");
-
- experts.add(expert);
-
- expert = new Expert();
- expert.setId("3");
- expert.setName("Mark Smith");
- expert.setLocation("CA");
- expert.getExpertise().add("SCA");
- expert.getExpertise().add("WASCE");
-
- experts.add(expert);
- }
-
- public void addExpert(Expert expert) {
- experts.add(expert);
- }
-
- public void removeExpert(Expert expert) {
- experts.remove(expert);
- }
-
- public List<Expert> getExperts() {
- return experts;
- }
-
- public List<Expert> getExpertsByExpertise(String expertise) {
- List<Expert> expertsByExpertise = new ArrayList<Expert>();
-
- for (Expert expert : experts) {
- if (expert.getExpertise().contains(expertise)) {
- expertsByExpertise.add(expert);
- }
- }
-
- return expertsByExpertise;
- }
-}