Skip to content

Commit e4b22d0

Browse files
author
Alex Huang
committed
Replace all tabs, particularly the ones in the comments
1 parent 62e9273 commit e4b22d0

134 files changed

Lines changed: 4605 additions & 4603 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

awsapi/src/com/cloud/bridge/model/SAcl.java

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -65,35 +65,35 @@ public interface SAcl {
6565
*/
6666
//public static OrderedPair <Integer,Integer> getCannedAccessControls ( String aclRequestString, String target );
6767

68-
/* {
69-
if ( aclRequestString.equalsIgnoreCase( "public-read" ))
70-
// All users granted READ access.
71-
return new OrderedPair <Integer,Integer> (PERMISSION_READ,GRANTEE_ALLUSERS);
72-
else if (aclRequestString.equalsIgnoreCase( "public-read-write" ))
73-
// All users granted READ and WRITE access
74-
return new OrderedPair <Integer,Integer> ((PERMISSION_READ | PERMISSION_WRITE),GRANTEE_ALLUSERS);
75-
else if (aclRequestString.equalsIgnoreCase( "authenticated-read" ))
76-
// Authenticated users have READ access
77-
return new OrderedPair <Integer,Integer> (PERMISSION_READ,GRANTEE_AUTHENTICATED);
78-
else if (aclRequestString.equalsIgnoreCase( "private" ))
79-
// Only Owner gets FULL_CONTROL
80-
return new OrderedPair <Integer,Integer> (PERMISSION_FULL,GRANTEE_USER);
81-
else if (aclRequestString.equalsIgnoreCase( "bucket-owner-read" ))
82-
{
83-
// Object Owner gets FULL_CONTROL, Bucket Owner gets READ
84-
if ( target.equalsIgnoreCase( "SBucket" ))
85-
return new OrderedPair <Integer,Integer> (PERMISSION_READ, GRANTEE_USER);
86-
else
87-
return new OrderedPair <Integer,Integer> (PERMISSION_FULL, GRANTEE_USER);
88-
}
89-
else if (aclRequestString.equalsIgnoreCase( "bucket-owner-full-control" ))
90-
{
91-
// Object Owner gets FULL_CONTROL, Bucket Owner gets FULL_CONTROL
92-
// This is equivalent to private when used with PUT Bucket
93-
return new OrderedPair <Integer,Integer> (PERMISSION_FULL,GRANTEE_USER);
94-
}
95-
else throw new UnsupportedException( "Unknown Canned Access Policy: " + aclRequestString + " is not supported" );
96-
}
68+
/* {
69+
if ( aclRequestString.equalsIgnoreCase( "public-read" ))
70+
// All users granted READ access.
71+
return new OrderedPair <Integer,Integer> (PERMISSION_READ,GRANTEE_ALLUSERS);
72+
else if (aclRequestString.equalsIgnoreCase( "public-read-write" ))
73+
// All users granted READ and WRITE access
74+
return new OrderedPair <Integer,Integer> ((PERMISSION_READ | PERMISSION_WRITE),GRANTEE_ALLUSERS);
75+
else if (aclRequestString.equalsIgnoreCase( "authenticated-read" ))
76+
// Authenticated users have READ access
77+
return new OrderedPair <Integer,Integer> (PERMISSION_READ,GRANTEE_AUTHENTICATED);
78+
else if (aclRequestString.equalsIgnoreCase( "private" ))
79+
// Only Owner gets FULL_CONTROL
80+
return new OrderedPair <Integer,Integer> (PERMISSION_FULL,GRANTEE_USER);
81+
else if (aclRequestString.equalsIgnoreCase( "bucket-owner-read" ))
82+
{
83+
// Object Owner gets FULL_CONTROL, Bucket Owner gets READ
84+
if ( target.equalsIgnoreCase( "SBucket" ))
85+
return new OrderedPair <Integer,Integer> (PERMISSION_READ, GRANTEE_USER);
86+
else
87+
return new OrderedPair <Integer,Integer> (PERMISSION_FULL, GRANTEE_USER);
88+
}
89+
else if (aclRequestString.equalsIgnoreCase( "bucket-owner-full-control" ))
90+
{
91+
// Object Owner gets FULL_CONTROL, Bucket Owner gets FULL_CONTROL
92+
// This is equivalent to private when used with PUT Bucket
93+
return new OrderedPair <Integer,Integer> (PERMISSION_FULL,GRANTEE_USER);
94+
}
95+
else throw new UnsupportedException( "Unknown Canned Access Policy: " + aclRequestString + " is not supported" );
96+
}
9797
*/
9898
/** Return a Triple
9999
* < permission1, permission2, symbol >
@@ -111,39 +111,39 @@ else if (aclRequestString.equalsIgnoreCase( "bucket-owner-full-control" ))
111111
* @param ownerID - An ID for the owner, if used in place of symbols "A" or "*"
112112
*/
113113
//public static Triple <Integer,Integer,String> getCannedAccessControls ( String aclRequestString, String target, String ownerID );
114-
/* throws UnsupportedException
115-
{
116-
if ( aclRequestString.equalsIgnoreCase( "public-read" ))
114+
/* throws UnsupportedException
115+
{
116+
if ( aclRequestString.equalsIgnoreCase( "public-read" ))
117117
// Owner gets FULL_CONTROL and the anonymous principal (the 'A' symbol here) is granted READ access.
118-
return new Triple <Integer, Integer, String> (PERMISSION_FULL, PERMISSION_READ,"A");
119-
else if (aclRequestString.equalsIgnoreCase( "public-read-write" ))
120-
// Owner gets FULL_CONTROL and the anonymous principal (the 'A' symbol here) is granted READ and WRITE access
121-
return new Triple <Integer, Integer, String> (PERMISSION_FULL, (PERMISSION_READ | PERMISSION_WRITE),"A");
122-
else if (aclRequestString.equalsIgnoreCase( "authenticated-read" ))
123-
// Owner gets FULL_CONTROL and ANY principal authenticated as a registered S3 user (the '*' symbol here) is granted READ access
124-
return new Triple <Integer, Integer, String> (PERMISSION_FULL, PERMISSION_READ,"*");
125-
else if (aclRequestString.equalsIgnoreCase( "private" ))
126-
// This is termed the "private" or default ACL, "Owner gets FULL_CONTROL"
127-
return new Triple <Integer, Integer, String> (PERMISSION_FULL, PERMISSION_FULL,null);
128-
else if (aclRequestString.equalsIgnoreCase( "bucket-owner-read" ))
129-
{
130-
// Object Owner gets FULL_CONTROL, Bucket Owner gets READ
131-
// This is equivalent to private when used with PUT Bucket
132-
if ( target.equalsIgnoreCase( "SBucket" ))
133-
return new Triple <Integer, Integer, String> (PERMISSION_FULL,PERMISSION_FULL ,null);
134-
else
135-
return new Triple <Integer, Integer, String> (PERMISSION_FULL,PERMISSION_READ,ownerID);
136-
}
137-
else if (aclRequestString.equalsIgnoreCase( "bucket-owner-full-control" ))
138-
{
139-
// Object Owner gets FULL_CONTROL, Bucket Owner gets FULL_CONTROL
140-
// This is equivalent to private when used with PUT Bucket
141-
if ( target.equalsIgnoreCase( "SBucket" ))
142-
return new Triple <Integer, Integer, String> (PERMISSION_FULL, PERMISSION_FULL, null);
143-
else
144-
return new Triple <Integer, Integer, String> (PERMISSION_FULL,PERMISSION_FULL, ownerID);
145-
}
146-
else throw new UnsupportedException( "Unknown Canned Access Policy: " + aclRequestString + " is not supported" );
147-
}
118+
return new Triple <Integer, Integer, String> (PERMISSION_FULL, PERMISSION_READ,"A");
119+
else if (aclRequestString.equalsIgnoreCase( "public-read-write" ))
120+
// Owner gets FULL_CONTROL and the anonymous principal (the 'A' symbol here) is granted READ and WRITE access
121+
return new Triple <Integer, Integer, String> (PERMISSION_FULL, (PERMISSION_READ | PERMISSION_WRITE),"A");
122+
else if (aclRequestString.equalsIgnoreCase( "authenticated-read" ))
123+
// Owner gets FULL_CONTROL and ANY principal authenticated as a registered S3 user (the '*' symbol here) is granted READ access
124+
return new Triple <Integer, Integer, String> (PERMISSION_FULL, PERMISSION_READ,"*");
125+
else if (aclRequestString.equalsIgnoreCase( "private" ))
126+
// This is termed the "private" or default ACL, "Owner gets FULL_CONTROL"
127+
return new Triple <Integer, Integer, String> (PERMISSION_FULL, PERMISSION_FULL,null);
128+
else if (aclRequestString.equalsIgnoreCase( "bucket-owner-read" ))
129+
{
130+
// Object Owner gets FULL_CONTROL, Bucket Owner gets READ
131+
// This is equivalent to private when used with PUT Bucket
132+
if ( target.equalsIgnoreCase( "SBucket" ))
133+
return new Triple <Integer, Integer, String> (PERMISSION_FULL,PERMISSION_FULL ,null);
134+
else
135+
return new Triple <Integer, Integer, String> (PERMISSION_FULL,PERMISSION_READ,ownerID);
136+
}
137+
else if (aclRequestString.equalsIgnoreCase( "bucket-owner-full-control" ))
138+
{
139+
// Object Owner gets FULL_CONTROL, Bucket Owner gets FULL_CONTROL
140+
// This is equivalent to private when used with PUT Bucket
141+
if ( target.equalsIgnoreCase( "SBucket" ))
142+
return new Triple <Integer, Integer, String> (PERMISSION_FULL, PERMISSION_FULL, null);
143+
else
144+
return new Triple <Integer, Integer, String> (PERMISSION_FULL,PERMISSION_FULL, ownerID);
145+
}
146+
else throw new UnsupportedException( "Unknown Canned Access Policy: " + aclRequestString + " is not supported" );
147+
}
148148
*/
149149
}

awsapi/src/com/cloud/bridge/model/SBucket.java

Lines changed: 85 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -37,91 +37,91 @@ public interface SBucket {
3737
public static final int VERSIONING_ENABLED = 1;
3838
public static final int VERSIONING_SUSPENDED = 2;
3939

40-
/* private Long id;
41-
42-
private String name;
43-
private String ownerCanonicalId;
44-
45-
private SHost shost;
46-
private Date createTime;
47-
48-
private int versioningStatus;
49-
50-
private Set<SObject> objectsInBucket = new HashSet<SObject>();
51-
52-
public SBucket() {
53-
versioningStatus = VERSIONING_NULL;
54-
}
55-
56-
public Long getId() {
57-
return id;
58-
}
40+
/* private Long id;
41+
42+
private String name;
43+
private String ownerCanonicalId;
44+
45+
private SHost shost;
46+
private Date createTime;
47+
48+
private int versioningStatus;
49+
50+
private Set<SObject> objectsInBucket = new HashSet<SObject>();
51+
52+
public SBucket() {
53+
versioningStatus = VERSIONING_NULL;
54+
}
55+
56+
public Long getId() {
57+
return id;
58+
}
5959
60-
private void setId(Long id) {
61-
this.id = id;
62-
}
63-
64-
public String getName() {
65-
return name;
66-
}
67-
68-
public void setName(String name) {
69-
this.name = name;
70-
}
71-
72-
public String getOwnerCanonicalId() {
73-
return ownerCanonicalId;
74-
}
75-
76-
public void setOwnerCanonicalId(String ownerCanonicalId) {
77-
this.ownerCanonicalId = ownerCanonicalId;
78-
}
79-
80-
public SHost getShost() {
81-
return shost;
82-
}
83-
84-
public void setShost(SHost shost) {
85-
this.shost = shost;
86-
}
87-
88-
public Date getCreateTime() {
89-
return createTime;
90-
}
91-
92-
public void setCreateTime(Date createTime) {
93-
this.createTime = createTime;
94-
}
95-
96-
public int getVersioningStatus() {
97-
return versioningStatus;
98-
}
99-
100-
public void setVersioningStatus( int versioningStatus ) {
101-
this.versioningStatus = versioningStatus;
102-
}
103-
104-
public Set<SObject> getObjectsInBucket() {
105-
return objectsInBucket;
106-
}
60+
private void setId(Long id) {
61+
this.id = id;
62+
}
63+
64+
public String getName() {
65+
return name;
66+
}
67+
68+
public void setName(String name) {
69+
this.name = name;
70+
}
71+
72+
public String getOwnerCanonicalId() {
73+
return ownerCanonicalId;
74+
}
75+
76+
public void setOwnerCanonicalId(String ownerCanonicalId) {
77+
this.ownerCanonicalId = ownerCanonicalId;
78+
}
79+
80+
public SHost getShost() {
81+
return shost;
82+
}
83+
84+
public void setShost(SHost shost) {
85+
this.shost = shost;
86+
}
87+
88+
public Date getCreateTime() {
89+
return createTime;
90+
}
91+
92+
public void setCreateTime(Date createTime) {
93+
this.createTime = createTime;
94+
}
95+
96+
public int getVersioningStatus() {
97+
return versioningStatus;
98+
}
99+
100+
public void setVersioningStatus( int versioningStatus ) {
101+
this.versioningStatus = versioningStatus;
102+
}
103+
104+
public Set<SObject> getObjectsInBucket() {
105+
return objectsInBucket;
106+
}
107107
108-
public void setObjectsInBucket(Set<SObject> objectsInBucket) {
109-
this.objectsInBucket = objectsInBucket;
110-
}
111-
112-
@Override
113-
public boolean equals(Object other) {
114-
if(this == other)
115-
return true;
116-
117-
if(!(other instanceof SBucket))
118-
return false;
119-
120-
return getName().equals(((SBucket)other).getName());
121-
}
122-
123-
@Override
124-
public int hashCode() {
125-
return getName().hashCode();
126-
}*/
108+
public void setObjectsInBucket(Set<SObject> objectsInBucket) {
109+
this.objectsInBucket = objectsInBucket;
110+
}
111+
112+
@Override
113+
public boolean equals(Object other) {
114+
if(this == other)
115+
return true;
116+
117+
if(!(other instanceof SBucket))
118+
return false;
119+
120+
return getName().equals(((SBucket)other).getName());
121+
}
122+
123+
@Override
124+
public int hashCode() {
125+
return getName().hashCode();
126+
}*/
127127
}

0 commit comments

Comments
 (0)