diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-11 23:07:45 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-11 23:07:45 +0000 |
commit | 6a3ca6736c808c1647854e405ef379b609f276db (patch) | |
tree | 67670193d3511b227100419589d0f2ec0bb02cc0 /branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache | |
parent | 9f395ebf3ec27f89c8dc63137bc99c8d6b0cff6d (diff) |
Moving 1.x branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835126 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache')
6 files changed, 0 insertions, 423 deletions
diff --git a/branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache/tuscany/sca/implementation/data/collection/Collection.java b/branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache/tuscany/sca/implementation/data/collection/Collection.java deleted file mode 100644 index 98204a8324..0000000000 --- a/branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache/tuscany/sca/implementation/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.implementation.data.collection; - -import org.osoa.sca.annotations.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/branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache/tuscany/sca/implementation/data/collection/Entry.java b/branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache/tuscany/sca/implementation/data/collection/Entry.java deleted file mode 100644 index bf2bbc1812..0000000000 --- a/branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache/tuscany/sca/implementation/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.implementation.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/branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache/tuscany/sca/implementation/data/collection/Item.java b/branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache/tuscany/sca/implementation/data/collection/Item.java deleted file mode 100644 index d0b9d942c1..0000000000 --- a/branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache/tuscany/sca/implementation/data/collection/Item.java +++ /dev/null @@ -1,157 +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.implementation.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 link 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 a related web resource - * @param link the item link to a related 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/branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache/tuscany/sca/implementation/data/collection/ItemCollection.java b/branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache/tuscany/sca/implementation/data/collection/ItemCollection.java deleted file mode 100644 index d441437791..0000000000 --- a/branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache/tuscany/sca/implementation/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.implementation.data.collection; - -import org.osoa.sca.annotations.Remotable; - -/** - * Provides access to a collection of data items. - * - * @version $Rev$ $Date$ - */ -@Remotable -public interface ItemCollection extends Collection<String, Item> { -} diff --git a/branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache/tuscany/sca/implementation/data/collection/LocalItemCollection.java b/branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache/tuscany/sca/implementation/data/collection/LocalItemCollection.java deleted file mode 100644 index b849aa2405..0000000000 --- a/branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache/tuscany/sca/implementation/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.implementation.data.collection; - - -/** - * Provides access to a collection of data items. - * - * @version $Rev$ $Date$ - */ -public interface LocalItemCollection extends Collection<String, Item> { -} diff --git a/branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache/tuscany/sca/implementation/data/collection/NotFoundException.java b/branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache/tuscany/sca/implementation/data/collection/NotFoundException.java deleted file mode 100644 index 11d51dcd06..0000000000 --- a/branches/sca-java-1.2.1/modules/implementation-data-api/src/main/java/org/apache/tuscany/sca/implementation/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.implementation.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); - } - -} |