diff options
| author | slewis | 2005-05-21 23:48:13 +0000 |
|---|---|---|
| committer | slewis | 2005-05-21 23:48:13 +0000 |
| commit | 9b5b9b9c1291f42f4e1a6e88023d2e2e53b2d472 (patch) | |
| tree | b6e22b634c21866e8241e5ebcf684f75f3b1ffb5 | |
| parent | 5596d4208bfdd390b5f55b03484df429cb40c8e6 (diff) | |
| download | org.eclipse.ecf-9b5b9b9c1291f42f4e1a6e88023d2e2e53b2d472.tar.gz org.eclipse.ecf-9b5b9b9c1291f42f4e1a6e88023d2e2e53b2d472.tar.xz org.eclipse.ecf-9b5b9b9c1291f42f4e1a6e88023d2e2e53b2d472.zip | |
Added security interfaces: IContainerPolicy, IJoinPolicy, ISharedObjectPolicy
4 files changed, 92 insertions, 0 deletions
diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IContainerPolicy.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IContainerPolicy.java new file mode 100644 index 000000000..dd54589a2 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IContainerPolicy.java @@ -0,0 +1,18 @@ +/******************************************************************************* + * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This + * program and the accompanying materials are made available under the terms of + * the Eclipse Public License v1.0 which accompanies this distribution, and is + * available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: Composent, Inc. - initial API and implementation + ******************************************************************************/ + +package org.eclipse.ecf.core.security; + +public interface IContainerPolicy { + /** + * Refresh the policy + * + */ + public void refresh(); +} diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IJoinPolicy.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IJoinPolicy.java new file mode 100644 index 000000000..9a2669099 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IJoinPolicy.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This + * program and the accompanying materials are made available under the terms of + * the Eclipse Public License v1.0 which accompanies this distribution, and is + * available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: Composent, Inc. - initial API and implementation + ******************************************************************************/ + +package org.eclipse.ecf.core.security; + +import java.io.Serializable; +import java.security.PermissionCollection; + +import org.eclipse.ecf.core.identity.ID; + +public interface IJoinPolicy extends IContainerPolicy { + /** + * Check join request + * + * @param fromID + * the ID of the container making the join request + * @param targetID + * the ID of the container responding to that join request + * @param targetGroup + * the target name of the group that is being joined + * @param joinData + * arbitrary data associated with the join request + * @return PermissionCollection a collection of permissions associated with + * a successful acceptance of join request + * @throws SecurityException + * if join is to be refused + */ + public PermissionCollection checkJoin(ID fromID, ID targetID, + String targetGroup, Serializable joinData) throws SecurityException; +} diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/security/ISharedObjectPolicy.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/security/ISharedObjectPolicy.java new file mode 100644 index 000000000..33b45e96d --- /dev/null +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/security/ISharedObjectPolicy.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This + * program and the accompanying materials are made available under the terms of + * the Eclipse Public License v1.0 which accompanies this distribution, and is + * available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: Composent, Inc. - initial API and implementation + ******************************************************************************/ + +package org.eclipse.ecf.core.security; + +import java.security.PermissionCollection; + +import org.eclipse.ecf.core.SharedObjectDescription; +import org.eclipse.ecf.core.identity.ID; + +public interface ISharedObjectPolicy extends IContainerPolicy { + /** + * Check the request to add a shared object from external source (i.e. remote container). + * + * @param fromID the ID of the container making the container add request + * @param toID the ID of the container receiving/handling the add request + * @param newObject the shared object description associated with the shared object being added + * @return PermissionCollection the permission collection associated with successful acceptance + * of the add request. Null if the add should be refused, Non-null if add request is accepted. + * @throws SecurityException if request should be refused <b>and</b> associated container should leave group + */ + public PermissionCollection checkAddSharedObject(ID fromID, ID toID, SharedObjectDescription newObject) throws SecurityException; +} diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/security/ObjectCallback.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/security/ObjectCallback.java index 18a1375db..4bb64b776 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/security/ObjectCallback.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/security/ObjectCallback.java @@ -1,3 +1,12 @@ +/******************************************************************************* + * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This + * program and the accompanying materials are made available under the terms of + * the Eclipse Public License v1.0 which accompanies this distribution, and is + * available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: Composent, Inc. - initial API and implementation + ******************************************************************************/ + package org.eclipse.ecf.core.security; import javax.security.auth.callback.Callback; |
