Coverage Report - com.ctrip.apollo.portal.entity.form.NamespaceTextModel
 
Classes in this File Line Coverage Branch Coverage Complexity
NamespaceTextModel
73%
17/23
0%
0/4
1.067
 
 1  
 package com.ctrip.apollo.portal.entity.form;
 2  
 
 3  
 
 4  
 import com.ctrip.apollo.core.enums.Env;
 5  
 import com.ctrip.apollo.core.utils.StringUtils;
 6  
 
 7  1
 public class NamespaceTextModel implements Verifiable {
 8  
 
 9  
   private String appId;
 10  
   private String env;
 11  
   private String clusterName;
 12  
   private String namespaceName;
 13  
   private int namespaceId;
 14  
   private String configText;
 15  
   private String comment;
 16  
 
 17  
   @Override
 18  
   public boolean isInvalid(){
 19  0
     return StringUtils.isContainEmpty(appId, env, clusterName, namespaceName, configText) || namespaceId <= 0;
 20  
   }
 21  
   public String getAppId() {
 22  1
     return appId;
 23  
   }
 24  
 
 25  
   public void setAppId(String appId) {
 26  1
     this.appId = appId;
 27  1
   }
 28  
 
 29  
   public Env getEnv() {
 30  1
     return Env.valueOf(env);
 31  
   }
 32  
 
 33  
   public void setEnv(String env) {
 34  1
     this.env = env;
 35  1
   }
 36  
 
 37  
   public String getClusterName() {
 38  1
     return clusterName;
 39  
   }
 40  
 
 41  
   public void setClusterName(String clusterName) {
 42  1
     this.clusterName = clusterName;
 43  1
   }
 44  
 
 45  
   public String getNamespaceName() {
 46  1
     return namespaceName;
 47  
   }
 48  
 
 49  
   public void setNamespaceName(String namespaceName) {
 50  1
     this.namespaceName = namespaceName;
 51  1
   }
 52  
 
 53  
   public int getNamespaceId() {
 54  1
     return namespaceId;
 55  
   }
 56  
 
 57  
   public void setNamespaceId(int namespaceId) {
 58  0
     this.namespaceId = namespaceId;
 59  0
   }
 60  
 
 61  
   public String getConfigText() {
 62  2
     return configText;
 63  
   }
 64  
 
 65  
   public void setConfigText(String configText) {
 66  1
     this.configText = configText;
 67  1
   }
 68  
 
 69  
   public String getComment() {
 70  0
     return comment;
 71  
   }
 72  
 
 73  
   public void setComment(String comment) {
 74  0
     this.comment = comment;
 75  0
   }
 76  
 }