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 * This class implements the facsimile telephone number attribute syntax, which 038 * contains a printable string (the number) followed by zero or more parameters. 039 * Those parameters should start with a dollar sign may be any of the following 040 * strings: 041 * <UL> 042 * <LI>twoDimensional</LI> 043 * <LI>fineResolution</LI> 044 * <LI>unlimitedLength</LI> 045 * <LI>b4Length</LI> 046 * <LI>a3Width</LI> 047 * <LI>b4Width</LI> 048 * <LI>uncompressed</LI> 049 * </UL> 050 */ 051public class FaxNumberSyntax 052 extends AttributeSyntax<AttributeSyntaxCfg> 053{ 054 055 /** 056 * Creates a new instance of this syntax. Note that the only thing that 057 * should be done here is to invoke the default constructor for the 058 * superclass. All initialization should be performed in the 059 * <CODE>initializeSyntax</CODE> method. 060 */ 061 public FaxNumberSyntax() 062 { 063 super(); 064 } 065 066 /** {@inheritDoc} */ 067 @Override 068 public Syntax getSDKSyntax(Schema schema) 069 { 070 return schema.getSyntax(SchemaConstants.SYNTAX_FAXNUMBER_OID); 071 } 072 073 /** 074 * Retrieves the common name for this attribute syntax. 075 * 076 * @return The common name for this attribute syntax. 077 */ 078 @Override 079 public String getName() 080 { 081 return SYNTAX_FAXNUMBER_NAME; 082 } 083 084 /** 085 * Retrieves the OID for this attribute syntax. 086 * 087 * @return The OID for this attribute syntax. 088 */ 089 @Override 090 public String getOID() 091 { 092 return SYNTAX_FAXNUMBER_OID; 093 } 094 095 /** 096 * Retrieves a description for this attribute syntax. 097 * 098 * @return A description for this attribute syntax. 099 */ 100 @Override 101 public String getDescription() 102 { 103 return SYNTAX_FAXNUMBER_DESCRIPTION; 104 } 105} 106