Subversion Repositories XServices

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
94 brianR 1
/*
2
 *   Copyright 2012 Brian Rosenberger (Brutex Network)
3
 *
4
 *   Licensed under the Apache License, Version 2.0 (the "License");
5
 *   you may not use this file except in compliance with the License.
6
 *   You may obtain a copy of the License at
7
 *
8
 *       http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 *   Unless required by applicable law or agreed to in writing, software
11
 *   distributed under the License is distributed on an "AS IS" BASIS,
12
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 *   See the License for the specific language governing permissions and
14
 *   limitations under the License.
15
 */
16
 
17
package net.brutex.xservices.types.scm;
18
 
19
import java.io.File;
20
import java.util.ArrayList;
21
import java.util.List;
22
 
23
import javax.xml.bind.annotation.XmlAccessType;
24
import javax.xml.bind.annotation.XmlAccessorType;
25
import javax.xml.bind.annotation.XmlRootElement;
26
import javax.xml.bind.annotation.XmlType;
27
 
28
 
29
/**
30
 * @author Brian Rosenberger, bru(at)brutex.de
31
 * @since 0.5.0-20120817
32
 */
33
@XmlAccessorType(XmlAccessType.FIELD)
34
@XmlType(propOrder={"localFilename", "repositoryFilename", "description", "headRevision", "branch", "totalRevisions", "revisions"})
35
@XmlRootElement
36
public class FileType {
37
 
38
	String localFilename;
39
	String repositoryFilename;
40
	String description;
41
	String headRevision;
42
	String branch;
43
	String totalRevisions;
44
	final List<Revision> revisions = new ArrayList<Revision>();
45
 
46
	/**
47
	 * @return the revisions
48
	 */
49
	public List<Revision> getRevisions() {
50
		return revisions;
51
	}
52
 
53
	public void addRevision(Revision revision) {
54
		this.revisions.add(revision);
55
	}
56
 
57
	/**
58
	 * @return the totalRevisions
59
	 */
60
	public String getTotalRevisions() {
61
		return totalRevisions;
62
	}
63
 
64
	/**
65
	 * @param totalRevisions the totalRevisions to set
66
	 */
67
	public void setTotalRevisions(String totalRevisions) {
68
		this.totalRevisions = totalRevisions;
69
	}
70
 
71
	public FileType() {
72
	}
73
 
74
	public FileType(File file, String repositoryname, String description) {
75
		if(file!= null ) {
76
			this.localFilename = file.toURI().toString();
77
		} else {
78
			localFilename = "";
79
		}
80
 
81
		this.repositoryFilename = repositoryname;
82
		this.description = description;
83
	}
84
 
85
	/**
86
	 * @return the localFilename
87
	 */
88
	public String getLocalFilename() {
89
		return localFilename;
90
	}
91
 
92
	/**
93
	 * @param localFilename the localFilename to set
94
	 */
95
	public void setLocalFilename(String localFilename) {
96
		this.localFilename = localFilename;
97
	}
98
 
99
	/**
100
	 * @return the repositoryFilename
101
	 */
102
	public String getRepositoryFilename() {
103
		return repositoryFilename;
104
	}
105
 
106
	/**
107
	 * @param repositoryFilename the repositoryFilename to set
108
	 */
109
	public void setRepositoryFilename(String repositoryFilename) {
110
		this.repositoryFilename = repositoryFilename;
111
	}
112
 
113
	/**
114
	 * @return the description
115
	 */
116
	public String getDescription() {
117
		return description;
118
	}
119
 
120
	/**
121
	 * @param description the description to set
122
	 */
123
	public void setDescription(String description) {
124
		this.description = description;
125
	}
126
 
127
	/**
128
	 * @return the headRevision
129
	 */
130
	public String getHeadRevision() {
131
		return headRevision;
132
	}
133
 
134
	/**
135
	 * @param headRevision the headRevision to set
136
	 */
137
	public void setHeadRevision(String headRevision) {
138
		this.headRevision = headRevision;
139
	}
140
 
141
	/**
142
	 * @return the branch
143
	 */
144
	public String getBranch() {
145
		return branch;
146
	}
147
 
148
	/**
149
	 * @param branch the branch to set
150
	 */
151
	public void setBranch(String branch) {
152
		this.branch = branch;
153
	}
154
 
155
	public void clearRevisionList() {
156
		this.revisions.clear();
157
	}
158
 
159
 
160
}