1 package org.kuali.common.devops.logic; 2 3 import static com.google.common.base.Optional.fromNullable; 4 5 import java.util.Properties; 6 7 import org.kuali.common.devops.model.Scm; 8 9 import com.google.common.base.Optional; 10 11 public class Applications extends Examiner { 12 13 public static Optional<Scm> getScm(Properties properties) { 14 Optional<String> url = fromNullable(properties.getProperty(SCM_URL_KEY)); 15 Optional<String> revision = fromNullable(properties.getProperty(SCM_REVISION_KEY)); 16 if (url.isPresent() && revision.isPresent()) { 17 return Optional.of(Scm.create(url.get(), revision.get())); 18 } else { 19 return Optional.absent(); 20 } 21 } 22 23 }