/************************************************************************* * * * EJBCA Community: The OpenSource Certificate Authority * * * * This software is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or any later version. * * * * See terms of license at gnu.org. * * * *************************************************************************/ package org.ejbca.core.model.approval; import org.apache.log4j.Logger; /** * Class used in constants for approvalable methods indicating calling classes/methods * that don't need to go through approvals * * Contains the full classpath and method na,e * * @author Philip Vendil * $Id: ApprovalOveradableClassName.java 19901 2014-09-30 14:29:38Z anatom $ */ public class ApprovalOveradableClassName { private static final Logger log = Logger.getLogger(ApprovalOveradableClassName.class); String className = null; String methodName = null; /** * * @param className The full name with packages * @param methodName the method name/ can be null indicating all methods */ public ApprovalOveradableClassName(String className, String methodName) { super(); this.className = className; this.methodName = methodName; } /** * @return The full name with packages */ public String getClassName() { return className; } public String getMethodName() { return methodName; } /** * Method that checks if the current classname / method is in the stacktrace * @param traces * @return if the class.method exists in trace */ public boolean isInStackTrace(StackTraceElement[] traces){ boolean retval = false; for(int i=0;i