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