Class BucketPath
- java.lang.Object
-
- com.google.jenkins.plugins.storage.util.BucketPath
-
- All Implemented Interfaces:
Serializable
public class BucketPath extends Object implements Serializable
Handles cloud uris and their parsing.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BucketPath(String uri)
Prepares a new BucketPath.BucketPath(String bucket, String object)
Initializes BucketPath directly, with no parsing or substitutions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
error()
Determines if this is an invalidBucketPath
.String
getBucket()
String
getObject()
String
getPath()
-
-
-
Constructor Detail
-
BucketPath
public BucketPath(String uri) throws IllegalArgumentException
Prepares a new BucketPath.- Parameters:
uri
- path to the bucket object, of the form "gs://bucket_name/path/to/object". May contain other characters (i.e., *), no verification is done in this class.- Throws:
IllegalArgumentException
-
-
Method Detail
-
error
public boolean error()
Determines if this is an invalidBucketPath
.- Returns:
- False if the bucket is empty.
-
getPath
public String getPath()
- Returns:
- Regenerate the path (without gs:// prefix)
-
getBucket
public String getBucket()
- Returns:
- The Bucket portion of the URI
-
getObject
public String getObject()
- Returns:
- The object portion of the URI
-
-