You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jm...@apache.org on 2007/01/25 04:45:43 UTC
svn commit: r499656 - in
/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver:
./ ResolutionException.java Resolver.java ResolverRegistry.java
Author: jmarino
Date: Wed Jan 24 19:45:43 2007
New Revision: 499656
URL: http://svn.apache.org/viewvc?view=rev&rev=499656
Log:
first cut at resolver which will be used to separate the load process
Added:
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/ResolutionException.java (with props)
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/Resolver.java (with props)
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/ResolverRegistry.java (with props)
Added: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/ResolutionException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/ResolutionException.java?view=auto&rev=499656
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/ResolutionException.java (added)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/ResolutionException.java Wed Jan 24 19:45:43 2007
@@ -0,0 +1,52 @@
+/*
+ * 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.spi.resolver;
+
+import org.apache.tuscany.api.TuscanyException;
+
+/**
+ * Denotes an error during the resolve phase as an assembly is evaluated
+ *
+ * @version $Rev$ $Date$
+ */
+public abstract class ResolutionException extends TuscanyException {
+
+ public ResolutionException() {
+ }
+
+ public ResolutionException(String message) {
+ super(message);
+ }
+
+ public ResolutionException(String message, String identifier) {
+ super(message, identifier);
+ }
+
+ public ResolutionException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public ResolutionException(String message, String identifier, Throwable cause) {
+ super(message, identifier, cause);
+ }
+
+ public ResolutionException(Throwable cause) {
+ super(cause);
+ }
+}
Propchange: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/ResolutionException.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/ResolutionException.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/Resolver.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/Resolver.java?view=auto&rev=499656
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/Resolver.java (added)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/Resolver.java Wed Jan 24 19:45:43 2007
@@ -0,0 +1,37 @@
+/*
+ * 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.spi.resolver;
+
+import org.apache.tuscany.spi.model.ModelObject;
+
+/**
+ * Implementations are responsible for resolving resources referenced by an assembly model object
+ *
+ * @version $Rev$ $Date$
+ */
+public interface Resolver {
+
+ /**
+ * Processes a model object, resolving resources referenced by it
+ *
+ * @param object the model object to process
+ * @throws ResolutionException
+ */
+ void resolve(ModelObject object) throws ResolutionException;
+}
Propchange: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/Resolver.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/Resolver.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/ResolverRegistry.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/ResolverRegistry.java?view=auto&rev=499656
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/ResolverRegistry.java (added)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/ResolverRegistry.java Wed Jan 24 19:45:43 2007
@@ -0,0 +1,44 @@
+/*
+ * 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.spi.resolver;
+
+/**
+ * Registry for resolvers that handle resolution of resources referenced by assembly model elements
+ * <p/>
+ * Resolvers are contributed by system extensions
+ *
+ * @version $Rev$ $Date$
+ */
+public interface ResolverRegistry {
+ /**
+ * Register a resolver for a model type.
+ *
+ * @param modelClass the type model element the resolver handles
+ * @param resolver the resolver to be registered
+ */
+ void register(Class<?> modelClass, Resolver resolver);
+
+ /**
+ * Unregister a resolver for a model type.
+ *
+ * @param modelClass the model type whose builder should be unregistered
+ */
+ void unregister(Class<?> modelClass);
+
+}
Propchange: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/ResolverRegistry.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/resolver/ResolverRegistry.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org