Move classes to their pertinent packages, too much clutter under
com.rcarrillocruz.android.openstackdroid
This commit is contained in:
parent
a052ab848c
commit
10f3c5885b
|
@ -41,7 +41,8 @@
|
|||
<service android:name="com.rcarrillocruz.android.openstackdroid.CloudControllerService" />
|
||||
|
||||
<provider
|
||||
android:name="com.rcarrillocruz.android.openstackdroid.ConnectionProfileContentProvider"
|
||||
android:name="com.rcarrillocruz.android.openstackdroid.db.connectionprofile.ConnectionProfileContentProvider"
|
||||
android:exported="false"
|
||||
android:authorities="com.rcarrillocruz.android.openstackdroid" >
|
||||
</provider>
|
||||
</application>
|
||||
|
|
|
@ -105,7 +105,6 @@ public class CloudBrowserActivity extends Activity implements TabListener {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch(item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
|
@ -125,15 +124,11 @@ public class CloudBrowserActivity extends Activity implements TabListener {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTabReselected(Tab tab, FragmentTransaction ft) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTabSelected(Tab tab, FragmentTransaction ft) {
|
||||
// TODO Auto-generated method stub
|
||||
Class<?> tabClass = null;
|
||||
|
||||
switch(tab.getPosition()) {
|
||||
|
@ -239,9 +234,7 @@ public class CloudBrowserActivity extends Activity implements TabListener {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTabUnselected(Tab tab, FragmentTransaction ft) {
|
||||
// TODO Auto-generated method stub
|
||||
if (mListFragmentAttached != null)
|
||||
ft.detach(mListFragmentAttached);
|
||||
}
|
||||
|
|
|
@ -17,9 +17,8 @@ public abstract class CloudBrowserListFragment extends ListFragment implements R
|
|||
mReceiver.setReceiver(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceiveResult(int resultCode, Bundle resultData) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public String getEndpoint() {
|
||||
|
|
|
@ -9,7 +9,6 @@ public class CloudControllerResultReceiver extends ResultReceiver {
|
|||
|
||||
public CloudControllerResultReceiver(Handler handler) {
|
||||
super(handler);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public interface Receiver {
|
||||
|
@ -20,7 +19,6 @@ public class CloudControllerResultReceiver extends ResultReceiver {
|
|||
mReceiver = receiver;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onReceiveResult(int resultCode, Bundle resultData) {
|
||||
|
||||
if (mReceiver != null) {
|
||||
|
|
|
@ -1,29 +1,15 @@
|
|||
package com.rcarrillocruz.android.openstackdroid;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.ParseException;
|
||||
import org.apache.http.client.ClientProtocolException;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.client.methods.HttpRequestBase;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
import com.rcarrillocruz.android.openstackdroid.operations.ApiOperation;
|
||||
|
||||
import android.app.IntentService;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
|
@ -32,6 +18,8 @@ import android.os.ResultReceiver;
|
|||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.rcarrillocruz.android.openstackdroid.operations.ApiOperation;
|
||||
|
||||
public class CloudControllerService extends IntentService {
|
||||
public static final String TAG = CloudControllerResultReceiver.class.getName();
|
||||
public static final String GET_TOKEN_OPERATION = "com.rcarrillocruz.android.openstackdroid.operations.identity.GetTokenOperation";
|
||||
|
@ -51,12 +39,9 @@ public class CloudControllerService extends IntentService {
|
|||
|
||||
public CloudControllerService() {
|
||||
super("CloudControllerService");
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onHandleIntent(Intent intent) {
|
||||
// TODO Auto-generated method stub
|
||||
Uri data = intent.getData();
|
||||
Bundle extras = intent.getExtras();
|
||||
|
||||
|
@ -77,45 +62,42 @@ public class CloudControllerService extends IntentService {
|
|||
}
|
||||
|
||||
private ApiOperation getOperationInstance(String operation) {
|
||||
// TODO Auto-generated method stub
|
||||
ApiOperation apiOperation = null;
|
||||
|
||||
try {
|
||||
apiOperation = (ApiOperation) Class.forName(operation).newInstance();
|
||||
} catch (InstantiationException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
Log.e(TAG,Log.getStackTraceString(e));
|
||||
Toast.makeText(getApplicationContext(), "Instantiation exception, check the Android log!", Toast.LENGTH_LONG).show();
|
||||
} catch (IllegalAccessException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
Log.e(TAG,Log.getStackTraceString(e));
|
||||
Toast.makeText(getApplicationContext(), "Illegal access exception, check the Android log!", Toast.LENGTH_LONG).show();
|
||||
} catch (ClassNotFoundException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
Log.e(TAG,Log.getStackTraceString(e));
|
||||
Toast.makeText(getApplicationContext(), "Class not found exception, check the Android log!", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
return apiOperation;
|
||||
}
|
||||
|
||||
private HttpResponse executeOperation(HttpRequestBase request) {
|
||||
// TODO Auto-generated method stub
|
||||
HttpResponse response = null;
|
||||
HttpClient client = new DefaultHttpClient();
|
||||
|
||||
try {
|
||||
response = client.execute(request);
|
||||
} catch (ClientProtocolException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
Log.e(TAG,Log.getStackTraceString(e));
|
||||
Toast.makeText(getApplicationContext(), "Client protocol exception, check the Android log!", Toast.LENGTH_LONG).show();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
Log.e(TAG,Log.getStackTraceString(e));
|
||||
Toast.makeText(getApplicationContext(), "Input/output exception, check the Android log!", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
private void returnResultstoReceiver(String operation, HttpResponse response,
|
||||
ResultReceiver receiver) {
|
||||
// TODO Auto-generated method stub
|
||||
Bundle results = new Bundle();
|
||||
|
||||
try {
|
||||
|
@ -128,11 +110,11 @@ public class CloudControllerService extends IntentService {
|
|||
receiver.send(504, results);
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
Log.e(TAG,Log.getStackTraceString(e));
|
||||
Toast.makeText(getApplicationContext(), "Parsing exception, check the Android log!", Toast.LENGTH_LONG).show();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
Log.e(TAG,Log.getStackTraceString(e));
|
||||
Toast.makeText(getApplicationContext(), "Input/output exception, check the Android log!", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
package com.rcarrillocruz.android.openstackdroid;
|
||||
|
||||
import com.rcarrillocruz.android.openstackdroid.R;
|
||||
import com.rcarrillocruz.android.openstackdroid.R.id;
|
||||
import com.rcarrillocruz.android.openstackdroid.R.layout;
|
||||
import com.rcarrillocruz.android.openstackdroid.R.menu;
|
||||
import com.rcarrillocruz.android.openstackdroid.db.connectionprofile.ConnectionProfileContentProvider;
|
||||
import com.rcarrillocruz.android.openstackdroid.db.connectionprofile.ConnectionProfileTable;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ContentValues;
|
||||
import android.database.Cursor;
|
||||
|
@ -18,9 +25,7 @@ public class ConnectionProfileActivity extends Activity {
|
|||
private EditText mPassword;
|
||||
private EditText mTenantId;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
// TODO Auto-generated method stub
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.connection_profile_activity);
|
||||
|
||||
|
@ -56,7 +61,6 @@ public class ConnectionProfileActivity extends Activity {
|
|||
}
|
||||
|
||||
private void saveConnectionProfile() {
|
||||
// TODO Auto-generated method stub
|
||||
String profileName = (String) mProfileName.getText().toString();
|
||||
String endpoint = mEndpoint.getText().toString();
|
||||
String username = mUsername.getText().toString();
|
||||
|
@ -80,7 +84,6 @@ public class ConnectionProfileActivity extends Activity {
|
|||
}
|
||||
|
||||
private void populateForm(Uri uri) {
|
||||
// TODO Auto-generated method stub
|
||||
String[] projection = {ConnectionProfileTable.COLUMN_PROFILE_NAME, ConnectionProfileTable.COLUMN_ENDPOINT,
|
||||
ConnectionProfileTable.COLUMN_USERNAME, ConnectionProfileTable.COLUMN_PASSWORD,
|
||||
ConnectionProfileTable.COLUMN_TENANT_ID};
|
||||
|
|
|
@ -16,7 +16,6 @@ public class FlavorDetailsFragment extends Fragment {
|
|||
private TextView tv;
|
||||
|
||||
public static FlavorDetailsFragment newInstance(int position) {
|
||||
// TODO Auto-generated method stub
|
||||
FlavorDetailsFragment f = new FlavorDetailsFragment();
|
||||
|
||||
Bundle args = new Bundle();
|
||||
|
@ -27,7 +26,6 @@ public class FlavorDetailsFragment extends Fragment {
|
|||
}
|
||||
|
||||
public int getShownIndex() {
|
||||
// TODO Auto-generated method stub
|
||||
return getArguments().getInt("position", 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,10 +20,8 @@ public class FlavorListFragment extends CloudBrowserListFragment {
|
|||
List<FlavorModel> flavors;
|
||||
private ArrayAdapter<FlavorModel> adapter;
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
// TODO Auto-generated method stub
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
endpoint = ((OpenstackdroidApplication) (getActivity().getApplication())).getComputeEndpoint();
|
||||
flavors = ((CloudBrowserActivity) getActivity()).getFlavors();
|
||||
|
||||
|
@ -44,18 +42,14 @@ public class FlavorListFragment extends CloudBrowserListFragment {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onListItemClick(ListView l, View v, int position, long id) {
|
||||
// TODO Auto-generated method stub
|
||||
mCurCheckPosition = position;
|
||||
public void onListItemClick(ListView l, View v, int position, long id) {
|
||||
mCurCheckPosition = position;
|
||||
getListView().setItemChecked(position, true);
|
||||
|
||||
showDetails(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void showDetails(int position) {
|
||||
// TODO Auto-generated method stub
|
||||
FlavorDetailsFragment fdf = (FlavorDetailsFragment) ((CloudBrowserActivity) getActivity()).getmFlavorDetailsFragment();
|
||||
|
||||
if (fdf == null || fdf.getShownIndex() != position)
|
||||
|
@ -68,9 +62,7 @@ public class FlavorListFragment extends CloudBrowserListFragment {
|
|||
((CloudBrowserActivity) getActivity()).showDetailsLayout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceiveResult(int resultCode, Bundle resultData) {
|
||||
// TODO Auto-generated method stub
|
||||
if (resultCode == 200) {
|
||||
String operation = resultData.getString(CloudControllerService.OPERATION);
|
||||
|
||||
|
@ -84,7 +76,6 @@ public class FlavorListFragment extends CloudBrowserListFragment {
|
|||
}
|
||||
|
||||
private void populateItems(GetFlavorsResponse gfr) {
|
||||
// TODO Auto-generated method stub
|
||||
flavors.clear();
|
||||
Iterator<FlavorDetailsObject> it = gfr.getFlavors().iterator();
|
||||
FlavorDetailsObject item = null;
|
||||
|
|
|
@ -16,7 +16,6 @@ public class ImageDetailsFragment extends Fragment {
|
|||
private TextView tv;
|
||||
|
||||
public static ImageDetailsFragment newInstance(int position) {
|
||||
// TODO Auto-generated method stub
|
||||
ImageDetailsFragment f = new ImageDetailsFragment();
|
||||
|
||||
Bundle args = new Bundle();
|
||||
|
@ -27,7 +26,6 @@ public class ImageDetailsFragment extends Fragment {
|
|||
}
|
||||
|
||||
public int getShownIndex() {
|
||||
// TODO Auto-generated method stub
|
||||
return getArguments().getInt("position", 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,17 +4,14 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
|
||||
import android.app.FragmentTransaction;
|
||||
import android.app.ListFragment;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.View;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListView;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.rcarrillocruz.android.openstackdroid.CloudControllerResultReceiver.Receiver;
|
||||
import com.rcarrillocruz.android.openstackdroid.json.image.GetImagesResponse;
|
||||
import com.rcarrillocruz.android.openstackdroid.json.image.ImageDetailsObject;
|
||||
import com.rcarrillocruz.android.openstackdroid.model.ImageModel;
|
||||
|
@ -23,10 +20,8 @@ public class ImageListFragment extends CloudBrowserListFragment {
|
|||
List<ImageModel> images;
|
||||
private ArrayAdapter<ImageModel> adapter;
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
// TODO Auto-generated method stub
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
endpoint = ((OpenstackdroidApplication) (getActivity().getApplication())).getImageEndpoint();
|
||||
images = ((CloudBrowserActivity) getActivity()).getImages();
|
||||
|
||||
|
@ -47,17 +42,14 @@ public class ImageListFragment extends CloudBrowserListFragment {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onListItemClick(ListView l, View v, int position, long id) {
|
||||
// TODO Auto-generated method stub
|
||||
mCurCheckPosition = position;
|
||||
public void onListItemClick(ListView l, View v, int position, long id) {
|
||||
mCurCheckPosition = position;
|
||||
getListView().setItemChecked(position, true);
|
||||
|
||||
showDetails(position);
|
||||
}
|
||||
|
||||
protected void showDetails(int position) {
|
||||
// TODO Auto-generated method stub
|
||||
ImageDetailsFragment idf = (ImageDetailsFragment) ((CloudBrowserActivity) getActivity()).getmImageDetailsFragment();
|
||||
|
||||
if (idf == null || idf.getShownIndex() != position)
|
||||
|
@ -70,9 +62,7 @@ public class ImageListFragment extends CloudBrowserListFragment {
|
|||
((CloudBrowserActivity) getActivity()).showDetailsLayout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceiveResult(int resultCode, Bundle resultData) {
|
||||
// TODO Auto-generated method stub
|
||||
if (resultCode == 200) {
|
||||
String operation = resultData.getString(CloudControllerService.OPERATION);
|
||||
|
||||
|
@ -86,7 +76,6 @@ public class ImageListFragment extends CloudBrowserListFragment {
|
|||
}
|
||||
|
||||
private void populateItems(GetImagesResponse gir) {
|
||||
// TODO Auto-generated method stub
|
||||
images.clear();
|
||||
Iterator<ImageDetailsObject> it = gir.getImages().iterator();
|
||||
ImageDetailsObject item = null;
|
||||
|
|
|
@ -5,7 +5,6 @@ import java.util.List;
|
|||
|
||||
import android.net.Uri;
|
||||
import android.os.Handler;
|
||||
import android.os.Parcelable;
|
||||
import android.app.ListActivity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.ContentValues;
|
||||
|
@ -27,6 +26,8 @@ import android.app.LoaderManager;
|
|||
import android.content.CursorLoader;
|
||||
import com.google.gson.Gson;
|
||||
import com.rcarrillocruz.android.openstackdroid.CloudControllerResultReceiver.Receiver;
|
||||
import com.rcarrillocruz.android.openstackdroid.db.connectionprofile.ConnectionProfileContentProvider;
|
||||
import com.rcarrillocruz.android.openstackdroid.db.connectionprofile.ConnectionProfileTable;
|
||||
import com.rcarrillocruz.android.openstackdroid.json.identity.EndpointObject;
|
||||
import com.rcarrillocruz.android.openstackdroid.json.identity.GetTokenResponse;
|
||||
import com.rcarrillocruz.android.openstackdroid.json.identity.RoleObject;
|
||||
|
@ -43,7 +44,6 @@ public class LoginActivity extends ListActivity implements Receiver, LoaderManag
|
|||
private long selectedItemId = -1;
|
||||
private ProgressDialog progressDialog;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
|
@ -52,7 +52,6 @@ public class LoginActivity extends ListActivity implements Receiver, LoaderManag
|
|||
|
||||
lv.setOnItemLongClickListener(new OnItemLongClickListener() {
|
||||
|
||||
@Override
|
||||
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
|
||||
if (mActionMode != null) {
|
||||
|
@ -110,7 +109,6 @@ public class LoginActivity extends ListActivity implements Receiver, LoaderManag
|
|||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.login_menu, menu);
|
||||
return true;
|
||||
|
@ -153,8 +151,6 @@ public class LoginActivity extends ListActivity implements Receiver, LoaderManag
|
|||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch(item.getItemId()) {
|
||||
case R.id.add_profile:
|
||||
|
@ -203,7 +199,6 @@ public class LoginActivity extends ListActivity implements Receiver, LoaderManag
|
|||
}
|
||||
|
||||
private EndpointObject getEndpointByType(List<ServiceCatalogObject> sc, String type) {
|
||||
// TODO Auto-generated method stub
|
||||
EndpointObject eo = null;
|
||||
boolean found = false;
|
||||
ServiceCatalogObject item = null;
|
||||
|
@ -278,20 +273,17 @@ public class LoginActivity extends ListActivity implements Receiver, LoaderManag
|
|||
|
||||
setListAdapter(adapter);
|
||||
}
|
||||
@Override
|
||||
|
||||
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
|
||||
// TODO Auto-generated method stub
|
||||
String[] projection = { ConnectionProfileTable.COLUMN_ID, ConnectionProfileTable.COLUMN_PROFILE_NAME };
|
||||
CursorLoader cursorLoader = new CursorLoader(this, ConnectionProfileContentProvider.CONTENT_URI, projection, null, null, null);
|
||||
return cursorLoader;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
|
||||
adapter.swapCursor(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaderReset(Loader<Cursor> loader) {
|
||||
adapter.swapCursor(null);
|
||||
}
|
||||
|
|
|
@ -12,61 +12,73 @@ public class OpenstackdroidApplication extends Application {
|
|||
private String identityAdminEndpoint;
|
||||
private String imageEndpoint;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
// TODO Auto-generated method stub
|
||||
super.onCreate();
|
||||
}
|
||||
@Override
|
||||
|
||||
public void onTerminate() {
|
||||
// TODO Auto-generated method stub
|
||||
super.onTerminate();
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
public void setToken(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public String getTenantId() {
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
public void setTenantId(String tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public boolean isAdminUser() {
|
||||
return isAdminUser;
|
||||
}
|
||||
|
||||
public void setAdminUser(boolean isAdminUser) {
|
||||
this.isAdminUser = isAdminUser;
|
||||
}
|
||||
|
||||
public String getComputeEndpoint() {
|
||||
return computeEndpoint;
|
||||
}
|
||||
|
||||
public void setComputeEndpoint(String computeEndpoint) {
|
||||
this.computeEndpoint = computeEndpoint;
|
||||
}
|
||||
|
||||
public String getVolumeEndpoint() {
|
||||
return volumeEndpoint;
|
||||
}
|
||||
|
||||
public void setVolumeEndpoint(String volumeEndpoint) {
|
||||
this.volumeEndpoint = volumeEndpoint;
|
||||
}
|
||||
|
||||
public String getIdentityEndpoint() {
|
||||
return identityEndpoint;
|
||||
}
|
||||
|
||||
public void setIdentityEndpoint(String identityEndpoint) {
|
||||
this.identityEndpoint = identityEndpoint;
|
||||
}
|
||||
|
||||
public String getIdentityAdminEndpoint() {
|
||||
return identityAdminEndpoint;
|
||||
}
|
||||
|
||||
public void setIdentityAdminEndpoint(String identityAdminEndpoint) {
|
||||
this.identityAdminEndpoint = identityAdminEndpoint;
|
||||
}
|
||||
|
||||
public String getImageEndpoint() {
|
||||
return imageEndpoint;
|
||||
}
|
||||
|
||||
public void setImageEndpoint(String imageEndpoint) {
|
||||
this.imageEndpoint = imageEndpoint;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ public class ServerDetailsFragment extends Fragment {
|
|||
private TextView tv;
|
||||
|
||||
public static ServerDetailsFragment newInstance(int position) {
|
||||
// TODO Auto-generated method stub
|
||||
ServerDetailsFragment f = new ServerDetailsFragment();
|
||||
|
||||
Bundle args = new Bundle();
|
||||
|
@ -30,11 +29,9 @@ public class ServerDetailsFragment extends Fragment {
|
|||
}
|
||||
|
||||
public int getShownIndex() {
|
||||
// TODO Auto-generated method stub
|
||||
return getArguments().getInt("position", 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
|
||||
scroller = new ScrollView(getActivity());
|
||||
|
|
|
@ -4,31 +4,26 @@ import java.util.ArrayList;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import android.app.FragmentTransaction;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListView;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.rcarrillocruz.android.openstackdroid.CloudControllerResultReceiver.Receiver;
|
||||
import com.rcarrillocruz.android.openstackdroid.json.compute.GetServersResponse;
|
||||
import com.rcarrillocruz.android.openstackdroid.json.compute.IPAddressObject;
|
||||
import com.rcarrillocruz.android.openstackdroid.json.compute.ServerDetailsObject;
|
||||
import com.rcarrillocruz.android.openstackdroid.model.IPAddressModel;
|
||||
import com.rcarrillocruz.android.openstackdroid.model.ServerModel;
|
||||
|
||||
import android.app.FragmentTransaction;
|
||||
import android.app.ListFragment;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.View;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListView;
|
||||
|
||||
public class ServerListFragment extends CloudBrowserListFragment {
|
||||
List<ServerModel> servers;
|
||||
private ArrayAdapter<ServerModel> adapter;
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
// TODO Auto-generated method stub
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
servers = ((CloudBrowserActivity) getActivity()).getServers();
|
||||
endpoint = ((OpenstackdroidApplication) (getActivity().getApplication())).getComputeEndpoint();
|
||||
|
@ -50,9 +45,7 @@ public class ServerListFragment extends CloudBrowserListFragment {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onListItemClick(ListView l, View v, int position, long id) {
|
||||
// TODO Auto-generated method stub
|
||||
mCurCheckPosition = position;
|
||||
getListView().setItemChecked(position, true);
|
||||
|
||||
|
@ -60,7 +53,6 @@ public class ServerListFragment extends CloudBrowserListFragment {
|
|||
}
|
||||
|
||||
protected void showDetails(int position) {
|
||||
// TODO Auto-generated method stub
|
||||
ServerDetailsFragment sdf = (ServerDetailsFragment) ((CloudBrowserActivity) getActivity()).getmServerDetailsFragment();
|
||||
|
||||
if (sdf == null || sdf.getShownIndex() != position)
|
||||
|
@ -73,9 +65,7 @@ public class ServerListFragment extends CloudBrowserListFragment {
|
|||
((CloudBrowserActivity) getActivity()).showDetailsLayout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceiveResult(int resultCode, Bundle resultData) {
|
||||
// TODO Auto-generated method stub
|
||||
if (resultCode == 200) {
|
||||
String operation = resultData.getString(CloudControllerService.OPERATION);
|
||||
|
||||
|
@ -89,7 +79,6 @@ public class ServerListFragment extends CloudBrowserListFragment {
|
|||
}
|
||||
|
||||
private void populateItems(GetServersResponse gsr) {
|
||||
// TODO Auto-generated method stub
|
||||
servers.clear();
|
||||
Iterator<ServerDetailsObject> it = gsr.getServers().iterator();
|
||||
ServerDetailsObject item = null;
|
||||
|
|
|
@ -16,7 +16,6 @@ public class TenantDetailsFragment extends Fragment {
|
|||
private TextView tv;
|
||||
|
||||
public static TenantDetailsFragment newInstance(int position) {
|
||||
// TODO Auto-generated method stub
|
||||
TenantDetailsFragment f = new TenantDetailsFragment();
|
||||
|
||||
Bundle args = new Bundle();
|
||||
|
@ -27,11 +26,9 @@ public class TenantDetailsFragment extends Fragment {
|
|||
}
|
||||
|
||||
public int getShownIndex() {
|
||||
// TODO Auto-generated method stub
|
||||
return getArguments().getInt("position", 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
scroller = new ScrollView(getActivity());
|
||||
tv = new TextView(getActivity());
|
||||
|
|
|
@ -22,7 +22,6 @@ public class TenantListFragment extends CloudBrowserListFragment {
|
|||
private ArrayAdapter<TenantModel> adapter;
|
||||
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
// TODO Auto-generated method stub
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
tenants = ((CloudBrowserActivity) getActivity()).getTenants();
|
||||
endpoint = ((OpenstackdroidApplication) (getActivity().getApplication())).getIdentityAdminEndpoint();
|
||||
|
@ -44,9 +43,7 @@ public class TenantListFragment extends CloudBrowserListFragment {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onListItemClick(ListView l, View v, int position, long id) {
|
||||
// TODO Auto-generated method stub
|
||||
mCurCheckPosition = position;
|
||||
getListView().setItemChecked(position, true);
|
||||
|
||||
|
@ -54,7 +51,6 @@ public class TenantListFragment extends CloudBrowserListFragment {
|
|||
}
|
||||
|
||||
protected void showDetails(int position) {
|
||||
// TODO Auto-generated method stub
|
||||
TenantDetailsFragment tdf = (TenantDetailsFragment) ((CloudBrowserActivity) getActivity()).getmTenantDetailsFragment();
|
||||
|
||||
if (tdf == null || tdf.getShownIndex() != position)
|
||||
|
@ -67,9 +63,7 @@ public class TenantListFragment extends CloudBrowserListFragment {
|
|||
((CloudBrowserActivity) getActivity()).showDetailsLayout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceiveResult(int resultCode, Bundle resultData) {
|
||||
// TODO Auto-generated method stub
|
||||
if (resultCode == 200) {
|
||||
String operation = resultData.getString(CloudControllerService.OPERATION);
|
||||
|
||||
|
@ -83,7 +77,6 @@ public class TenantListFragment extends CloudBrowserListFragment {
|
|||
}
|
||||
|
||||
private void populateItems(GetTenantsResponse gtr) {
|
||||
// TODO Auto-generated method stub
|
||||
tenants.clear();
|
||||
Iterator<TenantDetailsObject> it = gtr.getTenants().iterator();
|
||||
TenantDetailsObject item = null;
|
||||
|
|
|
@ -16,7 +16,6 @@ public class UserDetailsFragment extends Fragment {
|
|||
private TextView tv;
|
||||
|
||||
public static UserDetailsFragment newInstance(int position) {
|
||||
// TODO Auto-generated method stub
|
||||
UserDetailsFragment f = new UserDetailsFragment();
|
||||
|
||||
Bundle args = new Bundle();
|
||||
|
@ -27,11 +26,9 @@ public class UserDetailsFragment extends Fragment {
|
|||
}
|
||||
|
||||
public int getShownIndex() {
|
||||
// TODO Auto-generated method stub
|
||||
return getArguments().getInt("position", 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
scroller = new ScrollView(getActivity());
|
||||
tv = new TextView(getActivity());
|
||||
|
|
|
@ -22,7 +22,6 @@ public class UserListFragment extends CloudBrowserListFragment {
|
|||
private ArrayAdapter<UserModel> adapter;
|
||||
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
// TODO Auto-generated method stub
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
users = ((CloudBrowserActivity) getActivity()).getUsers();
|
||||
endpoint = ((OpenstackdroidApplication) (getActivity().getApplication())).getIdentityAdminEndpoint();
|
||||
|
@ -44,9 +43,7 @@ public class UserListFragment extends CloudBrowserListFragment {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onListItemClick(ListView l, View v, int position, long id) {
|
||||
// TODO Auto-generated method stub
|
||||
mCurCheckPosition = position;
|
||||
getListView().setItemChecked(position, true);
|
||||
|
||||
|
@ -54,7 +51,6 @@ public class UserListFragment extends CloudBrowserListFragment {
|
|||
}
|
||||
|
||||
protected void showDetails(int position) {
|
||||
// TODO Auto-generated method stub
|
||||
UserDetailsFragment udf = (UserDetailsFragment) ((CloudBrowserActivity) getActivity()).getmUserDetailsFragment();
|
||||
|
||||
if (udf == null || udf.getShownIndex() != position)
|
||||
|
@ -67,9 +63,7 @@ public class UserListFragment extends CloudBrowserListFragment {
|
|||
((CloudBrowserActivity) getActivity()).showDetailsLayout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceiveResult(int resultCode, Bundle resultData) {
|
||||
// TODO Auto-generated method stub
|
||||
if (resultCode == 200) {
|
||||
String operation = resultData.getString(CloudControllerService.OPERATION);
|
||||
|
||||
|
@ -83,7 +77,6 @@ public class UserListFragment extends CloudBrowserListFragment {
|
|||
}
|
||||
|
||||
private void populateItems(GetUsersResponse gur) {
|
||||
// TODO Auto-generated method stub
|
||||
users.clear();
|
||||
Iterator<UserDetailsObject> it = gur.getUsers().iterator();
|
||||
UserDetailsObject item = null;
|
||||
|
|
|
@ -16,7 +16,6 @@ public class VolumeDetailsFragment extends Fragment {
|
|||
private TextView tv;
|
||||
|
||||
public static VolumeDetailsFragment newInstance(int position) {
|
||||
// TODO Auto-generated method stub
|
||||
VolumeDetailsFragment f = new VolumeDetailsFragment();
|
||||
|
||||
Bundle args = new Bundle();
|
||||
|
@ -27,11 +26,9 @@ public class VolumeDetailsFragment extends Fragment {
|
|||
}
|
||||
|
||||
public int getShownIndex() {
|
||||
// TODO Auto-generated method stub
|
||||
return getArguments().getInt("position", 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
scroller = new ScrollView(getActivity());
|
||||
tv = new TextView(getActivity());
|
||||
|
|
|
@ -1,34 +1,26 @@
|
|||
package com.rcarrillocruz.android.openstackdroid;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import android.app.FragmentTransaction;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListView;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.rcarrillocruz.android.openstackdroid.json.volume.GetVolumesResponse;
|
||||
import com.rcarrillocruz.android.openstackdroid.json.volume.VolumeDetailsObject;
|
||||
import com.rcarrillocruz.android.openstackdroid.model.VolumeModel;
|
||||
|
||||
import android.app.FragmentTransaction;
|
||||
import android.app.ListFragment;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.LinearLayout.LayoutParams;
|
||||
|
||||
public class VolumeListFragment extends CloudBrowserListFragment {
|
||||
List<VolumeModel> volumes;
|
||||
private ArrayAdapter<VolumeModel> adapter;
|
||||
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
// TODO Auto-generated method stub
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
volumes = ((CloudBrowserActivity) getActivity()).getVolumes();
|
||||
endpoint = ((OpenstackdroidApplication) (getActivity().getApplication())).getVolumeEndpoint();
|
||||
|
@ -50,9 +42,7 @@ public class VolumeListFragment extends CloudBrowserListFragment {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onListItemClick(ListView l, View v, int position, long id) {
|
||||
// TODO Auto-generated method stub
|
||||
mCurCheckPosition = position;
|
||||
getListView().setItemChecked(position, true);
|
||||
|
||||
|
@ -60,7 +50,6 @@ public class VolumeListFragment extends CloudBrowserListFragment {
|
|||
}
|
||||
|
||||
protected void showDetails(int position) {
|
||||
// TODO Auto-generated method stub
|
||||
VolumeDetailsFragment sdf = (VolumeDetailsFragment) ((CloudBrowserActivity) getActivity()).getmVolumeDetailsFragment();
|
||||
|
||||
if (sdf == null || sdf.getShownIndex() != position)
|
||||
|
@ -73,9 +62,7 @@ public class VolumeListFragment extends CloudBrowserListFragment {
|
|||
((CloudBrowserActivity) getActivity()).showDetailsLayout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceiveResult(int resultCode, Bundle resultData) {
|
||||
// TODO Auto-generated method stub
|
||||
if (resultCode == 200) {
|
||||
String operation = resultData.getString(CloudControllerService.OPERATION);
|
||||
|
||||
|
@ -89,7 +76,6 @@ public class VolumeListFragment extends CloudBrowserListFragment {
|
|||
}
|
||||
|
||||
private void populateItems(GetVolumesResponse gsr) {
|
||||
// TODO Auto-generated method stub
|
||||
volumes.clear();
|
||||
Iterator<VolumeDetailsObject> it = gsr.getVolumes().iterator();
|
||||
VolumeDetailsObject item = null;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.rcarrillocruz.android.openstackdroid;
|
||||
package com.rcarrillocruz.android.openstackdroid.db.connectionprofile;
|
||||
|
||||
public class ConnectionProfile {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.rcarrillocruz.android.openstackdroid;
|
||||
package com.rcarrillocruz.android.openstackdroid.db.connectionprofile;
|
||||
|
||||
import android.content.ContentProvider;
|
||||
import android.content.ContentResolver;
|
||||
|
@ -28,9 +28,7 @@ public class ConnectionProfileContentProvider extends ContentProvider {
|
|||
sURIMatcher.addURI(AUTHORITY, BASE_PATH + "/#", CONNECTION_PROFILE_ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delete(Uri uri, String selection, String[] selectionArgs) {
|
||||
// TODO Auto-generated method stub
|
||||
int uriType = sURIMatcher.match(uri);
|
||||
SQLiteDatabase sqlDB = database.getWritableDatabase();
|
||||
int rowsDeleted = 0;
|
||||
|
@ -59,15 +57,11 @@ public class ConnectionProfileContentProvider extends ContentProvider {
|
|||
return rowsDeleted;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType(Uri uri) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Uri insert(Uri uri, ContentValues values) {
|
||||
// TODO Auto-generated method stub
|
||||
int uriType = sURIMatcher.match(uri);
|
||||
SQLiteDatabase sqlDB = database.getWritableDatabase();
|
||||
long id = 0;
|
||||
|
@ -85,16 +79,12 @@ public class ConnectionProfileContentProvider extends ContentProvider {
|
|||
return Uri.parse(BASE_PATH + "/" + id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreate() {
|
||||
// TODO Auto-generated method stub
|
||||
database = new ConnectionProfileDatabaseHelper(getContext());
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
|
||||
// TODO Auto-generated method stub
|
||||
SQLiteQueryBuilder queryBuilder = new SQLiteQueryBuilder();
|
||||
queryBuilder.setTables(ConnectionProfileTable.TABLE_CONNECTION_PROFILE);
|
||||
int uriType = sURIMatcher.match(uri);
|
||||
|
@ -116,9 +106,7 @@ public class ConnectionProfileContentProvider extends ContentProvider {
|
|||
return cursor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
|
||||
// TODO Auto-generated method stub
|
||||
int uriType = sURIMatcher.match(uri);
|
||||
SQLiteDatabase sqlDB = database.getWritableDatabase();
|
||||
int rowsUpdated = 0;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.rcarrillocruz.android.openstackdroid;
|
||||
package com.rcarrillocruz.android.openstackdroid.db.connectionprofile;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.DatabaseErrorHandler;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteDatabase.CursorFactory;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
|
@ -18,18 +17,13 @@ public class ConnectionProfileDatabaseHelper extends SQLiteOpenHelper {
|
|||
public ConnectionProfileDatabaseHelper(Context context, String name,
|
||||
CursorFactory factory, int version) {
|
||||
super(context, name, factory, version);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(SQLiteDatabase database) {
|
||||
// TODO Auto-generated method stub
|
||||
ConnectionProfileTable.onCreate(database);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpgrade(SQLiteDatabase database, int oldVersion, int newVersion) {
|
||||
// TODO Auto-generated method stub
|
||||
ConnectionProfileTable.onUpgrade(database, oldVersion, newVersion);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.rcarrillocruz.android.openstackdroid;
|
||||
package com.rcarrillocruz.android.openstackdroid.db.connectionprofile;
|
||||
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ public class FlavorDetailsObject {
|
|||
|
||||
public FlavorDetailsObject() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
|
|
|
@ -6,7 +6,6 @@ public class FlavorLinkObject {
|
|||
|
||||
public FlavorLinkObject() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public String getHref() {
|
||||
|
|
|
@ -8,7 +8,6 @@ public class FlavorObject {
|
|||
|
||||
public FlavorObject() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
|
|
|
@ -7,7 +7,6 @@ public class GetFlavorsResponse {
|
|||
|
||||
public GetFlavorsResponse() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public List<FlavorDetailsObject> getFlavors() {
|
||||
|
|
|
@ -7,7 +7,6 @@ public class GetServersResponse {
|
|||
|
||||
public GetServersResponse() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public List<ServerDetailsObject> getServers() {
|
||||
|
|
|
@ -6,7 +6,6 @@ public class IPAddressObject {
|
|||
|
||||
public IPAddressObject() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public String getAddr() {
|
||||
|
|
|
@ -13,7 +13,6 @@ public class IPAddressesObject {
|
|||
|
||||
public IPAddressesObject() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public List<IPAddressObject> getPrivateAddresses() {
|
||||
|
|
|
@ -6,7 +6,6 @@ public class ImageLinkObject {
|
|||
|
||||
public ImageLinkObject() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public String getHref() {
|
||||
|
|
|
@ -8,7 +8,6 @@ public class ImageObject {
|
|||
|
||||
public ImageObject() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
|
|
|
@ -6,7 +6,6 @@ public class LinkObject {
|
|||
|
||||
public LinkObject() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public String getHref() {
|
||||
|
|
|
@ -13,7 +13,6 @@ public class ServerDetailsObject {
|
|||
|
||||
public ServerDetailsObject() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
|
|
|
@ -6,7 +6,6 @@ public class ServerLinkObject {
|
|||
|
||||
public ServerLinkObject() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public String getHref() {
|
||||
|
|
|
@ -10,7 +10,6 @@ public class AccessObject {
|
|||
|
||||
public AccessObject() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public TokenObject getToken() {
|
||||
|
|
|
@ -9,7 +9,6 @@ public class EndpointObject {
|
|||
|
||||
|
||||
public EndpointObject() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public String getAdminURL() {
|
||||
|
|
|
@ -7,7 +7,6 @@ public class GetTenantsResponse {
|
|||
|
||||
public GetTenantsResponse() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public List<TenantDetailsObject> getTenants() {
|
||||
|
|
|
@ -6,7 +6,6 @@ public class GetTokenRequest {
|
|||
|
||||
public GetTokenRequest() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public GetTokenRequest(AuthObject auth) {
|
||||
|
|
|
@ -5,7 +5,6 @@ public class GetTokenResponse {
|
|||
|
||||
public GetTokenResponse() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public AccessObject getAccess() {
|
||||
|
|
|
@ -15,6 +15,5 @@ public class GetUsersResponse {
|
|||
|
||||
public GetUsersResponse() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ public class MetadataObject {
|
|||
private List<String> roles;
|
||||
|
||||
public MetadataObject() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public int getIs_admin() {
|
||||
|
|
|
@ -4,7 +4,6 @@ public class RoleObject {
|
|||
private String name;
|
||||
|
||||
public RoleObject() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
|
|
|
@ -10,7 +10,6 @@ public class ServiceCatalogObject {
|
|||
|
||||
public ServiceCatalogObject() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public List<EndpointObject> getEndpoints() {
|
||||
|
|
|
@ -7,7 +7,6 @@ public class TenantObject {
|
|||
private String description;
|
||||
|
||||
public TenantObject() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
|
|
|
@ -8,7 +8,6 @@ public class TokenObject {
|
|||
|
||||
public TokenObject() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
|
|
|
@ -9,7 +9,6 @@ public class UserDetailsObject {
|
|||
|
||||
public UserDetailsObject() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
|
|
|
@ -11,7 +11,6 @@ public class UserObject {
|
|||
|
||||
public UserObject() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
|
|
|
@ -7,7 +7,6 @@ public class GetImagesResponse {
|
|||
|
||||
public GetImagesResponse() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public List<ImageDetailsObject> getImages() {
|
||||
|
|
|
@ -14,7 +14,6 @@ public class ImageDetailsObject {
|
|||
|
||||
public ImageDetailsObject() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public String getChecksum() {
|
||||
|
|
|
@ -7,7 +7,6 @@ public class GetVolumesResponse {
|
|||
|
||||
public GetVolumesResponse() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public List<VolumeDetailsObject> getVolumes() {
|
||||
|
|
|
@ -6,7 +6,6 @@ public class IPAddressModel {
|
|||
|
||||
public IPAddressModel() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public IPAddressModel(String addr, int version) {
|
||||
|
|
|
@ -14,7 +14,6 @@ public class ImageModel {
|
|||
|
||||
public ImageModel() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public ImageModel(String id, String name, String status, String visibility,
|
||||
|
|
|
@ -15,11 +15,9 @@ public class ServerModel {
|
|||
|
||||
public ServerModel() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public ServerModel(String id, String name) {
|
||||
// TODO Auto-generated constructor stub
|
||||
super();
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
|
@ -119,7 +117,6 @@ public class ServerModel {
|
|||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
// TODO Auto-generated method stub
|
||||
return (this.getId().equals(((ServerModel)o).getId()));
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ public class VolumeModel {
|
|||
|
||||
public VolumeModel() {
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public VolumeModel(String id, String name, String description,
|
||||
|
|
|
@ -15,10 +15,8 @@ public class GetFlavorsOperation implements ApiOperation {
|
|||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpRequestBase invoke(Uri endpoint, String token, String tenantId,
|
||||
Bundle params) {
|
||||
// TODO Auto-generated method stub
|
||||
HttpGet httpGet = new HttpGet(endpoint.toString() + urlTail);
|
||||
httpGet.setHeader("X-Auth-Token", token);
|
||||
|
||||
|
|
|
@ -15,10 +15,8 @@ public class GetServersOperation implements ApiOperation {
|
|||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpRequestBase invoke(Uri endpoint, String token, String tenantId,
|
||||
Bundle params) {
|
||||
// TODO Auto-generated method stub
|
||||
HttpGet httpGet = new HttpGet(endpoint.toString()+urlTail);
|
||||
httpGet.setHeader("X-Auth-Token", token);
|
||||
|
||||
|
|
|
@ -16,10 +16,8 @@ public class GetTenantsOperation implements ApiOperation {
|
|||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpRequestBase invoke(Uri endpoint, String token, String tenantId,
|
||||
Bundle params) {
|
||||
// TODO Auto-generated method stub
|
||||
HttpGet httpGet = new HttpGet(endpoint.toString()+urlTail);
|
||||
httpGet.setHeader("X-Auth-Token", token);
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import org.apache.http.entity.StringEntity;
|
|||
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.rcarrillocruz.android.openstackdroid.json.identity.AuthObject;
|
||||
|
@ -18,16 +19,15 @@ import com.rcarrillocruz.android.openstackdroid.operations.ApiOperation;
|
|||
public class GetTokenOperation implements ApiOperation {
|
||||
private Gson gson;
|
||||
private static final String urlTail = "/v2.0/tokens";
|
||||
private static final String TAG = "com.rcarrillocruz.android.openstackdroid.operations.identity.GetTokenOperation";
|
||||
|
||||
public GetTokenOperation() {
|
||||
super();
|
||||
gson = new Gson();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpRequestBase invoke(Uri endpoint, String token, String tenantId,
|
||||
Bundle params) {
|
||||
// TODO Auto-generated method stub
|
||||
HttpPost httpPost = new HttpPost(endpoint.toString()+urlTail);
|
||||
httpPost.setHeader("Content-type", "application/json");
|
||||
|
||||
|
@ -40,8 +40,7 @@ public class GetTokenOperation implements ApiOperation {
|
|||
try {
|
||||
se = new StringEntity(gson.toJson(request));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
Log.e(TAG,Log.getStackTraceString(e));
|
||||
}
|
||||
|
||||
httpPost.setEntity(se);
|
||||
|
|
|
@ -15,10 +15,8 @@ public class GetUsersOperation implements ApiOperation {
|
|||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpRequestBase invoke(Uri endpoint, String token, String tenantId,
|
||||
Bundle params) {
|
||||
// TODO Auto-generated method stub
|
||||
HttpGet httpGet = new HttpGet(endpoint.toString()+urlTail);
|
||||
httpGet.setHeader("X-Auth-Token", token);
|
||||
|
||||
|
|
|
@ -10,10 +10,8 @@ import android.os.Bundle;
|
|||
|
||||
public class GetImagesOperation implements ApiOperation {
|
||||
private static final String urlTail = "/v2/images";
|
||||
@Override
|
||||
public HttpRequestBase invoke(Uri endpoint, String token, String tenantId,
|
||||
Bundle params) {
|
||||
// TODO Auto-generated method stub
|
||||
HttpGet httpGet = new HttpGet(endpoint.toString()+urlTail);
|
||||
httpGet.setHeader("X-Auth-Token", token);
|
||||
|
||||
|
|
|
@ -16,10 +16,8 @@ public class GetVolumesOperation implements ApiOperation {
|
|||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpRequestBase invoke(Uri endpoint, String token, String tenantId,
|
||||
Bundle params) {
|
||||
// TODO Auto-generated method stub
|
||||
HttpGet httpGet = new HttpGet(endpoint.toString()+urlTail);
|
||||
httpGet.setHeader("X-Auth-Token", token);
|
||||
|
||||
|
|
Loading…
Reference in New Issue