1 7 package com.inversoft.savant.ant.types; 8 9 10 import java.util.Date ; 11 12 import org.apache.tools.ant.types.DataType; 13 import org.apache.tools.ant.types.Reference; 14 15 import com.inversoft.savant.Artifact; 16 17 18 25 public class ArtifactType extends DataType { 26 27 private Artifact proxy = new Artifact(); 28 29 30 33 public Artifact getProxy() { 34 return proxy; 35 } 36 37 40 public void setRefid(Reference reference) { 41 super.setRefid(reference); 42 43 ArtifactType art = (ArtifactType) reference.getReferencedObject(getProject()); 44 proxy.setGroup(art.getGroup()); 45 proxy.setName(art.getName()); 46 proxy.setProjectname(art.getProjectname()); 47 proxy.setType(art.getType()); 48 proxy.setVersion(art.getVersion()); 49 } 50 51 public String getGroup() { 52 return proxy.getGroup(); 53 } 54 55 public void setGroup(String group) { 56 if (isReference()) { 57 throw tooManyAttributes(); 58 } 59 60 proxy.setGroup(group); 61 } 62 63 public String getProjectname() { 64 return proxy.getProjectname(); 65 } 66 67 public void setProjectname(String project) { 68 if (isReference()) { 69 throw tooManyAttributes(); 70 } 71 72 proxy.setProjectname(project); 73 } 74 75 public String getName() { 76 return proxy.getName(); 77 } 78 79 public void setName(String name) { 80 if (isReference()) { 81 throw tooManyAttributes(); 82 } 83 84 proxy.setName(name); 85 } 86 87 public String getVersion() { 88 return proxy.getVersion(); 89 } 90 91 public void setVersion(String version) { 92 if (isReference()) { 93 throw tooManyAttributes(); 94 } 95 96 proxy.setVersion(version); 97 } 98 99 public String getType() { 100 return proxy.getType(); 101 } 102 103 public void setType(String type) { 104 if (isReference()) { 105 throw tooManyAttributes(); 106 } 107 108 proxy.setType(type); 109 } 110 111 public int getExpireminutes() { 112 return proxy.getExpireminutes(); 113 } 114 115 public void setExpireminutes(int expireMinutes) { 116 proxy.setExpireminutes(expireMinutes); 117 } 118 119 public Date getExpiretime() { 120 return proxy.getExpiretime(); 121 } 122 123 public void setExpiretime(Date expireTime) { 124 proxy.setExpiretime(expireTime); 125 } 126 } | Popular Tags |