Hi Neeraj,I noticed that this file had its Apache license removed. So I looked at the svn repo and found a number of files with no license.
Can someone take a look at these please? Thanks, Craig/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/ imperius/util/messages.properties/incubator/imperius/trunk/imperius- splcore/src/main/java/org/apache/imperius/util/SPLLogger.java /incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/ imperius/util/Messages.java
Begin forwarded message:
From: [EMAIL PROTECTED] Date: August 18, 2008 5:50:42 AM PDT To: [EMAIL PROTECTED]Subject: svn commit: r686743 [10/10] - in /incubator/imperius/trunk: imperius-javaspl/src/main/java/org/apache/imperius/javaspl/ imperius- splcore/src/main/antlr/org/apache/imperius/spl/parser/compiler/ imperius-splcore/src/main/java/org/apache/imperius/spl/data...Reply-To: [email protected]Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/ org/apache/imperius/util/SPLLogger.javaURL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/util/SPLLogger.java?rev=686743&r1=686742&r2=686743&view=diff= = = = = = = = ====================================================================== --- incubator/imperius/trunk/imperius-splcore/src/main/java/org/ apache/imperius/util/SPLLogger.java (original) +++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/ apache/imperius/util/SPLLogger.java Mon Aug 18 05:50:36 2008@@ -1,27 +1,3 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -// - -/** - * @author Prashant Baliga <[EMAIL PROTECTED]> - * - */ package org.apache.imperius.util; import java.io.IOException; @@ -30,43 +6,46 @@ import java.util.logging.Logger; import java.util.logging.SimpleFormatter; -public class SPLLogger +public class SPLLogger { - - private static SPLLogger splLogger; - - private static Logger logger = null; - - private static Logger auditLogger = null; - - public static boolean ENABLE_SPL_LOGGING = true; - - - public static String SPL_HOME = System.getProperty("user.dir"); - - - public static String fileSeparator = "/"; -- /** A private Constructor prevents any other class from instantiating. */- private SPLLogger() - { - //super(); - FileHandler handler; - FileHandler handler1; - System.identityHashCode(Thread.currentThread()); - try - { - String userHome = System.getProperty("SPLHOME"); - if(userHome != null) - { - SPL_HOME = userHome; - } - System.out.println("SPLHOME" + SPL_HOME);- logger = Logger.getLogger(SPLLogger.class.getName(),null);- - auditLogger = Logger.getLogger("AuditLog",null); -- String enableLogging = System.getProperty("ENABLE_SPL_LOGGING");+ private static SPLLogger splLogger = null; + private Logger auditLogger = null; + private SPLLoggerClass logger = null;+ private static final String BUNDLE_NAME = "org.apache.imperius.util.messages"; //$NON-NLS-1$+ private static final String LOG_FILENAME = "SPL"; //$NON-NLS-1$+ private static final String AUDIT_LOG_FILENAME = "SPLAudit"; // $NON-NLS-1$+ private static boolean ENABLE_SPL_LOGGING = true; ++ public static final String fileSeparator = System.getProperty("file.separator");+ public static String SPL_HOME = System.getProperty("user.dir"); + + // SPL Log Handler + private FileHandler loggerHandler = null; + + private SPLLogger() + { + initialize(); + } + + public static synchronized SPLLogger getSPLLogger() + { + if(splLogger == null) + { + splLogger = new SPLLogger(); + } + return splLogger; + } + + private void initialize() + { + try + { + // check if SPLHOME is set (Path to place log files) + String userHome = System.getProperty("SPLHOME"); + if(userHome != null) + SPL_HOME = userHome; + + String enableLogging = System.getProperty("ENABLE_SPL_LOGGING"); if(enableLogging != null) { if(enableLogging.equalsIgnoreCase("false")) @@ -75,71 +54,98 @@ } } - - if(!ENABLE_SPL_LOGGING) - { - logger.setLevel(Level.SEVERE); - auditLogger.setLevel(Level.ALL); - } - else - { - logger.setLevel(Level.ALL); - auditLogger.setLevel(Level.ALL); - } - -- handler = new FileHandler(SPL_HOME + fileSeparator + "SPL.log", false); - handler1 = new FileHandler(SPL_HOME + fileSeparator + "SPLAudit.log", true);- logger.addHandler(handler); - auditLogger.addHandler(handler1); - - logger.setLevel(Level.ALL); - auditLogger.setLevel(Level.ALL); - SimpleFormatter formatter = new SimpleFormatter(); - - handler.setFormatter(formatter); - SimpleFormatter formatter1 = new SimpleFormatter(); - handler1.setFormatter(formatter1); - - - - - } - catch (SecurityException e) - { - e.printStackTrace(); - } - catch (IOException e) - { - e.printStackTrace(); - } - - } - - public static synchronized SPLLogger getSPLLogger() - { - if (splLogger == null) - { - splLogger = new SPLLogger(); - } - return splLogger; - } - - public Object clone() throws CloneNotSupportedException - { - throw new CloneNotSupportedException(); - } - - public synchronized Logger getLogger() + // initialize SPL Audit Logger + initSPLAuditLogger(); + + // initialize SPL Logger + initSPLLogger(); + } + catch(SecurityException se) + {+ System.err.println("Error! while initializing logger " + se.getLocalizedMessage());+ } + catch(IOException io) + {+ System.err.println("Error! while initializing logger " + io.getLocalizedMessage());+ } + } ++ public void initSPLAuditLogger() throws SecurityException, IOException+ { + if(auditLogger != null) + return; + + FileHandler auditHandler = null; + + // set auditLogger + auditLogger = Logger.getLogger("AuditLog", BUNDLE_NAME); + + // create handler and add to logger + auditHandler = new FileHandler(SPL_HOME + + fileSeparator + AUDIT_LOG_FILENAME + + ".log", true); + auditLogger.addHandler(auditHandler); + + // initialize log formatter and set to handler + SimpleFormatter auditFormatter = new SimpleFormatter(); + auditHandler.setFormatter(auditFormatter); + + auditLogger.setLevel(Level.ALL); + } + + public void initSPLLogger() throws SecurityException, IOException + { + if(logger != null) + return; ++ logger = SPLLoggerClass.getInstance(SPLLogger.class.getName(), BUNDLE_NAME);+ + // add handler to logger + logger.addHandler(getSPLLogHandler()); + } + + public void enableSPLLogger() + { + if(!ENABLE_SPL_LOGGING) + { + logger.setLevel(Level.SEVERE); + } + else + { + logger.setLevel(Level.ALL); + } + } + + public synchronized SPLLoggerClass getLogger() { - return logger; } - - public synchronized Logger getAuditLogger() + + public synchronized Logger getAuditLogger() { - return auditLogger; } - + + public void disableSPLLogger() + { + logger.setLevel(Level.OFF); + } + + private FileHandler getSPLLogHandler() throws IOException + { + if(loggerHandler == null) + { + // create log handler + loggerHandler = new FileHandler(SPL_HOME + fileSeparator + + LOG_FILENAME + ".log", false); + + logger.addHandler(loggerHandler); + + // initialize log formatter + SimpleFormatter loggerFormatter = new SimpleFormatter(); + loggerHandler.setFormatter(loggerFormatter); + } + + return loggerHandler; + } }Added: incubator/imperius/trunk/imperius-splcore/src/main/java/org/ apache/imperius/util/SPLLogger2.javaURL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/util/SPLLogger2.java?rev=686743&view=auto= = = = = = = = ====================================================================== --- incubator/imperius/trunk/imperius-splcore/src/main/java/org/ apache/imperius/util/SPLLogger2.java (added) +++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/ apache/imperius/util/SPLLogger2.java Mon Aug 18 05:50:36 2008@@ -0,0 +1,145 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +// + +/** + * @author Prashant Baliga <[EMAIL PROTECTED]> + * + */ +package org.apache.imperius.util; + +import java.io.IOException; +import java.util.logging.FileHandler; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.logging.SimpleFormatter; + +public class SPLLogger2 +{ + + private static SPLLogger2 splLogger; + + private static Logger logger = null; + + private static Logger auditLogger = null; + + public static boolean ENABLE_SPL_LOGGING = true; + + + public static String SPL_HOME = System.getProperty("user.dir"); + + + public static String fileSeparator = "/"; ++ /** A private Constructor prevents any other class from instantiating. */+ private SPLLogger2() + { + //super(); + FileHandler handler; + FileHandler handler1; + System.identityHashCode(Thread.currentThread()); + try + { + String userHome = System.getProperty("SPLHOME"); + if(userHome != null) + { + SPL_HOME = userHome; + } + System.out.println("SPLHOME" + SPL_HOME);+ logger = Logger.getLogger(SPLLogger.class.getName(),null);+ + auditLogger = Logger.getLogger("AuditLog",null); ++ String enableLogging = System.getProperty("ENABLE_SPL_LOGGING");+ if(enableLogging != null) + { + if(enableLogging.equalsIgnoreCase("false")) + { + ENABLE_SPL_LOGGING = false; + } + } + + + if(!ENABLE_SPL_LOGGING) + { + logger.setLevel(Level.SEVERE); + auditLogger.setLevel(Level.ALL); + } + else + { + logger.setLevel(Level.ALL); + auditLogger.setLevel(Level.ALL); + } + ++ handler = new FileHandler(SPL_HOME + fileSeparator + "SPL.log", false); + handler1 = new FileHandler(SPL_HOME + fileSeparator + "SPLAudit.log", true);+ logger.addHandler(handler); + auditLogger.addHandler(handler1); + + logger.setLevel(Level.ALL); + auditLogger.setLevel(Level.ALL); + SimpleFormatter formatter = new SimpleFormatter(); + + handler.setFormatter(formatter); + SimpleFormatter formatter1 = new SimpleFormatter(); + handler1.setFormatter(formatter1); + + + + + } + catch (SecurityException e) + { + e.printStackTrace(); + } + catch (IOException e) + { + e.printStackTrace(); + } + + } + + public static synchronized SPLLogger2 getSPLLogger() + { + if (splLogger == null) + { + splLogger = new SPLLogger2(); + } + return splLogger; + } + + public Object clone() throws CloneNotSupportedException + { + throw new CloneNotSupportedException(); + } + + public synchronized Logger getLogger() + { + + return logger; + } + + public synchronized Logger getAuditLogger() + { + + return auditLogger; + } + +}Propchange: incubator/imperius/trunk/imperius-splcore/src/main/java/ org/apache/imperius/util/SPLLogger2.java------------------------------------------------------------------------------ svn:eol-style = nativeModified: incubator/imperius/trunk/imperius-splcore/src/main/java/ org/apache/imperius/util/SPLLoggerClass.javaURL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/util/SPLLoggerClass.java?rev=686743&r1=686742&r2=686743&view=diff= = = = = = = = ====================================================================== --- incubator/imperius/trunk/imperius-splcore/src/main/java/org/ apache/imperius/util/SPLLoggerClass.java (original) +++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/ apache/imperius/util/SPLLoggerClass.java Mon Aug 18 05:50:36 2008@@ -25,55 +25,60 @@ package org.apache.imperius.util; +import java.util.logging.Level; import java.util.logging.Logger; -public class SPLLoggerClass extends Logger +public class SPLLoggerClass extends Logger { - - public SPLLoggerClass(String name, String resourceBundleName) - { - super(name, resourceBundleName); - // TODO Auto-generated constructor stub - } - - - - public void fine(String msg) - { - String msgActual=Thread.currentThread().getName(); - msgActual+=" "+msg; - super.fine(msgActual); - - } - - public void entering(String className, String msg) - { - String msgActual=Thread.currentThread().getName(); - msgActual+=" "+msg; - super.entering(className, msgActual); - - } - - public void exiting(String className, String msg) - { - String msgActual=Thread.currentThread().getName(); - msgActual+=" "+msg; - super.exiting(className, msgActual); - - } - - public void severe(String msg) - { - String msgActual=Thread.currentThread().getName(); - msgActual+=" "+msg; - super.severe(msgActual); - - } - - /* public static final Logger getLogger(String name) - { - return new SPLLoggerClass(name,null); - // TODO Auto-generated constructor stub - }*/ - + private static SPLLoggerClass singletonObj = null; + + private SPLLoggerClass(String name, String resourceBundleName) + { + super(name, resourceBundleName); + } + + public static SPLLoggerClass getInstance(String name, + String resourceBundleName) + { + if (singletonObj == null) + singletonObj = new SPLLoggerClass(name, resourceBundleName); + + return singletonObj; + } + + public void entering(String sourceClass, String sourceMethod) + { + if (isLoggable(Level.FINE)) + super.entering(sourceClass, sourceMethod); + } + + public void exiting(String sourceClass, String sourceMethod) + { + if (isLoggable(Level.FINE)) + super.exiting(sourceClass, sourceMethod); + } + + public void log(Level level, String msg, Object[] params) + {+ if (isLoggable(Level.SEVERE) || isLoggable(Level.INFO) || isLoggable(Level.WARNING))+ super.log(level, msg, params); + } + + public void log(Level level, String msg) + {+ if (isLoggable(Level.SEVERE) || isLoggable(Level.INFO) || isLoggable(Level.WARNING))+ super.log(level, msg); + } + + public void fine(String msg) + { + if (isLoggable(Level.FINE)) + super.fine(msg); + } + + public void severe(String msg) + { + if (isLoggable(Level.SEVERE)) + super.severe(msg); + } }Added: incubator/imperius/trunk/imperius-splcore/src/main/java/org/ apache/imperius/util/messages.propertiesURL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/util/messages.properties?rev=686743&view=auto= = = = = = = = ====================================================================== --- incubator/imperius/trunk/imperius-splcore/src/main/java/org/ apache/imperius/util/messages.properties (added) +++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/ apache/imperius/util/messages.properties Mon Aug 18 05:50:36 2008@@ -0,0 +1,98 @@ +# INFO Messages+SPLOF0400I = SPLOF0400I create policy method is invoked for policy : {0} +SPLOF0401I = SPLOF0401I delete policy method is invoked for policy : {0} +SPLOF0402I = SPLOF0402I update policy method is invoked for policy : {0}+SPLOF0403I = SPLOF0403I policy manager shut down initiated +SPLOF0404I = SPLOF0404I getPolicy method is invoked for policy : {0} +SPLOF0405I = SPLOF0405I getAllPolicyNames method is invoked +SPLOF0406I = SPLOF0406I getAllPolicies method is invoked +SPLOF0407I = SPLOF0407I policy parsing started +SPLOF0408I = SPLOF0408I policy parsing completed successfully+SPLOF0409I = SPLOF0409I Policy Evaluator calling evaluate method on SPLPolicy object+ + +# WARNING Messages + +# ERROR Messages +SPLOF0001E = SPLOF0001E Error while creating policy {0} +SPLOF0002E = SPLOF0002E Error while deleting as the {0}+SPLOF0003E = SPLOF0003E Error while reading serialized policyMap object +SPLOF0004E = SPLOF0004E Error class of serialized policyMap object cannot be found+SPLOF0005E = SPLOF0005E Error while serializing policyMap object +SPLOF0006E = SPLOF0006E Error while parsing the policy string {0} +SPLOF0007E = SPLOF0007E Error no abstract tree is produced +SPLOF0008E = SPLOF0008E Error while evaluating the policy {0} +SPLOF0009E = SPLOF0009E Error symbol {0} already defined + + + + +# Messages+SPL_POLICY_DOES_NOT_EXIST_EXCEPTION_MSG = policy does not exist in the Repository +SPL_POLICY_DOES_NOT_EXIST_IN_CACHE_EXCEPTION_MSG = policy does not exist in cache +SPL_NULL_POLICY_NAME_EXCEPTION_MSG = The Policy cannot be found due to Invalid Policy Parameters+SPL_DELETE_POLICY_FROM_CACHE_MSG = Deleting Policy Object from cache+SPL_DELETE_POLICY_FROM_REPOSITORY_MSG = Deleting Policy from Repository +SPL_POLICY_ALREADY_EXISTS_MSG = Cannot create new Policy as Policy already exists +SPL_POLICY_PARSING_EXCEPTION_MSG = Error encountered while parsing PolicyString +SPL_POLICY_TREE_PARSING_EXCEPTION_MSG = Error encountered while parsing tree +SPL_NO_INSTANCES_PASSED_FOR_EVALUATION_MSG = no instances are passed for evaluation+SPL_CREATED_INTERNAL_POLICY_OBJ_MSG = created internal policy object+SPL_POLICY_INSERTION_INTO_REPOSITORY_MSG = inserting policy into repository+SPL_SYMBOL_ALREADY_EXISTS_MSG = already exists with symbol name :+SPL_SYMBOL_DOES_NOT_EXISTS_MSG = Symbol does not exist with the name : +SPL_EXPRESSION_VALIDATION_FAIL_MSG = validation of parameters failed for expression :+SPL_MISSING_PARAMETERS_EXCEPTION_MSG = missing parameters+SPL_COLLECT_OPERATION_EXP_EXCEPTION1_MSG = parameter in CollectOperation expression needs to be a reference expression +SPL_COLLECT_OPERATION_EXP_EXCEPTION2_MSG = parameter in CollectOperation expression needs to be a string expression +SPL_COLLECT_OPERATION_EXP_EXCEPTION3_MSG = parameter in CollectOperation expression needs to be a boolean expression +SPL_POSTCOLLECT_EXP_EXCEPTION1_MSG = array index should be integer and not {0}+SPL_SYMBOL_DOES_NOT_EXIST_EXCEPTION_MSG = symbol {0} doesnot exist+SPL_INVALID_METHOD_INVOCATION_SECTION_EXCEPTION_MSG = Cannot invoke methods in the {0} sections +SPL_ARRAY_INDEX_OUT_OF_RANGE_EXCEPTION_MSG = array index is out of range +SPL_VALIDATE_METHOD_NOT_SUPPORTED_EXCEPTION_MSG = validate method not supported for the expression : {0} +SPL_EVALUATE_METHOD_NOT_SUPPORTED_EXCEPTION_MSG = evaluate method not supported for the expression : {0} +SPL_SELF_EXPRESSION_EXCEPTION_MSG = non collect Parent SymbolTable not found in Self Expression+SPL_VALIDATION_ERROR_MSG = validation error : {0} +SPL_EVALUATION_ERROR_MSG = evaluation error : {0}+SPL_PASSED_EXPRESSION_ERROR_MSG = {0} hand side expression passed in is null +SPL_NO_OF_ARGUMENTS_PASSED_ERROR_MSG = No of arguments to be passed should be {0}, but it is {1} +SPL_BLANK_EXPRESSION_PASSED_ERROR_MSG = {0} expression passed is blank+SPL_BUILT_IN_METHOD_ERROR_MSG = built-in method error +SPL_CLASS_NOT_FOUND_EXCEPTION_MSG = class not found {0}+SPL_EXPRESSION_FACTORY_EXCEPTION_MSG = id1.id2 type of method calls not allowed +SPL_EXPRESSION_FACTORY_EXCEPTION1_MSG = Constructor BasicCollectionExpression(pList,sTab) returned null expression +SPL_METHOD_PASSED_ARGUMENTS_EXCEPTION_MSG = Formal and passed parameter types don't match for method +SPL_ASSIGNMENT_EXP_EXCEPTION_MSG = LHS or RHS or argument in method call is null : {0} {1} +SPL_INVOKE_POLICY_ACTION_EXCEPTION1_MSG = first expression should be a string describing the name of the policy to invoke +SPL_SET_ACTION_BLOCK_EXCEPTION_MSG = paramlist in SetActionBlock does not consist of asignment expressions+SPL_WRONG_OPERAND_TYPE_EXCEPTION_MSG = wrong or invalid operand type+SPL_TYPE_NOT_COMPATIBLE_EXCEPTION_MSG = Types are not compatible : LHS {0} and RHS {1} +SPL_NOT_REQUIRED_EXP_EXCEPTION_MSG = passed expression is not of {0} type +SPL_WRONG_OPERAND_TYPE_EXCEPTION1_MSG = wrong or invalid operand type {0} +SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG = {0} hand side expression passed in {1} of type {2}+SPL_INVALID_DIRECTION_ARGUMENT_ERROR_MSG = Invalid direction argument +SPL_NO_OF_WORDS_EXCEPTION_MSG = NumberOfWords must be non-negative. +SPL_OPERATION_NOT_SUPPORTED_EXCEPTION_MSG = operation not supported + + + + + + + + + + + + + + + + + + + + + +Propchange: incubator/imperius/trunk/imperius-splcore/src/main/java/ org/apache/imperius/util/messages.properties------------------------------------------------------------------------------ svn:eol-style = native
Craig L Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp!
smime.p7s
Description: S/MIME cryptographic signature
