Source Code Cross Referenced for RegistryLogItem.java in  » Installer » IzPack » com » coi » tools » os » win » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Installer » IzPack » com.coi.tools.os.win 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
003:         * 
004:         * http://izpack.org/
005:         * http://izpack.codehaus.org/
006:         * 
007:         * Copyright 2005 Klaus Bartz
008:         *
009:         * Licensed under the Apache License, Version 2.0 (the "License");
010:         * you may not use this file except in compliance with the License.
011:         * You may obtain a copy of the License at
012:         * 
013:         *     http://www.apache.org/licenses/LICENSE-2.0
014:         *     
015:         * Unless required by applicable law or agreed to in writing, software
016:         * distributed under the License is distributed on an "AS IS" BASIS,
017:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018:         * See the License for the specific language governing permissions and
019:         * limitations under the License.
020:         */
021:
022:        package com.coi.tools.os.win;
023:
024:        import java.io.Serializable;
025:
026:        /**
027:         * Data container for Windows registry logging. This container is used to hold old and new created
028:         * registry data used at rewinding the registry changes.
029:         * 
030:         * @author Klaus Bartz
031:         * 
032:         */
033:        public class RegistryLogItem implements  Cloneable, Serializable {
034:
035:            /**
036:             * 
037:             */
038:            private static final long serialVersionUID = 3618134559108444211L;
039:
040:            /** Types of log items */
041:
042:            /** Identifier for removed key */
043:            public static final int REMOVED_KEY = 1;
044:
045:            /** Identifier for created key */
046:            public static final int CREATED_KEY = 2;
047:
048:            /** Identifier for removed value */
049:            public static final int REMOVED_VALUE = 3;
050:
051:            /** Identifier for created value */
052:            public static final int CREATED_VALUE = 4;
053:
054:            /** Identifier for changed value */
055:            public static final int CHANGED_VALUE = 5;
056:
057:            private int type;
058:
059:            private int root;
060:
061:            private String key;
062:
063:            private String valueName;
064:
065:            private RegDataContainer newValue = null;
066:
067:            private RegDataContainer oldValue = null;
068:
069:            /**
070:             * Default constructor.
071:             */
072:            private RegistryLogItem() {
073:                super ();
074:            }
075:
076:            /**
077:             * Constructor with settings.
078:             * 
079:             * @param type type of loging item. Possible are REMOVED_KEY, CREATED_KEY, REMOVED_VALUE,
080:             * CREATED_VALUE and CHANGED_VALUE
081:             * @param root id for the registry root
082:             * @param key key name of the item which should be logged
083:             * @param valueName name of the value of the item which should be logged if it is a value type,
084:             * else null
085:             * @param newValue new value of the registry entry if it is a value type, else null
086:             * @param oldValue old value of the registry entry if it is a value type, else null
087:             */
088:            public RegistryLogItem(int type, int root, String key,
089:                    String valueName, RegDataContainer newValue,
090:                    RegDataContainer oldValue) {
091:                this .type = type;
092:                this .root = root;
093:                this .key = key;
094:                this .valueName = valueName;
095:                this .newValue = newValue;
096:                this .oldValue = oldValue;
097:            }
098:
099:            /**
100:             * Returns the key name of this logging item.
101:             * 
102:             * @return the key name of this logging item
103:             */
104:            public String getKey() {
105:                return key;
106:            }
107:
108:            /**
109:             * Returns the new value of this logging item.
110:             * 
111:             * @return the new value of this logging item
112:             */
113:            public RegDataContainer getNewValue() {
114:                return newValue;
115:            }
116:
117:            /**
118:             * Returns the old value of this logging item.
119:             * 
120:             * @return the old value of this logging item
121:             */
122:            public RegDataContainer getOldValue() {
123:                return oldValue;
124:            }
125:
126:            /**
127:             * Returns the root id of this logging item.
128:             * 
129:             * @return the root id of this logging item
130:             */
131:            public int getRoot() {
132:                return root;
133:            }
134:
135:            /**
136:             * Returns the type id of this logging item.
137:             * 
138:             * @return the type id of this logging item
139:             */
140:            public int getType() {
141:                return type;
142:            }
143:
144:            /**
145:             * Returns the value name of this logging item.
146:             * 
147:             * @return the value name of this logging item
148:             */
149:            public String getValueName() {
150:                return valueName;
151:            }
152:
153:            /**
154:             * Sets the key name to the given string
155:             * 
156:             * @param string to be used as key name
157:             */
158:            public void setKey(String string) {
159:                key = string;
160:            }
161:
162:            /**
163:             * Sets the new value to the given RegDataContainer.
164:             * 
165:             * @param container to be used as new value
166:             */
167:            public void setNewValue(RegDataContainer container) {
168:                newValue = container;
169:            }
170:
171:            /**
172:             * Sets the old value to the given RegDataContainer.
173:             * 
174:             * @param container to be used as old value
175:             */
176:            public void setOldValue(RegDataContainer container) {
177:                oldValue = container;
178:            }
179:
180:            /**
181:             * Sets the root id for this logging item.
182:             * 
183:             * @param i root id to be used for this logging item
184:             */
185:            public void setRoot(int i) {
186:                root = i;
187:            }
188:
189:            /**
190:             * Sets the type id for this logging item.
191:             * 
192:             * @param i type id to be used for this logging item
193:             */
194:            public void setType(int i) {
195:                type = i;
196:            }
197:
198:            /**
199:             * Sets the value name to the given string
200:             * 
201:             * @param string to be used as value name
202:             */
203:            public void setValueName(String string) {
204:                valueName = string;
205:            }
206:
207:            public Object clone() throws CloneNotSupportedException {
208:                RegistryLogItem retval = (RegistryLogItem) super .clone();
209:                if (newValue != null)
210:                    retval.newValue = (RegDataContainer) newValue.clone();
211:                if (oldValue != null)
212:                    retval.oldValue = (RegDataContainer) oldValue.clone();
213:                return (retval);
214:
215:            }
216:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.