root / src / com / rackspace / cloud / files / api / client / ContainerObjects.java @ 71c27c5a
History | View | Annotate | Download (2.4 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 |
*
|
28 |
* @return the object
|
29 |
*/
|
30 |
public String getObject() { |
31 |
return object;
|
32 |
} |
33 |
/**
|
34 |
*
|
35 |
* @param object from container
|
36 |
*/
|
37 |
public void setObject(String object) { |
38 |
this.object = object;
|
39 |
} |
40 |
/**
|
41 |
* @return the hash
|
42 |
*/
|
43 |
public String getHash() { |
44 |
return hash;
|
45 |
} |
46 |
/**
|
47 |
* @param hash hash of object
|
48 |
*/
|
49 |
public void setHash(String hash) { |
50 |
this.hash = hash;
|
51 |
} |
52 |
/**
|
53 |
*
|
54 |
* @return the LastMod ification of file
|
55 |
*/
|
56 |
public String getLastMod() { |
57 |
return lastMod;
|
58 |
} |
59 |
|
60 |
/**
|
61 |
*
|
62 |
* @param lastMod that LastMod is set to
|
63 |
*/
|
64 |
public void setLastMod(String lastMod) { |
65 |
this.lastMod = lastMod;
|
66 |
} |
67 |
/**
|
68 |
*
|
69 |
* @return the object's name
|
70 |
*/
|
71 |
public String getCName() { |
72 |
return cname;
|
73 |
} |
74 |
/**
|
75 |
*
|
76 |
* @param name the object is set to
|
77 |
*/
|
78 |
public void setCName(String cname) { |
79 |
this.cname = cname;
|
80 |
} |
81 |
/**
|
82 |
*
|
83 |
* @return the objects size
|
84 |
*/
|
85 |
public int getBytes() { |
86 |
return bytes;
|
87 |
} |
88 |
/**
|
89 |
*
|
90 |
* @param the bytes the object is set to
|
91 |
*/
|
92 |
public void setBytes(int bytes) { |
93 |
this.bytes = bytes;
|
94 |
} |
95 |
/**
|
96 |
*
|
97 |
* @param contentType the object is set to
|
98 |
*/
|
99 |
public void setContentType(String contentType) { |
100 |
this.contentType = contentType;
|
101 |
|
102 |
} |
103 |
/**
|
104 |
*
|
105 |
* @return the objects content type
|
106 |
*/
|
107 |
public String getContentType(){ |
108 |
return contentType;
|
109 |
} |
110 |
@Override
|
111 |
public String toString() { |
112 |
return "ContainerObjects [" + "getCName()=" |
113 |
+ getCName() + " object=" + object + ", hash=" + hash |
114 |
+ ", lastMod=" + lastMod + ", bytes=" + bytes + ", cname=" |
115 |
+ cname + ", contentType=" + contentType + ", getId()=" |
116 |
+ getId() + ", getName()=" + getName() + ", getModifiedBy()=" |
117 |
+ getModifiedBy() + ", getVersion()=" + getVersion()
|
118 |
+ ", getVersionTimestamp()=" + getVersionTimestamp()
|
119 |
+ ", getObjectUUID()=" + getObjectUUID() + ", getObjectHash()=" |
120 |
+ getObjectHash() + ", getObjectSharing()="
|
121 |
+ getObjectSharing() + ", getMetadata()=" + getMetadata() + "]"; |
122 |
} |
123 |
|
124 |
|
125 |
|
126 |
} |
127 |
|