/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2008 Sun Microsystems, Inc.
* Portions Copyright 2013-2015 ForgeRock AS
*/
/**
* This class represents a single ACI's IP bind rule expression. It is possible
* for that expression to contain several IP addresses to evaluate, so the
* class contains a list of classes that can evaluate a remote clients IP
* address for each IP address parsed from the bind rule.
*/
/**
* Regular expression used to do a quick check on the characters in a
* bind rule address. These are all of the valid characters that may
* appear in an bind rule address part.
*/
"((?i)[\\.{1}[a-f]\\d:\\+{1}\\*/{1}\\t\\[{1}\\]{1}]+(?-i))";
/**
* List of the pattern classes, one for each address decoded from the bind
* rule.
*/
/** The type of the bind rule (!= or =). */
/**
* Create a class representing the IP bind rule expressions for this ACI.
* @param patternIPList A list of PatternIP objects representing the IP
* bind rule expressions decoded from ACI.
* @param type An enumeration representing the expression type.
*/
this.patternIPList=patternIPList;
}
/**
* Decodes the provided IP bind rule expression string and returns an
* IP class the can be used to evaluate remote clients IP addresses.
*
* @param expr The expression string from the ACI IP bind rule.
* @param type An enumeration representing the expression type.
* @return A class that can be used to evaluate remote clients IP
* addresses.
* @throws AciException If there is a parsing error.
*/
throws AciException {
//Split on the ','.
throw new AciException(message);
}
}
}
/**
* Perform an evaluation using the provided evaluation context's remote
* IP address information.
*
* @param evalCtx An evaluation context containing the remote clients
* IP address information.
*
* @return An enumeration representing if the address matched.
*/
return evaluate(remoteAddr);
}
/**
* Perform an evaluation using the InetAddress.
*
* @param addr The InetAddress to evaluate against PatternIP classes.
* @return An enumeration representing if the address matched one
* of the patterns.
*/
}
}
/** {@inheritDoc} */
}
/** {@inheritDoc} */
}
}