org.openpermis.examples.ldap
Class CertIntoLdifUtil
java.lang.Object
org.openpermis.examples.ldap.CertIntoLdifUtil
public final class CertIntoLdifUtil
- extends Object
This utility class substitutes in the given ldif file the given place holder with the given
certificate.
- Since:
- 0.3.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BUFFER_SIZE
static final int BUFFER_SIZE
- Constant Field Value:
1024
- Since:
- 0.3.0
ARGUMENT_NUMBER
static final int ARGUMENT_NUMBER
- Constant Field Value:
3
- Since:
- 0.3.0
CertIntoLdifUtil
private CertIntoLdifUtil()
- Since:
- 0.3.0
main
public static void main(String[] args)
throws IOException
- Substitutes in the given ldif file the given place holder with the given certificate.
- Parameters:
args
- "#1 argument: path of ldif file, #2 argument: place holder within ldif file, #3
argument: path of certificate file
- Throws:
IOException
- if something goes awry.- Since:
- 0.3.0
substitutePlaceholderWithCertificate
private static String substitutePlaceholderWithCertificate(String inputStr,
String patternStr,
String replacementStr)
- Since:
- 0.3.0
getCertificateInBase64
private static String getCertificateInBase64(String certificateFilePath)
throws IOException
- Throws:
IOException
- Since:
- 0.3.0
readFileAsString
private static String readFileAsString(String filePath)
throws IOException
- Throws:
IOException
- Since:
- 0.3.0
writeStringToFile
private static void writeStringToFile(String encodedCertificate,
String filePath)
throws IOException
- Throws:
IOException
- Since:
- 0.3.0
PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:07:19
Copyright (c) 2002-2007 Ergon Informatik AG