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 2008 Sun Microsystems, Inc. 015 * Portions Copyright 2015 ForgeRock AS. 016 */ 017package org.opends.server.authorization.dseecompat; 018 019import org.opends.server.types.LDAPURL; 020 021/** 022 * The UserDNTypeURL class contains the EnumUserDNType and the URL value, 023 * of a "userdn" URL decoded by the UserDN.decode() method. 024 */ 025public class UserDNTypeURL { 026 027 /** The DN type of the URL. */ 028 private EnumUserDNType dnType; 029 030 /** The URL value. Maybe a dummy value for types such as ANYONE or SELF. */ 031 private LDAPURL url; 032 033 /** 034 * Create a class representing the "userdn" URL decoded by the 035 * UserDN.decode() method. 036 * @param dnType The type of the URL determined by examining the DN 037 * or suffix. 038 * @param url The URL itself from the ACI "userdn" string expression. 039 */ 040 UserDNTypeURL(EnumUserDNType dnType, LDAPURL url) { 041 this.url=url; 042 this.dnType=dnType; 043 } 044 045 /** 046 * Returns the DN type. 047 * @return The DN type of the URL. 048 */ 049 public EnumUserDNType getUserDNType() { 050 return this.dnType; 051 } 052 053 /** Returns the URL. 054 * @return The URL decoded by the UserDN.decode() method. 055 */ 056 public LDAPURL getURL() { 057 return this.url; 058 } 059}