root / src / com / rackspace / cloud / android / AndroidCloudApplication.java @ 378fe36a
History | View | Annotate | Download (2.9 kB)
1 |
package com.rackspace.cloud.android; |
---|---|
2 |
|
3 |
import java.util.ArrayList; |
4 |
import java.util.HashMap; |
5 |
import java.util.List; |
6 |
import java.util.Map; |
7 |
|
8 |
import org.apache.http.HttpEntity; |
9 |
|
10 |
import android.app.Application; |
11 |
|
12 |
import com.rackspace.cloud.files.api.client.ContainerObjects; |
13 |
import com.rackspace.cloud.files.api.client.GroupResource; |
14 |
|
15 |
public class AndroidCloudApplication extends Application { |
16 |
|
17 |
/*
|
18 |
* these fields act as global fields for the application
|
19 |
* they are used for some async tasks that need this
|
20 |
* data but may lose reference to them on a rotation
|
21 |
*/
|
22 |
private boolean isLoggingIn; |
23 |
private boolean taskProcessing; |
24 |
private boolean deletingObjectProcessing; |
25 |
private boolean deletingContainerProcessing; |
26 |
private boolean downloadingObject; |
27 |
private boolean isSettingLogs; |
28 |
private boolean isSettingSessionPersistence; |
29 |
private HttpEntity downloadedObject;
|
30 |
private ArrayList<ContainerObjects> curDirFiles; |
31 |
private List<GroupResource> groups = new ArrayList<GroupResource>(); |
32 |
private List<String> others = new ArrayList<String>(); |
33 |
|
34 |
public static long lastPause; |
35 |
|
36 |
public List<String> getOthers() { |
37 |
return others;
|
38 |
} |
39 |
|
40 |
public void setOthers(List<String> others) { |
41 |
this.others = others;
|
42 |
} |
43 |
|
44 |
public List<GroupResource> getGroups() { |
45 |
return groups;
|
46 |
} |
47 |
|
48 |
public void setGroups(List<GroupResource> groups) { |
49 |
this.groups = groups;
|
50 |
} |
51 |
|
52 |
public void setAddingObject(boolean processing){ |
53 |
taskProcessing = processing; |
54 |
} |
55 |
|
56 |
public boolean isAddingObject(){ |
57 |
return taskProcessing;
|
58 |
} |
59 |
|
60 |
public void setDownloadedEntity(HttpEntity obj){ |
61 |
downloadedObject = obj; |
62 |
} |
63 |
|
64 |
public HttpEntity getDownloadedEntity(){
|
65 |
return downloadedObject;
|
66 |
} |
67 |
|
68 |
public void setDownloadingObject(boolean processing){ |
69 |
downloadingObject = processing; |
70 |
} |
71 |
|
72 |
public boolean isDownloadingObject(){ |
73 |
return downloadingObject;
|
74 |
} |
75 |
|
76 |
public void setDeleteingObject(boolean processing){ |
77 |
deletingObjectProcessing = processing; |
78 |
} |
79 |
|
80 |
public boolean isDeletingObject(){ |
81 |
return deletingObjectProcessing;
|
82 |
} |
83 |
|
84 |
public void setDeletingContainer(boolean processing){ |
85 |
deletingContainerProcessing = processing; |
86 |
} |
87 |
|
88 |
public boolean isDeletingContainer(){ |
89 |
return deletingContainerProcessing;
|
90 |
} |
91 |
|
92 |
public ArrayList<ContainerObjects> getCurFiles(){ |
93 |
return curDirFiles;
|
94 |
} |
95 |
|
96 |
public void setCurFiles(ArrayList<ContainerObjects> files){ |
97 |
curDirFiles = new ArrayList<ContainerObjects>(); |
98 |
for(ContainerObjects obj : files){
|
99 |
curDirFiles.add(obj); |
100 |
} |
101 |
|
102 |
} |
103 |
|
104 |
public void setIsLoggingIn(boolean logginIn){ |
105 |
isLoggingIn = logginIn; |
106 |
} |
107 |
|
108 |
public boolean isLoggingIn(){ |
109 |
return isLoggingIn;
|
110 |
} |
111 |
|
112 |
public void setIsSettingLogs(Boolean logging){ |
113 |
isSettingLogs = logging; |
114 |
} |
115 |
|
116 |
public boolean isSettingLogs(){ |
117 |
return isSettingLogs;
|
118 |
} |
119 |
|
120 |
public void setSettingSessionPersistence(Boolean setting){ |
121 |
isSettingSessionPersistence = setting; |
122 |
} |
123 |
|
124 |
public boolean isSettingSessionPersistence(){ |
125 |
return isSettingSessionPersistence;
|
126 |
} |
127 |
} |