Skip to content

Commit

Permalink
Bumped up some plugins version
Browse files Browse the repository at this point in the history
  • Loading branch information
elecharny committed Aug 14, 2024
1 parent 1aad145 commit 0d2540f
Show file tree
Hide file tree
Showing 18 changed files with 214 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void mkdirs() throws IOException
{
if ( !requiredDirectory.exists() && !requiredDirectory.mkdirs() )
{
throw new IOException( I18n.err( I18n.ERR_112_COULD_NOT_CREATE_DIRECTORY, requiredDirectory ) );
throw new IOException( I18n.err( I18n.ERR_02000_COULD_NOT_CREATE_DIRECTORY, requiredDirectory ) );
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -727,31 +727,31 @@ public void setInstanceLayout( InstanceLayout instanceLayout ) throws IOExceptio
// Create the directories if they are missing
if ( !instanceLayout.getInstanceDirectory().exists() && !instanceLayout.getInstanceDirectory().mkdirs() )
{
throw new IOException( I18n.err( I18n.ERR_112_COULD_NOT_CREATE_DIRECTORY,
throw new IOException( I18n.err( I18n.ERR_00004_COULD_NOT_CREATE_DIRECTORY,
instanceLayout.getInstanceDirectory() ) );
}

if ( !instanceLayout.getLogDirectory().exists() && !instanceLayout.getLogDirectory().mkdirs() )
{
throw new IOException( I18n.err( I18n.ERR_112_COULD_NOT_CREATE_DIRECTORY,
throw new IOException( I18n.err( I18n.ERR_00004_COULD_NOT_CREATE_DIRECTORY,
instanceLayout.getLogDirectory() ) );
}

if ( !instanceLayout.getRunDirectory().exists() && !instanceLayout.getRunDirectory().mkdirs() )
{
throw new IOException( I18n.err( I18n.ERR_112_COULD_NOT_CREATE_DIRECTORY,
throw new IOException( I18n.err( I18n.ERR_00004_COULD_NOT_CREATE_DIRECTORY,
instanceLayout.getRunDirectory() ) );
}

if ( !instanceLayout.getPartitionsDirectory().exists() && !instanceLayout.getPartitionsDirectory().mkdirs() )
{
throw new IOException( I18n.err( I18n.ERR_112_COULD_NOT_CREATE_DIRECTORY,
throw new IOException( I18n.err( I18n.ERR_00004_COULD_NOT_CREATE_DIRECTORY,
instanceLayout.getPartitionsDirectory() ) );
}

if ( !instanceLayout.getConfDirectory().exists() && !instanceLayout.getConfDirectory().mkdirs() )
{
throw new IOException( I18n.err( I18n.ERR_112_COULD_NOT_CREATE_DIRECTORY,
throw new IOException( I18n.err( I18n.ERR_00004_COULD_NOT_CREATE_DIRECTORY,
instanceLayout.getConfDirectory() ) );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public Certificate engineGetCertificate( String alias )
}
catch ( Exception e )
{
LOG.error( I18n.err( I18n.ERR_65 ), e );
LOG.error( I18n.err( I18n.ERR_00001_FAILED_CERTIFICATE_ACCESS ), e );
}
}

Expand Down Expand Up @@ -187,7 +187,7 @@ public String engineGetCertificateAlias( Certificate cert )
}
catch ( Exception e )
{
LOG.error( I18n.err( I18n.ERR_66 ), e );
LOG.error( I18n.err( I18n.ERR_00002_FAILED_COMPARE_CERTIFICATE_BYTES ), e );
}

return null;
Expand All @@ -213,7 +213,7 @@ public Certificate[] engineGetCertificateChain( String alias )
}
catch ( Exception e )
{
LOG.error( I18n.err( I18n.ERR_66 ), e );
LOG.error( I18n.err( I18n.ERR_00002_FAILED_COMPARE_CERTIFICATE_BYTES ), e );
}

return new Certificate[0];
Expand Down Expand Up @@ -250,7 +250,7 @@ public Key engineGetKey( String alias, char[] password ) throws NoSuchAlgorithmE
}
catch ( Exception e )
{
LOG.error( I18n.err( I18n.ERR_68 ), e );
LOG.error( I18n.err( I18n.ERR_00003_FAILED_EXTRACT_KEY ), e );
}

return null;
Expand Down
87 changes: 82 additions & 5 deletions i18n/src/main/java/org/apache/directory/server/i18n/I18n.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,88 @@
*/
public enum I18n
{
// apacheds-core errors 0 - 999
ERR_00001_FAILED_CERTIFICATE_ACCESS("ERR_00001_FAILED_CERTIFICATE_ACCESS"),
ERR_00002_FAILED_COMPARE_CERTIFICATE_BYTES("ERR_00002_FAILED_COMPARE_CERTIFICATE_BYTES"),
ERR_00003_FAILED_EXTRACT_KEY("ERR_00003_FAILED_EXTRACT_KEY"),
ERR_00004_COULD_NOT_CREATE_DIRECTORY("ERR_00004_COULD_NOT_CREATE_DIRECTORY"),

// apacheds-core-annotation errors 1000 - 1999

// apacheds-core-api errors 2000 - 2999
ERR_02000_COULD_NOT_CREATE_DIRECTORY("ERR_02000_COULD_NOT_CREATE_DIRECTORY"),

// apacheds-core-avl errors 3000 - 3999

// apacheds-core-constants errors 4000 - 4999

// apacheds-core-integ errors 5000 - 5999

// apacheds-core-jndi errors 6000 - 6999

// apacheds-core-shared errors 7000 - 7999

// apacheds-http-directory-bridge errors 8000 - 8999

// apacheds-http-integration errors 9000 - 9999

// apacheds-installers errors 10000 - 10999

// apacheds-installers-maven-plugins errors 11000 - 11999
ERR_11000_COULD_NOT_CREATE_DIRECTORY("ERR_11000_COULD_NOT_CREATE_DIRECTORY"),

// apacheds-interceptor-kerberos errors 12000 - 12999
// apacheds-interceptors-admin errors 13000 - 13999
// apacheds-interceptors-authn errors 14000 - 14999
// apacheds-interceptors-authz errors 15000 - 15999
// apacheds-interceptors-changelog errors 16000 - 16999
// apacheds-interceptors-collective errors 17000 - 17999
// apacheds-interceptors-event errors 18000 - 18999
// apacheds-interceptors-exception errors 19000 - 19999
// apacheds-interceptors-hash errors 20000 - 20999
// apacheds-interceptors-journal errors 21000 - 21999
// apacheds-interceptors-logger errors 22000 - 22999
// apacheds-interceptors-normalization errors 23000 - 23999
// apacheds-interceptors-number errors 24000 - 24999
// apacheds-interceptors-operational errors 25000 - 25999
// apacheds-interceptors-ppolicy errors 26000 - 26999
// apacheds-interceptors-referral errors 27000 - 27999
// apacheds-interceptors-schema errors 28000 - 28999
// apacheds-interceptors-subtree errors 29000 - 29999
// apacheds-interceptors-trigger errors 30000 - 30999
// apacheds-jdbm-partition errors 31000 - 31999
ERR_31000_COULD_NOT_CREATE_DIRECTORY("ERR_31000_COULD_NOT_CREATE_DIRECTORY"),
ERR_31001_ODD_NUMBER_OF_BYTES_IN_SERIALIZED_STRING("ERR_31001_ODD_NUMBER_OF_BYTES_IN_SERIALIZED_STRING"),

// apacheds-kerberos-codec errors 32000 - 32999
// apacheds-ldif-partition errors 33000 - 33999
ERR_33000_COULD_NOT_CREATE_DIRECTORY("ERR_33000_COULD_NOT_CREATE_DIRECTORY"),

// apacheds-mavipot-partition errors 34000 - 34999
ERR_34000_COULD_NOT_CREATE_DIRECTORY("ERR_34000_COULD_NOT_CREATE_DIRECTORY"),

// apacheds-osgi-integ errors 35000 - 35999
// apacheds-protocol-dhcp errors 36000 - 36999
// apacheds-protocol-dns errors 37000 - 37999
// apacheds-protocol-ldap errors 38000 - 38999
ERR_38000_COULD_NOT_CREATE_DIRECTORY("ERR_38000_COULD_NOT_CREATE_DIRECTORY"),

// apacheds-protocol-ntp errors 39000 - 39999
// apacheds-protocol-shared errors 40000 - 40999
// apacheds-server-annotations errors 41000 - 41999
// apacheds-server-config errors 42000 - 42999
ERR_42000_COULD_NOT_CREATE_DIRECTORY("ERR_42000_COULD_NOT_CREATE_DIRECTORY"),

// apacheds-server-integ errors 43000 - 43999
// apacheds-server-jndi errors 44000 - 44999
// apacheds-service errors 45000 - 45999
ERR_45000_COULD_NOT_CREATE_DIRECTORY("ERR_45000_COULD_NOT_CREATE_DIRECTORY"),

// apacheds-service-builder errors 46000 - 46999
// apacheds-test-framework errors 47000 - 47999
// apacheds-wrapper errors 48000 - 48999
// apacheds-xdbm-partition errors 49000 - 49999

ERR_1("ERR_1"),
ERR_2("ERR_2"),
ERR_3("ERR_3"),
Expand Down Expand Up @@ -99,10 +181,6 @@ public enum I18n
ERR_62("ERR_62"),
ERR_63("ERR_63"),
ERR_64("ERR_64"),
ERR_65("ERR_65"),
ERR_66("ERR_66"),
// ERR_67( "ERR_67" ),
ERR_68("ERR_68"),
ERR_69("ERR_69"),
ERR_70("ERR_70"),
ERR_71("ERR_71"),
Expand Down Expand Up @@ -146,7 +224,6 @@ public enum I18n
// ERR_109( "ERR_109" ),
// ERR_110( "ERR_110" ),
// ERR_111( "ERR_111" ),
ERR_112_COULD_NOT_CREATE_DIRECTORY("ERR_112_COULD_NOT_CREATE_DIRECTORY"),
ERR_113_COULD_NOT_DELETE_FILE_OR_DIRECTORY("ERR_113_COULD_NOT_DELETE_FILE_OR_DIRECTORY"),
ERR_114("ERR_114"),
ERR_115("ERR_115"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,88 @@
# Default error code translations comes here
#

# apacheds-core errors 0 - 999
ERR_00001_FAILED_CERTIFICATE_ACCESS=Failed to access certificate in DIT.
ERR_00002_FAILED_COMPARE_CERTIFICATE_BYTES=Failed on attempt to compare certificate bytes to determine alias.
ERR_00003_FAILED_EXTRACT_KEY=Failed on attempt to extract key.
ERR_00004_COULD_NOT_CREATE_DIRECTORY=Could not create directory {0}

# apacheds-core-annotation errors 1000 - 1999

# apacheds-core-api errors 2000 - 2999
ERR_02000_COULD_NOT_CREATE_DIRECTORY=Could not create directory {0}

# apacheds-core-avl errors 3000 - 3999

# apacheds-core-constants errors 4000 - 4999

# apacheds-core-integ errors 5000 - 5999

# apacheds-core-jndi errors 6000 - 6999

# apacheds-core-shared errors 7000 - 7999

# apacheds-http-directory-bridge errors 8000 - 8999

# apacheds-http-integration errors 9000 - 9999

# apacheds-installers errors 10000 - 10999

# apacheds-installers-maven-plugins errors 11000 - 11999
ERR_11000_COULD_NOT_CREATE_DIRECTORY=Could not create directory {0}

# apacheds-interceptor-kerberos errors 12000 - 12999
# apacheds-interceptors-admin errors 13000 - 13999
# apacheds-interceptors-authn errors 14000 - 14999
# apacheds-interceptors-authz errors 15000 - 15999
# apacheds-interceptors-changelog errors 16000 - 16999
# apacheds-interceptors-collective errors 17000 - 17999
# apacheds-interceptors-event errors 18000 - 18999
# apacheds-interceptors-exception errors 19000 - 19999
# apacheds-interceptors-hash errors 20000 - 20999
# apacheds-interceptors-journal errors 21000 - 21999
# apacheds-interceptors-logger errors 22000 - 22999
# apacheds-interceptors-normalization errors 23000 - 23999
# apacheds-interceptors-number errors 24000 - 24999
# apacheds-interceptors-operational errors 25000 - 25999
# apacheds-interceptors-ppolicy errors 26000 - 26999
# apacheds-interceptors-referral errors 27000 - 27999
# apacheds-interceptors-schema errors 28000 - 28999
# apacheds-interceptors-subtree errors 29000 - 29999
# apacheds-interceptors-trigger errors 30000 - 30999
# apacheds-jdbm-partition errors 31000 - 31999
ERR_31000_COULD_NOT_CREATE_DIRECTORY=Could not create directory {0}
ERR_31001_ODD_NUMBER_OF_BYTES_IN_SERIALIZED_STRING=The serialized String contains an odd number of bytes

# apacheds-kerberos-codec errors 32000 - 32999
# apacheds-ldif-partition errors 33000 - 33999
ERR_33000_COULD_NOT_CREATE_DIRECTORY=Could not create directory {0}

# apacheds-mavipot-partition errors 34000 - 34999
ERR_34000_COULD_NOT_CREATE_DIRECTORY=Could not create directory {0}

# apacheds-osgi-integ errors 35000 - 35999
# apacheds-protocol-dhcp errors 36000 - 36999
# apacheds-protocol-dns errors 37000 - 37999
# apacheds-protocol-ldap errors 38000 - 38999
ERR_38000_COULD_NOT_CREATE_DIRECTORY=Could not create directory {0}

# apacheds-protocol-ntp errors 39000 - 39999
# apacheds-protocol-shared errors 40000 - 40999
# apacheds-server-annotations errors 41000 - 41999
# apacheds-server-config errors 42000 - 42999
ERR_42000_COULD_NOT_CREATE_DIRECTORY=Could not create directory {0}

# apacheds-server-integ errors 43000 - 43999
# apacheds-server-jndi errors 44000 - 44999
# apacheds-service errors 45000 - 45999
ERR_45000_COULD_NOT_CREATE_DIRECTORY=Could not create directory {0}

# apacheds-service-builder errors 46000 - 46999
# apacheds-test-framework errors 47000 - 47999
# apacheds-wrapper errors 48000 - 48999
# apacheds-xdbm-partition errors 49000 - 49999

ERR_1=Failed to identify OID for: {0}
ERR_2=A system index on attribute {0} ({1}) does not exist!
ERR_3=A user index on attribute {0} ({1}) does not exist!
Expand Down Expand Up @@ -86,10 +168,6 @@ ERR_61=Entry {0} contains more than one STRUCTURAL ObjectClass: {1}
ERR_62=Entry {0} does not have the {1} attributeType, which is part of the RDN";
ERR_63=The value stored in a not Human Readable attribute as a String should be convertible to a byte[]
ERR_64=The value is not valid. It should be a String or a byte[]
ERR_65=Failed to access certificate in DIT.
ERR_66=Failed on attempt to compare certificate bytes to determine alias.
# ERR_67=
ERR_68=Failed on attempt to extract key.
ERR_69=Exception while searching the DIT for class: {0}
ERR_70=Encountered failure while searching directory for class: {0}
ERR_71=failed to parse the new subtreeSpecification
Expand Down Expand Up @@ -133,7 +211,6 @@ ERR_91=Attempt to destroy wrapped partition failed.
# ERR_109=
# ERR_110=
# ERR_111=
ERR_112_COULD_NOT_CREATE_DIRECTORY=Could not create directory {0}
ERR_113_COULD_NOT_DELETE_FILE_OR_DIRECTORY=Could not delete file or directory {0}
ERR_114=Unable to create a DirectoryService instance for unknow reason
ERR_115=Failed to delete the working directory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public static void copyFiles( File src, File dest ) throws IOException

if ( !dest.mkdirs() )
{
throw new IOException( I18n.err( I18n.ERR_112_COULD_NOT_CREATE_DIRECTORY, dest ) );
throw new IOException( I18n.err( I18n.ERR_11000_COULD_NOT_CREATE_DIRECTORY, dest ) );
}

for ( File file : files )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public void execute() throws MojoExecutionException, MojoFailureException
// will be packaged to form the installer
if ( !getTargetDirectory().mkdirs() )
{
Exception e = new IOException( I18n.err( I18n.ERR_112_COULD_NOT_CREATE_DIRECTORY, getTargetDirectory() ) );
Exception e = new IOException( I18n.err( I18n.ERR_11000_COULD_NOT_CREATE_DIRECTORY, getTargetDirectory() ) );
log.error( e.getLocalizedMessage() );
throw new MojoFailureException( e.getMessage() );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void execute() throws MojoExecutionException, MojoFailureException
// Creating the target directory
if ( !getTargetDirectory().mkdirs() )
{
Exception e = new IOException( I18n.err( I18n.ERR_112_COULD_NOT_CREATE_DIRECTORY, getTargetDirectory() ) );
Exception e = new IOException( I18n.err( I18n.ERR_11000_COULD_NOT_CREATE_DIRECTORY, getTargetDirectory() ) );
log.error( e.getLocalizedMessage() );
throw new MojoFailureException( e.getMessage() );
}
Expand All @@ -104,7 +104,7 @@ public void execute() throws MojoExecutionException, MojoFailureException

if ( !instanceDirectory.mkdirs() )
{
Exception e = new IOException( I18n.err( I18n.ERR_112_COULD_NOT_CREATE_DIRECTORY, instanceDirectory ) );
Exception e = new IOException( I18n.err( I18n.ERR_11000_COULD_NOT_CREATE_DIRECTORY, instanceDirectory ) );
log.error( e.getLocalizedMessage() );
throw new MojoFailureException( e.getMessage() );
}
Expand All @@ -130,7 +130,7 @@ public void execute() throws MojoExecutionException, MojoFailureException

if ( !binShDirectory.mkdirs() )
{
Exception e = new IOException( I18n.err( I18n.ERR_112_COULD_NOT_CREATE_DIRECTORY, binShDirectory ) );
Exception e = new IOException( I18n.err( I18n.ERR_11000_COULD_NOT_CREATE_DIRECTORY, binShDirectory ) );
log.error( e.getLocalizedMessage() );
throw new MojoFailureException( e.getMessage() );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void execute() throws MojoExecutionException, MojoFailureException

if ( !getTargetDirectory().mkdirs() )
{
Exception e = new IOException( I18n.err( I18n.ERR_112_COULD_NOT_CREATE_DIRECTORY, getTargetDirectory() ) );
Exception e = new IOException( I18n.err( I18n.ERR_11000_COULD_NOT_CREATE_DIRECTORY, getTargetDirectory() ) );
log.error( e.getLocalizedMessage() );
throw new MojoFailureException( e.getMessage() );
}
Expand All @@ -119,7 +119,7 @@ public void execute() throws MojoExecutionException, MojoFailureException

if ( !debEtcInitdDirectory.mkdirs() )
{
Exception e = new IOException( I18n.err( I18n.ERR_112_COULD_NOT_CREATE_DIRECTORY, debEtcInitdDirectory ) );
Exception e = new IOException( I18n.err( I18n.ERR_11000_COULD_NOT_CREATE_DIRECTORY, debEtcInitdDirectory ) );
log.error( e.getLocalizedMessage() );
throw new MojoFailureException( e.getMessage() );
}
Expand All @@ -139,7 +139,7 @@ public void execute() throws MojoExecutionException, MojoFailureException

if ( !debDebianDirectory.mkdirs() )
{
Exception e = new IOException( I18n.err( I18n.ERR_112_COULD_NOT_CREATE_DIRECTORY, debDebianDirectory ) );
Exception e = new IOException( I18n.err( I18n.ERR_11000_COULD_NOT_CREATE_DIRECTORY, debDebianDirectory ) );
log.error( e.getLocalizedMessage() );
throw new MojoFailureException( e.getMessage() );
}
Expand Down
Loading

0 comments on commit 0d2540f

Please sign in to comment.