001/* 002 * CDDL HEADER START 003 * 004 * The contents of this file are subject to the terms of the 005 * Common Development and Distribution License, Version 1.0 only 006 * (the "License"). You may not use this file except in compliance 007 * with the License. 008 * 009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt 010 * or http://forgerock.org/license/CDDLv1.0.html. 011 * See the License for the specific language governing permissions 012 * and limitations under the License. 013 * 014 * When distributing Covered Code, include this CDDL HEADER in each 015 * file and include the License file at legal-notices/CDDLv1_0.txt. 016 * If applicable, add the following below this CDDL HEADER, with the 017 * fields enclosed by brackets "[]" replaced with your own identifying 018 * information: 019 * Portions Copyright [yyyy] [name of copyright owner] 020 * 021 * CDDL HEADER END 022 * 023 * 024 * Copyright 2006-2008 Sun Microsystems, Inc. 025 * Portions Copyright 2012-2015 ForgeRock AS 026 */ 027package org.opends.server.schema; 028 029import static org.opends.server.schema.SchemaConstants.*; 030 031import org.forgerock.opendj.ldap.schema.Schema; 032import org.forgerock.opendj.ldap.schema.Syntax; 033import org.opends.server.admin.std.server.AttributeSyntaxCfg; 034import org.opends.server.api.AttributeSyntax; 035 036 037/** 038 * This class implements the certificate list attribute syntax. This should be 039 * restricted to holding only X.509 certificate lists, but we will accept any 040 * set of bytes. It will be treated much like the octet string attribute 041 * syntax. 042 */ 043public class CertificateListSyntax 044 extends AttributeSyntax<AttributeSyntaxCfg> 045{ 046 047 /** 048 * Creates a new instance of this syntax. Note that the only thing that 049 * should be done here is to invoke the default constructor for the 050 * superclass. All initialization should be performed in the 051 * <CODE>initializeSyntax</CODE> method. 052 */ 053 public CertificateListSyntax() 054 { 055 super(); 056 } 057 058 /** {@inheritDoc} */ 059 @Override 060 public Syntax getSDKSyntax(Schema schema) 061 { 062 return schema.getSyntax(SchemaConstants.SYNTAX_CERTLIST_OID); 063 } 064 065 /** 066 * Retrieves the common name for this attribute syntax. 067 * 068 * @return The common name for this attribute syntax. 069 */ 070 @Override 071 public String getName() 072 { 073 return SYNTAX_CERTLIST_NAME; 074 } 075 076 /** 077 * Retrieves the OID for this attribute syntax. 078 * 079 * @return The OID for this attribute syntax. 080 */ 081 @Override 082 public String getOID() 083 { 084 return SYNTAX_CERTLIST_OID; 085 } 086 087 /** 088 * Retrieves a description for this attribute syntax. 089 * 090 * @return A description for this attribute syntax. 091 */ 092 @Override 093 public String getDescription() 094 { 095 return SYNTAX_CERTLIST_DESCRIPTION; 096 } 097} 098