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 TypeMethodDescriptionbooleanexists()static SCMProbeStatfromAlternativePath(String alternativePath) Creates aSCMProbeStatfrom an alternative path suggestion.static SCMProbeStatfromType(SCMFile.Type type) Creates aSCMProbeStatfrom aSCMFile.Type.IfgetType()!=SCMFile.Type.NONEXISTENTand there is an alternative name that would match but for case sensitivity or a typo.getType()The type of entity orSCMFile.Type.NONEXISTENTif the entity does not exist.
-
Method Details
-
fromType
Creates aSCMProbeStatfrom aSCMFile.Type.- Parameters:
type- theSCMFile.Type.- Returns:
- the
SCMProbeStat.
-
fromAlternativePath
Creates aSCMProbeStatfrom 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.NONEXISTENTand 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.NONEXISTENTif the entity does not exist.- Returns:
- the type of entity.
-