Package jenkins.scm.api
Class SCMProbeStat
- java.lang.Object
-
- jenkins.scm.api.SCMProbeStat
-
public class SCMProbeStat extends Object
Represents the result of an existence check which may optionally include details of an alternative name for the object being checked for existence.- Since:
- 2.0
- See Also:
SCMProbe.stat(String)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
exists()
static SCMProbeStat
fromAlternativePath(String alternativePath)
Creates aSCMProbeStat
from an alternative path suggestion.static SCMProbeStat
fromType(SCMFile.Type type)
Creates aSCMProbeStat
from aSCMFile.Type
.String
getAlternativePath()
IfgetType()
!=
SCMFile.Type.NONEXISTENT
and there is an alternative name that would match but for case sensitivity or a typo.SCMFile.Type
getType()
The type of entity orSCMFile.Type.NONEXISTENT
if the entity does not exist.
-
-
-
Method Detail
-
fromType
public static SCMProbeStat fromType(@NonNull SCMFile.Type type)
Creates aSCMProbeStat
from aSCMFile.Type
.- Parameters:
type
- theSCMFile.Type
.- Returns:
- the
SCMProbeStat
.
-
fromAlternativePath
public static SCMProbeStat fromAlternativePath(@NonNull String alternativePath)
Creates aSCMProbeStat
from an alternative path suggestion.- Parameters:
alternativePath
- the suggested alternative path.- Returns:
- the
SCMProbeStat
.
-
exists
public boolean exists()
- Returns:
getType()
!=
SCMFile.Type.NONEXISTENT
.
-
getAlternativePath
@CheckForNull public String getAlternativePath()
IfgetType()
!=
SCMFile.Type.NONEXISTENT
and there is an alternative name that would match but for case sensitivity or a typo.- Returns:
- a suggested alternative name.
-
getType
@NonNull public SCMFile.Type getType()
The type of entity orSCMFile.Type.NONEXISTENT
if the entity does not exist.- Returns:
- the type of entity.
-
-