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-2016 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 final EnumUserDNType dnType; 029 /** The URL value. Maybe a dummy value for types such as ANYONE or SELF. */ 030 private final LDAPURL url; 031 032 /** 033 * Create a class representing the "userdn" URL decoded by the 034 * UserDN.decode() method. 035 * @param dnType The type of the URL determined by examining the DN 036 * or suffix. 037 * @param url The URL itself from the ACI "userdn" string expression. 038 */ 039 UserDNTypeURL(EnumUserDNType dnType, LDAPURL url) { 040 this.url=url; 041 this.dnType=dnType; 042 } 043 044 /** 045 * Returns the DN type. 046 * @return The DN type of the URL. 047 */ 048 public EnumUserDNType getUserDNType() { 049 return this.dnType; 050 } 051 052 /** Returns the URL. 053 * @return The URL decoded by the UserDN.decode() method. 054 */ 055 public LDAPURL getURL() { 056 return this.url; 057 } 058}