Subversion Repositories XServices

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
30 brianR 1
/*
2
 *   Mylyn Connector for Serena Business Mashups
3
 * 	 Copyright 2010 Brian Rosenberger (Brutex Network)
4
 *
5
 *   Licensed under the Apache License, Version 2.0 (the "License");
6
 *   you may not use this file except in compliance with the License.
7
 *   You may obtain a copy of the License at
8
 *
9
 *       http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 *   Unless required by applicable law or agreed to in writing, software
12
 *   distributed under the License is distributed on an "AS IS" BASIS,
13
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 *   See the License for the specific language governing permissions and
15
 *   limitations under the License.
16
 *
17
 *   Serena, TeamTrack and Serena Business Mashup are
18
 * 	 registered trademarks of SERENA Software Inc.
19
 */
20
package net.brutex.mylyn.sbmconnector.core.model;
21
 
22
/**
23
 * Static DBFieldnames for SBM/ TeamTrack system fields
24
 * which are not intended to be changed by a user directly
25
 * (auto-resolved by the system).
26
 *
27
 * @author Brian Rosenberger
28
 */
29
public enum SBMStaticFields {
30
 
31
	/** The internal item id in [tableid:recordid] format. */
32
	ID("ID"),
33
 
34
	/** The internal uuid. */
35
	UUID("UUID"),
36
 
37
	/** The Constant ISSUEID. */
38
	ISSUEID("ISSUEID"),
39
 
40
	/** The project name (integer in DB, but name here).
41
	 * because this is driven by the sbm web service */
42
	PROJECTID("PROJECTID"),
43
 
44
	/** The project uuid (not found in primary table). */
45
	PROJECTUUID("PROJECTUUID"),
46
 
47
	/** The submitter (id reference, but user login name here). */
48
	SUBMITTER("SUBMITTER"),
49
 
50
	/** The submit date/time. */
51
	SUBMITDATE("SUBMITDATE"),
52
 
53
	/** The LASTMODIFIEDDATE date/time. */
54
	LASTMODIFIEDDATE("LASTMODIFIEDDATE"),
55
 
56
	/** The LASTMODIFIER. */
57
	LASTMODIFIER("LASTMODIFIER"),
58
 
59
	/** The ACTIVEINACTIVE flag.*/
60
	ACTIVEINACTIVE("ACTIVEINACTIVE"),
61
 
62
	/** The Constant STATE. */
63
	STATE("STATE"),
64
 
65
	/** The ITEMURL (not present in DB) */
66
	ITEMURL("ITEMURL"),
67
 
68
	/** The owner of an item (id reference, but name here). */
69
	OWNER("OWNER"),
70
 
71
	/** The LASTSTATECHANGEDATE. */
72
	LASTSTATECHANGEDATE("LASTSTATECHANGEDATE"),
73
 
74
	/** The LASTSTATECHANGER (id reference, but name here). */
75
	LASTSTATECHANGER("LASTSTATECHANGER"),
76
 
77
	/** The SECONDARYOWNER (id reference, but name here). */
78
	SECONDARYOWNER("SECONDARYOWNER"),
79
 
80
	/** The CLOSEDATE. */
81
	CLOSEDATE("CLOSEDATE");
82
 
83
	private final String value;
84
 
85
    SBMStaticFields(String v) {
86
        value = v;
87
    }
88
 
89
    public String getValue() {
90
    	return value;
91
    }
92
 
93
    public static SBMStaticFields fromValue(String v) {
94
        for (SBMStaticFields c: SBMStaticFields.values()) {
95
            if (c.value.equals(v)) {
96
                return c;
97
            }
98
        }
99
        throw new IllegalArgumentException(v);
100
    }
101
}