~ccheney/ubuntu/lucid/eucalyptus/lucid-sru

« back to all changes in this revision

Viewing changes to clc/modules/www/src/edu/ucsb/eucalyptus/admin/client/EucalyptusWebBackend.java

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2009-02-11 02:45:39 UTC
  • Revision ID: james.westby@ubuntu.com-20090211024539-0jhzbpg3hk6nu1yg
Tags: upstream-1.5~bzr139
ImportĀ upstreamĀ versionĀ 1.5~bzr139

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Software License Agreement (BSD License)
 
3
 *
 
4
 * Copyright (c) 2008, Regents of the University of California
 
5
 * All rights reserved.
 
6
 *
 
7
 * Redistribution and use of this software in source and binary forms, with or
 
8
 * without modification, are permitted provided that the following conditions
 
9
 * are met:
 
10
 *
 
11
 * * Redistributions of source code must retain the above
 
12
 *   copyright notice, this list of conditions and the
 
13
 *   following disclaimer.
 
14
 *
 
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.
 
19
 *
 
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.
 
31
 *
 
32
 * Author: Dmitrii Zagorodnov dmitrii@cs.ucsb.edu
 
33
 */
 
34
 
 
35
package edu.ucsb.eucalyptus.admin.client;
 
36
 
 
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;
 
41
 
 
42
import java.util.HashMap;
 
43
import java.util.List;
 
44
 
 
45
/**
 
46
 * Created by IntelliJ IDEA.
 
47
 * User: dmitriizagorodnov
 
48
 * Date: May 3, 2008
 
49
 * Time: 2:57:31 PM
 
50
 * To change this template use File | Settings | File Templates.
 
51
 */
 
52
public interface EucalyptusWebBackend extends RemoteService {
 
53
 
 
54
    public String getNewSessionID( String userId, String bCryptedPassword )
 
55
            throws SerializableException;
 
56
 
 
57
    public String addUserRecord( UserInfoWeb user)
 
58
            throws SerializableException;
 
59
 
 
60
    public String addUserRecord( String sessionId, UserInfoWeb user )
 
61
            throws SerializableException;
 
62
 
 
63
        public String recoverPassword( UserInfoWeb user )
 
64
                throws SerializableException;
 
65
 
 
66
  public List<UserInfoWeb> getUserRecord( String sessionId, String userId )
 
67
      throws SerializableException;
 
68
 
 
69
   public List<ImageInfoWeb> getImageInfo( String sessionId, String userId )
 
70
      throws SerializableException;
 
71
 
 
72
  public String performAction( String sessionId, String action, String param )
 
73
      throws SerializableException;
 
74
 
 
75
  public void logoutSession( String sessionId )
 
76
      throws SerializableException;
 
77
 
 
78
  public String getNewCert( String sessionId )
 
79
      throws SerializableException;
 
80
 
 
81
  public HashMap<String,String> getProperties()
 
82
      throws SerializableException;
 
83
 
 
84
  public String changePassword( String sessionId, String oldPassword, String newPassword )
 
85
      throws SerializableException;
 
86
 
 
87
  public String updateUserRecord( String sessionId, UserInfoWeb newRecord )
 
88
      throws SerializableException;
 
89
 
 
90
  public List<ClusterInfoWeb> getClusterList( String sessionId )
 
91
      throws SerializableException;
 
92
 
 
93
  public void setClusterList( String sessionId, List<ClusterInfoWeb> clusterList )
 
94
      throws SerializableException;
 
95
 
 
96
  public SystemConfigWeb getSystemConfig( String sessionId ) throws SerializableException;
 
97
 
 
98
  public void setSystemConfig( String sessionId, SystemConfigWeb systemConfig ) throws SerializableException;
 
99
 
 
100
  public List<VmTypeWeb> getVmTypes( String sessionId ) throws SerializableException;
 
101
  public void setVmTypes( String sessionId, List<VmTypeWeb> vmTypes )throws SerializableException;
 
102
 
 
103
  public CloudInfoWeb getCloudInfo (String sessionId, boolean setExternalHostport) throws SerializableException;
 
104
 
 
105
 
 
106
  /**
 
107
   * Utility/Convenience class.
 
108
   * Use EucalyptusWebBackend.App.getInstance() to access static instance of EucalyptusWebBackendAsync
 
109
   */
 
110
  public static class App {
 
111
 
 
112
    private static edu.ucsb.eucalyptus.admin.client.EucalyptusWebBackendAsync ourInstance = null;
 
113
 
 
114
    public static synchronized edu.ucsb.eucalyptus.admin.client.EucalyptusWebBackendAsync getInstance()
 
115
    {
 
116
      if ( ourInstance == null )
 
117
      {
 
118
        ourInstance = ( edu.ucsb.eucalyptus.admin.client.EucalyptusWebBackendAsync ) GWT.create( EucalyptusWebBackend.class );
 
119
        ( ( ServiceDefTarget ) ourInstance ).setServiceEntryPoint( GWT.getModuleBaseURL() + "EucalyptusWebBackend" );
 
120
      }
 
121
      return ourInstance;
 
122
    }
 
123
  }
 
124
}