From c07394f00d32204dbbf2b37b4716d60cf8cfcbff Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Wed, 19 Oct 2011 10:34:33 +0000
Subject: [PATCH] Fix OPENDJ-325: Remove experimental ArisID privacy control support
---
/dev/null | 34 ----------------------------------
1 files changed, 0 insertions(+), 34 deletions(-)
diff --git a/opends/experimental/arisid-privacy-control/README b/opends/experimental/arisid-privacy-control/README
deleted file mode 100644
index 76a5eb2..0000000
--- a/opends/experimental/arisid-privacy-control/README
+++ /dev/null
@@ -1,48 +0,0 @@
-This folder contains source code for the IGF ArisID Privacy Control.
-
- http://www.openliberty.org/wiki/index.php/ProjectAris
-
-In order to build this extension you'll need the Aris ID core libraries
-which are available here:
-
- http://sourceforge.net/projects/arisid/files/ArisId/Release%201.1/arisId_1.1.jar/download
-
-Put the JAR file into the lib directory and build. In order to run
-OpenDS using the plugin you're probably going to need some other
-libraries (neethi?) which are loaded at runtime.
-
-Once you have the required libraries, do the following steps:
-
- 1. In the top-level source folder for OpenDS, first build and
- package OpenDS:
-
- ./build.sh
-
- 2. Next cd into this extension folder:
-
- cd experimental/arisid-privacy-control
-
- 3. And build the control+plugin (this requires Ant version 7 or
- higher in your path):
-
- ant install
-
- 4. This will copy the following files into the parent OpenDS
- default installation (build/package/OpenDS-2.3.0):
-
- INSTANCE_ROOT/lib/extensions/arisid-privacy-control.jar
- INSTANCE_ROOT/config/arisid-privacy-control.ldif
- INSTANCE_ROOT/config/schema/99-arisid-privacy-control.ldif
-
- 5. Add the plugin's config to the server configuration. The
- following instruction assumes usage of the Unix 'cat'
- command, but obviously ldapadd can be used:
-
- cd INSTANCE_ROOT/config
- cat arisid-privacy-control.ldif >> config.ldif
-
- 6. Start the server and look for the log message indicating that
- the extension is loaded:
-
- cd INSTANCE_ROOT
- ./bin/start-ds
diff --git a/opends/experimental/arisid-privacy-control/build.xml b/opends/experimental/arisid-privacy-control/build.xml
deleted file mode 100644
index ea05169..0000000
--- a/opends/experimental/arisid-privacy-control/build.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<!--
- ! CDDL HEADER START
- !
- ! The contents of this file are subject to the terms of the
- ! Common Development and Distribution License, Version 1.0 only
- ! (the "License"). You may not use this file except in compliance
- ! with the License.
- !
- ! You can obtain a copy of the license at
- ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
- ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- ! See the License for the specific language governing permissions
- ! and limitations under the License.
- !
- ! When distributing Covered Code, include this CDDL HEADER in each
- ! file and include the License file at
- ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- ! add the following below this CDDL HEADER, with the fields enclosed
- ! by brackets "[]" replaced with your own identifying information:
- ! Portions Copyright [yyyy] [name of copyright owner]
- !
- ! CDDL HEADER END
- !
- !
- ! Copyright 2010 Sun Microsystems, Inc.
- ! -->
-
-<project name="ArisID Privacy Control" basedir="." default="package">
- <description>
- This is the build script for the ArisID Privacy Control.
- </description>
-
- <!-- CONFIGURE: The name of the extension as used in file names -->
- <property name="extension.name" value="arisid-privacy-control" />
-
- <!-- CONFIGURE: The description of this extension - used in the Javadoc title -->
- <property name="extension.description" value="ArisID Privacy Control" />
-
- <!-- Use common extension targets -->
- <import file="../build.xml" />
-</project>
diff --git a/opends/experimental/arisid-privacy-control/config/arisid-privacy-control.ldif b/opends/experimental/arisid-privacy-control/config/arisid-privacy-control.ldif
deleted file mode 100644
index d1b4ca2..0000000
--- a/opends/experimental/arisid-privacy-control/config/arisid-privacy-control.ldif
+++ /dev/null
@@ -1,43 +0,0 @@
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at
-# trunk/opends/resource/legal-notices/OpenDS.LICENSE
-# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at
-# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
-# add the following below this CDDL HEADER, with the fields enclosed
-# by brackets "[]" replaced with your own identifying information:
-# Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2010 Sun Microsystems, Inc.
-#
-#
-# This file contains a default configuration for the
-# ArisID Privacy Control which can be appended to config.ldif.
-dn: cn=ArisID Privacy Control Plugin,cn=Plugins,cn=config
-objectClass: top
-objectClass: ds-cfg-plugin
-objectClass: ds-cfg-arisid-privacy-control-plugin
-cn: ArisID Privacy Control Plugin
-ds-cfg-java-class: org.opends.arisid.ArisIDPrivacyControlPlugin
-ds-cfg-enabled: true
-ds-cfg-plugin-type: preOperationAdd
-ds-cfg-plugin-type: preOperationCompare
-ds-cfg-plugin-type: preOperationDelete
-ds-cfg-plugin-type: preOperationExtended
-ds-cfg-plugin-type: preOperationModify
-ds-cfg-plugin-type: preOperationModifyDN
-ds-cfg-plugin-type: preOperationSearch
-ds-cfg-invoke-for-internal-operations: true
diff --git a/opends/experimental/arisid-privacy-control/schema/99-arisid-privacy-control.ldif b/opends/experimental/arisid-privacy-control/schema/99-arisid-privacy-control.ldif
deleted file mode 100644
index 5a7147e..0000000
--- a/opends/experimental/arisid-privacy-control/schema/99-arisid-privacy-control.ldif
+++ /dev/null
@@ -1,34 +0,0 @@
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at
-# trunk/opends/resource/legal-notices/OpenDS.LICENSE
-# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at
-# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
-# add the following below this CDDL HEADER, with the fields enclosed
-# by brackets "[]" replaced with your own identifying information:
-# Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2010 Sun Microsystems, Inc.
-#
-#
-# This file contains the attribute type and objectclass definitions for use
-# with the Directory Server configuration.
-dn: cn=schema
-objectClass: top
-objectClass: ldapSubentry
-objectClass: subschema
-objectClasses: ( ds-cfg-arisid-privacy-control-oid NAME 'ds-cfg-arisid-privacy-control-plugin'
- SUP ds-cfg-plugin STRUCTURAL X-ORIGIN 'OpenDS Directory Server' )
diff --git a/opends/experimental/arisid-privacy-control/src/org/opends/arisid/ArisIDPrivacyControl.java b/opends/experimental/arisid-privacy-control/src/org/opends/arisid/ArisIDPrivacyControl.java
deleted file mode 100644
index 616ba0b..0000000
--- a/opends/experimental/arisid-privacy-control/src/org/opends/arisid/ArisIDPrivacyControl.java
+++ /dev/null
@@ -1,513 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- */
-package org.opends.arisid;
-
-
-
-import static org.opends.server.protocols.asn1.ASN1Constants.*;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.opends.messages.Message;
-import org.opends.server.controls.ControlDecoder;
-import org.opends.server.protocols.asn1.ASN1;
-import org.opends.server.protocols.asn1.ASN1Reader;
-import org.opends.server.protocols.asn1.ASN1Writer;
-import org.opends.server.types.*;
-import org.openliberty.arisid.*;
-import org.openliberty.arisid.log.ILogger;
-import org.openliberty.arisid.log.LogHandler;
-import org.openliberty.arisid.policy.IPolicy;
-import org.openliberty.arisid.policy.PolicyHandler;
-import org.openliberty.arisid.protocol.ldap.IPrivacyControl;
-import org.w3c.dom.Element;
-
-
-
-/**
- * IGF ArisID Privacy Control implementation.
- */
-public class ArisIDPrivacyControl extends Control implements
- IPrivacyControl
-{
-
- /**
- * ControlDecoder implentation to decode this control from a
- * ByteString.
- */
- private final static class Decoder implements
- ControlDecoder<ArisIDPrivacyControl>
- {
- /**
- * Decodes and constructs a Java object representing the
- * encodedValue.
- * <p>
- * ASN.1 encoded value as per Privacy Control Specifiction:
- * http://www.openliberty.org/wiki/index.php/Profile_LDAP#
- * Extended_PolicySequence_Variation
- */
- public ArisIDPrivacyControl decode(boolean isCritical,
- ByteString value) throws DirectoryException
- {
- if (value == null)
- {
- final Message message = Message
- .raw("Control contains no value");
- throw new DirectoryException(ResultCode.PROTOCOL_ERROR, message);
- }
-
- String ixnName = "";
- String appName = "";
- String appUri = "";
- final HashMap<String, IPolicy> polMap = new HashMap<String, IPolicy>();
- final ASN1Reader reader = ASN1.getReader(value);
-
- try
- {
- reader.readStartSequence();
- {
- appName = reader.readOctetStringAsString();
- appUri = reader.readOctetStringAsString();
- ixnName = reader.readOctetStringAsString();
-
- reader.readStartSequence();
- {
- // Get the count of policies coming
- final long policyCount = reader.readInteger();
- if (policyCount > 1)
- {
- for (int i = 0; i < policyCount; i++)
- {
- reader.readStartSequence();
- {
- final String pname = reader.readOctetStringAsString();
- final String pStr = reader.readOctetStringAsString();
- final Element node = phandler
- .parseStringToElement(pStr);
- IPolicy pol = null;
- try
- {
- pol = phandler.parseDomPolicy(node);
- }
- catch (final Exception e)
- {
- logger.error("Error parsing policy: "
- + e.getMessage(), e);
- }
- polMap.put(pname, pol);
- }
- reader.readEndSequence();
- }
- }
- }
- reader.readEndSequence();
- }
- reader.readEndSequence();
- }
- catch (final Exception e1)
- {
- throw new DirectoryException(ResultCode.PROTOCOL_ERROR,
- Message.raw("Unable to decode privacy control: "
- + e1.getMessage()), e1);
- }
-
- return new ArisIDPrivacyControl(isCritical, ixnName, appName,
- appUri, polMap);
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- public String getOID()
- {
- return IPrivacyControl.OID_IGF_CONTROL;
- }
- }
-
-
-
- private static final long serialVersionUID = -2668010326604049964L;
-
- private static final ILogger logger = LogHandler
- .getLogger(ArisIDPrivacyControl.class);
-
- private static PolicyHandler phandler = PolicyHandler.getInstance();
-
- private String _ixnName = "";
-
- private String _appName = "";
-
- private String _appUri = "";
-
- private ArisIdService _asvc = null;
-
- private CarmlDoc _doc = null;
-
- private HashMap<String, IPolicy> _polMap = new HashMap<String, IPolicy>();
-
- /**
- * The Control Decoder that can be used to decode this control.
- */
- public static final ControlDecoder<ArisIDPrivacyControl> DECODER = new Decoder();
-
-
-
- /**
- * Creates a new non-critical IGF Privacy Control using the provided
- * Interaction.
- *
- * @param ixn
- * The interaction.
- * @throws IGFException
- * If an error occurred processing the Interaction.
- */
- public ArisIDPrivacyControl(IInteraction ixn) throws IGFException
- {
- super(IPrivacyControl.OID_IGF_CONTROL, false);
- _processCarmlDoc(ixn);
- }
-
-
-
- /**
- * Creates a new IGF Privacy Control using the provided Interaction
- * and criticality.
- *
- * @param ixn
- * The interaction.
- * @param critical
- * The criticality.
- * @throws IGFException
- * If an error occurred processing the Interaction.
- */
- public ArisIDPrivacyControl(IInteraction ixn, boolean critical)
- throws IGFException
- {
- super(IPrivacyControl.OID_IGF_CONTROL, critical);
- _processCarmlDoc(ixn);
- }
-
-
-
- private ArisIDPrivacyControl(boolean isCritical, String _ixnName,
- String _appName, String _appUri, HashMap<String, IPolicy> _polMap)
- {
- super(IPrivacyControl.OID_IGF_CONTROL, isCritical);
- this._ixnName = _ixnName;
- this._appName = _appName;
- this._appUri = _appUri;
- this._polMap = _polMap;
- }
-
-
-
- public String getAppName()
- {
- return this._appName;
- }
-
-
-
- /**
- * @deprecated Use {@link #getCarmlURI()} instead
- */
- @Deprecated
- public URI getAppURI()
- {
- return getCarmlURI();
- }
-
-
-
- /**
- * A convenience method to obtain the CarmlDoc object referenced by
- * this control. For performance reasons, the CarmlDoc object is not
- * instantiated unless {@link #loadCarmlDoc(URI)} is called first.
- *
- * @return A CarmlDoc object containing the Controls referenced
- * CarmlDoc or null if the document hasn't been loaded.
- */
- public CarmlDoc getCarmlDoc()
- {
-
- return this._doc;
- }
-
-
-
- public URI getCarmlURI()
- {
- try
- {
- return new URI(this._appUri);
- }
- catch (final URISyntaxException e)
- {
- logger
- .warn("Invalid CARML URI syntax exception occurred for value: "
- + this._appUri);
- return null;
- }
- }
-
-
-
- /*
- * (non-Javadoc)
- * @see
- * org.openliberty.arisid.protocol.ldap.IPrivacyControl#getConstraintMap
- * ()
- */
- public Map<String, IPolicy> getConstraintMap()
- {
- return this._polMap;
- }
-
-
-
- /*
- * (non-Javadoc)
- * @seeorg.openliberty.arisid.protocol.ldap.IPrivacyControl#
- * getDynamicConstraints (java.lang.String)
- */
- public IPolicy getDynamicConstraints(String nameId)
- {
- return this._polMap.get(nameId);
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- public byte[] getEncodedValue()
- {
- try
- {
- final ByteStringBuilder builder = new ByteStringBuilder();
- final ASN1Writer writer = ASN1.getWriter(builder);
- writeValue(writer);
- writer.close();
- return builder.toByteArray();
- }
- catch (final IOException e)
- {
- // Should never occur.
- throw new RuntimeException(e);
- }
- }
-
-
-
- /*
- * (non-Javadoc)
- * @see org.openliberty.arisid.protocol.ldap.IPrivacyControl#getID()
- */
- public String getID()
- {
- return OID_IGF_CONTROL;
- }
-
-
-
- /*
- * (non-Javadoc)
- * @see
- * org.openliberty.arisid.protocol.ldap.IPrivacyControl#getInteractionName
- * ()
- */
- public String getInteractionName()
- {
- return this._ixnName;
- }
-
-
-
- /**
- * Returns the named transaction constraint.
- *
- * @param nameId
- * The transaction constraint name.
- * @return The named transaction constraint.
- */
- public IPolicy getTransactionConstraints(String nameId)
- {
- return this._polMap.get(nameId);
- }
-
-
-
- /**
- * This is a convenience method intended for servers/proxies that need
- * to instantiate a CarmlDoc object. The localUri is the URI of a
- * local copy of the controls referenced Carml Document.
- *
- * @param localUri
- * A URI to a copy of the CARML document matching the
- * {@link #getAppName()} of this control. If localUri is
- * null, the method will use the stored URI to load the
- * document.
- * @throws URISyntaxException
- * @throws IllegalAccessException
- * @throws IGFException
- * @throws InstantiationException
- * @throws AttrSvcInitializedException
- * @throws FileNotFoundException
- */
- public void loadCarmlDoc(URI localUri) throws URISyntaxException,
- FileNotFoundException, AttrSvcInitializedException,
- InstantiationException, IGFException, IllegalAccessException
- {
- URI loadUri = localUri;
- if (loadUri == null)
- {
- loadUri = new URI(this._appUri);
- }
-
- // TODO I wonder if this should come from a static hash to avoid
- // re-parsing?
- this._asvc = ArisIdServiceFactory.parseCarmlOnly(loadUri);
- if (this._asvc != null)
- {
- this._doc = this._asvc.getCarmlDoc();
- }
- }
-
-
-
- /*
- * (non-Javadoc)
- * @seeorg.openliberty.arisid.protocol.ldap.IPrivacyControl#
- * setDynamicConstraints (java.util.Map)
- */
- public void setDynamicConstraints(
- Map<String, IPolicy> dynamicConstraints)
- {
- if (dynamicConstraints != null)
- {
- this._polMap.putAll(dynamicConstraints);
- }
- }
-
-
-
- /*
- * (non-Javadoc)
- * @seeorg.openliberty.arisid.protocol.ldap.IPrivacyControl#
- * setTranasactionConstraints(java.lang.String,
- * org.openliberty.arisid.schema.IPolicy)
- */
- public void setDynamicConstraints(String nameId,
- IPolicy txnConstraints)
- {
- this._polMap.put(nameId, txnConstraints);
- }
-
-
-
- private void _processCarmlDoc(IInteraction ixn) throws IGFException
- {
- // set defaults of empty string
- this._appName = "";
- this._ixnName = "";
- this._appUri = "";
-
- if (ixn == null)
- {
- return;
- }
-
- final ArisIdService asvc = ixn.getAttributeService();
- if (asvc == null)
- {
- return;
- }
-
- final CarmlDoc doc = asvc.getCarmlDoc();
- this._appName = doc.getApplicationNameId();
- if (this._appName == null)
- {
- this._appName = "";
- }
- this._appUri = doc.getCarmlURI().toString();
- if (this._appUri == null)
- {
- this._appUri = "";
- }
- this._ixnName = ixn.getNameId();
- if (this._ixnName == null)
- {
- this._ixnName = "";
- }
-
- }
-
-
-
- /**
- * Encode ASN.1 value. Encoding is as per spec:
- * http://www.openliberty.org/wiki
- * /index.php/Profile_LDAP#Extended_PolicySequence_Variation
- */
- protected void writeValue(ASN1Writer writer) throws IOException
- {
- writer.writeStartSequence(UNIVERSAL_OCTET_STRING_TYPE);
- {
- writer.writeOctetString(_appName);
- writer.writeOctetString(_appUri);
- writer.writeOctetString(_ixnName);
- writer.writeStartSequence();
- {
- writer.writeInteger(_polMap.size());
- for (final Map.Entry<String, IPolicy> entry : _polMap
- .entrySet())
- {
- writer.writeStartSequence();
- {
- final String nameId = entry.getKey();
- final IPolicy pol = this.getTransactionConstraints(nameId);
- final String strPol = phandler.policyToString(pol);
-
- writer.writeOctetString(entry.getKey());
- writer.writeOctetString(strPol);
- }
- writer.writeEndSequence();
- }
- }
- writer.writeEndSequence();
- }
- writer.writeEndSequence();
- }
-
-}
diff --git a/opends/experimental/arisid-privacy-control/src/org/opends/arisid/ArisIDPrivacyControlPlugin.java b/opends/experimental/arisid-privacy-control/src/org/opends/arisid/ArisIDPrivacyControlPlugin.java
deleted file mode 100644
index fe30b53..0000000
--- a/opends/experimental/arisid-privacy-control/src/org/opends/arisid/ArisIDPrivacyControlPlugin.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- */
-package org.opends.arisid;
-
-
-
-import java.util.Set;
-
-import org.opends.arisid.server.ArisidPrivacyControlPluginCfg;
-import org.opends.messages.Message;
-import org.opends.server.api.plugin.DirectoryServerPlugin;
-import org.opends.server.api.plugin.PluginResult;
-import org.opends.server.api.plugin.PluginType;
-import org.opends.server.config.ConfigException;
-import org.opends.server.loggers.ErrorLogger;
-import org.opends.server.types.CanceledOperationException;
-import org.opends.server.types.operation.*;
-
-
-
-/**
- * IGF ArisID Privacy Control Plugin implementation.
- */
-public final class ArisIDPrivacyControlPlugin extends
- DirectoryServerPlugin<ArisidPrivacyControlPluginCfg>
-{
- /**
- * {@inheritDoc}
- */
- @Override
- public PluginResult.PreOperation doPreOperation(
- PreOperationAddOperation addOperation)
- throws CanceledOperationException
- {
- handleOperation(addOperation);
- return PluginResult.PreOperation.continueOperationProcessing();
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PluginResult.PreOperation doPreOperation(
- PreOperationCompareOperation compareOperation)
- throws CanceledOperationException
- {
- handleOperation(compareOperation);
- return PluginResult.PreOperation.continueOperationProcessing();
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PluginResult.PreOperation doPreOperation(
- PreOperationDeleteOperation deleteOperation)
- throws CanceledOperationException
- {
- handleOperation(deleteOperation);
- return PluginResult.PreOperation.continueOperationProcessing();
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PluginResult.PreOperation doPreOperation(
- PreOperationExtendedOperation extendedOperation)
- throws CanceledOperationException
- {
- handleOperation(extendedOperation);
- return PluginResult.PreOperation.continueOperationProcessing();
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PluginResult.PreOperation doPreOperation(
- PreOperationModifyDNOperation modifyDNOperation)
- throws CanceledOperationException
- {
- handleOperation(modifyDNOperation);
- return PluginResult.PreOperation.continueOperationProcessing();
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PluginResult.PreOperation doPreOperation(
- PreOperationModifyOperation modifyOperation)
- throws CanceledOperationException
- {
- handleOperation(modifyOperation);
- return PluginResult.PreOperation.continueOperationProcessing();
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PluginResult.PreOperation doPreOperation(
- PreOperationSearchOperation searchOperation)
- throws CanceledOperationException
- {
- handleOperation(searchOperation);
- return PluginResult.PreOperation.continueOperationProcessing();
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override()
- public void initializePlugin(Set<PluginType> pluginTypes,
- ArisidPrivacyControlPluginCfg configuration)
- throws ConfigException
- {
- // This plugin may only be used as a pre-operation plugin.
- for (final PluginType t : pluginTypes)
- {
- switch (t)
- {
- case PRE_OPERATION_ADD:
- case PRE_OPERATION_COMPARE:
- case PRE_OPERATION_DELETE:
- case PRE_OPERATION_EXTENDED:
- case PRE_OPERATION_MODIFY:
- case PRE_OPERATION_MODIFY_DN:
- case PRE_OPERATION_SEARCH:
- // This is fine.
- break;
- default:
- throw new ConfigException(Message.raw("Invalid plugin type "
- + t + " for the IGF plugin."));
- }
- }
-
- }
-
-
-
- private void handleOperation(PreOperationOperation op)
- {
- try
- {
- final ArisIDPrivacyControl control = op
- .getRequestControl(ArisIDPrivacyControl.DECODER);
- if (control != null)
- {
- ErrorLogger.logError(Message.raw(control.toString()));
- }
- }
- catch (final Exception e)
- {
- ErrorLogger.logError(Message
- .raw("Unable to decode the IGF privacy" + " control: " + e));
- }
- }
-}
diff --git a/opends/experimental/arisid-privacy-control/src/org/opends/arisid/ArisidPrivacyControlPluginConfiguration.xml b/opends/experimental/arisid-privacy-control/src/org/opends/arisid/ArisidPrivacyControlPluginConfiguration.xml
deleted file mode 100644
index e6d5c92..0000000
--- a/opends/experimental/arisid-privacy-control/src/org/opends/arisid/ArisidPrivacyControlPluginConfiguration.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ! CDDL HEADER START
- !
- ! The contents of this file are subject to the terms of the
- ! Common Development and Distribution License, Version 1.0 only
- ! (the "License"). You may not use this file except in compliance
- ! with the License.
- !
- ! You can obtain a copy of the license at
- ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
- ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- ! See the License for the specific language governing permissions
- ! and limitations under the License.
- !
- ! When distributing Covered Code, include this CDDL HEADER in each
- ! file and include the License file at
- ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- ! add the following below this CDDL HEADER, with the fields enclosed
- ! by brackets "[]" replaced with your own identifying information:
- ! Portions Copyright [yyyy] [name of copyright owner]
- !
- ! CDDL HEADER END
- !
- !
- ! Copyright 2010 Sun Microsystems, Inc.
- ! -->
-<adm:managed-object name="arisid-privacy-control-plugin"
- plural-name="arisid-privacy-control-plugin"
- package="org.opends.arisid" extends="plugin"
- parent-package="org.opends.server.admin.std"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>ArisID Privacy Control Plugin.</adm:synopsis>
- <adm:profile name="ldap">
- <ldap:object-class>
- <ldap:name>ds-cfg-arisid-privacy-control-plugin</ldap:name>
- <ldap:superior>ds-cfg-plugin</ldap:superior>
- </ldap:object-class>
- </adm:profile>
- <adm:property-override name="java-class">
- <adm:default-behavior>
- <adm:defined>
- <adm:value>org.opends.arisid.ArisIDPrivacyControlPlugin</adm:value>
- </adm:defined>
- </adm:default-behavior>
- </adm:property-override>
-</adm:managed-object>
diff --git a/opends/experimental/arisid-privacy-control/src/org/opends/arisid/Package.xml b/opends/experimental/arisid-privacy-control/src/org/opends/arisid/Package.xml
deleted file mode 100644
index f013bc6..0000000
--- a/opends/experimental/arisid-privacy-control/src/org/opends/arisid/Package.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ! CDDL HEADER START
- !
- ! The contents of this file are subject to the terms of the
- ! Common Development and Distribution License, Version 1.0 only
- ! (the "License"). You may not use this file except in compliance
- ! with the License.
- !
- ! You can obtain a copy of the license at
- ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
- ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- ! See the License for the specific language governing permissions
- ! and limitations under the License.
- !
- ! When distributing Covered Code, include this CDDL HEADER in each
- ! file and include the License file at
- ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- ! add the following below this CDDL HEADER, with the fields enclosed
- ! by brackets "[]" replaced with your own identifying information:
- ! Portions Copyright [yyyy] [name of copyright owner]
- !
- ! CDDL HEADER END
- !
- !
- ! Copyright 2010 Sun Microsystems, Inc.
- ! -->
-<adm:package name="org.opends.arisid"
- xmlns:adm="http://www.opends.org/admin"
- xmlns:ldap="http://www.opends.org/admin-ldap">
- <adm:synopsis>ArisID Privacy Control.</adm:synopsis>
-</adm:package>
diff --git a/opends/experimental/arisid-privacy-control/src/org/opends/arisid/package-info.java b/opends/experimental/arisid-privacy-control/src/org/opends/arisid/package-info.java
deleted file mode 100644
index d0474ab..0000000
--- a/opends/experimental/arisid-privacy-control/src/org/opends/arisid/package-info.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- */
-
-/**
- * ArisID Privacy Control implementation clases.
- * <p>
- * This package contains the classes which implement the
- * ArisID Privacy Control.
- */
-package org.opends.arisid;
--
Gitblit v1.10.0