Package jenkins.scm.api
Class SCMProbeStat
java.lang.Object
jenkins.scm.api.SCMProbeStat
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:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
exists()
static SCMProbeStat
fromAlternativePath
(String alternativePath) Creates aSCMProbeStat
from an alternative path suggestion.static SCMProbeStat
fromType
(SCMFile.Type type) Creates aSCMProbeStat
from aSCMFile.Type
.IfgetType()
!=
SCMFile.Type.NONEXISTENT
and there is an alternative name that would match but for case sensitivity or a typo.getType()
The type of entity orSCMFile.Type.NONEXISTENT
if the entity does not exist.
-
Method Details
-
fromType
Creates aSCMProbeStat
from aSCMFile.Type
.- Parameters:
type
- theSCMFile.Type
.- Returns:
- the
SCMProbeStat
.
-
fromAlternativePath
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
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
The type of entity orSCMFile.Type.NONEXISTENT
if the entity does not exist.- Returns:
- the type of entity.
-