Coverage Report - com.ctrip.framework.apollo.portal.entity.vo.NamespaceIdentifer
 
Classes in this File Line Coverage Branch Coverage Complexity
NamespaceIdentifer
86%
13/15
N/A
1
 
 1  
 package com.ctrip.framework.apollo.portal.entity.vo;
 2  
 
 3  
 import com.ctrip.framework.apollo.core.enums.Env;
 4  
 import com.ctrip.framework.apollo.core.utils.StringUtils;
 5  
 import com.ctrip.framework.apollo.portal.entity.form.Verifiable;
 6  
 
 7  2
 public class NamespaceIdentifer implements Verifiable {
 8  
   private String appId;
 9  
   private String env;
 10  
   private String clusterName;
 11  
   private String namespaceName;
 12  
 
 13  
   public String getAppId() {
 14  5
     return appId;
 15  
   }
 16  
 
 17  
   public void setAppId(String appId) {
 18  2
     this.appId = appId;
 19  2
   }
 20  
 
 21  
   public Env getEnv() {
 22  5
     return Env.valueOf(env);
 23  
   }
 24  
 
 25  
   public void setEnv(String env) {
 26  2
     this.env = env;
 27  2
   }
 28  
 
 29  
   public String getClusterName() {
 30  5
     return clusterName;
 31  
   }
 32  
 
 33  
   public void setClusterName(String clusterName) {
 34  2
     this.clusterName = clusterName;
 35  2
   }
 36  
 
 37  
   public String getNamespaceName() {
 38  5
     return namespaceName;
 39  
   }
 40  
 
 41  
   public void setNamespaceName(String namespaceName) {
 42  2
     this.namespaceName = namespaceName;
 43  2
   }
 44  
 
 45  
 
 46  
   @Override
 47  
   public boolean isInvalid() {
 48  0
     return StringUtils.isContainEmpty(env, clusterName, namespaceName);
 49  
   }
 50  
 
 51  
   @Override
 52  
   public String toString() {
 53  0
     return "NamespaceIdentifer{" +
 54  
            "appId='" + appId + '\'' +
 55  
            ", env='" + env + '\'' +
 56  
            ", clusterName='" + clusterName + '\'' +
 57  
            ", namespaceName='" + namespaceName + '\'' +
 58  
            '}';
 59  
   }
 60  
 }