001/* 002 * The contents of this file are subject to the terms of the Common Development and 003 * Distribution License (the License). You may not use this file except in compliance with the 004 * License. 005 * 006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 007 * specific language governing permission and limitations under the License. 008 * 009 * When distributing Covered Software, include this CDDL Header Notice in each file and include 010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 011 * Header, with the fields enclosed by brackets [] replaced by your own identifying 012 * information: "Portions Copyright [year] [name of copyright owner]". 013 * 014 * Copyright 2006-2008 Sun Microsystems, Inc. 015 * Portions Copyright 2012-2016 ForgeRock AS. 016 */ 017package org.opends.server.schema; 018 019import static org.opends.server.schema.SchemaConstants.*; 020 021import org.forgerock.opendj.ldap.schema.Schema; 022import org.forgerock.opendj.ldap.schema.Syntax; 023import org.forgerock.opendj.server.config.server.AttributeSyntaxCfg; 024import org.opends.server.api.AttributeSyntax; 025 026/** 027 * This class implements the teletex terminal identifier attribute syntax, which 028 * contains a printable string (the terminal identifier) followed by zero or 029 * more parameters, which start with a dollar sign and are followed by a 030 * parameter name, a colon, and a value. The parameter value should consist of 031 * any string of bytes (the dollar sign and backslash must be escaped with a 032 * preceding backslash), and the parameter name must be one of the following 033 * strings: 034 * <UL> 035 * <LI>graphic</LI> 036 * <LI>control</LI> 037 * <LI>misc</LI> 038 * <LI>page</LI> 039 * <LI>private</LI> 040 * </UL> 041 */ 042public class TeletexTerminalIdentifierSyntax 043 extends AttributeSyntax<AttributeSyntaxCfg> 044{ 045 046 /** 047 * Creates a new instance of this syntax. Note that the only thing that 048 * should be done here is to invoke the default constructor for the 049 * superclass. All initialization should be performed in the 050 * <CODE>initializeSyntax</CODE> method. 051 */ 052 public TeletexTerminalIdentifierSyntax() 053 { 054 super(); 055 } 056 057 /** {@inheritDoc} */ 058 @Override 059 public Syntax getSDKSyntax(Schema schema) 060 { 061 return schema.getSyntax(SchemaConstants.SYNTAX_TELETEX_TERM_ID_OID); 062 } 063 064 /** 065 * Retrieves the common name for this attribute syntax. 066 * 067 * @return The common name for this attribute syntax. 068 */ 069 @Override 070 public String getName() 071 { 072 return SYNTAX_TELETEX_TERM_ID_NAME; 073 } 074 075 /** 076 * Retrieves the OID for this attribute syntax. 077 * 078 * @return The OID for this attribute syntax. 079 */ 080 @Override 081 public String getOID() 082 { 083 return SYNTAX_TELETEX_TERM_ID_OID; 084 } 085 086 /** 087 * Retrieves a description for this attribute syntax. 088 * 089 * @return A description for this attribute syntax. 090 */ 091 @Override 092 public String getDescription() 093 { 094 return SYNTAX_TELETEX_TERM_ID_DESCRIPTION; 095 } 096} 097