From fdaae3ffaa2f06063d0afe27b38aa05af398835f Mon Sep 17 00:00:00 2001 From: rsivaram Date: Thu, 16 Oct 2008 13:50:40 +0000 Subject: Event prototype: subset modules and change version to 1.4-EVENT-SNAPSHOT git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@705244 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/binding/gdata/GDataBinding.java | 77 ------------ .../sca/binding/gdata/GDataBindingFactory.java | 35 ------ .../gdata/GDataImplementationProcessor.java | 100 --------------- .../gdata/impl/GDataBindingFactoryImpl.java | 36 ------ .../sca/binding/gdata/impl/GDataBindingImpl.java | 137 --------------------- 5 files changed, 385 deletions(-) delete mode 100644 sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/GDataBinding.java delete mode 100644 sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/GDataBindingFactory.java delete mode 100644 sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/GDataImplementationProcessor.java delete mode 100644 sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GDataBindingFactoryImpl.java delete mode 100644 sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GDataBindingImpl.java (limited to 'sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata') diff --git a/sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/GDataBinding.java b/sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/GDataBinding.java deleted file mode 100644 index c1868f05dc..0000000000 --- a/sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/GDataBinding.java +++ /dev/null @@ -1,77 +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.binding.gdata; - -import org.apache.tuscany.sca.assembly.Binding; - -/** - * GData binding model. - * - * @version $Rev$ $Date$ - */ -public interface GDataBinding extends Binding { - - /** - * Returns the title of the Atom collection. - * @return - */ - String getTitle(); - - /** - * Sets the title of the Atom collection. - * @param title - */ - void setTitle(String title); - - /* - * Returns the username of a Google account - * @return - */ - String getUsername(); - - /* - * Sets the username of a Google account - * @param username - */ - void setUsername(String username); - - /* - * Returns the password of a Google account - * @return - */ - String getPassword(); - - /* - * Sets the password of a Google account - * @param password - */ - void setPassword(String password); - - /* - * Retruns the name of the Google service to which we are connecting. Sample names of services might include "cl" (Calendar), "mail" (GMail), or "blogger" (Blogger) - * @return - */ - String getServiceType(); - - /* - * Sets the name of the Google service to which we are connecting. Sample names of services might include "cl" (Calendar), "mail" (GMail), or "blogger" (Blogger) - * @param serviceType - */ - void setServiceType(String serviceType); -} diff --git a/sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/GDataBindingFactory.java b/sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/GDataBindingFactory.java deleted file mode 100644 index ec2f179fdb..0000000000 --- a/sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/GDataBindingFactory.java +++ /dev/null @@ -1,35 +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.binding.gdata; - -/** - * Factory for the GData binding - * - * @version $Rev$ $Date$ - */ -public interface GDataBindingFactory { - - /** - * Creates a new Atom binding. - * @return the new Atom binding - */ - GDataBinding createAtomBinding(); - -} diff --git a/sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/GDataImplementationProcessor.java b/sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/GDataImplementationProcessor.java deleted file mode 100644 index 5797629bed..0000000000 --- a/sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/GDataImplementationProcessor.java +++ /dev/null @@ -1,100 +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.binding.gdata; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import javax.xml.stream.XMLStreamWriter; - -import org.apache.tuscany.sca.assembly.xml.Constants; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.resolver.ModelResolver; -import org.apache.tuscany.sca.contribution.service.ContributionResolveException; -import org.apache.tuscany.sca.monitor.Monitor; - -public class GDataImplementationProcessor implements StAXArtifactProcessor { - - private GDataBindingFactory gdataFactory; - protected static final QName BINDING_GDATA = new QName(Constants.SCA10_TUSCANY_NS, "binding.gdata"); - - public GDataImplementationProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) { - - this.gdataFactory = (GDataBindingFactory) modelFactories.getFactory(GDataBindingFactory.class); - } - - public GDataBinding read(XMLStreamReader reader) { - - assert BINDING_GDATA.equals(reader.getName()); - - GDataBinding gdataBinding = gdataFactory.createAtomBinding(); - - /* - * - */ - - String uri = reader.getAttributeValue(null, "uri"); - String serviceType = reader.getAttributeValue(null, "serviceType"); - String login = reader.getAttributeValue(null, "username"); - String password = reader.getAttributeValue(null, "password"); - - gdataBinding.setURI(uri); - gdataBinding.setServiceType(serviceType); - gdataBinding.setUsername(login); - gdataBinding.setPassword(password); - - return gdataBinding; - } - - public void write(GDataBinding gdataBinding, XMLStreamWriter writer) throws XMLStreamException { - if (gdataBinding != null) { - writer.writeStartElement(BINDING_GDATA.getNamespaceURI(), BINDING_GDATA.getLocalPart()); - - if (gdataBinding.getURI() != null) { - writer.writeAttribute("uri", gdataBinding.getURI()); - } - - if (gdataBinding.getServiceType() != null) { - writer.writeAttribute("serviceType", gdataBinding.getServiceType()); - } - if (gdataBinding.getUsername() != null) { - writer.writeAttribute("username", gdataBinding.getUsername()); - } - if (gdataBinding.getPassword() != null) { - writer.writeAttribute("password", gdataBinding.getPassword()); - } - - writer.writeEndElement(); - } - } - - public QName getArtifactType() { - return BINDING_GDATA; - } - - public void resolve(GDataBinding arg0, ModelResolver arg1) throws ContributionResolveException { - } - - public Class getModelType() { - return GDataBinding.class; - } -} diff --git a/sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GDataBindingFactoryImpl.java b/sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GDataBindingFactoryImpl.java deleted file mode 100644 index e0c3bfbe78..0000000000 --- a/sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GDataBindingFactoryImpl.java +++ /dev/null @@ -1,36 +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.binding.gdata.impl; - -import org.apache.tuscany.sca.binding.gdata.GDataBinding; -import org.apache.tuscany.sca.binding.gdata.GDataBindingFactory; - -/** - * Factory for the GData binding model. - * - * @version $Rev$ $Date$ - */ -public class GDataBindingFactoryImpl implements GDataBindingFactory { - - public GDataBinding createAtomBinding() { - return new GDataBindingImpl(); - } - -} diff --git a/sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GDataBindingImpl.java b/sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GDataBindingImpl.java deleted file mode 100644 index baba882c4c..0000000000 --- a/sandbox/event/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GDataBindingImpl.java +++ /dev/null @@ -1,137 +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.binding.gdata.impl; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.tuscany.sca.binding.gdata.GDataBinding; -import org.apache.tuscany.sca.policy.Intent; -import org.apache.tuscany.sca.policy.IntentAttachPointType; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.policy.PolicySetAttachPoint; - -/** - * Implementation of the GData binding model. - * - * @version $Rev$ $Date$ - */ -class GDataBindingImpl implements GDataBinding, PolicySetAttachPoint { - - private String password; - private String username; - private String name; - private String serviceType; - private String uri; - private String title; - private List requiredIntents = new ArrayList(); - private List policySets = new ArrayList(); - private IntentAttachPointType intentAttachPointType; - private List applicablePolicySets = new ArrayList(); - - public List getApplicablePolicySets() { - return applicablePolicySets; - } - - public String getName() { - return name; - } - - public String getURI() { - return uri; - } - - public void setName(String name) { - this.name = name; - } - - public void setURI(String uri) { - this.uri = uri; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public boolean isUnresolved() { - // The binding is always resolved - return false; - } - - public void setUnresolved(boolean unresolved) { - // The binding is always resolved - } - - public List getPolicySets() { - return policySets; - } - - public List getRequiredIntents() { - return requiredIntents; - } - - public IntentAttachPointType getType() { - return intentAttachPointType; - } - - public void setType(IntentAttachPointType intentAttachPointType) { - this.intentAttachPointType = intentAttachPointType; - } - - @Override - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - public void setPolicySets(List policySets) { - this.policySets = policySets; - } - - public void setRequiredIntents(List intents) { - this.requiredIntents = intents; - } - - public String getUsername() { - return this.username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return this.password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getServiceType() { - return this.serviceType; - } - - public void setServiceType(String serviceType) { - this.serviceType = serviceType; - } -} -- cgit v1.2.3