You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by le...@apache.org on 2007/06/18 11:00:06 UTC
svn commit: r548265 - in
/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security:
Policy.java URIParameter.java
Author: leoli
Date: Mon Jun 18 02:00:04 2007
New Revision: 548265
URL: http://svn.apache.org/viewvc?view=rev&rev=548265
Log:
Add Java 6 API class java.security.URIParameter.
Added:
harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/URIParameter.java
Modified:
harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Policy.java
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Policy.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Policy.java?view=diff&rev=548265&r1=548264&r2=548265
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Policy.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Policy.java Mon Jun 18 02:00:04 2007
@@ -215,6 +215,15 @@
}
/**
+ * A marker interface for Policy parameters.
+ *
+ * @since 1.6
+ */
+ public static interface Parameters {
+ // a marker interface
+ }
+
+ /**
* A read-only empty PermissionCollection instance.
*
* @since 1.6
Added: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/URIParameter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/URIParameter.java?view=auto&rev=548265
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/URIParameter.java (added)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/URIParameter.java Mon Jun 18 02:00:04 2007
@@ -0,0 +1,61 @@
+/*
+ * 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 java.security;
+
+import java.net.URI;
+import java.security.Policy;
+import javax.security.auth.login.Configuration;
+
+import org.apache.harmony.security.internal.nls.Messages;
+
+/**
+ * This class includes a URI which refers to data for a PolicySpi or
+ * ConfigurationSpi implementation.
+ *
+ * @since 1.6
+ */
+public class URIParameter implements Policy.Parameters,
+ Configuration.Parameters {
+ private URI uri = null;
+
+ /**
+ * Constructs an instance with the URI pointing to data intended for
+ * PolicySpi or ConfigurationSpi implementation.
+ *
+ * @param u -
+ * the URI pointing to the data.
+ *
+ * @throws NullPointerException -
+ * if the URI is null.
+ */
+ public URIParameter(URI u) {
+ if (u == null) {
+ throw new NullPointerException(Messages.getString("security.1A4")); //$NON-NLS-1$
+ }
+ uri = u;
+ }
+
+ /**
+ * Answers the specified uri.
+ *
+ * @return - the uri.
+ */
+ public URI getURI() {
+ return uri;
+ }
+}