Class BucketPath
java.lang.Object
com.google.jenkins.plugins.storage.util.BucketPath
- All Implemented Interfaces:
Serializable
Handles cloud uris and their parsing.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBucketPath
(String uri) Prepares a new BucketPath.BucketPath
(String bucket, String object) Initializes BucketPath directly, with no parsing or substitutions. -
Method Summary
-
Constructor Details
-
BucketPath
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
-
BucketPath
Initializes BucketPath directly, with no parsing or substitutions.- Parameters:
bucket
- The bucket portion of the URI.object
- The path to the object portion of the URI not including bucket.
-
-
Method Details
-
error
public boolean error()Determines if this is an invalidBucketPath
.- Returns:
- False if the bucket is empty.
-
getPath
- Returns:
- Regenerate the path (without gs:// prefix)
-
getBucket
- Returns:
- The Bucket portion of the URI
-
getObject
- Returns:
- The object portion of the URI
-