You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/04/07 14:19:17 UTC
svn commit: r762733 - in
/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/platform:
./ windows/ windows/HKEY.java
Author: mturk
Date: Tue Apr 7 12:19:17 2009
New Revision: 762733
URL: http://svn.apache.org/viewvc?rev=762733&view=rev
Log:
Initial commit for making the svn directory layout
Added:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/platform/
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/platform/windows/
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/platform/windows/HKEY.java (with props)
Added: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/platform/windows/HKEY.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/platform/windows/HKEY.java?rev=762733&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/platform/windows/HKEY.java (added)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/platform/windows/HKEY.java Tue Apr 7 12:19:17 2009
@@ -0,0 +1,104 @@
+/* Apache Commons Runtime
+ * Copyright 2009 The Apache Software Foundation
+ *
+ *Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.runtime.platform.windows;
+
+/**
+ * An application can use handles to these keys as entry points to the
+ * registry. These handles are valid for all implementations of the
+ * registry, although the use of the handles may vary from platform to
+ * platform. In addition, other predefined handles have been defined
+ * for specific platforms. The following are handles to the predefined
+ * keys.
+ */
+public enum HKEY
+{
+ /** Registry entries subordinate to this key define types (or classes)
+ * of documents and the properties associated with those types. Shell
+ * and COM applications use the information stored under this key.
+ * For more information, see HKEY_CLASSES_ROOT Key
+ * <BR/>
+ * This key also provides backward compatibility with the Windows 3.1
+ * registration database by storing information for DDE and OLE support.
+ * File viewers and user interface extensions store their OLE class
+ * identifiers in HKEY_CLASSES_ROOT, and in-process servers are
+ * registered in this key.
+ * <BR/>
+ * This handle should not be used in a service or an application that
+ * impersonates different users.
+ */
+ CLASSES_ROOT( 1),
+
+ /** Contains information about the current hardware profile of the
+ * local computer system. The information under HKEY_CURRENT_CONFIG
+ * describes only the differences between the current hardware
+ * configuration and the standard configuration. Information about
+ * the standard hardware configuration is stored under the Software
+ * and System keys of HKEY_LOCAL_MACHINE.
+ */
+ CURRENT_CONFIG( 2),
+
+ /** Registry entries subordinate to this key define the preferences of
+ * the current user. These preferences include the settings of
+ * environment variables, data about program groups, colors, printers,
+ * network connections, and application preferences. This key makes it
+ * easier to establish the current user's settings; the key maps to the
+ * current user's branch in HKEY_USERS.
+ */
+ CURRENT_USER( 3),
+
+ /** Registry entries subordinate to this key define the physical state
+ * of the computer, including data about the bus type, system memory,
+ * and installed hardware and software. It contains subkeys that hold
+ * current configuration data, including Plug and Play information
+ * (the Enum branch, which includes a complete list of all hardware that
+ * has ever been on the system), network logon preferences, network
+ * security information, software-related information (such as server
+ * names and the location of the server), and other system information.
+ */
+ LOCAL_MACHINE( 4),
+
+ /** Registry entries subordinate to this key define the default user
+ * configuration for new users on the local computer and the user
+ * configuration for the current user.
+ */
+ USERS ( 5);
+
+
+ private int value;
+ private HKEY(int v)
+ {
+ value = v;
+ }
+
+ public int valueOf()
+ {
+ return value;
+ }
+
+ public static HKEY valueOf(int value)
+ {
+ for (HKEY e : values()) {
+ if (e.value == value)
+ return e;
+ }
+ throw new IllegalArgumentException("Invalid initializer: " + value);
+ }
+
+}
Propchange: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/platform/windows/HKEY.java
------------------------------------------------------------------------------
svn:eol-style = native