You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2015/04/01 03:01:43 UTC
svn commit: r1670531 [10/14] - in
/directory/studio/trunk/plugins/openldap.config.editor: ./ resources/icons/
src/main/java/org/apache/directory/studio/openldap/config/
src/main/java/org/apache/directory/studio/openldap/config/actions/
src/main/java/or...
Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/jobs/PartitionsDiffComputer.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/jobs/PartitionsDiffComputer.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/jobs/PartitionsDiffComputer.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/jobs/PartitionsDiffComputer.java Wed Apr 1 01:01:42 2015
@@ -21,24 +21,16 @@ package org.apache.directory.studio.open
import java.util.ArrayList;
-import java.util.HashSet;
import java.util.List;
-import java.util.Set;
-import org.apache.directory.server.core.api.entry.ClonedServerEntry;
-import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
-import org.apache.directory.server.core.api.interceptor.context.LookupOperationContext;
-import org.apache.directory.server.core.api.interceptor.context.SearchOperationContext;
-import org.apache.directory.server.core.api.partition.Partition;
import org.apache.directory.api.ldap.model.constants.SchemaConstants;
+import org.apache.directory.api.ldap.model.entry.Attribute;
import org.apache.directory.api.ldap.model.entry.DefaultAttribute;
import org.apache.directory.api.ldap.model.entry.DefaultModification;
import org.apache.directory.api.ldap.model.entry.Entry;
-import org.apache.directory.api.ldap.model.entry.Attribute;
import org.apache.directory.api.ldap.model.entry.Modification;
import org.apache.directory.api.ldap.model.entry.ModificationOperation;
import org.apache.directory.api.ldap.model.entry.Value;
-import org.apache.directory.api.ldap.model.exception.LdapException;
import org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException;
import org.apache.directory.api.ldap.model.filter.FilterParser;
import org.apache.directory.api.ldap.model.ldif.ChangeType;
@@ -47,12 +39,19 @@ import org.apache.directory.api.ldap.mod
import org.apache.directory.api.ldap.model.message.SearchScope;
import org.apache.directory.api.ldap.model.name.Dn;
import org.apache.directory.api.ldap.model.schema.AttributeType;
-import org.apache.directory.api.ldap.model.schema.AttributeTypeOptions;
-import org.apache.directory.api.ldap.model.schema.SchemaManager;
-import org.apache.directory.api.ldap.model.schema.SchemaUtils;
import org.apache.directory.api.ldap.model.schema.UsageEnum;
+import org.apache.directory.server.core.api.entry.ClonedServerEntry;
+import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
+import org.apache.directory.server.core.api.interceptor.context.LookupOperationContext;
+import org.apache.directory.server.core.api.interceptor.context.SearchOperationContext;
+import org.apache.directory.server.core.api.partition.Partition;
+/**
+ *
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
public class PartitionsDiffComputer
{
/** The original partition */
@@ -215,11 +214,9 @@ public class PartitionsDiffComputer
}
// Creating a search operation context to get the children of the current entry
- SearchOperationContext soc = new SearchOperationContext( null );
- setReturningAttributes( originalPartition.getSchemaManager(), attributeIds, soc );
- soc.setDn( originalEntry.getDn() );
- soc.setScope( SearchScope.ONELEVEL );
- soc.setFilter( FilterParser.parse( originalPartition.getSchemaManager(), "(objectClass=*)" ) );
+ SearchOperationContext soc = new SearchOperationContext( null, originalEntry.getDn(),
+ SearchScope.ONELEVEL,
+ FilterParser.parse( originalPartition.getSchemaManager(), "(objectClass=*)" ), attributeIds );
soc.setAliasDerefMode( AliasDerefMode.DEREF_ALWAYS );
// Looking for the children of the current entry
@@ -229,72 +226,71 @@ public class PartitionsDiffComputer
originalEntries.add( ( ( ClonedServerEntry ) cursor.get() ).getClonedEntry() );
}
}
- }
- catch ( Exception e )
- {
- throw new PartitionsDiffException( e );
- }
-
- return modifications;
- }
+ // Looking up the destination base entry
+ Entry destinationBaseEntry = destinationPartition
+ .lookup( new LookupOperationContext( null, baseDn, attributeIds ) );
+ if ( destinationBaseEntry == null )
+ {
+ throw new PartitionsDiffException( "Unable to find the base entry in the destination partition." );
+ }
- /**
- * Sets the returning attributes to the search operation context.
- *
- * @param schemaManager
- * the schema manager
- * @param attributeIds
- * the attribute IDs
- * @param soc
- * the search operation context
- * @throws org.apache.directory.api.ldap.model.exception.LdapException
- */
- private void setReturningAttributes( SchemaManager schemaManager, String[] attributeIds,
- SearchOperationContext soc ) throws LdapException
- {
- if ( attributeIds != null && attributeIds.length != 0 )
- {
- Set<AttributeTypeOptions> returningAttributes = new HashSet<AttributeTypeOptions>();
+ // Creating the list containing all the destination entries to be processed
+ // and adding it the destination base entry
+ List<Entry> destinationEntries = new ArrayList<Entry>();
+ destinationEntries.add( originalBaseEntry );
- for ( String returnAttribute : attributeIds )
+ // Looping until all destination entries are being processed
+ while ( destinationEntries.size() > 0 )
{
- if ( returnAttribute.equals( SchemaConstants.NO_ATTRIBUTE ) )
- {
- soc.setNoAttributes( true );
- continue;
- }
+ // Getting the first destination entry from the list
+ Entry destinationEntry = destinationEntries.remove( 0 );
- if ( returnAttribute.equals( SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES ) )
- {
- soc.setAllOperationalAttributes( true );
- continue;
- }
+ // Looking for the equivalent entry in the destination partition
+ Entry originalEntry = originalPartition.lookup( new LookupOperationContext( null, destinationEntry
+ .getDn(), attributeIds ) );
+ // We're only looking for new entries, modified or removed
+ // entries have already been computed
+ if ( originalEntry == null )
+ {
+ // Creating a modification entry to hold all modifications
+ LdifEntry modificationEntry = new LdifEntry();
+ modificationEntry.setDn( destinationEntry.getDn() );
- if ( returnAttribute.equals( SchemaConstants.ALL_USER_ATTRIBUTES ) )
- {
- soc.setAllUserAttributes( true );
- continue;
- }
+ // Setting the changetype to addition
+ modificationEntry.setChangeType( ChangeType.Add );
+
+ // Copying attributes
+ for ( Attribute attribute : destinationEntry )
+ {
+ modificationEntry.addAttribute( attribute );
+ }
- String id = SchemaUtils.stripOptions( returnAttribute );
- Set<String> options = SchemaUtils.getOptions( returnAttribute );
+ // Adding the modification entry to the list
+ modifications.add( modificationEntry );
+ }
- AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( id );
- AttributeTypeOptions attrOptions = new AttributeTypeOptions( attributeType, options );
+ // Creating a search operation context to get the children of the current entry
+ SearchOperationContext soc = new SearchOperationContext( null, destinationEntry.getDn(),
+ SearchScope.ONELEVEL,
+ FilterParser.parse( originalPartition.getSchemaManager(), "(objectClass=*)" ), attributeIds );
+ soc.setAliasDerefMode( AliasDerefMode.DEREF_ALWAYS );
- returningAttributes.add( attrOptions );
- }
+ // Looking for the children of the current entry
+ EntryFilteringCursor cursor = destinationPartition.search( soc );
- // reset the noAttrubte flag if it is already set cause that will be ignored if any other AT is requested
- if ( soc.isNoAttributes()
- && ( soc.isAllUserAttributes() || soc.isAllOperationalAttributes() || ( !returningAttributes.isEmpty() ) ) )
- {
- soc.setNoAttributes( false );
+ while ( cursor.next() )
+ {
+ destinationEntries.add( ( ( ClonedServerEntry ) cursor.get() ).getClonedEntry() );
+ }
}
-
- soc.setReturningAttributes( returningAttributes.toArray( new String[returningAttributes.size()] ) );
}
+ catch ( Exception e )
+ {
+ throw new PartitionsDiffException( e );
+ }
+
+ return modifications;
}
@@ -392,54 +388,17 @@ public class PartitionsDiffComputer
private void compareAttributes( Attribute originalAttribute, Attribute destinationAttribute,
LdifEntry modificationEntry )
{
- // Creating a list to store the already evaluated values
- List<Value<?>> evaluatedValues = new ArrayList<Value<?>>();
-
- // Checking values of the original attribute
- for ( Value<?> originalValue : originalAttribute )
+ // Special case for 'objectClass' attribute, due to a bug in OpenLDAP
+ // which does not allow us to modify the 'objectClass' attribute
+ if ( !SchemaConstants.OBJECT_CLASS_AT.equalsIgnoreCase( originalAttribute.getUpId() ) )
{
- if ( !destinationAttribute.contains( originalValue ) )
+ // Checking if the two attributes are equivalent
+ if ( !originalAttribute.equals( destinationAttribute ) )
{
- // Creating a modification for the removed AT value
+ // Creating a modification for the modified AT values
Modification modification = new DefaultModification();
- modification.setOperation( ModificationOperation.REMOVE_ATTRIBUTE );
- Attribute attribute = new DefaultAttribute( originalAttribute.getAttributeType() );
- modification.setAttribute( attribute );
-
- try
- {
- attribute.add( originalValue );
- }
- catch ( LdapInvalidAttributeValueException liave )
- {
- // TODO : handle the exception
- }
-
- modificationEntry.addModification( modification );
- }
-
- evaluatedValues.add( originalValue );
- }
-
- // Checking values of the destination attribute
- for ( Value<?> destinationValue : destinationAttribute )
- {
- if ( !evaluatedValues.contains( destinationValue ) )
- {
- // Creating a modification for the added AT value
- Modification modification = new DefaultModification();
- modification.setOperation( ModificationOperation.ADD_ATTRIBUTE );
- Attribute attribute = new DefaultAttribute( originalAttribute.getAttributeType() );
- modification.setAttribute( attribute );
-
- try
- {
- attribute.add( destinationValue );
- }
- catch ( LdapInvalidAttributeValueException liave )
- {
- // TODO : handle the exception
- }
+ modification.setOperation( ModificationOperation.REPLACE_ATTRIBUTE );
+ modification.setAttribute( destinationAttribute );
modificationEntry.addModification( modification );
}
Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/AuxiliaryObjectClass.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/AuxiliaryObjectClass.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/AuxiliaryObjectClass.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/AuxiliaryObjectClass.java Wed Apr 1 01:01:42 2015
@@ -22,7 +22,9 @@ package org.apache.directory.studio.open
/**
* Java bean for an auxiliary object class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public abstract class AuxiliaryObjectClass
+public interface AuxiliaryObjectClass
{
}
Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcAccessLogConfig.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcAccessLogConfig.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcAccessLogConfig.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcAccessLogConfig.java Wed Apr 1 01:01:42 2015
@@ -28,6 +28,8 @@ import org.apache.directory.api.ldap.mod
/**
* Java bean for the 'olcAccessLogConfig' object class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
public class OlcAccessLogConfig extends OlcOverlayConfig
{
@@ -69,6 +71,33 @@ public class OlcAccessLogConfig extends
/**
+ * Creates a new instance of OlcAccessLogConfig.
+ */
+ public OlcAccessLogConfig()
+ {
+ super();
+ olcOverlay = "accesslog";
+ }
+
+
+ /**
+ * Creates a copy instance of OlcAccessLogConfig.
+ *
+ * @param o the initial object
+ */
+ public OlcAccessLogConfig( OlcAccessLogConfig o )
+ {
+ super( o );
+ olcAccessLogDB = o.olcAccessLogDB;
+ olcAccessLogOld = o.olcAccessLogOld;
+ olcAccessLogOldAttr = new ArrayList<String>( olcAccessLogOldAttr );
+ olcAccessLogOps = new ArrayList<String>( o.olcAccessLogOps );
+ olcAccessLogPurge = o.olcAccessLogPurge;
+ olcAccessLogSuccess = o.olcAccessLogSuccess;
+ }
+
+
+ /**
* @param strings
*/
public void addOlcAccessLogOldAttr( String... strings )
@@ -210,4 +239,13 @@ public class OlcAccessLogConfig extends
{
this.olcAccessLogSuccess = olcAccessLogSuccess;
}
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public OlcAccessLogConfig copy()
+ {
+ return new OlcAccessLogConfig( this );
+ }
}
Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcAuditlogConfig.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcAuditlogConfig.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcAuditlogConfig.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcAuditlogConfig.java Wed Apr 1 01:01:42 2015
@@ -26,6 +26,8 @@ import java.util.List;
/**
* Java bean for the 'olcAuditlogConfig' object class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
public class OlcAuditlogConfig extends OlcOverlayConfig
{
@@ -37,6 +39,28 @@ public class OlcAuditlogConfig extends O
/**
+ * Creates a new instance of OlcAuditlogConfig.
+ */
+ public OlcAuditlogConfig()
+ {
+ super();
+ olcOverlay = "auditlog";
+ }
+
+
+ /**
+ * Creates a copy instance of OlcAuditlogConfig.
+ *
+ * @param o the initial object
+ */
+ public OlcAuditlogConfig( OlcAuditlogConfig o )
+ {
+ super( o );
+ olcAuditlogFile = new ArrayList<String>( olcAuditlogFile );
+ }
+
+
+ /**
* @param strings
*/
public void addOlcAuditlogFile( String... strings )
@@ -70,4 +94,13 @@ public class OlcAuditlogConfig extends O
{
this.olcAuditlogFile = olcAuditlogFile;
}
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public OlcAuditlogConfig copy()
+ {
+ return new OlcAuditlogConfig( this );
+ }
}
Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcBdbConfig.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcBdbConfig.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcBdbConfig.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcBdbConfig.java Wed Apr 1 01:01:42 2015
@@ -23,9 +23,13 @@ package org.apache.directory.studio.open
import java.util.ArrayList;
import java.util.List;
+import org.apache.directory.studio.openldap.config.editor.databases.DatabaseTypeEnum;
+
/**
* Java bean for the 'olcBdbConfig' object class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
public class OlcBdbConfig extends OlcDatabaseConfig
{
@@ -84,7 +88,7 @@ public class OlcBdbConfig extends OlcDat
private Integer olcDbDNcacheSize;
/**
- * Field for the 'olcDbDLcacheSize' attribute.
+ * Field for the 'olcDbIDLcacheSize' attribute.
*/
@ConfigurationElement(attributeType = "olcDbIDLcacheSize")
private Integer olcDbIDLcacheSize;
@@ -108,7 +112,7 @@ public class OlcBdbConfig extends OlcDat
private String olcDbLockDetect;
/**
- * Field for the 'olcDbNoSync' attribute.
+ * Field for the 'olcDbMode' attribute.
*/
@ConfigurationElement(attributeType = "olcDbMode")
private String olcDbMode;
@@ -514,4 +518,13 @@ public class OlcBdbConfig extends OlcDat
{
this.olcDbShmKey = olcDbShmKey;
}
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getOlcDatabaseType()
+ {
+ return DatabaseTypeEnum.BDB.toString().toLowerCase();
+ };
}
Added: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcBdbConfigLockDetectEnum.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcBdbConfigLockDetectEnum.java?rev=1670531&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcBdbConfigLockDetectEnum.java (added)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcBdbConfigLockDetectEnum.java Wed Apr 1 01:01:42 2015
@@ -0,0 +1,115 @@
+/*
+ * 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 org.apache.directory.studio.openldap.config.model;
+
+
+/**
+ * This enum represents the various values for the 'olcDbLockDetect' attribute.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public enum OlcBdbConfigLockDetectEnum
+{
+ /** Enum value for 'oldest' */
+ OLDEST,
+
+ /** Enum value for 'youngest' */
+ YOUNGEST,
+
+ /** Enum value for 'fewest' */
+ FEWEST,
+
+ /** Enum value for 'random' */
+ RANDOM,
+
+ /** Enum value for 'default' */
+ DEFAULT;
+
+ /** The constant string for 'oldest' */
+ private static final String OLDEST_STRING = "oldest";
+
+ /** The constant string for 'youngest' */
+ private static final String YOUNGEST_STRING = "youngest";
+
+ /** The constant string for 'fewest' */
+ private static final String FEWEST_STRING = "fewest";
+
+ /** The constant string for 'random' */
+ private static final String RANDOM_STRING = "random";
+
+ /** The constant string for 'default' */
+ private static final String DEFAULT_STRING = "default";
+
+
+ /**
+ * Gets the associated enum element.
+ *
+ * @param s the string
+ * @return the associated enum element
+ */
+ public static OlcBdbConfigLockDetectEnum fromString( String s )
+ {
+ if ( OLDEST_STRING.equalsIgnoreCase( s ) )
+ {
+ return OLDEST;
+ }
+ else if ( YOUNGEST_STRING.equalsIgnoreCase( s ) )
+ {
+ return YOUNGEST;
+ }
+ else if ( FEWEST_STRING.equalsIgnoreCase( s ) )
+ {
+ return FEWEST;
+ }
+ else if ( RANDOM_STRING.equalsIgnoreCase( s ) )
+ {
+ return RANDOM;
+ }
+ else if ( DEFAULT_STRING.equalsIgnoreCase( s ) )
+ {
+ return DEFAULT;
+ }
+
+ return null;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString()
+ {
+ switch ( this )
+ {
+ case OLDEST:
+ return OLDEST_STRING;
+ case YOUNGEST:
+ return YOUNGEST_STRING;
+ case FEWEST:
+ return FEWEST_STRING;
+ case RANDOM:
+ return RANDOM_STRING;
+ case DEFAULT:
+ return DEFAULT_STRING;
+ }
+
+ return super.toString();
+ }
+}
Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcChainConfig.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcChainConfig.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcChainConfig.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcChainConfig.java Wed Apr 1 01:01:42 2015
@@ -22,7 +22,9 @@ package org.apache.directory.studio.open
/**
* Java bean for the 'olcChainConfig' object class.
- */
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+*/
public class OlcChainConfig extends OlcOverlayConfig
{
/**
@@ -51,6 +53,30 @@ public class OlcChainConfig extends OlcO
/**
+ * Creates a new instance of OlcChainConfig.
+ */
+ public OlcChainConfig()
+ {
+ super();
+ }
+
+
+ /**
+ * Creates a copy instance of OlcChainConfig.
+ *
+ * @param o the initial object
+ */
+ public OlcChainConfig( OlcChainConfig o )
+ {
+ super( o );
+ olcChainCacheURI = o.olcChainCacheURI;
+ olcChainingBehavior = o.olcChainingBehavior;
+ olcChainMaxReferralDepth = o.olcChainMaxReferralDepth;
+ olcChainReturnError = o.olcChainReturnError;
+ }
+
+
+ /**
* @return the olcChainCacheURI
*/
public Boolean getOlcChainCacheURI()
@@ -120,4 +146,13 @@ public class OlcChainConfig extends OlcO
{
this.olcChainReturnError = olcChainReturnError;
}
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public OlcChainConfig copy()
+ {
+ return new OlcChainConfig( this );
+ }
}
Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcConfig.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcConfig.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcConfig.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcConfig.java Wed Apr 1 01:01:42 2015
@@ -28,13 +28,14 @@ import org.apache.directory.api.ldap.mod
/**
* Java bean for the 'olcConfig' object class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
public class OlcConfig
{
/** The parent DN of the associated entry */
protected Dn parentDn;
-
-
+
/** The list of auxiliary object classes */
protected List<AuxiliaryObjectClass> auxiliaryObjectClasses = new ArrayList<AuxiliaryObjectClass>();
@@ -75,7 +76,7 @@ public class OlcConfig
/**
* Gets the parent DN of the associated entry.
- *
+ *
* @return the dn the parent DN of the asssociated entry
*/
public Dn getParentDn()
@@ -86,7 +87,7 @@ public class OlcConfig
/**
* Sets the parent DN of the associated entry.
- *
+ *
* @param dn the parent dn to set
*/
public void setParentDn( Dn parentDn )
Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDatabaseConfig.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDatabaseConfig.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDatabaseConfig.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDatabaseConfig.java Wed Apr 1 01:01:42 2015
@@ -27,11 +27,31 @@ import org.apache.directory.api.ldap.mod
/**
- * Java bean for the 'olcDatabaseConfig' object class.
+ * Java bean for the 'olcDatabaseConfig' object class. It stores the common parameters
+ * for any DB :
+ * <ul>
+ * <li></li>
+ * <li></li>
+ * <li></li>
+ * <li></li>
+ * <li></li>
+ * <li></li>
+ * <li></li>
+ * <li></li>
+ * <li></li>
+ * <li></li>
+ * </ul>
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
public class OlcDatabaseConfig extends OlcConfig
{
/**
+ * The overlays list
+ */
+ private List<OlcOverlayConfig> overlays = new ArrayList<OlcOverlayConfig>();
+
+ /**
* Field for the 'olcDatabase' attribute.
*/
@ConfigurationElement(attributeType = "olcDatabase", isOptional = false, isRdn = true)
@@ -681,6 +701,52 @@ public class OlcDatabaseConfig extends O
/**
+ * @return the overlays
+ */
+ public List<OlcOverlayConfig> getOverlays()
+ {
+ return overlays;
+ }
+
+
+ /**
+ * @param overlays
+ */
+ public void setOverlays( List<OlcOverlayConfig> overlays )
+ {
+ this.overlays = overlays;
+ }
+
+
+ public void clearOverlays()
+ {
+ overlays.clear();
+ }
+
+
+ /**
+ * @param o
+ * @return
+ * @see java.util.List#add(java.lang.Object)
+ */
+ public boolean addOverlay( OlcOverlayConfig o )
+ {
+ return overlays.add( o );
+ }
+
+
+ /**
+ * @param o
+ * @return
+ * @see java.util.List#remove(java.lang.Object)
+ */
+ public boolean removeOverlay( OlcOverlayConfig o )
+ {
+ return overlays.remove( o );
+ }
+
+
+ /**
* @param olcAccess the olcAccess to set
*/
public void setOlcAccess( List<String> olcAccess )
@@ -948,4 +1014,15 @@ public class OlcDatabaseConfig extends O
{
this.olcUpdateRef = olcUpdateRef;
}
+
+
+ /**
+ * Gets the type of the database.
+ *
+ * @return the type of the database
+ */
+ public String getOlcDatabaseType()
+ {
+ return "default";
+ }
}
Added: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbIndex.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbIndex.java?rev=1670531&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbIndex.java (added)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbIndex.java Wed Apr 1 01:01:42 2015
@@ -0,0 +1,259 @@
+/*
+ * 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 org.apache.directory.studio.openldap.config.model;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * This class represents an index value.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class OlcDbIndex
+{
+ /** The "default" special flag tag */
+ private static final String DEFAULT_FLAG = "default";
+
+ /** The space ' ' separator */
+ private static final String SPACE_SEPARATOR = " ";
+
+ /** The comma ',' separator */
+ private static final String COMMA_SEPARATOR = ",";
+
+ /** The default flag */
+ private boolean isDefault = false;
+
+ /** The list of attributes */
+ private List<String> attributes = new ArrayList<String>();
+
+ /** The list of index types */
+ private List<OlcDbIndexTypeEnum> indexTypes = new ArrayList<OlcDbIndexTypeEnum>();
+
+
+ /**
+ * Creates a new instance of OlcDbIndex.
+ */
+ public OlcDbIndex()
+ {
+ }
+
+
+ /**
+ * Creates a new instance of OlcDbIndex.
+ *
+ * @param s the string
+ */
+ public OlcDbIndex( String s )
+ {
+ if ( s != null )
+ {
+ String[] components = s.split( SPACE_SEPARATOR );
+
+ if ( components.length > 0 )
+ {
+ String[] attributes = components[0].split( COMMA_SEPARATOR );
+
+ if ( attributes.length > 0 )
+ {
+ for ( String attribute : attributes )
+ {
+ addAttribute( attribute );
+ }
+ }
+
+ if ( components.length == 2 )
+ {
+ String[] indexTypes = components[1].split( COMMA_SEPARATOR );
+
+ if ( indexTypes.length > 0 )
+ {
+ for ( String indexType : indexTypes )
+ {
+ OlcDbIndexTypeEnum type = OlcDbIndexTypeEnum.fromString( indexType );
+
+ if ( type != null )
+ {
+ addIndexType( type );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Adds an attribute.
+ *
+ * @param attribute the attribute
+ */
+ public void addAttribute( String attribute )
+ {
+ if ( DEFAULT_FLAG.equalsIgnoreCase( attribute ) )
+ {
+ setDefault( true );
+ }
+ else
+ {
+ attributes.add( attribute );
+ }
+ }
+
+
+ /**
+ * Gets the default flag.
+ *
+ * @return the default flag
+ */
+ public boolean isDefault()
+ {
+ return isDefault;
+ }
+
+
+ /**
+ * Sets the default flag.
+ *
+ * @param isDefault the default flag
+ */
+ public void setDefault( boolean isDefault )
+ {
+ this.isDefault = isDefault;
+ }
+
+
+ /**
+ * Adds an index type.
+ *
+ * @param indexType the index type
+ */
+ public void addIndexType( OlcDbIndexTypeEnum indexType )
+ {
+ indexTypes.add( indexType );
+ }
+
+
+ /**
+ * Clears the attributes.
+ */
+ public void clearAttributes()
+ {
+ attributes.clear();
+ }
+
+
+ /**
+ * Clears the index types.
+ */
+ public void clearIndexTypes()
+ {
+ indexTypes.clear();
+ }
+
+
+ /**
+ * Removes an attribute.
+ *
+ * @param attribute the attribute
+ */
+ public void removeAttribute( String attribute )
+ {
+ attributes.remove( attribute );
+ }
+
+
+ /**
+ * Removes an index type.
+ *
+ * @param indexType the index type
+ */
+ public void removeIndexType( OlcDbIndexTypeEnum indexType )
+ {
+ indexTypes.remove( indexType );
+ }
+
+
+ /**
+ * Gets the attributes.
+ *
+ * @return the attributes
+ */
+ public List<String> getAttributes()
+ {
+ return attributes;
+ }
+
+
+ /**
+ * Gets the index types.
+ *
+ * @return the index types
+ */
+ public List<OlcDbIndexTypeEnum> getIndexTypes()
+ {
+ return indexTypes;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString()
+ {
+ StringBuilder sb = new StringBuilder();
+
+ if ( isDefault )
+ {
+ sb.append( DEFAULT_FLAG );
+ }
+ else
+ {
+ if ( attributes.size() > 0 )
+ {
+ for ( String attribute : attributes )
+ {
+ sb.append( attribute );
+ sb.append( COMMA_SEPARATOR );
+ }
+
+ sb.deleteCharAt( sb.length() - 1 );
+ }
+ }
+
+ if ( indexTypes.size() > 0 )
+ {
+ sb.append( SPACE_SEPARATOR );
+
+ for ( OlcDbIndexTypeEnum indexType : indexTypes )
+ {
+ sb.append( indexType.toString() );
+ sb.append( COMMA_SEPARATOR );
+ }
+
+ sb.deleteCharAt( sb.length() - 1 );
+ }
+
+ return sb.toString();
+ }
+}
Added: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbIndexTypeEnum.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbIndexTypeEnum.java?rev=1670531&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbIndexTypeEnum.java (added)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbIndexTypeEnum.java Wed Apr 1 01:01:42 2015
@@ -0,0 +1,163 @@
+/*
+ * 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 org.apache.directory.studio.openldap.config.model;
+
+
+/**
+ * This enum represents the various values for the 'OlcDbIndex' attribute type value.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public enum OlcDbIndexTypeEnum
+{
+ /** Enum value for 'pres' */
+ PRES,
+
+ /** Enum value for 'eq' */
+ EQ,
+
+ /** Enum value for 'approx' */
+ APPROX,
+
+ /** Enum value for 'sub' */
+ SUB,
+
+ /** Enum value for 'subinitial' */
+ SUBINITIAL,
+
+ /** Enum value for 'subany' */
+ SUBANY,
+
+ /** Enum value for 'subfinal' */
+ SUBFINAL,
+
+ /** Enum value for 'nolang' */
+ NOLANG,
+
+ /** Enum value for 'nosubtypes' */
+ NOSUBTYPES;
+
+ /** The constant string for 'pres' */
+ private static final String PRES_STRING = "pres";
+
+ /** The constant string for 'eq' */
+ private static final String EQ_STRING = "eq";
+
+ /** The constant string for 'approx' */
+ private static final String APPROX_STRING = "approx";
+
+ /** The constant string for 'sub' */
+ private static final String SUB_STRING = "sub";
+
+ /** The constant string for 'subinitial' */
+ private static final String SUBINITIAL_STRING = "subinitial";
+
+ /** The constant string for 'subany' */
+ private static final String SUBANY_STRING = "subany";
+
+ /** The constant string for 'subfinal' */
+ private static final String SUBFINAL_STRING = "subfinal";
+
+ /** The constant string for 'nolang' */
+ private static final String NOLANG_STRING = "nolang";
+
+ /** The constant string for 'nosubtypes' */
+ private static final String NOSUBTYPES_STRING = "nosubtypes";
+
+
+ /**
+ * Gets the associated enum element.
+ *
+ * @param s the string
+ * @return the associated enum element
+ */
+ public static OlcDbIndexTypeEnum fromString( String s )
+ {
+ if ( PRES_STRING.equalsIgnoreCase( s ) )
+ {
+ return PRES;
+ }
+ else if ( EQ_STRING.equalsIgnoreCase( s ) )
+ {
+ return EQ;
+ }
+ else if ( APPROX_STRING.equalsIgnoreCase( s ) )
+ {
+ return APPROX;
+ }
+ else if ( SUB_STRING.equalsIgnoreCase( s ) )
+ {
+ return SUB;
+ }
+ else if ( SUBINITIAL_STRING.equalsIgnoreCase( s ) )
+ {
+ return SUBINITIAL;
+ }
+ else if ( SUBANY_STRING.equalsIgnoreCase( s ) )
+ {
+ return SUBANY;
+ }
+ else if ( SUBFINAL_STRING.equalsIgnoreCase( s ) )
+ {
+ return SUBFINAL;
+ }
+ else if ( NOLANG_STRING.equalsIgnoreCase( s ) )
+ {
+ return NOLANG;
+ }
+ else if ( NOSUBTYPES_STRING.equalsIgnoreCase( s ) )
+ {
+ return NOSUBTYPES;
+ }
+
+ return null;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString()
+ {
+ switch ( this )
+ {
+ case PRES:
+ return PRES_STRING;
+ case EQ:
+ return EQ_STRING;
+ case APPROX:
+ return APPROX_STRING;
+ case SUB:
+ return SUB_STRING;
+ case SUBINITIAL:
+ return SUBINITIAL_STRING;
+ case SUBANY:
+ return SUBANY_STRING;
+ case SUBFINAL:
+ return SUBFINAL_STRING;
+ case NOLANG:
+ return NOLANG_STRING;
+ case NOSUBTYPES:
+ return NOSUBTYPES_STRING;
+ }
+
+ return super.toString();
+ }
+}
Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbSocketConfig.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbSocketConfig.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbSocketConfig.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDbSocketConfig.java Wed Apr 1 01:01:42 2015
@@ -26,6 +26,8 @@ import java.util.List;
/**
* Java bean for the 'olcDbSocketConfig' object class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
public class OlcDbSocketConfig extends OlcDatabaseConfig
{
Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDistProcConfig.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDistProcConfig.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDistProcConfig.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcDistProcConfig.java Wed Apr 1 01:01:42 2015
@@ -22,6 +22,8 @@ package org.apache.directory.studio.open
/**
* Java bean for the 'olcDistProcConfig' object class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
public class OlcDistProcConfig extends OlcOverlayConfig
{
@@ -39,6 +41,28 @@ public class OlcDistProcConfig extends O
/**
+ * Creates a new instance of OlcDistProcConfig.
+ */
+ public OlcDistProcConfig()
+ {
+ super();
+ }
+
+
+ /**
+ * Creates a copy instance of OlcDistProcConfig.
+ *
+ * @param o the initial object
+ */
+ public OlcDistProcConfig( OlcDistProcConfig o )
+ {
+ super( o );
+ olcChainCacheURI = o.olcChainCacheURI;
+ olcChainingBehavior = o.olcChainingBehavior;
+ }
+
+
+ /**
* @return the olcChainCacheURI
*/
public Boolean getOlcChainCacheURI()
@@ -72,4 +96,13 @@ public class OlcDistProcConfig extends O
{
this.olcChainingBehavior = olcChainingBehavior;
}
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public OlcDistProcConfig copy()
+ {
+ return new OlcDistProcConfig( this );
+ }
}
Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcFrontendConfig.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcFrontendConfig.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcFrontendConfig.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcFrontendConfig.java Wed Apr 1 01:01:42 2015
@@ -25,9 +25,11 @@ import java.util.List;
/**
- * Java bean for the 'olcDbSocketConfig' object class.
+ * Java bean for the 'OlcFrontendConfig' object class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class OlcFrontendConfig extends AuxiliaryObjectClass
+public class OlcFrontendConfig implements AuxiliaryObjectClass
{
/**
* Field for the 'olcDefaultSearchBase' attribute.
Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcGlobal.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcGlobal.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcGlobal.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcGlobal.java Wed Apr 1 01:01:42 2015
@@ -26,6 +26,8 @@ import java.util.List;
/**
* Java bean for the 'OlcGlobal' object class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
public class OlcGlobal extends OlcConfig
{
@@ -132,6 +134,12 @@ public class OlcGlobal extends OlcConfig
private Integer olcIdleTimeout;
/**
+ * Field for the 'olcIndexHash64' attribute.
+ */
+ @ConfigurationElement(attributeType = "olcIndexHash64")
+ private Boolean olcIndexHash64;
+
+ /**
* Field for the 'olcIndexIntLen' attribute.
*/
@ConfigurationElement(attributeType = "olcIndexIntLen")
@@ -306,16 +314,16 @@ public class OlcGlobal extends OlcConfig
private String olcSizeLimit;
/**
- * Field for the 'olcSockbufMaxIncomming' attribute.
+ * Field for the 'olcSockbufMaxIncoming' attribute.
*/
- @ConfigurationElement(attributeType = "olcSockbufMaxIncomming")
- private String olcSockbufMaxIncomming;
+ @ConfigurationElement(attributeType = "olcSockbufMaxIncoming")
+ private String olcSockbufMaxIncoming;
/**
- * Field for the 'olcSockbufMaxIncommingAuth' attribute.
+ * Field for the 'olcSockbufMaxIncomingAuth' attribute.
*/
- @ConfigurationElement(attributeType = "olcSockbufMaxIncommingAuth")
- private String olcSockbufMaxIncommingAuth;
+ @ConfigurationElement(attributeType = "olcSockbufMaxIncomingAuth")
+ private String olcSockbufMaxIncomingAuth;
/**
* Field for the 'olcTCPBuffer' attribute.
@@ -922,6 +930,15 @@ public class OlcGlobal extends OlcConfig
/**
+ * @return the olcIndexHash64
+ */
+ public Boolean getOlcIndexHash64()
+ {
+ return olcIndexHash64;
+ }
+
+
+ /**
* @return the olcIndexIntLen
*/
public Integer getOlcIndexIntLen()
@@ -1183,20 +1200,20 @@ public class OlcGlobal extends OlcConfig
/**
- * @return the olcSockbufMaxIncomming
+ * @return the olcSockbufMaxIncoming
*/
- public String getOlcSockbufMaxIncomming()
+ public String getOlcSockbufMaxIncoming()
{
- return olcSockbufMaxIncomming;
+ return olcSockbufMaxIncoming;
}
/**
- * @return the olcSockbufMaxIncommingAuth
+ * @return the olcSockbufMaxIncomingAuth
*/
- public String getOlcSockbufMaxIncommingAuth()
+ public String getOlcSockbufMaxIncomingAuth()
{
- return olcSockbufMaxIncommingAuth;
+ return olcSockbufMaxIncomingAuth;
}
@@ -1489,6 +1506,15 @@ public class OlcGlobal extends OlcConfig
/**
+ * @param olcIndexHash64 the olcIndexHash64 to set
+ */
+ public void setOlcIndexHash64( Boolean olcIndexHash64 )
+ {
+ this.olcIndexHash64 = olcIndexHash64;
+ }
+
+
+ /**
* @param olcIndexIntLen the olcIndexIntLen to set
*/
public void setOlcIndexIntLen( Integer olcIndexIntLen )
@@ -1750,20 +1776,20 @@ public class OlcGlobal extends OlcConfig
/**
- * @param olcSockbufMaxIncomming the olcSockbufMaxIncomming to set
+ * @param olcSockbufMaxIncoming the olcSockbufMaxIncoming to set
*/
- public void setOlcSockbufMaxIncomming( String olcSockbufMaxIncomming )
+ public void setOlcSockbufMaxIncomming( String olcSockbufMaxIncoming )
{
- this.olcSockbufMaxIncomming = olcSockbufMaxIncomming;
+ this.olcSockbufMaxIncoming = olcSockbufMaxIncoming;
}
/**
- * @param olcSockbufMaxIncommingAuth the olcSockbufMaxIncommingAuth to set
+ * @param olcSockbufMaxIncomingAuth the olcSockbufMaxIncomingAuth to set
*/
- public void setOlcSockbufMaxIncommingAuth( String olcSockbufMaxIncommingAuth )
+ public void setOlcSockbufMaxIncomingAuth( String olcSockbufMaxIncomingAuth )
{
- this.olcSockbufMaxIncommingAuth = olcSockbufMaxIncommingAuth;
+ this.olcSockbufMaxIncomingAuth = olcSockbufMaxIncomingAuth;
}
Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcHdbConfig.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcHdbConfig.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcHdbConfig.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcHdbConfig.java Wed Apr 1 01:01:42 2015
@@ -20,498 +20,18 @@
package org.apache.directory.studio.openldap.config.model;
-import java.util.ArrayList;
-import java.util.List;
-
-
/**
* Java bean for the 'olcHdbConfig' object class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class OlcHdbConfig extends OlcDatabaseConfig
+public class OlcHdbConfig extends OlcBdbConfig
{
/**
- * Field for the 'olcDbDirectory' attribute.
- */
- @ConfigurationElement(attributeType = "olcDbDirectory", isOptional = false)
- private String olcDbDirectory;
-
- /**
- * Field for the 'olcDbCacheFree' attribute.
- */
- @ConfigurationElement(attributeType = "olcDbCacheFree")
- private Integer olcDbCacheFree;
-
- /**
- * Field for the 'olcDbCacheSize' attribute.
- */
- @ConfigurationElement(attributeType = "olcDbCacheSize")
- private Integer olcDbCacheSize;
-
- /**
- * Field for the 'olcDbCheckpoint' attribute.
- */
- @ConfigurationElement(attributeType = "olcDbCheckpoint")
- private String olcDbCheckpoint;
-
- /**
- * Field for the 'olcDbConfig' attribute.
- */
- @ConfigurationElement(attributeType = "olcDbConfig")
- private List<String> olcDbConfig = new ArrayList<String>();
-
- /**
- * Field for the 'olcDbCryptFile' attribute.
- */
- @ConfigurationElement(attributeType = "olcDbCryptFile")
- private String olcDbCryptFile;
-
- /**
- * Field for the 'olcDbCryptKey' attribute.
- */
- @ConfigurationElement(attributeType = "olcDbCryptKey")
- private byte[] olcDbCryptKey;
-
- /**
- * Field for the 'olcDbDirtyRead' attribute.
- */
- @ConfigurationElement(attributeType = "olcDbDirtyRead")
- private Boolean olcDbDirtyRead;
-
- /**
- * Field for the 'olcDbDNcacheSize' attribute.
- */
- @ConfigurationElement(attributeType = "olcDbDNcacheSize")
- private Integer olcDbDNcacheSize;
-
- /**
- * Field for the 'olcDbDLcacheSize' attribute.
- */
- @ConfigurationElement(attributeType = "olcDbDLcacheSize")
- private String olcDbDLcacheSize;
-
- /**
- * Field for the 'olcDbIndex' attribute.
- */
- @ConfigurationElement(attributeType = "olcDbIndex")
- private List<String> olcDbIndex = new ArrayList<String>();
-
- /**
- * Field for the 'olcDbLinearIndex' attribute.
- */
- @ConfigurationElement(attributeType = "olcDbLinearIndex")
- private Boolean olcDbLinearIndex;
-
- /**
- * Field for the 'olcDbLockDetect' attribute.
- */
- @ConfigurationElement(attributeType = "olcDbLockDetect")
- private String olcDbLockDetect;
-
- /**
- * Field for the 'olcDbMode' attribute.
- */
- @ConfigurationElement(attributeType = "olcDbMode")
- private String olcDbMode;
-
- /**
- * Field for the 'olcDbNoSync' attribute.
- */
- @ConfigurationElement(attributeType = "olcDbNoSync")
- private Boolean olcDbNoSync;
-
- /**
- * Field for the 'olcDbPageSize' attribute.
- */
- @ConfigurationElement(attributeType = "olcDbPageSize")
- private List<String> olcDbPageSize = new ArrayList<String>();
-
- /**
- * Field for the 'olcDbSearchStack' attribute.
- */
- @ConfigurationElement(attributeType = "olcDbSearchStack")
- private Integer olcDbSearchStack;
-
- /**
- * Field for the 'olcDbShmKey' attribute.
- */
- @ConfigurationElement(attributeType = "olcDbShmKey")
- private Integer olcDbShmKey;
-
-
- /**
- * @param strings
- */
- public void addOlcDbConfig( String... strings )
- {
- for ( String string : strings )
- {
- olcDbConfig.add( string );
- }
- }
-
-
- /**
- * @param strings
- */
- public void addOlcDbIndex( String... strings )
- {
- for ( String string : strings )
- {
- olcDbIndex.add( string );
- }
- }
-
-
- /**
- * @param strings
- */
- public void addOlcDbPageSize( String... strings )
- {
- for ( String string : strings )
- {
- olcDbPageSize.add( string );
- }
- }
-
-
- public void clearOlcDbConfig()
- {
- olcDbConfig.clear();
- }
-
-
- public void clearOlcDbIndex()
- {
- olcDbIndex.clear();
- }
-
-
- public void clearOlcDbPageSize( )
- {
- olcDbPageSize.clear();
- }
-
-
- /**
- * @return the olcDbCacheFree
- */
- public Integer getOlcDbCacheFree()
- {
- return olcDbCacheFree;
- }
-
-
- /**
- * @return the olcDbCacheSize
- */
- public Integer getOlcDbCacheSize()
- {
- return olcDbCacheSize;
- }
-
-
- /**
- * @return the olcDbCheckpoint
- */
- public String getOlcDbCheckpoint()
- {
- return olcDbCheckpoint;
- }
-
-
- /**
- * @return the olcDbConfig
- */
- public List<String> getOlcDbConfig()
- {
- return olcDbConfig;
- }
-
-
- /**
- * @return the olcDbCryptFile
- */
- public String getOlcDbCryptFile()
- {
- return olcDbCryptFile;
- }
-
-
- /**
- * @return the olcDbCryptKey
- */
- public byte[] getOlcDbCryptKey()
- {
- return olcDbCryptKey;
- }
-
-
- /**
- * @return the olcDbDirectory
- */
- public String getOlcDbDirectory()
- {
- return olcDbDirectory;
- }
-
-
- /**
- * @return the olcDbDirtyRead
- */
- public Boolean getOlcDbDirtyRead()
- {
- return olcDbDirtyRead;
- }
-
-
- /**
- * @return the olcDbDLcacheSize
- */
- public String getOlcDbDLcacheSize()
- {
- return olcDbDLcacheSize;
- }
-
-
- /**
- * @return the olcDbDNcacheSize
- */
- public Integer getOlcDbDNcacheSize()
- {
- return olcDbDNcacheSize;
- }
-
-
- /**
- * @return the olcDbIndex
- */
- public List<String> getOlcDbIndex()
- {
- return olcDbIndex;
- }
-
-
- /**
- * @return the olcDbLinearIndex
- */
- public Boolean getOlcDbLinearIndex()
- {
- return olcDbLinearIndex;
- }
-
-
- /**
- * @return the olcDbLockDetect
- */
- public String getOlcDbLockDetect()
- {
- return olcDbLockDetect;
- }
-
-
- /**
- * @return the olcDbMode
- */
- public String getOlcDbMode()
- {
- return olcDbMode;
- }
-
-
- /**
- * @return the olcDbNoSync
- */
- public Boolean getOlcDbNoSync()
- {
- return olcDbNoSync;
- }
-
-
- /**
- * @return the olcDbPageSize
- */
- public List<String> getOlcDbPageSize()
- {
- return olcDbPageSize;
- }
-
-
- /**
- * @return the olcDbSearchStack
- */
- public Integer getOlcDbSearchStack()
- {
- return olcDbSearchStack;
- }
-
-
- /**
- * @return the olcDbShmKey
- */
- public Integer getOlcDbShmKey()
- {
- return olcDbShmKey;
- }
-
-
- /**
- * @param olcDbCacheFree the olcDbCacheFree to set
- */
- public void setOlcDbCacheFree( Integer olcDbCacheFree )
- {
- this.olcDbCacheFree = olcDbCacheFree;
- }
-
-
- /**
- * @param olcDbCacheSize the olcDbCacheSize to set
- */
- public void setOlcDbCacheSize( Integer olcDbCacheSize )
- {
- this.olcDbCacheSize = olcDbCacheSize;
- }
-
-
- /**
- * @param olcDbCheckpoint the olcDbCheckpoint to set
- */
- public void setOlcDbCheckpoint( String olcDbCheckpoint )
- {
- this.olcDbCheckpoint = olcDbCheckpoint;
- }
-
-
- /**
- * @param olcDbConfig the olcDbConfig to set
- */
- public void setOlcDbConfig( List<String> olcDbConfig )
- {
- this.olcDbConfig = olcDbConfig;
- }
-
-
- /**
- * @param olcDbCryptFile the olcDbCryptFile to set
- */
- public void setOlcDbCryptFile( String olcDbCryptFile )
- {
- this.olcDbCryptFile = olcDbCryptFile;
- }
-
-
- /**
- * @param olcDbCryptKey the olcDbCryptKey to set
- */
- public void setOlcDbCryptKey( byte[] olcDbCryptKey )
- {
- this.olcDbCryptKey = olcDbCryptKey;
- }
-
-
- /**
- * @param olcDbDirectory the olcDbDirectory to set
- */
- public void setOlcDbDirectory( String olcDbDirectory )
- {
- this.olcDbDirectory = olcDbDirectory;
- }
-
-
- /**
- * @param olcDbDirtyRead the olcDbDirtyRead to set
- */
- public void setOlcDbDirtyRead( Boolean olcDbDirtyRead )
- {
- this.olcDbDirtyRead = olcDbDirtyRead;
- }
-
-
- /**
- * @param olcDbDLcacheSize the olcDbDLcacheSize to set
- */
- public void setOlcDbDLcacheSize( String olcDbDLcacheSize )
- {
- this.olcDbDLcacheSize = olcDbDLcacheSize;
- }
-
-
- /**
- * @param olcDbDNcacheSize the olcDbDNcacheSize to set
- */
- public void setOlcDbDNcacheSize( Integer olcDbDNcacheSize )
- {
- this.olcDbDNcacheSize = olcDbDNcacheSize;
- }
-
-
- /**
- * @param olcDbIndex the olcDbIndex to set
- */
- public void setOlcDbIndex( List<String> olcDbIndex )
- {
- this.olcDbIndex = olcDbIndex;
- }
-
-
- /**
- * @param olcDbLinearIndex the olcDbLinearIndex to set
- */
- public void setOlcDbLinearIndex( Boolean olcDbLinearIndex )
- {
- this.olcDbLinearIndex = olcDbLinearIndex;
- }
-
-
- /**
- * @param olcDbLockDetect the olcDbLockDetect to set
- */
- public void setOlcDbLockDetect( String olcDbLockDetect )
- {
- this.olcDbLockDetect = olcDbLockDetect;
- }
-
-
- /**
- * @param olcDbMode the olcDbMode to set
- */
- public void setOlcDbMode( String olcDbMode )
- {
- this.olcDbMode = olcDbMode;
- }
-
-
- /**
- * @param olcDbNoSync the olcDbNoSync to set
- */
- public void setOlcDbNoSync( Boolean olcDbNoSync )
- {
- this.olcDbNoSync = olcDbNoSync;
- }
-
-
- /**
- * @param olcDbPageSize the olcDbPageSize to set
- */
- public void setOlcDbPageSize( List<String> olcDbPageSize )
- {
- this.olcDbPageSize = olcDbPageSize;
- }
-
-
- /**
- * @param olcDbSearchStack the olcDbSearchStack to set
- */
- public void setOlcDbSearchStack( Integer olcDbSearchStack )
- {
- this.olcDbSearchStack = olcDbSearchStack;
- }
-
-
- /**
- * @param olcDbShmKey the olcDbShmKey to set
+ * {@inheritDoc}
*/
- public void setOlcDbShmKey( Integer olcDbShmKey )
+ public String getOlcDatabaseType()
{
- this.olcDbShmKey = olcDbShmKey;
- }
+ return "hdb";
+ };
}
Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcLDAPConfig.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcLDAPConfig.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcLDAPConfig.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcLDAPConfig.java Wed Apr 1 01:01:42 2015
@@ -28,6 +28,8 @@ import org.apache.directory.api.ldap.mod
/**
* Java bean for the 'olcLDAPConfig' object class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
public class OlcLDAPConfig extends OlcDatabaseConfig
{
@@ -714,4 +716,13 @@ public class OlcLDAPConfig extends OlcDa
{
this.olcDbUseTemporaryConn = olcDbUseTemporaryConn;
}
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getOlcDatabaseType()
+ {
+ return "ldap";
+ };
}
Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcLdifConfig.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcLdifConfig.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcLdifConfig.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcLdifConfig.java Wed Apr 1 01:01:42 2015
@@ -48,4 +48,13 @@ public class OlcLdifConfig extends OlcDa
{
this.olcDbDirectory = olcDbDirectory;
}
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getOlcDatabaseType()
+ {
+ return "ldif";
+ };
}
Added: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMdbConfig.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMdbConfig.java?rev=1670531&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMdbConfig.java (added)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMdbConfig.java Wed Apr 1 01:01:42 2015
@@ -0,0 +1,261 @@
+/*
+ * 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 org.apache.directory.studio.openldap.config.model;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * Java bean for the 'olcMdbConfig' object class. There are a few parameter
+ * that can be managed for the MDB databse :
+ * <ul>
+ * <li>directory : the place on disk the DB will be stored</li>
+ * <li>maxSize : the size of the database, in bytes. As it can't grow automatically, set it to
+ * the expected maximum DB size</li>
+ * <li></li>
+ * <li></li>
+ * <li></li>
+ * </ul>
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class OlcMdbConfig extends OlcDatabaseConfig
+{
+ /**
+ * Field for the 'olcDbDirectory' attribute.
+ */
+ @ConfigurationElement(attributeType = "olcDbDirectory", isOptional = false)
+ private String olcDbDirectory;
+
+ /**
+ * Field for the 'olcDbMaxSize' attribute.
+ */
+ @ConfigurationElement(attributeType = "olcDbMaxSize")
+ private Long olcDbMaxSize;
+
+ /**
+ * Field for the 'olcDbCheckpoint' attribute.
+ */
+ @ConfigurationElement(attributeType = "olcDbCheckpoint")
+ private String olcDbCheckpoint;
+
+ /**
+ * Field for the 'olcDbNoSync' attribute.
+ */
+ @ConfigurationElement(attributeType = "olcDbNoSync")
+ private Boolean olcDbNoSync;
+
+ /**
+ * Field for the 'olcDbMode' attribute.
+ */
+ @ConfigurationElement(attributeType = "olcDbMode")
+ private String olcDbMode;
+
+ /**
+ * Field for the 'olcDbIndex' attribute.
+ */
+ @ConfigurationElement(attributeType = "olcDbIndex")
+ private List<String> olcDbIndex = new ArrayList<String>();
+
+ /**
+ * Field for the 'olcDbMaxReaders' attribute.
+ */
+ @ConfigurationElement(attributeType = "olcDbMaxReaders")
+ private Integer olcDbMaxReaders;
+
+ /**
+ * Field for the 'olcDbSearchStack' attribute.
+ */
+ @ConfigurationElement(attributeType = "olcDbSearchStack")
+ private Integer olcDbSearchStack;
+
+
+ /**
+ * @param strings
+ */
+ public void addOlcDbIndex( String... strings )
+ {
+ for ( String string : strings )
+ {
+ olcDbIndex.add( string );
+ }
+ }
+
+
+ public void clearOlcDbIndex()
+ {
+ olcDbIndex.clear();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getOlcDatabaseType()
+ {
+ return "mdb";
+ }
+
+
+ /**
+ * @return the olcDbCheckpoint
+ */
+ public String getOlcDbCheckpoint()
+ {
+ return olcDbCheckpoint;
+ }
+
+
+ /**
+ * @return the olcDbDirectory
+ */
+ public String getOlcDbDirectory()
+ {
+ return olcDbDirectory;
+ }
+
+
+ /**
+ * @return the olcDbIndex
+ */
+ public List<String> getOlcDbIndex()
+ {
+ return olcDbIndex;
+ }
+
+
+ /**
+ * @return the olcDbMaxReaders
+ */
+ public Integer getOlcDbMaxReaders()
+ {
+ return olcDbMaxReaders;
+ }
+
+
+ /**
+ * @return the olcDbMaxSize
+ */
+ public Long getOlcDbMaxSize()
+ {
+ return olcDbMaxSize;
+ }
+
+
+ /**
+ * @return the olcDbMode
+ */
+ public String getOlcDbMode()
+ {
+ return olcDbMode;
+ }
+
+
+ /**
+ * @return the olcDbNoSync
+ */
+ public Boolean getOlcDbNoSync()
+ {
+ return olcDbNoSync;
+ }
+
+
+ /**
+ * @return the olcDbSearchStack
+ */
+ public Integer getOlcDbSearchStack()
+ {
+ return olcDbSearchStack;
+ }
+
+
+ /**
+ * @param olcDbCheckpoint the olcDbCheckpoint to set
+ */
+ public void setOlcDbCheckpoint( String olcDbCheckpoint )
+ {
+ this.olcDbCheckpoint = olcDbCheckpoint;
+ }
+
+
+ /**
+ * @param olcDbDirectory the olcDbDirectory to set
+ */
+ public void setOlcDbDirectory( String olcDbDirectory )
+ {
+ this.olcDbDirectory = olcDbDirectory;
+ }
+
+
+ /**
+ * @param olcDbIndex the olcDbIndex to set
+ */
+ public void setOlcDbIndex( List<String> olcDbIndex )
+ {
+ this.olcDbIndex = olcDbIndex;
+ }
+
+
+ /**
+ * @param olcDbMaxReaders the olcDbMaxReaders to set
+ */
+ public void setOlcDbMaxReaders( Integer olcDbMaxReaders )
+ {
+ this.olcDbMaxReaders = olcDbMaxReaders;
+ }
+
+
+ /**
+ * @param olcDbMaxSize the olcDbMaxSize to set
+ */
+ public void setOlcDbMaxSize( Long olcDbMaxSize )
+ {
+ this.olcDbMaxSize = olcDbMaxSize;
+ }
+
+
+ /**
+ * @param olcDbMode the olcDbMode to set
+ */
+ public void setOlcDbMode( String olcDbMode )
+ {
+ this.olcDbMode = olcDbMode;
+ }
+
+
+ /**
+ * @param olcDbNoSync the olcDbNoSync to set
+ */
+ public void setOlcDbNoSync( Boolean olcDbNoSync )
+ {
+ this.olcDbNoSync = olcDbNoSync;
+ }
+
+
+ /**
+ * @param olcDbSearchStack the olcDbSearchStack to set
+ */
+ public void setOlcDbSearchStack( Integer olcDbSearchStack )
+ {
+ this.olcDbSearchStack = olcDbSearchStack;
+ }
+}
Added: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMemberOf.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMemberOf.java?rev=1670531&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMemberOf.java (added)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMemberOf.java Wed Apr 1 01:01:42 2015
@@ -0,0 +1,237 @@
+/*
+ * 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 org.apache.directory.studio.openldap.config.model;
+
+
+import org.apache.directory.api.ldap.model.name.Dn;
+
+
+/**
+ * Java bean for the 'olcSyncProvConfig' object class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class OlcMemberOf extends OlcOverlayConfig
+{
+ /**
+ * Field for the 'olcMemberOfDangling' attribute.
+ */
+ @ConfigurationElement(attributeType = "olcMemberOfDangling")
+ private String olcMemberOfDangling;
+
+ /**
+ * Field for the 'olcMemberOfDanglingError' attribute.
+ */
+ @ConfigurationElement(attributeType = "olcMemberOfDanglingError")
+ private String olcMemberOfDanglingError;
+
+ /**
+ * Field for the 'olcMemberOfDN' attribute.
+ */
+ @ConfigurationElement(attributeType = "olcMemberOfDN")
+ private Dn olcMemberOfDN;
+
+ /**
+ * Field for the 'olcMemberOfGroupOC' attribute.
+ */
+ @ConfigurationElement(attributeType = "olcMemberOfGroupOC")
+ private String olcMemberOfGroupOC;
+
+ /**
+ * Field for the 'olcMemberOfMemberAD' attribute.
+ */
+ @ConfigurationElement(attributeType = "olcMemberOfMemberAD")
+ private String olcMemberOfMemberAD;
+
+ /**
+ * Field for the 'olcMemberOfMemberOfAD' attribute.
+ */
+ @ConfigurationElement(attributeType = "olcMemberOfMemberOfAD")
+ private String olcMemberOfMemberOfAD;
+
+ /**
+ * Field for the 'olcMemberOfRefInt' attribute.
+ */
+ @ConfigurationElement(attributeType = "olcMemberOfRefInt")
+ private Boolean olcMemberOfRefInt;
+
+
+ /**
+ * Creates a new instance of OlcMemberOf.
+ */
+ public OlcMemberOf()
+ {
+ super();
+ olcOverlay = "memberof";
+ }
+
+
+ /**
+ * Creates a copy instance of OlcMemberOf.
+ *
+ * @param o the initial object
+ */
+ public OlcMemberOf( OlcMemberOf o )
+ {
+ super();
+ olcMemberOfDangling = o.olcMemberOfDangling;
+ olcMemberOfDanglingError = o.olcMemberOfDanglingError;
+ olcMemberOfDN = o.olcMemberOfDN;
+ olcMemberOfGroupOC = o.olcMemberOfGroupOC;
+ olcMemberOfMemberAD = o.olcMemberOfMemberAD;
+ olcMemberOfMemberOfAD = o.olcMemberOfMemberOfAD;
+ olcMemberOfRefInt = o.olcMemberOfRefInt;
+ }
+
+
+ /**
+ * @return
+ */
+ public String getOlcMemberOfDangling()
+ {
+ return olcMemberOfDangling;
+ }
+
+
+ /**
+ * @return
+ */
+ public String getOlcMemberOfDanglingError()
+ {
+ return olcMemberOfDanglingError;
+ }
+
+
+ /**
+ * @return
+ */
+ public Dn getOlcMemberOfDN()
+ {
+ return olcMemberOfDN;
+ }
+
+
+ /**
+ * @return
+ */
+ public String getOlcMemberOfGroupOC()
+ {
+ return olcMemberOfGroupOC;
+ }
+
+
+ /**
+ * @return
+ */
+ public String getOlcMemberOfMemberAD()
+ {
+ return olcMemberOfMemberAD;
+ }
+
+
+ /**
+ * @return
+ */
+ public String getOlcMemberOfMemberOfAD()
+ {
+ return olcMemberOfMemberOfAD;
+ }
+
+
+ /**
+ * @return
+ */
+ public Boolean getOlcMemberOfRefInt()
+ {
+ return olcMemberOfRefInt;
+ }
+
+
+ /**
+ * @param olcMemberOfDangling
+ */
+ public void setOlcMemberOfDangling( String olcMemberOfDangling )
+ {
+ this.olcMemberOfDangling = olcMemberOfDangling;
+ }
+
+
+ /**
+ * @param olcMemberOfDanglingError
+ */
+ public void setOlcMemberOfDanglingError( String olcMemberOfDanglingError )
+ {
+ this.olcMemberOfDanglingError = olcMemberOfDanglingError;
+ }
+
+
+ /**
+ * @param olcMemberOfDN
+ */
+ public void setOlcMemberOfDN( Dn olcMemberOfDN )
+ {
+ this.olcMemberOfDN = olcMemberOfDN;
+ }
+
+
+ /**
+ * @param olcMemberOfGroupOC
+ */
+ public void setOlcMemberOfGroupOC( String olcMemberOfGroupOC )
+ {
+ this.olcMemberOfGroupOC = olcMemberOfGroupOC;
+ }
+
+
+ /**
+ * @param olcMemberOfMemberAD
+ */
+ public void setOlcMemberOfMemberAD( String olcMemberOfMemberAD )
+ {
+ this.olcMemberOfMemberAD = olcMemberOfMemberAD;
+ }
+
+
+ /**
+ * @param olcMemberOfMemberOfAD
+ */
+ public void setOlcMemberOfMemberOfAD( String olcMemberOfMemberOfAD )
+ {
+ this.olcMemberOfMemberOfAD = olcMemberOfMemberOfAD;
+ }
+
+
+ /**
+ * @param olcMemberOfRefInt
+ */
+ public void setOlcMemberOfRefInt( Boolean olcMemberOfRefInt )
+ {
+ this.olcMemberOfRefInt = olcMemberOfRefInt;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public OlcMemberOf copy()
+ {
+ return new OlcMemberOf( this );
+ }
+}
Added: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMemberOfDanglingReferenceBehaviorEnum.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMemberOfDanglingReferenceBehaviorEnum.java?rev=1670531&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMemberOfDanglingReferenceBehaviorEnum.java (added)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMemberOfDanglingReferenceBehaviorEnum.java Wed Apr 1 01:01:42 2015
@@ -0,0 +1,91 @@
+/*
+ * 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 org.apache.directory.studio.openldap.config.model;
+
+
+/**
+ * This enum represents the various values for the 'olcMemberOfDangling' attribute.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public enum OlcMemberOfDanglingReferenceBehaviorEnum
+{
+ /** Enum value for 'ignore' */
+ IGNORE,
+
+ /** Enum value for 'drop' */
+ DROP,
+
+ /** Enum value for 'error' */
+ ERROR;
+
+ /** The constant string for 'ignore' */
+ private static final String IGNORE_STRING = "ignore";
+
+ /** The constant string for 'drop' */
+ private static final String DROP_STRING = "drop";
+
+ /** The constant string for 'error' */
+ private static final String ERROR_STRING = "error";
+
+
+ /**
+ * Gets the associated enum element.
+ *
+ * @param s the string
+ * @return the associated enum element
+ */
+ public static OlcMemberOfDanglingReferenceBehaviorEnum fromString( String s )
+ {
+ if ( IGNORE_STRING.equalsIgnoreCase( s ) )
+ {
+ return IGNORE;
+ }
+ else if ( DROP_STRING.equalsIgnoreCase( s ) )
+ {
+ return DROP;
+ }
+ else if ( ERROR_STRING.equalsIgnoreCase( s ) )
+ {
+ return ERROR;
+ }
+
+ return null;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString()
+ {
+ switch ( this )
+ {
+ case IGNORE:
+ return IGNORE_STRING;
+ case DROP:
+ return DROP_STRING;
+ case ERROR:
+ return ERROR_STRING;
+ }
+
+ return super.toString();
+ }
+}
Added: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcModuleList.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcModuleList.java?rev=1670531&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcModuleList.java (added)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcModuleList.java Wed Apr 1 01:01:42 2015
@@ -0,0 +1,141 @@
+/*
+ * 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 org.apache.directory.studio.openldap.config.model;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * Java bean for the 'OlcGlobal' object class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class OlcModuleList extends OlcConfig
+{
+ /**
+ * Field for the 'cn' attribute.
+ */
+ @ConfigurationElement(attributeType = "cn", isRdn = true)
+ private List<String> cn = new ArrayList<String>();
+
+ /**
+ * Field for the 'olcAllows' attribute.
+ */
+ @ConfigurationElement(attributeType = "olcModuleLoad")
+ private List<String> olcModuleLoad = new ArrayList<String>();
+
+ /**
+ * Field for the 'olcModulePath' attribute.
+ */
+ @ConfigurationElement(attributeType = "olcModulePath")
+ private String olcModulePath;
+
+
+ /**
+ * @param strings
+ */
+ public void addCn( String... strings )
+ {
+ for ( String string : strings )
+ {
+ cn.add( string );
+ }
+ }
+
+
+ /**
+ * @param strings
+ */
+ public void addOlcModuleLoad( String... strings )
+ {
+ for ( String string : strings )
+ {
+ olcModuleLoad.add( string );
+ }
+ }
+
+
+ public void clearCn()
+ {
+ cn.clear();
+ }
+
+
+ public void clearOlcModuleLoad()
+ {
+ olcModuleLoad.clear();
+ }
+
+
+ /**
+ * @return the cn
+ */
+ public List<String> getCn()
+ {
+ return cn;
+ }
+
+
+ /**
+ * @return the olcModuleLoad
+ */
+ public List<String> getOlcModuleLoad()
+ {
+ return olcModuleLoad;
+ }
+
+
+ /**
+ * @return the olcModulePath
+ */
+ public String getOlcModulePath()
+ {
+ return olcModulePath;
+ }
+
+
+ /**
+ * @param cn the cn to set
+ */
+ public void setCn( List<String> cn )
+ {
+ this.cn = cn;
+ }
+
+
+ /**
+ * @param olcModuleLoad the olcModuleLoad to set
+ */
+ public void setOlcModuleLoad( List<String> olcModuleLoad )
+ {
+ this.olcModuleLoad = olcModuleLoad;
+ }
+
+
+ /**
+ * @param olcArgsFile the olcArgsFile to set
+ */
+ public void setOlcModulePath( String olcModulePath )
+ {
+ this.olcModulePath = olcModulePath;
+ }
+}
Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMonitorConfig.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMonitorConfig.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMonitorConfig.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcMonitorConfig.java Wed Apr 1 01:01:42 2015
@@ -22,8 +22,18 @@ package org.apache.directory.studio.open
/**
* Java bean for the 'olcMonitorConfig' object class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
public class OlcMonitorConfig extends OlcDatabaseConfig
{
// No other fields than those inherited from the 'OlcDatabaseConfig' class
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getOlcDatabaseType()
+ {
+ return "monitor";
+ };
}
Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcNullConfig.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcNullConfig.java?rev=1670531&r1=1670530&r2=1670531&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcNullConfig.java (original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/OlcNullConfig.java Wed Apr 1 01:01:42 2015
@@ -22,6 +22,8 @@ package org.apache.directory.studio.open
/**
* Java bean for the 'olcNullConfig' object class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
public class OlcNullConfig extends OlcDatabaseConfig
{
@@ -48,4 +50,13 @@ public class OlcNullConfig extends OlcDa
{
this.olcDbBindAllowed = olcDbBindAllowed;
}
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getOlcDatabaseType()
+ {
+ return "null";
+ };
}