001 package org.kuali.maven.plugins.graph.pojo;
002
003 import org.apache.maven.artifact.Artifact;
004
005 public enum Scope {
006
007 COMPILE(Artifact.SCOPE_COMPILE) //
008 , TEST(Artifact.SCOPE_TEST) //
009 , RUNTIME(Artifact.SCOPE_RUNTIME) //
010 , PROVIDED(Artifact.SCOPE_PROVIDED) //
011 , SYSTEM(Artifact.SCOPE_SYSTEM) //
012 , IMPORT(Artifact.SCOPE_IMPORT);
013
014 private Scope(String value) {
015 this.value = value;
016 }
017
018 private final String value;
019
020 public String getValue() {
021 return value;
022 }
023
024 public static final Scope DEFAULT_SCOPE = COMPILE;
025
026 public static final Scope getScope(String value) {
027 Scope[] scopes = values();
028 for (Scope scope : scopes) {
029 if (scope.getValue().equals(value)) {
030 return scope;
031 }
032 }
033 return null;
034 }
035
036 @Override
037 public String toString() {
038 return getValue();
039 }
040 }