001 /* 002 * Copyright 2008-2009 the original author or authors. 003 * The contents of this file are subject to the Mozilla Public License 004 * Version 1.1 (the "License"); you may not use this file except in 005 * compliance with the License. You may obtain a copy of the License at 006 * http://www.mozilla.org/MPL/ 007 * 008 * Software distributed under the License is distributed on an "AS IS" 009 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 010 * License for the specific language governing rights and limitations 011 * under the License. 012 */ 013 014 package com.mtgi.analytics.aop.config.v10; 015 016 import org.springframework.core.Conventions; 017 018 public class BtNamespaceUtils { 019 public static final String TRACKING_MANAGER_ATTRIBUTE = "tracking-manager"; 020 021 public static final String TRACKING_MANAGER_PROPERTY = 022 Conventions.attributeNameToPropertyName(TRACKING_MANAGER_ATTRIBUTE); 023 024 public static final String TRACKING_ATTRIBUTE_SOURCE = "trackingAttributeSource"; 025 026 public static final String TRACKING_MANAGER_APPLICATION_ATTRIBUTE = "application"; 027 028 public static final String TRACKING_MANAGER_APPLICATION_PROPERTY = 029 Conventions.attributeNameToPropertyName(TRACKING_MANAGER_APPLICATION_ATTRIBUTE); 030 031 // private static final String ANNOTATION_TRACKING_ATTRIBUTE_SOURCE_CLASS_NAME = 032 // "org.springframework.transaction.annotation.AnnotationTransactionAttributeSource"; 033 // 034 // 035 // public static Class getAnnotationTransactionAttributeSourceClass() { 036 // if (JdkVersion.getMajorJavaVersion() < JdkVersion.JAVA_15) { 037 // throw new IllegalStateException( 038 // "AnnotationTransactionAttributeSource is only available on Java 1.5 and higher"); 039 // } 040 // try { 041 // return ClassUtils.forName( 042 // ANNOTATION_TRACKING_ATTRIBUTE_SOURCE_CLASS_NAME, BtNameSpaceUtils.class.getClassLoader()); 043 // } 044 // catch (Throwable ex) { 045 // throw new IllegalStateException("Unable to load Java 1.5 dependent class [" + 046 // ANNOTATION_TRACKING_ATTRIBUTE_SOURCE_CLASS_NAME + "]", ex); 047 // } 048 // } 049 }