001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * https://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 * 019 */ 020package org.apache.directory.api.ldap.model.schema.syntaxCheckers; 021 022 023import org.apache.directory.api.ldap.model.constants.SchemaConstants; 024import org.apache.directory.api.ldap.model.schema.SyntaxChecker; 025 026 027/** 028 * A SyntaxChecker which verifies that a value is a certificate pair according to RFC 4523 : 029 * 030 * <pre> 031 * "Due to changes made to the definition of a CertificatePair through time, 032 * no LDAP-specific encoding is defined for this syntax. Values of this 033 * syntax SHOULD be encoded using Distinguished Encoding Rules (DER) 034 * [X.690] and MUST only be transferred using the ;binary transfer 035 * option" 036 * </pre> 037 * 038 * It has been removed in RFC 4517 039 * 040 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 041 */ 042@SuppressWarnings("serial") 043public final class CertificatePairSyntaxChecker extends SyntaxChecker 044{ 045 /** 046 * A static instance of CertificatePairSyntaxChecker 047 */ 048 public static final CertificatePairSyntaxChecker INSTANCE = new CertificatePairSyntaxChecker( 049 SchemaConstants.CERTIFICATE_PAIR_SYNTAX ); 050 051 /** 052 * A static Builder for this class 053 */ 054 public static final class Builder extends SCBuilder<CertificatePairSyntaxChecker> 055 { 056 /** 057 * The Builder constructor 058 */ 059 private Builder() 060 { 061 super( SchemaConstants.CERTIFICATE_PAIR_SYNTAX ); 062 } 063 064 065 /** 066 * Create a new instance of CertificatePairSyntaxChecker 067 * @return A new instance of CertificatePairSyntaxChecker 068 */ 069 @Override 070 public CertificatePairSyntaxChecker build() 071 { 072 return new CertificatePairSyntaxChecker( oid ); 073 } 074 } 075 076 077 /** 078 * Creates a new instance of CertificatePairSyntaxChecker. 079 * 080 * @param oid The OID to use for this SyntaxChecker 081 */ 082 private CertificatePairSyntaxChecker( String oid ) 083 { 084 super( oid ); 085 } 086 087 088 /** 089 * @return An instance of the Builder for this class 090 */ 091 public static Builder builder() 092 { 093 return new Builder(); 094 } 095}