Revert "Bug 476404 - Delete Platform API as announced for Eclipse 4.2."

This reverts commit 835d3aff713f4cb4305e521da40222ca9439118b.
diff --git a/bundles/org.eclipse.core.runtime/.settings/.api_filters b/bundles/org.eclipse.core.runtime/.settings/.api_filters
index d9f7406..bd54e24 100644
--- a/bundles/org.eclipse.core.runtime/.settings/.api_filters
+++ b/bundles/org.eclipse.core.runtime/.settings/.api_filters
@@ -72,36 +72,4 @@
             </message_arguments>
         </filter>
     </resource>
-    <resource path="src/org/eclipse/core/runtime/Platform.java" type="org.eclipse.core.runtime.Platform">
-        <filter id="338792546">
-            <message_arguments>
-                <message_argument value="org.eclipse.core.runtime.Platform"/>
-                <message_argument value="addAuthorizationInfo(URL, String, String, Map&lt;String,String&gt;)"/>
-            </message_arguments>
-        </filter>
-        <filter comment="PLanned deletion does not require major update in our 4.9 process, this is planned to be changed for the 4.10 release" id="338792546">
-            <message_arguments>
-                <message_argument value="org.eclipse.core.runtime.Platform"/>
-                <message_argument value="addProtectionSpace(URL, String)"/>
-            </message_arguments>
-        </filter>
-        <filter id="338792546">
-            <message_arguments>
-                <message_argument value="org.eclipse.core.runtime.Platform"/>
-                <message_argument value="flushAuthorizationInfo(URL, String, String)"/>
-            </message_arguments>
-        </filter>
-        <filter comment="Planned removal" id="338792546">
-            <message_arguments>
-                <message_argument value="org.eclipse.core.runtime.Platform"/>
-                <message_argument value="getAuthorizationInfo(URL, String, String)"/>
-            </message_arguments>
-        </filter>
-        <filter id="338792546">
-            <message_arguments>
-                <message_argument value="org.eclipse.core.runtime.Platform"/>
-                <message_argument value="getProtectionSpace(URL)"/>
-            </message_arguments>
-        </filter>
-    </resource>
 </component>
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java
index 9d83ee3..7c10e9c 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java
@@ -444,6 +444,42 @@
 		super();
 	}
 
+	/**
+	 * Adds the given authorization information to the key ring. The
+	 * information is relevant for the specified protection space and the
+	 * given authorization scheme. The protection space is defined by the
+	 * combination of the given server URL and realm. The authorization
+	 * scheme determines what the authorization information contains and how
+	 * it should be used. The authorization information is a <code>Map</code>
+	 * of <code>String</code> to <code>String</code> and typically
+	 * contains information such as user names and passwords.
+	 *
+	 * @param serverUrl the URL identifying the server for this authorization
+	 *		information. For example, "http://www.example.com/".
+	 * @param realm the subsection of the given server to which this
+	 *		authorization information applies.  For example,
+	 *		"realm1@example.com" or "" for no realm.
+	 * @param authScheme the scheme for which this authorization information
+	 *		applies. For example, "Basic" or "" for no authorization scheme
+	 * @param info a <code>Map</code> containing authorization information
+	 *		such as user names and passwords (key type : <code>String</code>,
+	 *		value type : <code>String</code>)
+	 * @exception CoreException if there are problems setting the
+	 *		authorization information. Reasons include:
+	 * <ul>
+	 * <li>The keyring could not be saved.</li>
+	 * </ul>
+	 * @deprecated Authorization database is superseded by the Equinox secure storage.
+	 * Use <code>org.eclipse.equinox.security.storage.SecurePreferencesFactory</code>
+	 * to obtain secure preferences and <code>org.eclipse.equinox.security.storage.ISecurePreferences</code>
+	 * for data access and modifications.
+	 * Consider using <code>ISecurePreferences#put(String, String, boolean)</code> as a replacement of this method.
+	 * This API will be deleted in a future release. See bug 370248 for details.
+	 */
+	@Deprecated
+	public static void addAuthorizationInfo(URL serverUrl, String realm, String authScheme, Map<String,String> info) throws CoreException {
+		AuthorizationHandler.addAuthorizationInfo(serverUrl, realm, authScheme, info);
+	}
 
 	/**
 	 * Adds the given log listener to the notification list of the platform.
@@ -461,6 +497,32 @@
 		InternalPlatform.getDefault().addLogListener(listener);
 	}
 
+	/**
+	 * Adds the specified resource to the protection space specified by the
+	 * given realm. All targets at or deeper than the depth of the last
+	 * symbolic element in the path of the given resource URL are assumed to
+	 * be in the same protection space.
+	 *
+	 * @param resourceUrl the URL identifying the resources to be added to
+	 *		the specified protection space. For example,
+	 *		"http://www.example.com/folder/".
+	 * @param realm the name of the protection space. For example,
+	 *		"realm1@example.com"
+	 * @exception CoreException if there are problems setting the
+	 *		authorization information. Reasons include:
+	 * <ul>
+	 * <li>The key ring could not be saved.</li>
+	 * </ul>
+	 * @deprecated Authorization database is superseded by the Equinox secure storage.
+	 * Use <code>org.eclipse.equinox.security.storage.SecurePreferencesFactory</code>
+	 * to obtain secure preferences and <code>org.eclipse.equinox.security.storage.ISecurePreferences</code>
+	 * for data access and modifications.
+	 * This API will be deleted in a future release. See bug 370248 for details.
+	 */
+	@Deprecated
+	public static void addProtectionSpace(URL resourceUrl, String realm) throws CoreException {
+		AuthorizationHandler.addProtectionSpace(resourceUrl, realm);
+	}
 
 	/**
 	 * Returns a URL that is the local equivalent of the
@@ -497,6 +559,36 @@
 		InternalPlatform.getDefault().endSplash();
 	}
 
+	/**
+	 * Removes the authorization information for the specified protection
+	 * space and given authorization scheme. The protection space is defined
+	 * by the given server URL and realm.
+	 *
+	 * @param serverUrl the URL identifying the server to remove the
+	 *		authorization information for. For example,
+	 *		"http://www.example.com/".
+	 * @param realm the subsection of the given server to remove the
+	 *		authorization information for. For example,
+	 *		"realm1@example.com" or "" for no realm.
+	 * @param authScheme the scheme for which the authorization information
+	 *		to remove applies. For example, "Basic" or "" for no
+	 *		authorization scheme.
+	 * @exception CoreException if there are problems removing the
+	 *		authorization information. Reasons include:
+	 * <ul>
+	 * <li>The keyring could not be saved.</li>
+	 * </ul>
+	 * @deprecated Authorization database is superseded by the Equinox secure storage.
+	 * Use <code>org.eclipse.equinox.security.storage.SecurePreferencesFactory</code>
+	 * to obtain secure preferences and <code>org.eclipse.equinox.security.storage.ISecurePreferences</code>
+	 * for data access and modifications.
+	 * Consider using <code>ISecurePreferences#clear()</code> as a replacement of this method.
+	 * This API will be deleted in a future release. See bug 370248 for details.
+	 */
+	@Deprecated
+	public static void flushAuthorizationInfo(URL serverUrl, String realm, String authScheme) throws CoreException {
+		AuthorizationHandler.flushAuthorizationInfo(serverUrl, realm, authScheme);
+	}
 
 	/**
 	 * Returns the adapter manager used for extending
@@ -510,6 +602,34 @@
 	}
 
 	/**
+	 * Returns the authorization information for the specified protection
+	 * space and given authorization scheme. The protection space is defined
+	 * by the given server URL and realm. Returns <code>null</code> if no
+	 * such information exists.
+	 *
+	 * @param serverUrl the URL identifying the server for the authorization
+	 *		information. For example, "http://www.example.com/".
+	 * @param realm the subsection of the given server to which the
+	 *		authorization information applies.  For example,
+	 *		"realm1@example.com" or "" for no realm.
+	 * @param authScheme the scheme for which the authorization information
+	 *		applies. For example, "Basic" or "" for no authorization scheme
+	 * @return the authorization information for the specified protection
+	 *		space and given authorization scheme, or <code>null</code> if no
+	 *		such information exists
+	 * @deprecated Authorization database is superseded by the Equinox secure storage.
+	 * Use <code>org.eclipse.equinox.security.storage.SecurePreferencesFactory</code>
+	 * to obtain secure preferences and <code>org.eclipse.equinox.security.storage.ISecurePreferences</code>
+	 * for data access and modifications.
+	 * Consider using <code>ISecurePreferences#get(String, String)</code> as a replacement of this method.
+	 * This API will be deleted in a future release. See bug 370248 for details.
+	 */
+	@Deprecated
+	public static Map<String,String> getAuthorizationInfo(URL serverUrl, String realm, String authScheme) {
+		return AuthorizationHandler.getAuthorizationInfo(serverUrl, realm, authScheme);
+	}
+
+	/**
 	 * Returns the command line args provided to the Eclipse runtime layer when it was first run.
 	 * The returned value does not include arguments consumed by the lower levels of Eclipse
 	 * (e.g., OSGi or the launcher).
@@ -635,6 +755,25 @@
 	}
 
 	/**
+	 * Returns the protection space (realm) for the specified resource, or
+	 * <code>null</code> if the realm is unknown.
+	 *
+	 * @param resourceUrl the URL of the resource whose protection space is
+	 *		returned. For example, "http://www.example.com/folder/".
+	 * @return the protection space (realm) for the specified resource, or
+	 *		<code>null</code> if the realm is unknown
+	 * @deprecated Authorization database is superseded by the Equinox secure storage.
+	 * Use <code>org.eclipse.equinox.security.storage.SecurePreferencesFactory</code>
+	 * to obtain secure preferences and <code>org.eclipse.equinox.security.storage.ISecurePreferences</code>
+	 * for data access and modifications.
+	 * This API will be deleted in a future release. See bug 370248 for details.
+	 */
+	@Deprecated
+	public static String getProtectionSpace(URL resourceUrl) {
+		return AuthorizationHandler.getProtectionSpace(resourceUrl);
+	}
+
+	/**
 	 * Removes the indicated (identical) log listener from the notification list
 	 * of the platform.  If no such listener exists, no action is taken.
 	 *