niclas 2004/01/19 13:45:36
Modified: merlin/composition/api/src/java/org/apache/avalon/composition/model
ClassLoaderModel.java ContainmentModel.java
DeploymentModel.java
Log:
Additional changes in the composition to support code level security.
Revision Changes Path
1.3 +8 -1
avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ClassLoaderModel.java
Index: ClassLoaderModel.java
===================================================================
RCS file:
/home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ClassLoaderModel.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ClassLoaderModel.java 19 Jan 2004 01:26:19 -0000 1.2
+++ ClassLoaderModel.java 19 Jan 2004 21:45:36 -0000 1.3
@@ -52,6 +52,7 @@
import java.net.URL;
import java.security.Permission;
+import java.security.cert.Certificate;
import org.apache.avalon.extension.manager.OptionalPackage;
import org.apache.avalon.extension.manager.ExtensionManager;
@@ -126,6 +127,12 @@
*/
ClassLoader getClassLoader();
+ /**
+ * Returns the Certificates associated with the classes that
+ * can be loaded by the classloader.
+ **/
+ Certificate[] getCertificates();
+
/**
* Creation of a classloader context using this model as the
* relative parent.
1.12 +22 -6
avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ContainmentModel.java
Index: ContainmentModel.java
===================================================================
RCS file:
/home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/ContainmentModel.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ContainmentModel.java 13 Jan 2004 11:41:24 -0000 1.11
+++ ContainmentModel.java 19 Jan 2004 21:45:36 -0000 1.12
@@ -70,6 +70,8 @@
*/
public interface ContainmentModel extends DeploymentModel
{
+ String SECURE_EXECUTION_KEY = "urn:composition:security.enabled";
+
/**
* Get the startup sequence for the model.
*/
@@ -106,11 +108,25 @@
*/
ClassLoaderModel getClassLoaderModel();
- /** Returns the timel imit of how long the deployment may take.
+ /**
+ * Returns true if Secure Execution mode has been enabled in the kernel.
+ *
+ * Secure Execution mode enables the deployer to restrict the exection
+ * environment, and this flag allows for developers to quickly switch
+ * between the secure and non-secure execution modes.
+ *
+ * @return true if Secure Execution mode has been enabled in the kernel.
+ **/
+ boolean isSecureExecutionEnabled();
+
+ /**
+ * Return the default deployment timeout value declared in the
+ * kernel configuration. The implementation looks for a value
+ * assigned under the property key "urn:composition:deployment.timeout"
+ * and defaults to 1000 msec if undefined.
*
- * @return the maximum time expressed in millisecond of how
- * long a deployment may take.
- **/
+ * @return the default deployment timeout value
+ */
long getDeploymentTimeout();
/**
@@ -144,7 +160,7 @@
* @return the model created using the derived profile and configuration
* @exception ModelException if an error occurs during model establishment
*/
- public ContainmentModel addContainmentModel( URL block, URL config )
+ ContainmentModel addContainmentModel( URL block, URL config )
throws ModelException;
/**
1.10 +7 -5
avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/DeploymentModel.java
Index: DeploymentModel.java
===================================================================
RCS file:
/home/cvs/avalon/merlin/composition/api/src/java/org/apache/avalon/composition/model/DeploymentModel.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- DeploymentModel.java 15 Jan 2004 12:23:04 -0000 1.9
+++ DeploymentModel.java 19 Jan 2004 21:45:36 -0000 1.10
@@ -178,11 +178,13 @@
DeploymentModel[] getProviders();
/**
- * Returns the maximum allowable time for deployment.
+ * Return the default deployment timeout value declared in the
+ * kernel configuration. The implementation looks for a value
+ * assigned under the property key "urn:composition:deployment.timeout"
+ * and defaults to 1000 msec if undefined.
*
- * @return the maximum time expressed in millisecond of how
- * long a deployment may take.
- **/
+ * @return the default deployment timeout value
+ */
long getDeploymentTimeout();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]