@@ -0,0 +1,1966 @@
+/**%0A * Copyright 2010 OpenEngSB Division, Vienna University of Technology%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *   http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.openengsb.core.common;%0A%0Aimport java.util.List;%0A%0Aimport org.openengsb.core.common.util.OsgiServiceUtils;%0Aimport org.osgi.framework.BundleContext;%0Aimport org.osgi.framework.Filter;%0A%0Apublic final class DomainEndpointFactory %7B%0A%0A    private static BundleContext bundleContext;%0A%0A    public %3CT extends Domain%3E T getDomainEndpoint(Class%3CT%3E domainType, String location) %7B%0A        Filter filter = OsgiServiceUtils.getFilterForLocation(domainType, location);%0A        return OsgiServiceUtils.getOsgiServiceProxy(bundleContext, filter, domainType);%0A    %7D%0A%0A    public %3CT extends Domain%3E List%3CT%3E getDomainEndpoints(Class%3CT%3E domainType, String location) %7B%0A        throw new UnsupportedOperationException(%22NYI%22);%0A    %7D%0A%0A    public %3CT extends Domain%3E T getDomainEndpoint(Class%3CT%3E domainType, String location, String context) %7B%0A        Filter filter = OsgiServiceUtils.getFilterForLocation(domainType, location, context);%0A        return OsgiServiceUtils.getOsgiServiceProxy(bundleContext, filter, domainType);%0A    %7D%0A%0A    public %3CT extends Domain%3E List%3CT%3E getDomainEndpoints(Class%3CT%3E domainType, String location, String context) %7B%0A        throw new UnsupportedOperationException(%22NYI%22);%0A    %7D%0A%0A    public void setBundleContext(BundleContext context) %7B%0A        bundleContext = context;%0A    %7D%0A%0A    private DomainEndpointFactory() %7B%0A    %7D%0A%0A%7D%0A

add DomainEndpointFactory and implement single-service-methods