root / src / com / rackspace / cloud / files / api / client / ContainerObjects.java @ 038ac9a4
History | View | Annotate | Download (2.5 kB)
1 |
package com.rackspace.cloud.files.api.client; |
---|---|
2 |
|
3 |
import java.util.Map; |
4 |
|
5 |
import com.rackspace.cloud.servers.api.client.Entity; |
6 |
|
7 |
/**
|
8 |
* @author Phillip Toohill dead2hill@gmail.com
|
9 |
*
|
10 |
*/
|
11 |
public class ContainerObjects extends Entity { |
12 |
|
13 |
private static final long serialVersionUID = 5994739895998309675L; |
14 |
private String object; |
15 |
private String hash; |
16 |
private String lastMod; |
17 |
private int bytes; |
18 |
private String cname; |
19 |
private String contentType; |
20 |
|
21 |
private boolean isFolder() { |
22 |
return contentType.startsWith("application/folder;"); |
23 |
} |
24 |
|
25 |
/**
|
26 |
*
|
27 |
* @return the object
|
28 |
*/
|
29 |
public String getObject() { |
30 |
return object;
|
31 |
} |
32 |
|
33 |
/**
|
34 |
*
|
35 |
* @param object
|
36 |
* from container
|
37 |
*/
|
38 |
public void setObject(String object) { |
39 |
this.object = object;
|
40 |
} |
41 |
|
42 |
/**
|
43 |
* @return the hash
|
44 |
*/
|
45 |
public String getHash() { |
46 |
return hash;
|
47 |
} |
48 |
|
49 |
/**
|
50 |
* @param hash
|
51 |
* hash of object
|
52 |
*/
|
53 |
public void setHash(String hash) { |
54 |
this.hash = hash;
|
55 |
} |
56 |
|
57 |
/**
|
58 |
*
|
59 |
* @return the LastMod ification of file
|
60 |
*/
|
61 |
public String getLastMod() { |
62 |
return lastMod;
|
63 |
} |
64 |
|
65 |
/**
|
66 |
*
|
67 |
* @param lastMod
|
68 |
* that LastMod is set to
|
69 |
*/
|
70 |
public void setLastMod(String lastMod) { |
71 |
this.lastMod = lastMod;
|
72 |
} |
73 |
|
74 |
/**
|
75 |
*
|
76 |
* @return the object's name
|
77 |
*/
|
78 |
public String getCName() { |
79 |
return cname;
|
80 |
} |
81 |
|
82 |
/**
|
83 |
*
|
84 |
* @param name
|
85 |
* the object is set to
|
86 |
*/
|
87 |
public void setCName(String cname) { |
88 |
this.cname = cname;
|
89 |
} |
90 |
|
91 |
/**
|
92 |
*
|
93 |
* @return the objects size
|
94 |
*/
|
95 |
public int getBytes() { |
96 |
return bytes;
|
97 |
} |
98 |
|
99 |
/**
|
100 |
*
|
101 |
* @param the
|
102 |
* bytes the object is set to
|
103 |
*/
|
104 |
public void setBytes(int bytes) { |
105 |
this.bytes = bytes;
|
106 |
} |
107 |
|
108 |
/**
|
109 |
*
|
110 |
* @param contentType
|
111 |
* the object is set to
|
112 |
*/
|
113 |
public void setContentType(String contentType) { |
114 |
this.contentType = contentType;
|
115 |
|
116 |
} |
117 |
|
118 |
/**
|
119 |
*
|
120 |
* @return the objects content type
|
121 |
*/
|
122 |
public String getContentType() { |
123 |
return contentType;
|
124 |
} |
125 |
|
126 |
@Override
|
127 |
public String toString() { |
128 |
return "ContainerObjects [" + "getCName()=" + getCName() + " object=" |
129 |
+ object + ", hash=" + hash + ", lastMod=" + lastMod |
130 |
+ ", bytes=" + bytes + ", cname=" + cname + ", contentType=" |
131 |
+ contentType + ", getId()=" + getId() + ", getName()=" |
132 |
+ getName() + ", getModifiedBy()=" + getModifiedBy()
|
133 |
+ ", getVersion()=" + getVersion() + ", getVersionTimestamp()=" |
134 |
+ getVersionTimestamp() + ", getObjectUUID()="
|
135 |
+ getObjectUUID() + ", getObjectHash()=" + getObjectHash()
|
136 |
+ ", getObjectSharing()=" + getObjectSharing()
|
137 |
+ ", getMetadata()=" + getMetadata() + "]"; |
138 |
} |
139 |
|
140 |
} |