summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/data-api/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/modules/data-api/src/main/java')
-rw-r--r--java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Collection.java78
-rw-r--r--java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Entry.java85
-rw-r--r--java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Item.java159
-rw-r--r--java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/ItemCollection.java30
-rw-r--r--java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/LocalItemCollection.java28
-rw-r--r--java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/NotFoundException.java45
6 files changed, 0 insertions, 425 deletions
diff --git a/java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Collection.java b/java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Collection.java
deleted file mode 100644
index f1841c975e..0000000000
--- a/java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Collection.java
+++ /dev/null
@@ -1,78 +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.sca.data.collection;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * Provides access to a collection of data items.
- *
- * @version $Rev$ $Date$
- */
-@Remotable
-public interface Collection <K, D> {
-
- /**
- * Get the whole collection.
- *
- * @return the whole collection.
- */
- Entry<K, D>[] getAll();
-
- /**
- * Returns a collection resulting from a query.
- *
- * @return the collection.
- */
- Entry<K, D>[] query(String queryString);
-
- /**
- * Creates a new item.
- *
- * @param key
- * @param item
- * @return
- */
- K post(K key, D item);
-
- /**
- * Retrieves an item.
- *
- * @param key
- * @return
- */
- D get(K key) throws NotFoundException;
-
- /**
- * Updates an item.
- *
- * @param key
- * @param item
- * @return
- */
- void put(K key, D item) throws NotFoundException;
-
- /**
- * Delete an item.
- *
- * @param key
- */
- void delete(K key) throws NotFoundException;
-
-}
diff --git a/java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Entry.java b/java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Entry.java
deleted file mode 100644
index 5903fd95a4..0000000000
--- a/java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Entry.java
+++ /dev/null
@@ -1,85 +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.sca.data.collection;
-
-
-/**
- * Represents a key/data pair in a data collection.
- *
- * @version $Rev$ $Date$
- */
-public class Entry <K, D> {
-
- private K key;
- private D data;
-
- /**
- * Constructs a new entry.
- */
- public Entry() {
- }
-
- /**
- * Constructs a new entry.
- * @param key the entry key
- * @param data the entry data
- */
- public Entry(K key, D data) {
- this.key = key;
- this.data = data;
- }
-
- /**
- * Returns the entry key.
- * @return the key
- */
- public K getKey() {
- return key;
- }
-
- /**
- * Sets the entry key.
- * @param key the key
- */
- public void setKey(K key) {
- this.key = key;
- }
-
- /**
- * Returns the entry data.
- * @return the entry data
- */
- public D getData() {
- return data;
- }
-
- /**
- * Sets the entry data
- * @param data the entry data
- */
- public void setData(D data) {
- this.data = data;
- }
-
- //FIXME Temporary methods to make JAXB register the Item
- // class when the Entry class is registered in a JAXB context
- public void setDummy(Item item) {}
- public Item getDummy() { return null; }
-
-}
diff --git a/java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Item.java b/java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Item.java
deleted file mode 100644
index 37042c0895..0000000000
--- a/java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Item.java
+++ /dev/null
@@ -1,159 +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.sca.data.collection;
-
-import java.util.Date;
-
-
-/**
- * Represents a data item.
- *
- * @version $Rev$ $Date$
- */
-public class Item {
-
- private String title;
- private String contents;
- private String link;
- private String related;
- private String alternate;
- private Date date;
-
- /**
- * Constructs a new item.
- */
- public Item() {
- }
-
- /**
- * Constructs a new item.
- * @param title the item title
- * @param contents the item contents
- * @param link the item link to a web resource
- * @param related the item link to a related web resource
- * @param date the item date
- */
- public Item(String title, String contents, String link, String related, Date date) {
- this.title = title;
- this.contents = contents;
- this.link = link;
- this.related = related;
- this.date = date;
- }
-
- /**
- * Returns the item title.
- * @return the item title
- */
- public String getTitle() {
- return title;
- }
-
- /**
- * Sets the item title.
- * @param title the item title
- */
- public void setTitle(String title) {
- this.title = title;
- }
-
- /**
- * Returns the item contents
- * @return the item contents
- */
- public String getContents() {
- return contents;
- }
-
- /**
- * Sets the item contents
- * @param contents the item contents
- */
- public void setContents(String contents) {
- this.contents = contents;
- }
-
- /**
- * Returns the item link to a web resource
- * @return the item link to a web resource
- */
- public String getLink() {
- return link;
- }
-
- /**
- * Sets the item link to a web resource
- * @param link the item link to a web resource
- */
- public void setLink(String link) {
- this.link = link;
- }
-
- /**
- * Returns the item link to a related web resource
- * @return the item link to a related web resource
- */
- public String getRelated() {
- return related;
- }
-
- /**
- * Sets the item link to a related web resource.
- *
- * @param related the item link to a related web resource
- */
- public void setRelated(String related) {
- this.related = related;
- }
-
- /**
- * Returns the item link to an alternate web resource
- * @return the item link to an alternate web resource
- */
- public String getAlternate() {
- return alternate;
- }
-
- /**
- * Sets the item link to an alternate web resource.
- *
- * @param alternate the item link to an alternate web resource
- */
- public void setAlternate(String alternate) {
- this.alternate = alternate;
- }
-
- /**
- * Returns the item date
- * @return the item date
- */
- public Date getDate() {
- return date;
- }
-
- /**
- * Sets the item date
- * @param date the item date
- */
- public void setDate(Date date) {
- this.date = date;
- }
-
-
-}
diff --git a/java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/ItemCollection.java b/java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/ItemCollection.java
deleted file mode 100644
index 229b29f5cd..0000000000
--- a/java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/ItemCollection.java
+++ /dev/null
@@ -1,30 +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.sca.data.collection;
-
-import org.oasisopen.sca.annotation.Remotable;
-
-/**
- * Provides access to a collection of data items.
- *
- * @version $Rev$ $Date$
- */
-@Remotable
-public interface ItemCollection extends Collection<String, Item> {
-}
diff --git a/java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/LocalItemCollection.java b/java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/LocalItemCollection.java
deleted file mode 100644
index 69512058b7..0000000000
--- a/java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/LocalItemCollection.java
+++ /dev/null
@@ -1,28 +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.sca.data.collection;
-
-
-/**
- * Provides access to a collection of data items.
- *
- * @version $Rev$ $Date$
- */
-public interface LocalItemCollection extends Collection<String, Item> {
-}
diff --git a/java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/NotFoundException.java b/java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/NotFoundException.java
deleted file mode 100644
index 7f13db5228..0000000000
--- a/java/sca/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/NotFoundException.java
+++ /dev/null
@@ -1,45 +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.sca.data.collection;
-
-/**
- * Indicates that an item could not be found in a collection.
- *
- * @version $Rev$ $Date$
- */
-public class NotFoundException extends Exception {
- private static final long serialVersionUID = 6792367409396084646L;
-
- public NotFoundException() {
- }
-
- public NotFoundException(String message) {
- super(message);
- }
-
- public NotFoundException(Throwable cause) {
- super(cause);
- }
-
- public NotFoundException(String message, Throwable cause) {
- super(message, cause);
- }
-
-}