/*
* Created on Jul 18, 2006
*
* Copyright 2005 CafeSip.org
*
* Licensed 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.cafesip.jiplet.console.client.rpc;
import org.cafesip.gwtcomp.client.utils.ContextUtil;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.ServiceDefTarget;
/**
* @author Amit Chatterjee
*
*/
public interface ContextService extends RemoteService
{
public static class Util
{
public static final String SERVICE = ContextUtil.getContextURL()
+ "/ContextService";
private static ContextServiceAsync instance;
public static ContextServiceAsync getInstance()
{
if (instance == null)
{
instance = (ContextServiceAsync) GWT
.create(ContextService.class);
ServiceDefTarget target = (ServiceDefTarget) instance;
target.setServiceEntryPoint(SERVICE);
}
return instance;
}
}
public String[] list() throws Exception;
public void delete(String name) throws Exception;
public ContextElement getProperty(String context) throws Exception;
public ContextElement[] listProperties() throws Exception;
public String[] listJiplets(String context) throws Exception;
public JipletElement getJipletProperty(String context, String jiplet)
throws Exception;
public JipletElement[] listJipletProperties(String context)
throws Exception;
}