1 /*
2 * Copyright 2003 - 2013 The eFaps Team
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 * Revision: $Rev$
17 * Last Changed: $Date$
18 * Last Changed By: $Author$
19 */
20
21
22 package org.efaps.ci;
23
24 import org.apache.commons.lang3.builder.ToStringBuilder;
25
26 /**
27 * TODO comment!
28 *
29 * @author The eFaps Team
30 * @version $Id$
31 */
32 public class CIAttribute
33 {
34 //CHECKSTYLE:OFF
35 /**
36 * Name of the attribute.
37 */
38 public final String name;
39
40 /**
41 * Type this attribute belongs to.
42 */
43 public final CIType ciType;
44
45 /**
46 * Profiles this attribute is related to.
47 */
48 public final String[] profiles;
49 //CHECKSTYLE:ON
50
51 /**
52 * @param _type type this attribute belongs to
53 * @param _name name of this attribute
54 */
55 public CIAttribute(final CIType _type,
56 final String _name)
57 {
58 this(_type, _name, (String[]) null);
59 }
60
61 /**
62 * @param _type type this attribute belongs to
63 * @param _name name of this attribute
64 * @param _profiles Profiles this attribute is related to.
65 */
66 public CIAttribute(final CIType _type,
67 final String _name,
68 final String... _profiles)
69 {
70 this.ciType = _type;
71 this.name = _name;
72 this.profiles = _profiles;
73 }
74
75 @Override
76 public String toString()
77 {
78 return new ToStringBuilder(this).append("name", this.name).append("ciType", this.ciType).toString();
79 }
80 }