summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/workspace/src
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-04-10 00:11:48 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-04-10 00:11:48 +0000
commitf08e6ec68c6709018ad71d0e4140b9d4161ff10b (patch)
treeb387037f660ec615071b162ac47e9e7c688349f6 /java/sca/modules/workspace/src
parent58a8ca68a790cce2f3653ba2121d4e49a70d0228 (diff)
Remove deprecated classes and use generic type for getModel
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@763837 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/workspace/src')
-rw-r--r--java/sca/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/impl/WorkspaceImpl.java38
1 files changed, 19 insertions, 19 deletions
diff --git a/java/sca/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/impl/WorkspaceImpl.java b/java/sca/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/impl/WorkspaceImpl.java
index 8c2e119493..1ae3b6b664 100644
--- a/java/sca/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/impl/WorkspaceImpl.java
+++ b/java/sca/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/impl/WorkspaceImpl.java
@@ -6,15 +6,15 @@
* 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.
+ * under the License.
*/
package org.apache.tuscany.sca.workspace.impl;
@@ -43,21 +43,21 @@ class WorkspaceImpl implements Workspace {
private Object model;
private byte[] contents;
private boolean unresolved;
- private ModelResolver modelResolver;
+ private ModelResolver modelResolver;
private List<Contribution> dependencies = new ArrayList<Contribution>();
-
+
/**
- * Constructs a new workspace.
+ * Constructs a new workspace.
*/
WorkspaceImpl() {
}
-
+
public String getLocation() {
return location;
}
- public Object getModel() {
- return model;
+ public <T> T getModel() {
+ return (T) model;
}
public String getURI() {
@@ -75,11 +75,11 @@ class WorkspaceImpl implements Workspace {
public byte[] getContents() {
return contents;
}
-
+
public void setContents(byte[] contents) {
this.contents = contents;
}
-
+
public void setURI(String uri) {
this.uri = uri;
}
@@ -95,11 +95,11 @@ class WorkspaceImpl implements Workspace {
public List<Contribution> getContributions() {
return contributions;
}
-
+
public List<Artifact> getArtifacts() {
return (List<Artifact>)(Object)contributions;
}
-
+
public List<Contribution> getDependencies() {
return dependencies;
}
@@ -108,11 +108,11 @@ class WorkspaceImpl implements Workspace {
//FIXME Remove later
return null;
}
-
+
public void setClassLoader(ClassLoader classLoader) {
//FIXME Remove later
}
-
+
public List<Composite> getDeployables() {
List<Composite> deployables = new ArrayList<Composite>();
for (Contribution contribution: contributions) {
@@ -120,7 +120,7 @@ class WorkspaceImpl implements Workspace {
}
return deployables;
}
-
+
public List<Export> getExports() {
List<Export> exports = new ArrayList<Export>();
for (Contribution contribution: contributions) {
@@ -128,7 +128,7 @@ class WorkspaceImpl implements Workspace {
}
return exports;
}
-
+
public List<Import> getImports() {
List<Import> imports = new ArrayList<Import>();
for (Contribution contribution: contributions) {
@@ -136,11 +136,11 @@ class WorkspaceImpl implements Workspace {
}
return imports;
}
-
+
public ModelResolver getModelResolver() {
return modelResolver;
}
-
+
public void setModelResolver(ModelResolver modelResolver) {
this.modelResolver = modelResolver;
}