-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #362 from sxci/add_bucket_private
add bucketInfo, setBucketAcl, setIndexPage [ci skip]
- Loading branch information
Showing
9 changed files
with
283 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.qiniu.storage.model; | ||
|
||
/** | ||
* 空间类型:公开空间、私有空间 | ||
*/ | ||
public enum AclType { | ||
/** | ||
* 公开空间 | ||
*/ | ||
PUBLIC(0), | ||
/** | ||
* 私有空间 | ||
*/ | ||
PRIVATE(1); | ||
|
||
private int type = 0; | ||
|
||
AclType(int t) { | ||
type = t; | ||
} | ||
|
||
public int getType() { | ||
return type; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
package com.qiniu.storage.model; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
import java.util.Map; | ||
|
||
public class BucketInfo { | ||
@SerializedName("source") | ||
private String imageSource; | ||
@SerializedName("host") | ||
private String imageHost; | ||
@SerializedName("protected") | ||
private int _protected; | ||
@SerializedName("private") | ||
private int _private; | ||
@SerializedName("no_index_page") | ||
private int noIndexPage; | ||
private int imgsft; | ||
private String separator; | ||
private Map<String, String> styles; | ||
private String zone; | ||
private String region; | ||
private boolean global; | ||
|
||
public String getImageSource() { | ||
return imageSource; | ||
} | ||
|
||
public void setImageSource(String imageSource) { | ||
this.imageSource = imageSource; | ||
} | ||
|
||
public String getImageHost() { | ||
return imageHost; | ||
} | ||
|
||
public void setImageHost(String imageHost) { | ||
this.imageHost = imageHost; | ||
} | ||
|
||
public int getProtected() { | ||
return _protected; | ||
} | ||
|
||
public void setProtected(int _protected) { | ||
this._protected = _protected; | ||
} | ||
|
||
public int getPrivate() { | ||
return _private; | ||
} | ||
|
||
public void setPrivate(int _private) { | ||
this._private = _private; | ||
} | ||
|
||
public int getNoIndexPage() { | ||
return noIndexPage; | ||
} | ||
|
||
public void setNoIndexPage(int noIndexPage) { | ||
this.noIndexPage = noIndexPage; | ||
} | ||
|
||
public int getImgsft() { | ||
return imgsft; | ||
} | ||
|
||
public void setImgsft(int imgsft) { | ||
this.imgsft = imgsft; | ||
} | ||
|
||
public String getSeparator() { | ||
return separator; | ||
} | ||
|
||
public void setSeparator(String separator) { | ||
this.separator = separator; | ||
} | ||
|
||
public Map<String, String> getStyles() { | ||
return styles; | ||
} | ||
|
||
public void setStyles(Map<String, String> styles) { | ||
this.styles = styles; | ||
} | ||
|
||
public String getZone() { | ||
return zone; | ||
} | ||
|
||
public void setZone(String zone) { | ||
this.zone = zone; | ||
} | ||
|
||
public String getRegion() { | ||
return region; | ||
} | ||
|
||
public void setRegion(String region) { | ||
this.region = region; | ||
} | ||
|
||
public boolean isGlobal() { | ||
return global; | ||
} | ||
|
||
public void setGlobal(boolean global) { | ||
this.global = global; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.qiniu.storage.model; | ||
|
||
public enum IndexPageType { | ||
HAS(0), | ||
NO(1); | ||
|
||
private int type = 0; | ||
|
||
IndexPageType(int t) { | ||
type = t; | ||
} | ||
|
||
public int getType() { | ||
return type; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.qiniu.storage.model; | ||
|
||
/** | ||
* 存储类型 | ||
*/ | ||
public enum StorageType { | ||
/** | ||
* 普通存储 | ||
*/ | ||
COMMON, | ||
/** | ||
* 低频存储 | ||
*/ | ||
INFREQUENCY | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.