2
* Software License Agreement (BSD License)
4
* Copyright (c) 2008, Regents of the University of California
7
* Redistribution and use of this software in source and binary forms, with or
8
* without modification, are permitted provided that the following conditions
11
* * Redistributions of source code must retain the above
12
* copyright notice, this list of conditions and the
13
* following disclaimer.
15
* * Redistributions in binary form must reproduce the above
16
* copyright notice, this list of conditions and the
17
* following disclaimer in the documentation and/or other
18
* materials provided with the distribution.
20
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
* POSSIBILITY OF SUCH DAMAGE.
32
* Author: Dmitrii Zagorodnov dmitrii@cs.ucsb.edu
35
package edu.ucsb.eucalyptus.admin.client;
37
import com.google.gwt.core.client.GWT;
38
import com.google.gwt.user.client.rpc.RemoteService;
39
import com.google.gwt.user.client.rpc.SerializableException;
40
import com.google.gwt.user.client.rpc.ServiceDefTarget;
42
import java.util.HashMap;
43
import java.util.List;
46
* Created by IntelliJ IDEA.
47
* User: dmitriizagorodnov
50
* To change this template use File | Settings | File Templates.
52
public interface EucalyptusWebBackend extends RemoteService {
54
public String getNewSessionID( String userId, String bCryptedPassword )
55
throws SerializableException;
57
public String addUserRecord( UserInfoWeb user)
58
throws SerializableException;
60
public String addUserRecord( String sessionId, UserInfoWeb user )
61
throws SerializableException;
63
public String recoverPassword( UserInfoWeb user )
64
throws SerializableException;
66
public List<UserInfoWeb> getUserRecord( String sessionId, String userId )
67
throws SerializableException;
69
public List<ImageInfoWeb> getImageInfo( String sessionId, String userId )
70
throws SerializableException;
72
public String performAction( String sessionId, String action, String param )
73
throws SerializableException;
75
public void logoutSession( String sessionId )
76
throws SerializableException;
78
public String getNewCert( String sessionId )
79
throws SerializableException;
81
public HashMap<String,String> getProperties()
82
throws SerializableException;
84
public String changePassword( String sessionId, String oldPassword, String newPassword )
85
throws SerializableException;
87
public String updateUserRecord( String sessionId, UserInfoWeb newRecord )
88
throws SerializableException;
90
public List<ClusterInfoWeb> getClusterList( String sessionId )
91
throws SerializableException;
93
public void setClusterList( String sessionId, List<ClusterInfoWeb> clusterList )
94
throws SerializableException;
96
public SystemConfigWeb getSystemConfig( String sessionId ) throws SerializableException;
98
public void setSystemConfig( String sessionId, SystemConfigWeb systemConfig ) throws SerializableException;
100
public List<VmTypeWeb> getVmTypes( String sessionId ) throws SerializableException;
101
public void setVmTypes( String sessionId, List<VmTypeWeb> vmTypes )throws SerializableException;
103
public CloudInfoWeb getCloudInfo (String sessionId, boolean setExternalHostport) throws SerializableException;
107
* Utility/Convenience class.
108
* Use EucalyptusWebBackend.App.getInstance() to access static instance of EucalyptusWebBackendAsync
110
public static class App {
112
private static edu.ucsb.eucalyptus.admin.client.EucalyptusWebBackendAsync ourInstance = null;
114
public static synchronized edu.ucsb.eucalyptus.admin.client.EucalyptusWebBackendAsync getInstance()
116
if ( ourInstance == null )
118
ourInstance = ( edu.ucsb.eucalyptus.admin.client.EucalyptusWebBackendAsync ) GWT.create( EucalyptusWebBackend.class );
119
( ( ServiceDefTarget ) ourInstance ).setServiceEntryPoint( GWT.getModuleBaseURL() + "EucalyptusWebBackend" );