You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(64) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(48) |
Feb
|
Mar
(18) |
Apr
(33) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
(56) |
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(10) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2011 |
Jan
(17) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <bi...@us...> - 2011-08-21 23:31:55
|
Revision: 280 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=280&view=rev Author: bindul Date: 2011-08-21 23:31:49 +0000 (Sun, 21 Aug 2011) Log Message: ----------- Small refactoring and upgrade dependency versions Modified Paths: -------------- insight-core/trunk/insight-core-impl/pom.xml insight-core/trunk/pom.xml parent/trunk/pom.xml Added Paths: ----------- insight-core/trunk/insight-core-impl/insight-core-impl-base/ insight-core/trunk/insight-core-impl/insight-core-impl-base/pom.xml insight-core/trunk/insight-core-impl/insight-core-impl-base/src/ insight-core/trunk/insight-core-impl/insight-core-impl-base/src/main/ insight-core/trunk/insight-core-impl/insight-core-impl-base/src/main/java/ insight-core/trunk/insight-core-impl/insight-core-impl-base/src/main/resources/ insight-core/trunk/insight-core-impl/insight-core-impl-base/src/test/ insight-core/trunk/insight-core-impl/insight-core-impl-base/src/test/java/ insight-core/trunk/insight-core-impl/insight-core-impl-base/src/test/resources/ Removed Paths: ------------- insight-core/trunk/insight-core-impl/src/main/ insight-core/trunk/insight-core-impl/src/test/ Property changes on: insight-core/trunk/insight-core-impl/insight-core-impl-base ___________________________________________________________________ Added: svn:ignore + .settings target .classpath .project Added: insight-core/trunk/insight-core-impl/insight-core-impl-base/pom.xml =================================================================== --- insight-core/trunk/insight-core-impl/insight-core-impl-base/pom.xml (rev 0) +++ insight-core/trunk/insight-core-impl/insight-core-impl-base/pom.xml 2011-08-21 23:31:49 UTC (rev 280) @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + | + | Copyright (c) 2009 - 2011 MindTree Ltd. + | + | This file is part of Insight. + | + | Insight is free software: you can redistribute it + | and/or modify it under the terms of the GNU General Public License as + | published by the Free Software Foundation, either version 3 of the License, + | or (at your option) any later version. + | + | Insight is distributed in the hope that it will be + | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + | Public License for more details. + | + | You should have received a copy of the GNU General Public License along with + | Insight. If not, see <http://www.gnu.org/licenses />. + | +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>com.mindtree.techworks.insight.core</groupId> + <artifactId>insight-core-impl</artifactId> + <version>2.0.0-SNAPSHOT</version> + </parent> + <artifactId>insight-core-impl-base</artifactId> + <name>Insight Core Implementation :: Base</name> + <packaging>jar</packaging> + <description>Implementation of base insight functionality</description> + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>insight-core-api</artifactId> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + <properties> + <insight.project.type-implementation>true</insight.project.type-implementation> + <insight.project.type-implementation.spectitle>Insight Core API</insight.project.type-implementation.spectitle> + <insight.project.type-implementation.specversion>${project.version}</insight.project.type-implementation.specversion> + </properties> +</project> \ No newline at end of file Property changes on: insight-core/trunk/insight-core-impl/insight-core-impl-base/pom.xml ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Modified: insight-core/trunk/insight-core-impl/pom.xml =================================================================== --- insight-core/trunk/insight-core-impl/pom.xml 2011-08-18 07:49:42 UTC (rev 279) +++ insight-core/trunk/insight-core-impl/pom.xml 2011-08-21 23:31:49 UTC (rev 280) @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- | - | Copyright (c) 2009 - 2010 MindTree Ltd. + | Copyright (c) 2009 - 2011 MindTree Ltd. | | This file is part of Insight. | @@ -19,7 +19,7 @@ | Insight. If not, see <http://www.gnu.org/licenses />. | --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> @@ -28,24 +28,19 @@ <version>2.0.0-SNAPSHOT</version> </parent> <artifactId>insight-core-impl</artifactId> - <name>Insight Core Base Implementation</name> - <packaging>jar</packaging> - <description>Put some description here</description> - <dependencies> - <dependency> - <groupId>com.mindtree.techworks.insight.core</groupId> - <artifactId>insight-core-api</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - </dependencies> - <properties> - <insight.project.type-implementation>true</insight.project.type-implementation> - <insight.project.type-implementation.spectitle>Insight Core API</insight.project.type-implementation.spectitle> - <insight.project.type-implementation.specversion>${project.version}</insight.project.type-implementation.specversion> - </properties> + <name>Insight Core Implementation</name> + <packaging>pom</packaging> + <description>Insight Core Implementation Modules</description> + <dependencyManagement> + <dependencies> + <dependency> + <groupId>com.mindtree.techworks.insight.core</groupId> + <artifactId>insight-core-api</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </dependencyManagement> + <modules> + <module>insight-core-impl-base</module> + </modules> </project> \ No newline at end of file Modified: insight-core/trunk/pom.xml =================================================================== --- insight-core/trunk/pom.xml 2011-08-18 07:49:42 UTC (rev 279) +++ insight-core/trunk/pom.xml 2011-08-21 23:31:49 UTC (rev 280) @@ -31,8 +31,8 @@ <artifactId>insight-core</artifactId> <version>2.0.0-SNAPSHOT</version> <packaging>pom</packaging> - <name>Insight Core components</name> - <description>Put some description here</description> + <name>Insight Core</name> + <description>Insight Core Components - These components are designed to be libraries for use in Insight products</description> <url>http://mindtreeinsight.sourceforge.net/</url> <scm> <connection>scm:svn:http://mindtreeinsight.svn.sourceforge.net/svnroot/mindtreeinsight/insight-core/trunk</connection> Modified: parent/trunk/pom.xml =================================================================== --- parent/trunk/pom.xml 2011-08-18 07:49:42 UTC (rev 279) +++ parent/trunk/pom.xml 2011-08-21 23:31:49 UTC (rev 280) @@ -170,6 +170,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> + <version>2.3.2</version> <inherited>true</inherited> <configuration> <optimize>true</optimize> @@ -183,6 +184,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> + <version>2.8</version> <configuration> <downloadJavadocs>true</downloadJavadocs> <downloadSources>true</downloadSources> @@ -191,6 +193,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> + <version>2.3.2</version> <configuration> <archive> <index>true</index> @@ -212,6 +215,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> + <version>2.8</version> <executions> <execution> <id>attach-javadocs</id> @@ -235,15 +239,27 @@ </configuration> </plugin> <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-release-plugin</artifactId> + <version>2.2.1</version> + </plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> + <version>2.5</version> <configuration> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <version>3.0</version> + </plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> + <version>2.1.2</version> <executions> <execution> <id>attach-sources</id> @@ -260,6 +276,7 @@ <plugin> <groupId>org.apache.httpcomponents</groupId> <artifactId>maven-notice-plugin</artifactId> + <version>0.0.2</version> <executions> <execution> <id>attach-notice-license</id> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2011-08-18 07:49:49
|
Revision: 279 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=279&view=rev Author: bindul Date: 2011-08-18 07:49:42 +0000 (Thu, 18 Aug 2011) Log Message: ----------- Implemented base component lookup framework Modified Paths: -------------- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/ContextFactory.java insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/APIMessages.java insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/ImplementationLookup.java Added Paths: ----------- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/Component.java insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/api/internal/ insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/api/internal/ImplementationLookupTest.java insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/api/internal/TestComponent.java insight-core/trunk/insight-core-api/src/test/resources/ insight-core/trunk/insight-core-api/src/test/resources/META-INF/ insight-core/trunk/insight-core-api/src/test/resources/META-INF/services/ insight-core/trunk/insight-core-api/src/test/resources/META-INF/services/com.mindtree.techworks.insight.core.api.internal.TestComponent insight-core/trunk/insight-core-api/src/test/resources/components.properties Added: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/Component.java =================================================================== --- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/Component.java (rev 0) +++ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/Component.java 2011-08-18 07:49:42 UTC (rev 279) @@ -0,0 +1,70 @@ +/* + * $HeadURL$ + * + * Copyright (c) 2011 MindTree Ltd. + * + * This file is part of Insight. + * + * Insight is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) + * any later version. + * + * Insight is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along with + * Insight. If not, see <http://www.gnu.org/licenses/>. + */ +package com.mindtree.techworks.insight.core.api; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Annotation that marks a component in Insight. A component in Insight provides + * a constituent function contributing to the entire Insight functionality. + * Components may have one or more implementations providing similar or distinct + * functionality (e.g. a file system provider can have multiple implementations + * for a file system view of the local machine, over scp, etc.). + * + * <p>Insight uses a simple framework to identify and load implementations of + * components. Insight packages ship with most required implementations of the + * components, but it can be overridden at runtime or in downstream packaging. + * Components are configured using the following mechanisms (in lowering order + * of priority): + * <ol> + * <li><em>System Property:</em> A system property {@link #configLookupProperty()} + * may be present with a comma separated list of class names of the + * implementation.</li> + * <li><em>Component File:</em> A property file (components.properties) can be + * present at the root of the classpath which can contain a property with + * the name {@link #configLookupProperty()} and a comma separated list of + * values</li> + * <li><em>Java Service Locator</em> All other implementations are loaded by + * the Java Service Locator mechanism. This is the default way to configure + * components used by Insight.</em> + * </ol></p> + * + * <p>A component implementation selection may involve complex rules on the + * supported features of the component. Hence a generic component loader may + * not be able to handle this. The Insight component loader exposes an iterator + * over all discovered implementations for the base component to select. All + * component implementations must have a no-args public constructor.</p> + * + * @since Insight 2.0 + * @author Bindul Bhowmik + */ +@Documented +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) +public @interface Component { + + String configLookupProperty() default ""; + +} Property changes on: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/Component.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Modified: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/ContextFactory.java =================================================================== --- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/ContextFactory.java 2011-08-16 06:14:37 UTC (rev 278) +++ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/ContextFactory.java 2011-08-18 07:49:42 UTC (rev 279) @@ -28,6 +28,7 @@ * @since Insight 2.0 * @author Bindul Bhowmik */ +@Component(configLookupProperty="insight.core.api.ContextFactory") public abstract class ContextFactory { /** @@ -51,8 +52,8 @@ if (null == contextFactory) { synchronized (lock) { if (null == contextFactory) { - ImplementationLookup<ContextFactory> lookup = new ImplementationLookup<ContextFactory>(); - contextFactory = lookup.newInstance(); + ImplementationLookup<ContextFactory> lookup = ImplementationLookup.createLookup(ContextFactory.class); + contextFactory = lookup.nextInstance(); } } } Modified: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/APIMessages.java =================================================================== --- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/APIMessages.java 2011-08-16 06:14:37 UTC (rev 278) +++ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/APIMessages.java 2011-08-18 07:49:42 UTC (rev 279) @@ -30,6 +30,9 @@ * <code>com.mindtree.techworks.insight.core.api.api-messages</code> resource * bundle. * + * <br/><em>NOTE:</em> This class is part of internal Insight implementation and + * may change with binary incompatibilities across versions. + * * @since 2.0 * @author Bindul Bhowmik */ Modified: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/ImplementationLookup.java =================================================================== --- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/ImplementationLookup.java 2011-08-16 06:14:37 UTC (rev 278) +++ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/ImplementationLookup.java 2011-08-18 07:49:42 UTC (rev 279) @@ -20,19 +20,350 @@ */ package com.mindtree.techworks.insight.core.api.internal; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayDeque; +import java.util.Iterator; +import java.util.Properties; +import java.util.Queue; +import java.util.ServiceLoader; +import java.util.StringTokenizer; + +import com.mindtree.techworks.insight.core.api.Component; + /** - * @todo add documentation + * Looks up and loads Insight component implementations. The loading mechanism + * implemented is documented with the {@link Component} javadocs. + * + * <br/><em>NOTE:</em> This class is part of internal Insight implementation and + * may change with binary incompatibilities across versions. * * @since Insight 2.0 * @author Bindul Bhowmik */ public class ImplementationLookup <T> { - public T newInstance () { + /** + * The service class for which we lookup implementations + */ + private final Class<T> serviceClass; + + /** + * The component annotation on the service class + */ + private final Component serviceAnnotation; + + /** + * Queue of lookup strategies. The order is set in the {@link Component} + * documentation. + */ + private final Queue<LookupStrategy> lookupStrategies; + + /** + * Creates a new lookup class. The constructor has been kept private and + * instances should be created using the {@link #createLookup(Class)} + * method. Future implementations of this class may introduce caches for + * known lookups. + * + * @param serviceClass + * The service class which we are looking up instances for + */ + private ImplementationLookup (Class<T> serviceClass) { + this.serviceClass = serviceClass; + this.serviceAnnotation = this.serviceClass.getAnnotation(Component.class); + // Initialize the lookup strategies - order is important here. + lookupStrategies = new ArrayDeque<ImplementationLookup<T>.LookupStrategy>(3); + lookupStrategies.add(new SystemPropertyValueLookup()); + lookupStrategies.add(new ComponentPropertyValueLookup()); + lookupStrategies.add(new ServiceLoaderLookup()); } - public Class<T> getImplementationClass () { + /** + * Creates or looks up from cache an instance of the Implementation lookup + * + * @param serviceClass + * The service class which we are looking up instances for + * @return The implementation lookup + */ + public static <T> ImplementationLookup<T> createLookup (Class<T> serviceClass) { + return new ImplementationLookup<T>(serviceClass); + } + + /** + * Checks if the lookup may be able to check and return an implementation of + * the component. A value of <code>true</code> returned from this method + * guarantees that there is at least one <em>configured</em> implementation + * of the component available. However, due to lazy behavior of most lookup + * strategies, the next call to {@link #nextInstance()} may not return an + * implementation if the configured implementation cannot be instantiated. + * + * @return <code>true</code> if more implementations are configured + */ + public boolean hasMoreInstances() { + LookupStrategy nextLookup = getNextLookupStrategy(); + return (null != nextLookup); + } + + /** + * Returns the next configured implementation of the component that can be + * instantiated. If the component cannot be instantiated, returns + * <code>null</code>. + * + * @return The next configured implementation of the component. + */ + public T nextInstance () { + LookupStrategy nextLookup = getNextLookupStrategy(); + if (null != nextLookup) { + return nextLookup.nextInstance(); + } + return null; + } + + /** + * Returns the next lookup strategy from the lookup strategy queue if the + * strategy has at least one more configured implementation. The method also + * manages the lookup strategy queue removing elements from it when they + * have no more implementations configured. + * + * @return The next strategy with at least one implementation configured. + * <code>null</code> if no more strategies are available + */ + private LookupStrategy getNextLookupStrategy () { + while (!lookupStrategies.isEmpty()) { + LookupStrategy candidate = lookupStrategies.peek(); + if (!candidate.isInitialized()) { + candidate.initialize(); + } + if (candidate.hasMoreInstances()) { + return candidate; + } else { + lookupStrategies.poll(); + } + } + return null; + } + + /** + * A lookup strategy is an abstraction of the different mechanisms supported + * in Insight to look up component implementations. Each implementation of a + * LookupStrategy supports a single mechanism. + * + * @since Insight 2.0 + * @author Bindul Bhowmik + */ + private abstract class LookupStrategy { + /** + * Initializes the strategy. All strategies should be initialized before + * use. + * + * @see #isInitialized() + */ + abstract void initialize(); + + /** + * Returns <code>true</code> if there is at least one more configured + * instance. + * + * @return <code>true</code> if there are more instances configured + */ + abstract boolean hasMoreInstances(); + + /** + * Returns the next configured instance. If the configured + * implementation cannot be instantiated, it automatically falls over + * the next configured implementation until no more implementations are + * configured and returns <code>null</code> + * + * @return The next configured implementation that can be instantiated + * or <code>null</code> + */ + abstract T nextInstance(); + + /** + * Indicates if the strategy is initialized + * + * @return <code>true</code> if the strateg is initialized + */ + abstract boolean isInitialized(); + } + + /** + * Base implementation for the property based lookup strategies + * + * @since Insight 2.0 + * @author Bindul Bhowmik + */ + private abstract class PropertyValueLookup extends LookupStrategy { + abstract String getPropertyValue(); + Class<T> nextInstanceClass = null; + boolean isInitialized; + StringTokenizer tokenizer; + @Override + void initialize() { + isInitialized = true; + String propertyValue = getPropertyValue(); + if (null == propertyValue || propertyValue.trim().length() == 0) { + return; + } + tokenizer = new StringTokenizer(propertyValue, ","); + checkTokenizer(); + } + @Override + boolean hasMoreInstances() { + if (!isInitialized) { initialize(); } + return (null != nextInstanceClass); + } + @Override + T nextInstance() { + T instance = null; + while (null == instance && null != nextInstanceClass) { + try { + instance = nextInstanceClass.newInstance(); + } catch (InstantiationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + nextInstanceClass = null; + checkTokenizer(); + } + return instance; + } + @Override + boolean isInitialized() { + return isInitialized; + } + @SuppressWarnings("unchecked") + void checkTokenizer () { + if (null != tokenizer && tokenizer.hasMoreTokens()) { + String token = tokenizer.nextToken(); + try { + nextInstanceClass = (Class<T>) Class.forName(token.trim()); + } catch (ClassNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + if (null == nextInstanceClass) { + // There was an exception getting the instance + checkTokenizer(); + } + } + } + } + + /** + * Strategy implementation to lookup implementations from system properties + * + * @since Insight 2.0 + * @author Bindul Bhowmik + */ + private class SystemPropertyValueLookup extends PropertyValueLookup { + + /* (non-Javadoc) + * @see com.mindtree.techworks.insight.core.api.internal.ImplementationLookup.PropertyValueLookup#getPropertyValue() + */ + @Override + String getPropertyValue() { + String value = null; + if (null != serviceAnnotation) { + String property = serviceAnnotation.configLookupProperty(); + if (null != property && property.trim().length() > 0) { + value = System.getProperty(property); + } + } + return value; + } + } + + /** + * Strategy implementation to lookup implementations from + * components.properties file. + * + * @since Insight 2.0 + * @author Bindul Bhowmik + */ + private class ComponentPropertyValueLookup extends PropertyValueLookup { + + /* (non-Javadoc) + * @see com.mindtree.techworks.insight.core.api.internal.ImplementationLookup.PropertyValueLookup#getPropertyValue() + */ + @Override + String getPropertyValue() { + String value = null; + if (null != serviceAnnotation) { + String property = serviceAnnotation.configLookupProperty(); + if (null != property && property.trim().length() > 0) { + InputStream is = getClass().getResourceAsStream("/components.properties"); + if (null != is) { + Properties properties = new Properties(); + try { + properties.load(is); + value = properties.getProperty(property); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } finally { + try { + is.close(); + } catch (IOException e) { + // Ignore + } + } + } + } + } + + return value; + } + } + + /** + * Lookup strategy backed by Java Service Locator mechanism + * + * @since Insight 2.0 + * @author Bindul Bhowmik + */ + private class ServiceLoaderLookup extends LookupStrategy { + Iterator<T> instances; + boolean isInitialized; + + /* (non-Javadoc) + * @see com.mindtree.techworks.insight.core.api.internal.ImplementationLookup.Lookup#initialize() + */ + @Override + void initialize() { + isInitialized = true; + ServiceLoader<T> serviceLoader = (ServiceLoader<T>) ServiceLoader.load(serviceClass); + instances = serviceLoader.iterator(); + } + + /* (non-Javadoc) + * @see com.mindtree.techworks.insight.core.api.internal.ImplementationLookup.Lookup#hasMoreInstances() + */ + @Override + boolean hasMoreInstances() { + return instances.hasNext(); + } + + /* (non-Javadoc) + * @see com.mindtree.techworks.insight.core.api.internal.ImplementationLookup.Lookup#nextInstance() + */ + @Override + T nextInstance() { + return instances.next(); + } + + /* (non-Javadoc) + * @see com.mindtree.techworks.insight.core.api.internal.ImplementationLookup.Lookup#isInitialized() + */ + @Override + boolean isInitialized() { + return isInitialized; + } + } } Added: insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/api/internal/ImplementationLookupTest.java =================================================================== --- insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/api/internal/ImplementationLookupTest.java (rev 0) +++ insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/api/internal/ImplementationLookupTest.java 2011-08-18 07:49:42 UTC (rev 279) @@ -0,0 +1,89 @@ +/* + * $HeadURL$ + * + * Copyright (c) 2011 MindTree Ltd. + * + * This file is part of Insight. + * + * Insight is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) + * any later version. + * + * Insight is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along with + * Insight. If not, see <http://www.gnu.org/licenses/>. + */ +package com.mindtree.techworks.insight.core.api.internal; + +import static org.junit.Assert.*; + +import org.junit.BeforeClass; +import org.junit.Test; + +/** + * @todo add documentation + * + * @since Insight 2.0 + * @author Bindul Bhowmik + */ +public class ImplementationLookupTest { + + /** + * @throws java.lang.Exception + */ + @BeforeClass + public static void setUpBeforeClass() throws Exception { + System.setProperty("insight.test.component", "com.mindtree.techworks.insight.core.api.internal.ImplementationLookupTest$TestComponentImpl1, com.mindtree.techworks.insight.core.api.internal.ImplementationLookupTest$TestComponentImpl2, com.mindtree.techworks.insight.core.api.internal.ImplementationLookupTest$TestComponentImplX"); + } + + @Test + public void testAllLookups() { + ImplementationLookup<TestComponent> lookup = ImplementationLookup.createLookup(TestComponent.class); + assertTrue(lookup.hasMoreInstances()); + testComponent(lookup.nextInstance(), TestComponentImpl1.class); + assertTrue(lookup.hasMoreInstances()); + testComponent(lookup.nextInstance(), TestComponentImpl2.class); + assertTrue(lookup.hasMoreInstances()); + testComponent(lookup.nextInstance(), TestComponentImpl3.class); + assertTrue(lookup.hasMoreInstances()); + testComponent(lookup.nextInstance(), TestComponentImpl4.class); + assertTrue(lookup.hasMoreInstances()); + testComponent(lookup.nextInstance(), TestComponentImpl5.class); + assertTrue(lookup.hasMoreInstances()); + testComponent(lookup.nextInstance(), TestComponentImpl6.class); + } + + private void testComponent(TestComponent component, Class<? extends TestComponent> implClass) { + assertNotNull(component); + assertTrue(implClass.equals(component.getClass())); + } + + public static class TestComponentImpl1 extends TestComponent { + public TestComponentImpl1(){} + } + + public static class TestComponentImpl2 extends TestComponent { + public TestComponentImpl2(){} + } + + public static class TestComponentImpl3 extends TestComponent { + public TestComponentImpl3(){} + } + + public static class TestComponentImpl4 extends TestComponent { + public TestComponentImpl4(){} + } + + public static class TestComponentImpl5 extends TestComponent { + public TestComponentImpl5(){} + } + + public static class TestComponentImpl6 extends TestComponent { + public TestComponentImpl6(){} + } +} Property changes on: insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/api/internal/ImplementationLookupTest.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/api/internal/TestComponent.java =================================================================== --- insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/api/internal/TestComponent.java (rev 0) +++ insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/api/internal/TestComponent.java 2011-08-18 07:49:42 UTC (rev 279) @@ -0,0 +1,34 @@ +/* + * $HeadURL$ + * + * Copyright (c) 2011 MindTree Ltd. + * + * This file is part of Insight. + * + * Insight is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) + * any later version. + * + * Insight is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along with + * Insight. If not, see <http://www.gnu.org/licenses/>. + */ +package com.mindtree.techworks.insight.core.api.internal; + +import com.mindtree.techworks.insight.core.api.Component; + +/** + * A test component for component lookup + * + * @since Insight 2.0 + * @author Bindul Bhowmik + */ +@Component(configLookupProperty="insight.test.component") +public abstract class TestComponent { + +} Property changes on: insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/api/internal/TestComponent.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: insight-core/trunk/insight-core-api/src/test/resources/META-INF/services/com.mindtree.techworks.insight.core.api.internal.TestComponent =================================================================== --- insight-core/trunk/insight-core-api/src/test/resources/META-INF/services/com.mindtree.techworks.insight.core.api.internal.TestComponent (rev 0) +++ insight-core/trunk/insight-core-api/src/test/resources/META-INF/services/com.mindtree.techworks.insight.core.api.internal.TestComponent 2011-08-18 07:49:42 UTC (rev 279) @@ -0,0 +1,23 @@ +#--# +# $HeadURL$ +# +# Copyright (c) 2011 MindTree Ltd. +# +# This file is part of Insight. +# +# Insight is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) +# any later version. +# +# Insight is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Insight. If not, see <http://www.gnu.org/licenses/>. +#--# +com.mindtree.techworks.insight.core.api.internal.ImplementationLookupTest$TestComponentImpl5 +com.mindtree.techworks.insight.core.api.internal.ImplementationLookupTest$TestComponentImpl6 +com.mindtree.techworks.insight.core.api.internal.ImplementationLookupTest$TestComponentImplZ \ No newline at end of file Property changes on: insight-core/trunk/insight-core-api/src/test/resources/META-INF/services/com.mindtree.techworks.insight.core.api.internal.TestComponent ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + HeadURL Id Added: svn:eol-style + native Added: insight-core/trunk/insight-core-api/src/test/resources/components.properties =================================================================== --- insight-core/trunk/insight-core-api/src/test/resources/components.properties (rev 0) +++ insight-core/trunk/insight-core-api/src/test/resources/components.properties 2011-08-18 07:49:42 UTC (rev 279) @@ -0,0 +1,23 @@ +#--# +# $HeadURL$ +# +# Copyright (c) 2011 MindTree Ltd. +# +# This file is part of Insight. +# +# Insight is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) +# any later version. +# +# Insight is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Insight. If not, see <http://www.gnu.org/licenses/>. +#--# +insight.test.component=com.mindtree.techworks.insight.core.api.internal.ImplementationLookupTest$TestComponentImpl3,\ + com.mindtree.techworks.insight.core.api.internal.ImplementationLookupTest$TestComponentImpl4,\ + com.mindtree.techworks.insight.core.api.internal.ImplementationLookupTest$TestComponentImplY \ No newline at end of file Property changes on: insight-core/trunk/insight-core-api/src/test/resources/components.properties ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2011-08-16 06:14:43
|
Revision: 278 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=278&view=rev Author: bindul Date: 2011-08-16 06:14:37 +0000 (Tue, 16 Aug 2011) Log Message: ----------- An idea of a context Added Paths: ----------- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/Context.java insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/ContextFactory.java insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/ImplementationLookup.java Added: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/Context.java =================================================================== --- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/Context.java (rev 0) +++ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/Context.java 2011-08-16 06:14:37 UTC (rev 278) @@ -0,0 +1,40 @@ +/* + * $HeadURL$ + * + * Copyright (c) 2011 MindTree Ltd. + * + * This file is part of Insight. + * + * Insight is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) + * any later version. + * + * Insight is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along with + * Insight. If not, see <http://www.gnu.org/licenses/>. + */ +package com.mindtree.techworks.insight.core.api; + +/** + * A context defines the scope in which a <code>LogEventModel</code> lives and + * operations are performed on it. + * + * @todo add more documentation + * + * @since Insight 2.0 + * @author Bindul Bhowmik + */ +public interface Context { + + /** + * Returns an implementation specific ID of the context. + * + * @return The context ID + */ + public String getContextId (); +} Property changes on: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/Context.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + HeadURL Id Added: svn:eol-style + native Added: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/ContextFactory.java =================================================================== --- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/ContextFactory.java (rev 0) +++ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/ContextFactory.java 2011-08-16 06:14:37 UTC (rev 278) @@ -0,0 +1,85 @@ +/* + * $HeadURL$ + * + * Copyright (c) 2011 MindTree Ltd. + * + * This file is part of Insight. + * + * Insight is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) + * any later version. + * + * Insight is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along with + * Insight. If not, see <http://www.gnu.org/licenses/>. + */ +package com.mindtree.techworks.insight.core.api; + +import com.mindtree.techworks.insight.core.api.internal.ImplementationLookup; + +/** + * @todo add documentation + * + * @since Insight 2.0 + * @author Bindul Bhowmik + */ +public abstract class ContextFactory { + + /** + * Internal lock for lookups + */ + private static final Object lock = new Object(); + + /** + * The cached instance of the context factory + */ + private static ContextFactory contextFactory; + + /** + * Returns the instance of the factory. Factory lookup can be configured + * using multiple ways documented in the class documentation of the factory. + * + * @return The instance of the <code>ContextFactory</code> + */ + public static ContextFactory getInstance() { + + if (null == contextFactory) { + synchronized (lock) { + if (null == contextFactory) { + ImplementationLookup<ContextFactory> lookup = new ImplementationLookup<ContextFactory>(); + contextFactory = lookup.newInstance(); + } + } + } + + // TODO Add null check and throw an exception + return contextFactory; + } + + /** + * Creates a new context instance. Creation of new instances of context is + * implementation dependent. In certain framework implementations like + * Insight desktop, multiple contexts can exist, however in others like in + * a web container the implementation may optionally limit creating a single + * context per HTTP user session. + * + * @return A context object + */ + public abstract Context createNewContext (); + + /** + * Looks up a context by the context ID. The lookup may be scoped, specially + * in a web application setting, where lookups may only succeed within the + * same HTTP user session. Lookup may also fail if the context is already + * destroyed. + * + * @param contextId The ID of the context being looked up + * @return The <code>Context</code> object if available in scope + */ + public abstract Context getContext (String contextId); +} Property changes on: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/ContextFactory.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + HeadURL Id Added: svn:eol-style + native Added: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/ImplementationLookup.java =================================================================== --- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/ImplementationLookup.java (rev 0) +++ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/ImplementationLookup.java 2011-08-16 06:14:37 UTC (rev 278) @@ -0,0 +1,38 @@ +/* + * $HeadURL$ + * + * Copyright (c) 2011 MindTree Ltd. + * + * This file is part of Insight. + * + * Insight is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) + * any later version. + * + * Insight is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along with + * Insight. If not, see <http://www.gnu.org/licenses/>. + */ +package com.mindtree.techworks.insight.core.api.internal; + +/** + * @todo add documentation + * + * @since Insight 2.0 + * @author Bindul Bhowmik + */ +public class ImplementationLookup <T> { + + public T newInstance () { + + } + + public Class<T> getImplementationClass () { + + } +} Property changes on: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/ImplementationLookup.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + HeadURL Id Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2011-01-28 05:30:06
|
Revision: 277 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=277&view=rev Author: bindul Date: 2011-01-28 05:29:59 +0000 (Fri, 28 Jan 2011) Log Message: ----------- clearing Javadoc and maven-3 warnings Modified Paths: -------------- insight/insight-ui/branches/insight-ui-1.5.0/pom.xml insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/Controller.java insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/download/ProxyInfo.java insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/gui/Presentation.java insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/gui/action/MaintainPreferencesAction.java insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/gui/widgets/InsightToolbarButton.java insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/model/LogEventTableModel.java insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/pagination/PageImpl.java insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/pagination/PageSet.java insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/preferences/model/ListPreferenceAttribute.java insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/spi/LogNamespace.java insight/insight-ui/branches/insight-ui-1.5.0/src/main/javadoc/com/mindtree/techworks/insight/reporting/verifiers/package.html insight/insight-ui/branches/insight-ui-1.5.0/src/site/apt/index.apt parent/branches/parent-1.0.x/parent-1.0.1/pom.xml Modified: insight/insight-ui/branches/insight-ui-1.5.0/pom.xml =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/pom.xml 2011-01-27 10:15:02 UTC (rev 276) +++ insight/insight-ui/branches/insight-ui-1.5.0/pom.xml 2011-01-28 05:29:59 UTC (rev 277) @@ -23,6 +23,11 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>com.mindtree.techworks.insight</groupId> + <artifactId>parent</artifactId> + <version>1.0.2-SNAPSHOT</version> + </parent> <groupId>com.mindtree.techworks.insight</groupId> <artifactId>insight-ui</artifactId> <name>Insight</name> @@ -97,7 +102,7 @@ <id>bindul</id> <name>Bindul Bhowmik</name> <email>bindul_bhowmik at mindtree dot com</email> - <url>http://bindul.name/</url> + <url>http://blog.bindul.name/</url> <organization>MindTree Consulting Ltd.</organization> <organizationUrl>http://www.mindtree.com/</organizationUrl> <roles> @@ -337,13 +342,16 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> + <version>2.7</version> <configuration> <stylesheet>maven</stylesheet> + <quiet>true</quiet> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jxr-plugin</artifactId> + <version>2.2</version> <configuration> <linkJavadoc>true</linkJavadoc> <javadocDir>target/site/apidocs</javadocDir> Modified: insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/Controller.java =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/Controller.java 2011-01-27 10:15:02 UTC (rev 276) +++ insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/Controller.java 2011-01-28 05:29:59 UTC (rev 277) @@ -1,8 +1,8 @@ /* - * $HeadURL: $ - * $Date: $ - * $Revision: $ - * $Author: $ + * $HeadURL$ + * $Date$ + * $Revision$ + * $Author$ * * Copyright (c) 2005 MindTree Consulting Ltd. * @@ -321,7 +321,7 @@ /** * Call back method using which the controller will be notifed by * any LogEventModelMutators starts mutating the LogEventModel - * @see IMutatorListener#startMutating() + * @see com.mindtree.techworks.insight.model.IMutatorListener#startMutating(int) */ public void startMutating (int mutatorType) { this.mutatorType = mutatorType; Modified: insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/download/ProxyInfo.java =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/download/ProxyInfo.java 2011-01-27 10:15:02 UTC (rev 276) +++ insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/download/ProxyInfo.java 2011-01-28 05:29:59 UTC (rev 277) @@ -1,8 +1,8 @@ /* - * $HeadURL: $ - * $Date: $ - * $Revision: $ - * $Author: $ + * $HeadURL$ + * $Date$ + * $Revision$ + * $Author$ * * Copyright (c) 2005 MindTree Consulting Ltd. * @@ -30,8 +30,8 @@ * <code>ProxyInfo</code> is a data object that holds information about proxy * related parameters. * - * @author: balajiseshadri - * @version: + * @author balajiseshadri + * @version $Id:$ */ public class ProxyInfo { Modified: insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/gui/Presentation.java =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/gui/Presentation.java 2011-01-27 10:15:02 UTC (rev 276) +++ insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/gui/Presentation.java 2011-01-28 05:29:59 UTC (rev 277) @@ -1,8 +1,8 @@ /* - * $HeadURL: $ - * $Date: $ - * $Revision: $ - * $Author: $ + * $HeadURL$ + * $Date$ + * $Revision$ + * $Author$ * * Copyright (c) 2005 MindTree Consulting Ltd. * @@ -91,7 +91,7 @@ public void resetWidgets(); /** - * Informs this Presentation ot display the specified page and highlight the + * Informs this Presentation to display the specified page and highlight the * LogEvent with the specified sequence number. * @param page the IPage to display * @param eventSequenceNumber -1 or the valid sequence number of the LogEvent to be highlighted @@ -100,7 +100,7 @@ /** * Sets the status of the scroll lock for this Presentation. - * @param lock boolean true for scroll lock, false otherwise + * @param status boolean true for scroll lock, false otherwise */ public void setScrollLock(boolean status); Modified: insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/gui/action/MaintainPreferencesAction.java =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/gui/action/MaintainPreferencesAction.java 2011-01-27 10:15:02 UTC (rev 276) +++ insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/gui/action/MaintainPreferencesAction.java 2011-01-28 05:29:59 UTC (rev 277) @@ -1,8 +1,8 @@ /* - * $HeadURL: $ - * $Date: $ - * $Revision: $ - * $Author: $ + * $HeadURL$ + * $Date$ + * $Revision$ + * $Author$ * * Copyright (c) 2005 MindTree Consulting Ltd. * @@ -36,7 +36,7 @@ * * @author Regunath B * @version 1.0, 04/12/30 -* @see com.mindtree.techworks.insight.gui.PreferencesFrame +* @see com.mindtree.techworks.insight.gui.preferences.PreferencesFrame */ public class MaintainPreferencesAction extends AbstractAction { Modified: insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/gui/widgets/InsightToolbarButton.java =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/gui/widgets/InsightToolbarButton.java 2011-01-27 10:15:02 UTC (rev 276) +++ insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/gui/widgets/InsightToolbarButton.java 2011-01-28 05:29:59 UTC (rev 277) @@ -108,7 +108,7 @@ * Constructor for this class * @param type the valid type of this InsightToolbarButton as defined in IAction * @param name null or the name of the button - * @param image The image + * @param imageIcon The image * @param toolTip tooltip text for the JButton * @param actionListener ActionListener instance that processes ActionEvent generated on this JButton * @see IAction Modified: insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/model/LogEventTableModel.java =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/model/LogEventTableModel.java 2011-01-27 10:15:02 UTC (rev 276) +++ insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/model/LogEventTableModel.java 2011-01-28 05:29:59 UTC (rev 277) @@ -1,8 +1,8 @@ /* - * $HeadURL: $ - * $Date: $ - * $Revision: $ - * $Author: $ + * $HeadURL$ + * $Date$ + * $Revision$ + * $Author$ * * Copyright (c) 2005 MindTree Consulting Ltd. * @@ -111,7 +111,7 @@ /** * Constructor for this class - * @param int array containing valid column identifiers defined in this class + * @param columnList int array containing valid column identifiers defined in this class */ public LogEventTableModel(int[] columnList) { this.columnList = columnList; Modified: insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/pagination/PageImpl.java =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/pagination/PageImpl.java 2011-01-27 10:15:02 UTC (rev 276) +++ insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/pagination/PageImpl.java 2011-01-28 05:29:59 UTC (rev 277) @@ -1,8 +1,8 @@ /* - * $HeadURL: $ - * $Date: $ - * $Revision: $ - * $Author: $ + * $HeadURL$ + * $Date$ + * $Revision$ + * $Author$ * * Copyright (c) 2005 MindTree Consulting Ltd. * @@ -121,14 +121,16 @@ protected abstract void delete(); /** - * @return + * Returns the namespace of the page + * @return The source information for this page */ public String getPageNamespace() { return this.pageNamespace; } /** - * @return + * Sets the namespace for the page + * @return The namespace for the page */ public String getPageSetNamespace() { return this.pageSetNamespace; Modified: insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/pagination/PageSet.java =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/pagination/PageSet.java 2011-01-27 10:15:02 UTC (rev 276) +++ insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/pagination/PageSet.java 2011-01-28 05:29:59 UTC (rev 277) @@ -1,8 +1,8 @@ /* - * $HeadURL: $ - * $Date: $ - * $Revision: $ - * $Author: $ + * $HeadURL$ + * $Date$ + * $Revision$ + * $Author$ * * Copyright (c) 2005 MindTree Consulting Ltd. * @@ -311,7 +311,7 @@ /** * Call back method using which the controller will be notifed by * any LogEventModelMutators starts mutating the LogEventModel - * @see IMutatorListener#startMutating() + * @see IMutatorListener#startMutating(int) */ public void startMutating (int mutatorType) { this.mutatorType = mutatorType; Modified: insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/preferences/model/ListPreferenceAttribute.java =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/preferences/model/ListPreferenceAttribute.java 2011-01-27 10:15:02 UTC (rev 276) +++ insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/preferences/model/ListPreferenceAttribute.java 2011-01-28 05:29:59 UTC (rev 277) @@ -1,8 +1,8 @@ /* - * $HeadURL: $ - * $Date: $ - * $Revision: $ - * $Author: $ + * $HeadURL$ + * $Date$ + * $Revision$ + * $Author$ * * Copyright (c) 2005 MindTree Consulting Ltd. * @@ -55,8 +55,7 @@ * @param isPersistant Whether the value will be saved to the store * @param isUserModifiable Is the preference modifiable * @param parent The parent Preference of this attribute - * @see PreferenceAttribute#PreferenceAttribute(PreferenceAttributeType, - * String, String, boolean, boolean, Preference) PreferenceAttribtue + * @see PreferenceAttribute#PreferenceAttribute(PreferenceAttributeType, String, String, boolean, boolean, boolean, Preference) PreferenceAttribtue */ public ListPreferenceAttribute (String id, String value, boolean isEncrypted, boolean isPersistant, boolean isUserModifiable, Preference parent) { Modified: insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/spi/LogNamespace.java =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/spi/LogNamespace.java 2011-01-27 10:15:02 UTC (rev 276) +++ insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/spi/LogNamespace.java 2011-01-28 05:29:59 UTC (rev 277) @@ -1,8 +1,8 @@ /* - * $HeadURL: $ - * $Date: $ - * $Revision: $ - * $Author: $ + * $HeadURL$ + * $Date$ + * $Revision$ + * $Author$ * * Copyright (c) 2005 MindTree Consulting Ltd. * @@ -89,7 +89,7 @@ /** * Overriden superclass method - * @param the namespace that needs to be evaluated for equals + * @param namespace the namespace that needs to be evaluated for equals */ public boolean equals(Object namespace) { if (this == namespace) { Modified: insight/insight-ui/branches/insight-ui-1.5.0/src/main/javadoc/com/mindtree/techworks/insight/reporting/verifiers/package.html =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/src/main/javadoc/com/mindtree/techworks/insight/reporting/verifiers/package.html 2011-01-27 10:15:02 UTC (rev 276) +++ insight/insight-ui/branches/insight-ui-1.5.0/src/main/javadoc/com/mindtree/techworks/insight/reporting/verifiers/package.html 2011-01-28 05:29:59 UTC (rev 277) @@ -130,7 +130,7 @@ <p> <code>Verifiers</code> are meant to be Serializable (not <code> java.io.Serializable</code>), so that they can be stored and invoked - later. Like {@link com.insight.filter.criteria.FilterCriteria + later. Like {@link com.mindtree.techworks.insight.filter.criteria.FilterCriteria FilterCriteria} the serialization format used for <code>Verifiers</code> is XML. The details of the format are described in the class <code>VerifierDeserializer</code>. Modified: insight/insight-ui/branches/insight-ui-1.5.0/src/site/apt/index.apt =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/src/site/apt/index.apt 2011-01-27 10:15:02 UTC (rev 276) +++ insight/insight-ui/branches/insight-ui-1.5.0/src/site/apt/index.apt 2011-01-28 05:29:59 UTC (rev 277) @@ -39,9 +39,9 @@ Support and Reporting Defects Insight UI Support is available via public mailing lists. The available - mailing lists for the module is detailed on the {{{mail-lists.html}Mail lists}} + mailing lists for the module is detailed on the {{{./mail-lists.html}Mail lists}} page. For reporting a defect on Insight, please use the Soruce Forge tracker - system, the details of which are available in the {{{issue-tracking.html}Issue Tracking}} + system, the details of which are available in the {{{./issue-tracking.html}Issue Tracking}} page. \ No newline at end of file Modified: parent/branches/parent-1.0.x/parent-1.0.1/pom.xml =================================================================== --- parent/branches/parent-1.0.x/parent-1.0.1/pom.xml 2011-01-27 10:15:02 UTC (rev 276) +++ parent/branches/parent-1.0.x/parent-1.0.1/pom.xml 2011-01-28 05:29:59 UTC (rev 277) @@ -25,7 +25,7 @@ <artifactId>parent</artifactId> <packaging>pom</packaging> <name>MindTree Insight Parent</name> - <version>1.0.1</version> + <version>1.0.2-SNAPSHOT</version> <description>Insight log analyzer tool project parent</description> <url>http://mindtreeinsight.sourceforge.net/</url> <issueManagement> @@ -141,63 +141,92 @@ <url>http://www.mindtree.com/</url> </organization> <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>buildnumber-maven-plugin</artifactId> + <version>1.0-beta-4</version> + <executions> + <execution> + <phase>validate</phase> + <goals> + <goal>create</goal> + </goals> + </execution> + </executions> + <configuration> + <doCheck>false</doCheck> + <doUpdate>false</doUpdate> + <format>{0,date,yyyyMMdd-HHmmssZ}</format> + <items> + <item>timestamp</item> + </items> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <version>2.4.3</version> + <configuration> + <encoding>UTF-8</encoding> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-release-plugin</artifactId> + <version>2.1</version> + <configuration> + <autoVersionSubmodules>true</autoVersionSubmodules> + <commitByProject>true</commitByProject> + <releaseProfiles>release</releaseProfiles> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>2.3.2</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>2.7</version> + <configuration> + <quiet>true</quiet> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <version>2.1.2</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>2.3.1</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jxr-plugin</artifactId> + <version>2.2</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-project-info-reports-plugin</artifactId> + <version>2.3.1</version> + </plugin> + </plugins> + </pluginManagement> <plugins> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>buildnumber-maven-plugin</artifactId> - <executions> - <execution> - <phase>validate</phase> - <goals> - <goal>create</goal> - </goals> - </execution> - </executions> - <configuration> - <doCheck>false</doCheck> - <doUpdate>false</doUpdate> - <format>{0,date,yyyyMMdd-HHmmssZ}</format> - <items> - <item>timestamp</item> - </items> - </configuration> - </plugin> - <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-resources-plugin</artifactId> - <configuration> - <encoding>UTF-8</encoding> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-site-plugin</artifactId> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>site</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-scm-plugin</artifactId> + <version>1.4</version> <configuration> <tag>${project.artifactId}-${project.version}</tag> <connectionType>developerConnection</connectionType> </configuration> </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-release-plugin</artifactId> - <configuration> - <autoVersionSubmodules>true</autoVersionSubmodules> - <commitByProject>true</commitByProject> - <releaseProfiles>release</releaseProfiles> - </configuration> - </plugin> </plugins> <sourceDirectory>src/main/java</sourceDirectory> <testSourceDirectory>src/test/java</testSourceDirectory> @@ -384,6 +413,50 @@ </plugins> </build> </profile> + + <!-- Maven3 requires the new site plug-in and configuration --> + <profile> + <id>maven-3</id> + <activation> + <file> + <!-- The basedir expression is only recognized by Maven 3.x (see MNG-2363) --> + <exists>${basedir}</exists> + </file> + </activation> + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <version>3.0-beta-3</version> + <configuration> + <generateReports>true</generateReports> + </configuration> + </plugin> + </plugins> + </pluginManagement> + </build> + </profile> + <profile> + <id>maven-2</id> + <activation> + <file> + <missing>${basedir}</missing> + </file> + </activation> + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <version>2.2</version> + </plugin> + </plugins> + </pluginManagement> + </build> + </profile> </profiles> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2011-01-27 10:15:08
|
Revision: 276 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=276&view=rev Author: bindul Date: 2011-01-27 10:15:02 +0000 (Thu, 27 Jan 2011) Log Message: ----------- Creating parent 1.0.x maintenance branch Added Paths: ----------- parent/branches/parent-1.0.x/parent-1.0.1/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2011-01-27 10:15:00
|
Revision: 275 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=275&view=rev Author: bindul Date: 2011-01-27 10:14:54 +0000 (Thu, 27 Jan 2011) Log Message: ----------- Creating parent 1.0.x maintenance branch Added Paths: ----------- parent/branches/parent-1.0.x/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2011-01-26 09:28:26
|
Revision: 274 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=274&view=rev Author: bindul Date: 2011-01-26 09:28:20 +0000 (Wed, 26 Jan 2011) Log Message: ----------- POM fixes to build on OS X Modified Paths: -------------- insight/insight-ui/branches/insight-ui-1.5.0/pom.xml insight/insight-ui/branches/insight-ui-1.5.0/src/assembly/bin.xml Modified: insight/insight-ui/branches/insight-ui-1.5.0/pom.xml =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/pom.xml 2011-01-26 07:19:46 UTC (rev 273) +++ insight/insight-ui/branches/insight-ui-1.5.0/pom.xml 2011-01-26 09:28:20 UTC (rev 274) @@ -288,7 +288,7 @@ <plugin> <groupId>com.mindtree.techworks.insight.releng</groupId> <artifactId>maven-nsis-plugin</artifactId> - <version>0.1.0</version> + <version>0.2.0-M1</version> <executions> <execution> <phase>package</phase> @@ -413,6 +413,9 @@ <scope>test</scope> </dependency> </dependencies> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> <distributionManagement> <repository> <id>insight.release.repo</id> Modified: insight/insight-ui/branches/insight-ui-1.5.0/src/assembly/bin.xml =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/src/assembly/bin.xml 2011-01-26 07:19:46 UTC (rev 273) +++ insight/insight-ui/branches/insight-ui-1.5.0/src/assembly/bin.xml 2011-01-26 09:28:20 UTC (rev 274) @@ -76,14 +76,14 @@ <!-- The Windows binary scripts --> <file> <outputDirectory>/</outputDirectory> - <source>/src/main/scripts/insight.bat</source> + <source>src/main/scripts/insight.bat</source> <lineEnding>dos</lineEnding> <filtered>true</filtered> </file> <!-- The Linux binary scripts --> <file> <outputDirectory>/</outputDirectory> - <source>/src/main/scripts/insight.sh</source> + <source>src/main/scripts/insight.sh</source> <fileMode>755</fileMode> <filtered>true</filtered> <lineEnding>unix</lineEnding> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2011-01-26 07:19:52
|
Revision: 273 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=273&view=rev Author: bindul Date: 2011-01-26 07:19:46 +0000 (Wed, 26 Jan 2011) Log Message: ----------- Deleting old convention of storing .project and .classpath Removed Paths: ------------- releng/maven-nsis-plugin/branches/maven-nsis-plugin-0.2.0/.classpath releng/maven-nsis-plugin/branches/maven-nsis-plugin-0.2.0/.project Deleted: releng/maven-nsis-plugin/branches/maven-nsis-plugin-0.2.0/.classpath =================================================================== --- releng/maven-nsis-plugin/branches/maven-nsis-plugin-0.2.0/.classpath 2011-01-26 07:05:32 UTC (rev 272) +++ releng/maven-nsis-plugin/branches/maven-nsis-plugin-0.2.0/.classpath 2011-01-26 07:19:46 UTC (rev 273) @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry including="**/*.java" kind="src" path="src/main/java"/> - <classpathentry kind="src" path="src/main/resources"/> - <classpathentry kind="src" path="target/generated-sources/modello"/> - <classpathentry kind="con" path="org.devzuz.q.maven.jdt.core.mavenClasspathContainer"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/> - <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> - <classpathentry kind="output" path="target/classes"/> -</classpath> Deleted: releng/maven-nsis-plugin/branches/maven-nsis-plugin-0.2.0/.project =================================================================== --- releng/maven-nsis-plugin/branches/maven-nsis-plugin-0.2.0/.project 2011-01-26 07:05:32 UTC (rev 272) +++ releng/maven-nsis-plugin/branches/maven-nsis-plugin-0.2.0/.project 2011-01-26 07:19:46 UTC (rev 273) @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>maven-nsis-plugin</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.maven.ide.eclipse.maven2Builder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.devzuz.q.maven.jdt.core.mavenIncrementalBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.devzuz.q.maven.jdt.core.mavenNature</nature> - <nature>org.maven.ide.eclipse.maven2Nature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2011-01-26 07:05:39
|
Revision: 272 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=272&view=rev Author: bindul Date: 2011-01-26 07:05:32 +0000 (Wed, 26 Jan 2011) Log Message: ----------- Preparing for 1.5.3 Modified Paths: -------------- insight/insight-ui/branches/insight-ui-1.5.0/README.txt Modified: insight/insight-ui/branches/insight-ui-1.5.0/README.txt =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/README.txt 2011-01-26 05:42:46 UTC (rev 271) +++ insight/insight-ui/branches/insight-ui-1.5.0/README.txt 2011-01-26 07:05:32 UTC (rev 272) @@ -24,6 +24,31 @@ ******************************************************************************** -------------------------------------------------------------------------------- +RELEASE NOTES FOR RELEASE 1.5.3 +-------------------------------------------------------------------------------- +Minor bugfix release off 1.5.2. + +Bugs can be accessed using the URL: +https://sourceforge.net/tracker/index.php?func=detail&group_id=212019&atid=1020092&aid={BUG_ID} +and Feature Requests can be accessed using the URL: +https://sourceforge.net/tracker/index.php?func=detail&group_id=212019&atid=1020095&aid={FRQ_ID} + +Changes since the last release: +- - - - - - - - - - - - - - - - +None + +Bug Fixes: +- - - - - +3165153: HTTP download of log files fails +3165687: [2491873] Erroneous "log pattern doesnot match data" +2869448: Maven not installs missing jars + [Duplicate] 2865508: maven not building jar & not install missing jars + +Feature Requests Implemented: +- - - - - - - - - - - - - - - +None + +-------------------------------------------------------------------------------- RELEASE NOTES FOR RELEASE 1.5.2 -------------------------------------------------------------------------------- Minor bugfix release off 1.5.1. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 271 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=271&view=rev Author: bindul Date: 2011-01-26 05:42:46 +0000 (Wed, 26 Jan 2011) Log Message: ----------- 3165687: Handled timezone formats as part of the date format Modified Paths: -------------- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/receiver/LogInterpreter.java Modified: insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/receiver/LogInterpreter.java =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/receiver/LogInterpreter.java 2011-01-25 16:39:25 UTC (rev 270) +++ insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/receiver/LogInterpreter.java 2011-01-26 05:42:46 UTC (rev 271) @@ -1,8 +1,8 @@ /* - * $HeadURL: $ - * $Date: $ - * $Revision: $ - * $Author: $ + * $HeadURL$ + * $Date$ + * $Revision$ + * $Author$ * * Copyright (c) 2005 MindTree Consulting Ltd. * @@ -173,7 +173,11 @@ /** * Date format */ - private static final String VALID_DATEFORMAT_CHAR_PATTERN = "[GyMwWDdFEaHkKhmsSzZ]"; + // Defect 2491873 the regular replacement of timezones with \w fails to + // recognize the data due to the presence of signs (like -7000 for Z in MST) + private static final String VALID_DATEFORMAT_CHAR_PATTERN = "[GyMwWDdFEaHkKhmsS]"; + + private static final String VALID_DATEFORMAT_CHAR_PATTERN_TZ = "[zZ]"; /** * Property start @@ -560,8 +564,10 @@ String timestampFormat = receiverFormat.getTimeStampPattern() == null ? TIMESTAMP_FORMAT : receiverFormat.getTimeStampPattern(); - return util.substitute("s/" + VALID_DATEFORMAT_CHAR_PATTERN + String convertedPattern = util.substitute("s/" + VALID_DATEFORMAT_CHAR_PATTERN + "/\\\\w/g", timestampFormat); + convertedPattern = util.substitute("s/" + VALID_DATEFORMAT_CHAR_PATTERN_TZ + "/./g", convertedPattern); + return convertedPattern; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2011-01-25 16:39:31
|
Revision: 270 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=270&view=rev Author: bindul Date: 2011-01-25 16:39:25 +0000 (Tue, 25 Jan 2011) Log Message: ----------- 3165153: Properly handle HTTP filesets Modified Paths: -------------- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/download/DownloadProvider.java insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/download/HTTPRemoteClient.java Modified: insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/download/DownloadProvider.java =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/download/DownloadProvider.java 2011-01-25 16:38:35 UTC (rev 269) +++ insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/download/DownloadProvider.java 2011-01-25 16:39:25 UTC (rev 270) @@ -1,8 +1,8 @@ /* - * $HeadURL: $ - * $Date: $ - * $Revision: $ - * $Author: $ + * $HeadURL$ + * $Date$ + * $Revision$ + * $Author$ * * Copyright (c) 2005 MindTree Consulting Ltd. * @@ -200,7 +200,7 @@ break; case Fileset.HTTP_FILESET: try { - nodeId = new URL((String)uniqueFiles.get(count)).getHost(); + nodeId = new URL((String)files.get(count)).getHost(); } catch(MalformedURLException mfe) { // consume this } Modified: insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/download/HTTPRemoteClient.java =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/download/HTTPRemoteClient.java 2011-01-25 16:38:35 UTC (rev 269) +++ insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/download/HTTPRemoteClient.java 2011-01-25 16:39:25 UTC (rev 270) @@ -1,8 +1,8 @@ /* - * $HeadURL: $ - * $Date: $ - * $Revision: $ - * $Author: $ + * $HeadURL$ + * $Date$ + * $Revision$ + * $Author$ * * Copyright (c) 2005 MindTree Consulting Ltd. * @@ -30,6 +30,7 @@ import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; +import java.net.PasswordAuthentication; import java.net.URL; import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler; @@ -38,6 +39,7 @@ import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.NTCredentials; +import org.apache.commons.httpclient.UsernamePasswordCredentials; import org.apache.commons.httpclient.auth.AuthScope; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.params.HttpMethodParams; @@ -221,13 +223,13 @@ hostConfiguration.setProxy(httpProxyInfo.getHost(), httpProxyInfo.getPort()); - if (proxyInfo.isAuthenticationRequired()) { + if (proxyInfo.isAuthenticationRequired() && null != proxyInfo.getPasswordInformation()) { - NTCredentials credentials = getNTCredentials(proxyInfo - .getPasswordInformation().getUserName(), + PasswordAuthentication passwordAuth = proxyInfo.getPasswordInformation(); + UsernamePasswordCredentials credentials = getCredentials( + passwordAuth.getUserName(), new StringBuffer().append( - proxyInfo.getPasswordInformation() - .getPassword()).toString(), + passwordAuth.getPassword()).toString(), httpProxyInfo.getHost()); // Set the proxy credentials @@ -256,7 +258,7 @@ if (fileset.isAuthenticationRequired()) { try { URL theURL = new URL(url); - NTCredentials credentials = getNTCredentials(fileset + UsernamePasswordCredentials credentials = getCredentials(fileset .getUserName(), fileset.getPassword(), theURL.getHost()); AuthScope authScope = new AuthScope(theURL.getHost(), (theURL .getPort() == -1) ? theURL.getDefaultPort() : theURL @@ -279,7 +281,7 @@ * @return A {@link NTCredentials NTCredentials}object containing the * information. */ - private NTCredentials getNTCredentials (String user, String password, + private UsernamePasswordCredentials getCredentials (String user, String password, String host) { String domain = null; @@ -293,7 +295,11 @@ userName = userName.substring(userName.indexOf('\\') + 1); } - return new NTCredentials(userName, password, host, domain); + if (null == domain) { + return new UsernamePasswordCredentials(user, password); + } else { + return new NTCredentials(userName, password, host, domain); + } } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2011-01-25 16:38:41
|
Revision: 269 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=269&view=rev Author: bindul Date: 2011-01-25 16:38:35 +0000 (Tue, 25 Jan 2011) Log Message: ----------- Fix to handle command line insight home setting Modified Paths: -------------- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/Insight.java Modified: insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/Insight.java =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/Insight.java 2011-01-25 16:37:44 UTC (rev 268) +++ insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/Insight.java 2011-01-25 16:38:35 UTC (rev 269) @@ -1,8 +1,8 @@ /* - * $HeadURL: $ - * $Date: $ - * $Revision: $ - * $Author: $ + * $HeadURL$ + * $Date$ + * $Revision$ + * $Author$ * * Copyright (c) 2005 MindTree Consulting Ltd. * @@ -183,6 +183,9 @@ System.exit(1); } + // Finally make sure we set Insight Home correctly + System.setProperty(InsightConstants.INSIGHT_HOME, insightHome); + } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2011-01-25 16:37:50
|
Revision: 268 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=268&view=rev Author: bindul Date: 2011-01-25 16:37:44 +0000 (Tue, 25 Jan 2011) Log Message: ----------- POM fix to build with Maven 3 Modified Paths: -------------- insight/insight-ui/branches/insight-ui-1.5.0/pom.xml Modified: insight/insight-ui/branches/insight-ui-1.5.0/pom.xml =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/pom.xml 2011-01-25 10:56:28 UTC (rev 267) +++ insight/insight-ui/branches/insight-ui-1.5.0/pom.xml 2011-01-25 16:37:44 UTC (rev 268) @@ -320,14 +320,12 @@ <testSourceDirectory>src/main/test</testSourceDirectory> <resources> <resource> - <targetPath>/</targetPath> <filtering>true</filtering> <directory>src/main/resources</directory> </resource> </resources> <testResources> <testResource> - <targetPath>/</targetPath> <filtering>true</filtering> <directory>src/test/resources</directory> </testResource> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2011-01-25 10:56:34
|
Revision: 267 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=267&view=rev Author: bindul Date: 2011-01-25 10:56:28 +0000 (Tue, 25 Jan 2011) Log Message: ----------- Deleting old convention of storing .project and .classpath Property Changed: ---------------- insight/insight-ui/branches/insight-ui-1.5.0/ Property changes on: insight/insight-ui/branches/insight-ui-1.5.0 ___________________________________________________________________ Modified: svn:ignore - .settings bin config target + .settings bin config target .classpath .project This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2011-01-25 10:53:27
|
Revision: 266 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=266&view=rev Author: bindul Date: 2011-01-25 10:53:21 +0000 (Tue, 25 Jan 2011) Log Message: ----------- Deleting old convention of storing .project and .classpath Removed Paths: ------------- insight/insight-ui/branches/insight-ui-1.5.0/.classpath insight/insight-ui/branches/insight-ui-1.5.0/.project Deleted: insight/insight-ui/branches/insight-ui-1.5.0/.classpath =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/.classpath 2011-01-25 10:12:06 UTC (rev 265) +++ insight/insight-ui/branches/insight-ui-1.5.0/.classpath 2011-01-25 10:53:21 UTC (rev 266) @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src/main/java"/> - <classpathentry kind="src" path="src/test/java"/> - <classpathentry kind="src" path="src/test/resources"/> - <classpathentry kind="src" path="src/main/resources"/> - <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/> - <classpathentry kind="output" path="bin"/> -</classpath> Deleted: insight/insight-ui/branches/insight-ui-1.5.0/.project =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/.project 2011-01-25 10:12:06 UTC (rev 265) +++ insight/insight-ui/branches/insight-ui-1.5.0/.project 2011-01-25 10:53:21 UTC (rev 266) @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>insight-ui</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.maven.ide.eclipse.maven2Builder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - <nature>org.maven.ide.eclipse.maven2Nature</nature> - </natures> -</projectDescription> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2011-01-25 10:12:12
|
Revision: 265 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=265&view=rev Author: bindul Date: 2011-01-25 10:12:06 +0000 (Tue, 25 Jan 2011) Log Message: ----------- Setting up for 1.5.3 release - need to fix HTTP download Modified Paths: -------------- insight/insight-ui/branches/insight-ui-1.5.0/.classpath insight/insight-ui/branches/insight-ui-1.5.0/pom.xml Property Changed: ---------------- insight/insight-ui/branches/insight-ui-1.5.0/ Property changes on: insight/insight-ui/branches/insight-ui-1.5.0 ___________________________________________________________________ Modified: svn:ignore - .settings bin config + .settings bin config target Modified: insight/insight-ui/branches/insight-ui-1.5.0/.classpath =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/.classpath 2011-01-07 06:08:46 UTC (rev 264) +++ insight/insight-ui/branches/insight-ui-1.5.0/.classpath 2011-01-25 10:12:06 UTC (rev 265) @@ -4,7 +4,7 @@ <classpathentry kind="src" path="src/test/java"/> <classpathentry kind="src" path="src/test/resources"/> <classpathentry kind="src" path="src/main/resources"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/j2sdk1.4.2_16"/> <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/> <classpathentry kind="output" path="bin"/> </classpath> Modified: insight/insight-ui/branches/insight-ui-1.5.0/pom.xml =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/pom.xml 2011-01-07 06:08:46 UTC (rev 264) +++ insight/insight-ui/branches/insight-ui-1.5.0/pom.xml 2011-01-25 10:12:06 UTC (rev 265) @@ -393,6 +393,20 @@ <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.3alpha9-SNAPSHOT</version> + <exclusions> + <exclusion> + <groupId>com.sun.jdmk</groupId> + <artifactId>jmxtools</artifactId> + </exclusion> + <exclusion> + <groupId>javax.jms</groupId> + <artifactId>jms</artifactId> + </exclusion> + <exclusion> + <groupId>com.sun.jmx</groupId> + <artifactId>jmxri</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>junit</groupId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2011-01-07 06:08:52
|
Revision: 264 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=264&view=rev Author: bindul Date: 2011-01-07 06:08:46 +0000 (Fri, 07 Jan 2011) Log Message: ----------- added svn ignores Property Changed: ---------------- parent/trunk/ Property changes on: parent/trunk ___________________________________________________________________ Modified: svn:ignore - target + target .project .settings This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2011-01-07 06:04:20
|
Revision: 263 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=263&view=rev Author: bindul Date: 2011-01-07 06:04:13 +0000 (Fri, 07 Jan 2011) Log Message: ----------- Add svn ignore Property Changed: ---------------- insight-core/trunk/ Property changes on: insight-core/trunk ___________________________________________________________________ Modified: svn:ignore - .project + .project .settings target This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2011-01-07 05:57:49
|
Revision: 262 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=262&view=rev Author: bindul Date: 2011-01-07 05:57:42 +0000 (Fri, 07 Jan 2011) Log Message: ----------- Insight 2... Added Paths: ----------- insight-core/trunk/insight-core-api/src/site/apt/i18n.apt insight-core/trunk/insight-core-api/src/site/apt/index.apt Added: insight-core/trunk/insight-core-api/src/site/apt/i18n.apt =================================================================== --- insight-core/trunk/insight-core-api/src/site/apt/i18n.apt (rev 0) +++ insight-core/trunk/insight-core-api/src/site/apt/i18n.apt 2011-01-07 05:57:42 UTC (rev 262) @@ -0,0 +1,28 @@ + ------ + Insight Core API Localization + ------ + Bindul Bhowmik + ------ + $Date$ + +Localized Resources + + In Insight Core API, the following resources are localized. + +* API Messages + + The API messages and exceptions are localized using the + <<<com.mindtree.techworks.insight.core.api.api-messages>>> resource bundle. + The core implementation uses a property file resource bundle. The resource + keys are: + +*-----------------------------------+---------------------------------------------------------------+ +|| Key || English Message | +*-----------------------------------+---------------------------------------------------------------+ +| model.exception.loglevelnmnull | Log Level name cannot be null | +*-----------------------------------+---------------------------------------------------------------+ +| model.exception.duplicateglobal | Attempt to register a global log level with non-unique log level name: {0} | +*-----------------------------------+---------------------------------------------------------------+ +| model.exception.nullstore | Store cannot be null | +*-----------------------------------+---------------------------------------------------------------+ + Property changes on: insight-core/trunk/insight-core-api/src/site/apt/i18n.apt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: insight-core/trunk/insight-core-api/src/site/apt/index.apt =================================================================== --- insight-core/trunk/insight-core-api/src/site/apt/index.apt (rev 0) +++ insight-core/trunk/insight-core-api/src/site/apt/index.apt 2011-01-07 05:57:42 UTC (rev 262) @@ -0,0 +1,31 @@ + ------ + Insight Core API + ------ + Bindul Bhowmik + ------ + $Date$ + +Insight Core API + + Insight Core API holds the model and core API components for Insight. Implementation + of the features in Insight Core API is provided in the {{{../insight-core-impl} Core Implementation}} + and other related projects. The basic idea is that all Insight interfaces + and plug-ins will only need the Core API as a compiler dependency and + implementations and features can be plugged in and swapped at runtime. + +API Components + + The Core API is organized with the following components: + +* Log Model + + The log model holds the representation of a log event and log events from + a log source with all associated data. Most operations in Insight revolve + around manipulating and operating on the log model. + +Localization + + Insight 2.0 has been designed from ground up with localization in mind. The + localization support however is a little scattered and is dependent on the + individual Insight component. For the Insight Core API, localization details + are documented {{{i18n.html} here}}. \ No newline at end of file Property changes on: insight-core/trunk/insight-core-api/src/site/apt/index.apt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2011-01-07 05:52:45
|
Revision: 261 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=261&view=rev Author: bindul Date: 2011-01-07 05:52:38 +0000 (Fri, 07 Jan 2011) Log Message: ----------- Insight 2... Modified Paths: -------------- insight-core/trunk/insight-core-api/pom.xml insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogEvent.java insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogEventModel.java insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogLevel.java insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogLevelStore.java insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/insight/core/api/api-messages.properties insight-core/trunk/pom.xml parent/trunk/pom.xml Added Paths: ----------- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/APIMessages.java Modified: insight-core/trunk/insight-core-api/pom.xml =================================================================== --- insight-core/trunk/insight-core-api/pom.xml 2010-11-05 18:11:53 UTC (rev 260) +++ insight-core/trunk/insight-core-api/pom.xml 2011-01-07 05:52:38 UTC (rev 261) @@ -40,7 +40,7 @@ </dependencies> <properties> <insight.project.type-specification>true</insight.project.type-specification> - <insight.project.type-implementation.spectitle>${pom.name}</insight.project.type-implementation.spectitle> - <insight.project.type-implementation.specversion>${pom.version}</insight.project.type-implementation.specversion> + <insight.project.type-implementation.spectitle>${project.name}</insight.project.type-implementation.spectitle> + <insight.project.type-implementation.specversion>${project.version}</insight.project.type-implementation.specversion> </properties> </project> \ No newline at end of file Added: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/APIMessages.java =================================================================== --- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/APIMessages.java (rev 0) +++ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/APIMessages.java 2011-01-07 05:52:38 UTC (rev 261) @@ -0,0 +1,93 @@ +/* + * $HeadURL$ + * + * Copyright (c) 2010 MindTree Ltd. + * + * This file is part of Insight. + * + * Insight is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) + * any later version. + * + * Insight is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along with + * Insight. If not, see <http://www.gnu.org/licenses/>. + */ +package com.mindtree.techworks.insight.core.api.internal; + +import java.text.MessageFormat; +import java.util.MissingResourceException; +import java.util.ResourceBundle; + +/** + * Resource accessor for API messages. This class is not intended to be used + * outside the Insight Core API. It derives all its messages from the + * <code>com.mindtree.techworks.insight.core.api.api-messages</code> resource + * bundle. + * + * @since 2.0 + * @author Bindul Bhowmik + */ +public class APIMessages { + + /** + * The resource bundle name + */ + private static final String BUNDLE_NAME = "com.mindtree.techworks.insight.core.api.api-messages"; //$NON-NLS-1$ + + /** + * The resource bundle + */ + private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle + .getBundle(BUNDLE_NAME); + + private APIMessages() {} + + /** + * Returns the messages for the keys + * + * @param key + * The key + * @return The message for the key or the key itself + */ + public static String getString(String key) { + try { + return RESOURCE_BUNDLE.getString(key); + } catch (MissingResourceException e) { + return '!' + key + '!'; + } + } + + /** + * Returns the messages for the keys, filling in required parameters + * + * @param key + * The key + * @param params + * The parameters to be filled in the message + * @return The message for the key or the key itself + */ + public static String getString(String key, String... params) { + try { + String message = RESOURCE_BUNDLE.getString(key); + if (null != message && null != params) { + message = MessageFormat.format(message, (Object[]) params); + } + return message; + } catch (MissingResourceException e) { + StringBuilder missingResource = new StringBuilder(); + missingResource.append('!').append(key).append('!'); + if (null != params) { + for (String param : params) { + missingResource.append('~').append(param).append('~'); + } + } + return missingResource.toString(); + } + } +} Property changes on: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/internal/APIMessages.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Modified: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogEvent.java =================================================================== --- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogEvent.java 2010-11-05 18:11:53 UTC (rev 260) +++ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogEvent.java 2011-01-07 05:52:38 UTC (rev 261) @@ -20,14 +20,11 @@ */ package com.mindtree.techworks.insight.core.api.model; -import java.io.Externalizable; -import java.io.IOException; -import java.io.ObjectInput; -import java.io.ObjectOutput; +import java.util.Map; /** * This class represents a single log event from a log source. A log event needs - * to be initialized with a {@link Namespace} which contains information about + * to be initialized with a {@link LogSource} which contains information about * how the log event was parsed and also information about the source of the * log event. * <br /> @@ -35,14 +32,19 @@ * independent for Log4j. The <code>LogEvent</code> from this version is * designed to be a generic log event. Certain fields are defined, and the rest * are defined as a generic map where log events can be added. The fields in the - * log event are defined in the {@link Namespace}. + * log event are defined in the {@link LogSource}. * - * @since 2.0 + * @since Insight 2.0 * @author Bindul Bhowmik */ -public class LogEvent implements Externalizable { +public abstract class LogEvent { /** + * The sequence number of the log event in the model + */ + private int sequenceNumber; + + /** * The level of the log message */ private LogLevel level; @@ -62,25 +64,9 @@ */ private String message; - - - /* (non-Javadoc) - * @see java.io.Externalizable#writeExternal(java.io.ObjectOutput) + /** + * Other fields in the log event */ - @Override - public void writeExternal(ObjectOutput out) throws IOException { - // TODO Auto-generated method stub + private Map<String, Object> fields; - } - - /* (non-Javadoc) - * @see java.io.Externalizable#readExternal(java.io.ObjectInput) - */ - @Override - public void readExternal(ObjectInput in) throws IOException, - ClassNotFoundException { - // TODO Auto-generated method stub - - } - } Modified: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogEventModel.java =================================================================== --- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogEventModel.java 2010-11-05 18:11:53 UTC (rev 260) +++ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogEventModel.java 2011-01-07 05:52:38 UTC (rev 261) @@ -42,5 +42,5 @@ */ LogLevel getLogLevel(String name); - Log + } Modified: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogLevel.java =================================================================== --- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogLevel.java 2010-11-05 18:11:53 UTC (rev 260) +++ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogLevel.java 2011-01-07 05:52:38 UTC (rev 261) @@ -21,15 +21,19 @@ package com.mindtree.techworks.insight.core.api.model; import java.io.Serializable; -import java.text.MessageFormat; import java.util.HashMap; import java.util.Locale; import java.util.Map; import java.util.ResourceBundle; +import com.mindtree.techworks.insight.core.api.internal.APIMessages; + /** - * @TODO Add docs + * The class represents a <em>rank</em> level for a <code>LogEvent</code>. Each + * level in Insight has a numeric <code>priority</code> associated with the + * level as well as a <code>name</code> for the level. The <code>priority</code> + * may be used to sort or compare the levels, specially in a display. * * This was a good enough candidate to be defined as an enum, however that would * prevent runtime definition of new log levels, hence levels have been defined @@ -38,7 +42,7 @@ * @see http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html * @see http://download.oracle.com/javase/6/docs/api/java/util/logging/Level.html * @see http://httpd.apache.org/docs/current/mod/core.html#loglevel - * @since 2.0 + * @since Insight 2.0 * @author Bindul Bhowmik */ public final class LogLevel implements Serializable, Comparable<LogLevel> { @@ -51,63 +55,57 @@ /** * Resource bundle name for getting log names */ - private static final String LOG_LEVEL_RESOURCE_BUNDLE = "com.mindtree.techworks.insight.core.api.model.log-level-names"; + private static final String LOG_LEVEL_RESOURCE_BUNDLE = "com.mindtree.techworks.insight.core.api.model.log-level-names"; //$NON-NLS-1$ /** - * API Resource Bundle - */ - private static ResourceBundle apiMessages = ResourceBundle - .getBundle("com.mindtree.techworks.insight.core.api.api-messages"); - - /** * The global log level store */ private static GlobalLogLevelStore GLOBAL_STORE = new GlobalLogLevelStore(); /** # Level from [1] java.util.logging.Level [2] org.apache.log4j.Level */ - public static final LogLevel OFF = new LogLevel(Integer.MAX_VALUE, "OFF", GLOBAL_STORE); + public static final LogLevel OFF = new LogLevel(Integer.MAX_VALUE, "OFF", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [2] org.apache.log4j.Level */ - public static final LogLevel FATAL = new LogLevel(12500, "FATAL", GLOBAL_STORE); + public static final LogLevel FATAL = new LogLevel(12500, "FATAL", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [3] Apache HTTPD LogLevel */ - public static final LogLevel emerg = new LogLevel(12000, "emerg", GLOBAL_STORE); + public static final LogLevel emerg = new LogLevel(12000, "emerg", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [3] Apache HTTPD LogLevel */ - public static final LogLevel alert = new LogLevel (11000, "alert", GLOBAL_STORE); + public static final LogLevel alert = new LogLevel (11000, "alert", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [1] java.util.logging.Level */ - public static final LogLevel SEVERE = new LogLevel(10500, "SEVERE", GLOBAL_STORE); + public static final LogLevel SEVERE = new LogLevel(10500, "SEVERE", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [3] Apache HTTPD LogLevel */ - public static final LogLevel crit = new LogLevel(10000, "crit", GLOBAL_STORE); + public static final LogLevel crit = new LogLevel(10000, "crit", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [2] org.apache.log4j.Level */ - public static final LogLevel ERROR = new LogLevel(9000, "ERROR", GLOBAL_STORE); + public static final LogLevel ERROR = new LogLevel(9000, "ERROR", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [3] Apache HTTPD LogLevel */ - public static final LogLevel error = new LogLevel(ERROR.priority, "error", GLOBAL_STORE); + public static final LogLevel error = new LogLevel(ERROR.priority, "error", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [1] java.util.logging.Level */ - public static final LogLevel WARNING = new LogLevel(8000, "WARNING", GLOBAL_STORE); + public static final LogLevel WARNING = new LogLevel(8000, "WARNING", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [2] org.apache.log4j.Level */ - public static final LogLevel WARN = new LogLevel(WARNING.priority, "WARN", GLOBAL_STORE); + public static final LogLevel WARN = new LogLevel(WARNING.priority, "WARN", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [3] Apache HTTPD LogLevel */ - public static final LogLevel warn = new LogLevel(WARNING.priority, "warn", GLOBAL_STORE); + public static final LogLevel warn = new LogLevel(WARNING.priority, "warn", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [3] Apache HTTPD LogLevel */ - public static final LogLevel notice = new LogLevel(7000, "notice", GLOBAL_STORE); + public static final LogLevel notice = new LogLevel(7000, "notice", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [1] java.util.logging.Level [2] org.apache.log4j.Level */ - public static final LogLevel INFO = new LogLevel(6000, "INFO", GLOBAL_STORE); + public static final LogLevel INFO = new LogLevel(6000, "INFO", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [3] Apache HTTPD LogLevel */ - public static final LogLevel info = new LogLevel(INFO.priority, "info", GLOBAL_STORE); + public static final LogLevel info = new LogLevel(INFO.priority, "info", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [1] java.util.logging.Level */ - public static final LogLevel CONFIG = new LogLevel(5000, "CONFIG", GLOBAL_STORE); + public static final LogLevel CONFIG = new LogLevel(5000, "CONFIG", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [1] java.util.logging.Level */ - public static final LogLevel FINE = new LogLevel(4500, "FINE", GLOBAL_STORE); + public static final LogLevel FINE = new LogLevel(4500, "FINE", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [2] org.apache.log4j.Level */ - public static final LogLevel DEBUG = new LogLevel(4000, "DEBUG", GLOBAL_STORE); + public static final LogLevel DEBUG = new LogLevel(4000, "DEBUG", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [3] Apache HTTPD LogLevel */ - public static final LogLevel debug = new LogLevel(DEBUG.priority, "debug", GLOBAL_STORE); + public static final LogLevel debug = new LogLevel(DEBUG.priority, "debug", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [1] java.util.logging.Level */ - public static final LogLevel FINER = new LogLevel (2500, "FINER", GLOBAL_STORE); + public static final LogLevel FINER = new LogLevel (2500, "FINER", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [2] org.apache.log4j.Level */ - public static final LogLevel TRACE = new LogLevel (2000, "TRACE", GLOBAL_STORE); + public static final LogLevel TRACE = new LogLevel (2000, "TRACE", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [1] java.util.logging.Level */ - public static final LogLevel FINEST = new LogLevel (1000, "FINEST", GLOBAL_STORE); + public static final LogLevel FINEST = new LogLevel (1000, "FINEST", GLOBAL_STORE); //$NON-NLS-1$ /** # Level from [2] org.apache.log4j.Level */ - public static final LogLevel ALL = new LogLevel(Integer.MIN_VALUE, "ALL", GLOBAL_STORE); + public static final LogLevel ALL = new LogLevel(Integer.MIN_VALUE, "ALL", GLOBAL_STORE); //$NON-NLS-1$ /** * The integer priority for log levels, used for comparison @@ -129,7 +127,7 @@ private LogLevel(int priority, String name, LogLevelStore store) { if (null == name) { throw new NullPointerException( - apiMessages.getString("model.exception.loglevelnmnull")); + APIMessages.getString("model.exception.loglevelnmnull")); //$NON-NLS-1$ } this.priority = priority; this.name = name; @@ -251,7 +249,7 @@ */ public static LogLevel registerLogLevel (int priority, String name, LogLevelStore store) { if (null == store) { - throw new NullPointerException(apiMessages.getString("model.exception.nullstore")); + throw new NullPointerException(APIMessages.getString("model.exception.nullstore")); //$NON-NLS-1$ } return new LogLevel(priority, name, store); } @@ -300,7 +298,7 @@ * interface, with a check to throw an <code>IllegalStateException</code> if * duplicate registrations are attempted. * - * @since 2.0 + * @since Insight 2.0 * @author Bindul Bhowmik */ private static class GlobalLogLevelStore implements LogLevelStore { @@ -314,9 +312,7 @@ public void storeLogLevel(LogLevel logLevel) { // The global store does not allow overwrite if (store.containsKey(logLevel.name)) { - throw new IllegalStateException( - MessageFormat.format( - apiMessages.getString("model.exception.duplicateglobal"), + throw new IllegalStateException(APIMessages.getString("model.exception.duplicateglobal", //$NON-NLS-1$ logLevel.name)); } store.put(logLevel.name, logLevel); Modified: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogLevelStore.java =================================================================== --- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogLevelStore.java 2010-11-05 18:11:53 UTC (rev 260) +++ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogLevelStore.java 2011-01-07 05:52:38 UTC (rev 261) @@ -24,7 +24,7 @@ * Represents a local / contextual store where {@link LogLevel}s can be stored. * * @see LogLevel - * @since 2.0 + * @since Insight 2.0 * @author Bindul Bhowmik */ public interface LogLevelStore { Modified: insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/insight/core/api/api-messages.properties =================================================================== --- insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/insight/core/api/api-messages.properties 2010-11-05 18:11:53 UTC (rev 260) +++ insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/insight/core/api/api-messages.properties 2011-01-07 05:52:38 UTC (rev 261) @@ -5,4 +5,5 @@ #--# model.exception.loglevelnmnull=Log Level name cannot be null model.exception.duplicateglobal=Attempt to register a global log level with non-unique log level name: {0} -model.exception.nullstore=Store cannot be null \ No newline at end of file +model.exception.nullstore=Store cannot be null +#--# \ No newline at end of file Modified: insight-core/trunk/pom.xml =================================================================== --- insight-core/trunk/pom.xml 2010-11-05 18:11:53 UTC (rev 260) +++ insight-core/trunk/pom.xml 2011-01-07 05:52:38 UTC (rev 261) @@ -24,7 +24,7 @@ <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.mindtree.techworks.insight</groupId> - <artifactId>parent</artifactId> + <artifactId>insight-parent</artifactId> <version>2.0.0-SNAPSHOT</version> </parent> <groupId>com.mindtree.techworks.insight.core</groupId> Modified: parent/trunk/pom.xml =================================================================== --- parent/trunk/pom.xml 2010-11-05 18:11:53 UTC (rev 260) +++ parent/trunk/pom.xml 2011-01-07 05:52:38 UTC (rev 261) @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- | - | Copyright (c) 2009 - 2010 MindTree Ltd. + | Copyright (c) 2009 - 2011 MindTree Ltd. | | This file is part of Insight. | @@ -23,7 +23,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mindtree.techworks.insight</groupId> - <artifactId>parent</artifactId> + <artifactId>insight-parent</artifactId> <packaging>pom</packaging> <version>2.0.0-SNAPSHOT</version> <name>MindTree Insight</name> @@ -90,6 +90,9 @@ <system>sourceforge</system> <url>https://sourceforge.net/tracker2/index.php?group_id=212019</url> </issueManagement> + <prerequisites> + <maven>3.0+</maven> + </prerequisites> <developers> <developer> <id>bindul</id> @@ -148,6 +151,7 @@ </contributor> </contributors> <build> + <!-- <resources> <resource> <directory>${basedir}</directory> @@ -158,6 +162,7 @@ </includes> </resource> </resources> + --> <!-- TODO Set up resource filtering on each component for version.properties --> <pluginManagement> <plugins> @@ -199,7 +204,7 @@ <Specification-Vendor>${project.organization.name}</Specification-Vendor> <X-Compile-Source-JDK>${maven.compile.source}</X-Compile-Source-JDK> <X-Compile-Target-JDK>${maven.compile.target}</X-Compile-Target-JDK> - <Implementation-Build>${pom.version}-${maven.build.timestamp}</Implementation-Build> + <Implementation-Build>${project.version}-${maven.build.timestamp}</Implementation-Build> </manifestEntries> </archive> </configuration> @@ -252,6 +257,18 @@ </execution> </executions> </plugin> + <plugin> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>maven-notice-plugin</artifactId> + <executions> + <execution> + <id>attach-notice-license</id> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + </plugin> </plugins> </pluginManagement> <sourceDirectory>src/main/java</sourceDirectory> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2010-11-05 18:11:59
|
Revision: 260 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=260&view=rev Author: bindul Date: 2010-11-05 18:11:53 +0000 (Fri, 05 Nov 2010) Log Message: ----------- Added eclipse ignores Property Changed: ---------------- insight-core/trunk/insight-core-api/ insight-core/trunk/insight-core-impl/ Property changes on: insight-core/trunk/insight-core-api ___________________________________________________________________ Added: svn:ignore + .classpath .externalToolBuilders .project .settings target maven-eclipse.xml Property changes on: insight-core/trunk/insight-core-impl ___________________________________________________________________ Added: svn:ignore + .classpath .externalToolBuilders .project .settings target maven-eclipse.xml This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2010-08-25 08:54:42
|
Revision: 259 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=259&view=rev Author: bindul Date: 2010-08-25 08:54:33 +0000 (Wed, 25 Aug 2010) Log Message: ----------- Work on Insight 2 Added Paths: ----------- insight-core/trunk/pom.xml Property Changed: ---------------- insight-core/trunk/ Property changes on: insight-core/trunk ___________________________________________________________________ Added: svn:ignore + .project Added: insight-core/trunk/pom.xml =================================================================== --- insight-core/trunk/pom.xml (rev 0) +++ insight-core/trunk/pom.xml 2010-08-25 08:54:33 UTC (rev 259) @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + | + | Copyright (c) 2009 - 2010 MindTree Ltd. + | + | This file is part of Insight. + | + | Insight is free software: you can redistribute it + | and/or modify it under the terms of the GNU General Public License as + | published by the Free Software Foundation, either version 3 of the License, + | or (at your option) any later version. + | + | Insight is distributed in the hope that it will be + | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + | Public License for more details. + | + | You should have received a copy of the GNU General Public License along with + | Insight. If not, see <http://www.gnu.org/licenses />. + | +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>com.mindtree.techworks.insight</groupId> + <artifactId>parent</artifactId> + <version>2.0.0-SNAPSHOT</version> + </parent> + <groupId>com.mindtree.techworks.insight.core</groupId> + <artifactId>insight-core</artifactId> + <version>2.0.0-SNAPSHOT</version> + <packaging>pom</packaging> + <name>Insight Core components</name> + <description>Put some description here</description> + <url>http://mindtreeinsight.sourceforge.net/</url> + <scm> + <connection>scm:svn:http://mindtreeinsight.svn.sourceforge.net/svnroot/mindtreeinsight/insight-core/trunk</connection> + <developerConnection>scm:svn:https://mindtreeinsight.svn.sourceforge.net/svnroot/mindtreeinsight/insight-core/trunk</developerConnection> + <url>http://mindtreeinsight.svn.sourceforge.net/viewvc/mindtreeinsight/insight-core/trunk</url> + </scm> + <modules> + <module>insight-core-api</module> + <module>insight-core-impl</module> + </modules> +</project> \ No newline at end of file Property changes on: insight-core/trunk/pom.xml ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2010-08-25 08:53:33
|
Revision: 258 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=258&view=rev Author: bindul Date: 2010-08-25 08:53:27 +0000 (Wed, 25 Aug 2010) Log Message: ----------- Work on Insight 2 Added Paths: ----------- insight-core/trunk/insight-core-impl/ insight-core/trunk/insight-core-impl/pom.xml insight-core/trunk/insight-core-impl/src/ insight-core/trunk/insight-core-impl/src/main/ insight-core/trunk/insight-core-impl/src/main/java/ insight-core/trunk/insight-core-impl/src/main/java/com/ insight-core/trunk/insight-core-impl/src/main/java/com/mindtree/ insight-core/trunk/insight-core-impl/src/main/java/com/mindtree/techworks/ insight-core/trunk/insight-core-impl/src/main/java/com/mindtree/techworks/insight/ insight-core/trunk/insight-core-impl/src/main/java/com/mindtree/techworks/insight/core/ insight-core/trunk/insight-core-impl/src/main/java/com/mindtree/techworks/insight/core/impl/ insight-core/trunk/insight-core-impl/src/main/resources/ insight-core/trunk/insight-core-impl/src/site/ insight-core/trunk/insight-core-impl/src/site/apt/ insight-core/trunk/insight-core-impl/src/site/site.xml insight-core/trunk/insight-core-impl/src/test/ insight-core/trunk/insight-core-impl/src/test/java/ Added: insight-core/trunk/insight-core-impl/pom.xml =================================================================== --- insight-core/trunk/insight-core-impl/pom.xml (rev 0) +++ insight-core/trunk/insight-core-impl/pom.xml 2010-08-25 08:53:27 UTC (rev 258) @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + | + | Copyright (c) 2009 - 2010 MindTree Ltd. + | + | This file is part of Insight. + | + | Insight is free software: you can redistribute it + | and/or modify it under the terms of the GNU General Public License as + | published by the Free Software Foundation, either version 3 of the License, + | or (at your option) any later version. + | + | Insight is distributed in the hope that it will be + | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + | Public License for more details. + | + | You should have received a copy of the GNU General Public License along with + | Insight. If not, see <http://www.gnu.org/licenses />. + | +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>com.mindtree.techworks.insight.core</groupId> + <artifactId>insight-core</artifactId> + <version>2.0.0-SNAPSHOT</version> + </parent> + <artifactId>insight-core-impl</artifactId> + <name>Insight Core Base Implementation</name> + <packaging>jar</packaging> + <description>Put some description here</description> + <dependencies> + <dependency> + <groupId>com.mindtree.techworks.insight.core</groupId> + <artifactId>insight-core-api</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + <properties> + <insight.project.type-implementation>true</insight.project.type-implementation> + <insight.project.type-implementation.spectitle>Insight Core API</insight.project.type-implementation.spectitle> + <insight.project.type-implementation.specversion>${project.version}</insight.project.type-implementation.specversion> + </properties> +</project> \ No newline at end of file Property changes on: insight-core/trunk/insight-core-impl/pom.xml ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: insight-core/trunk/insight-core-impl/src/site/site.xml =================================================================== --- insight-core/trunk/insight-core-impl/src/site/site.xml (rev 0) +++ insight-core/trunk/insight-core-impl/src/site/site.xml 2010-08-25 08:53:27 UTC (rev 258) @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + | + | Copyright (c) 2010 MindTree Ltd. + | + | This file is part of Insight. + | + | Insight is free software: you can redistribute it + | and/or modify it under the terms of the GNU General Public License as + | published by the Free Software Foundation, either version 3 of the License, + | or (at your option) any later version. + | + | Insight is distributed in the hope that it will be + | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + | Public License for more details. + | + | You should have received a copy of the GNU General Public License along with + | Insight. If not, see <http://www.gnu.org/licenses />. + | +--> +<project xmlns="http://maven.apache.org/DECORATION/1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.1 http://maven.apache.org/xsd/decoration-1.0.1.xsd" name="Insight Core API"> +</project> Property changes on: insight-core/trunk/insight-core-impl/src/site/site.xml ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2010-08-25 08:52:46
|
Revision: 257 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=257&view=rev Author: bindul Date: 2010-08-25 08:52:38 +0000 (Wed, 25 Aug 2010) Log Message: ----------- Work on Insight 2 Added Paths: ----------- insight-core/trunk/insight-core-api/ insight-core/trunk/insight-core-api/pom.xml insight-core/trunk/insight-core-api/src/ insight-core/trunk/insight-core-api/src/main/ insight-core/trunk/insight-core-api/src/main/java/ insight-core/trunk/insight-core-api/src/main/java/com/ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogEvent.java insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogEventModel.java insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogLevel.java insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogLevelStore.java insight-core/trunk/insight-core-api/src/main/resources/ insight-core/trunk/insight-core-api/src/main/resources/com/ insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/ insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/ insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/insight/ insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/insight/core/ insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/insight/core/api/ insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/insight/core/api/api-messages.properties insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/insight/core/api/model/ insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/insight/core/api/model/log-level-names.properties insight-core/trunk/insight-core-api/src/site/ insight-core/trunk/insight-core-api/src/site/apt/ insight-core/trunk/insight-core-api/src/site/site.xml insight-core/trunk/insight-core-api/src/test/ insight-core/trunk/insight-core-api/src/test/java/ insight-core/trunk/insight-core-api/src/test/java/com/ insight-core/trunk/insight-core-api/src/test/java/com/mindtree/ insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/ insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/ insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/ insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/api/ insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/api/model/ insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/api/model/LogLevelTests.java Added: insight-core/trunk/insight-core-api/pom.xml =================================================================== --- insight-core/trunk/insight-core-api/pom.xml (rev 0) +++ insight-core/trunk/insight-core-api/pom.xml 2010-08-25 08:52:38 UTC (rev 257) @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + | + | Copyright (c) 2009 - 2010 MindTree Ltd. + | + | This file is part of Insight. + | + | Insight is free software: you can redistribute it + | and/or modify it under the terms of the GNU General Public License as + | published by the Free Software Foundation, either version 3 of the License, + | or (at your option) any later version. + | + | Insight is distributed in the hope that it will be + | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + | Public License for more details. + | + | You should have received a copy of the GNU General Public License along with + | Insight. If not, see <http://www.gnu.org/licenses />. + | +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>com.mindtree.techworks.insight.core</groupId> + <artifactId>insight-core</artifactId> + <version>2.0.0-SNAPSHOT</version> + </parent> + <artifactId>insight-core-api</artifactId> + <name>Insight Core API</name> + <packaging>jar</packaging> + <description>Put some description here</description> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + <properties> + <insight.project.type-specification>true</insight.project.type-specification> + <insight.project.type-implementation.spectitle>${pom.name}</insight.project.type-implementation.spectitle> + <insight.project.type-implementation.specversion>${pom.version}</insight.project.type-implementation.specversion> + </properties> +</project> \ No newline at end of file Property changes on: insight-core/trunk/insight-core-api/pom.xml ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogEvent.java =================================================================== --- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogEvent.java (rev 0) +++ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogEvent.java 2010-08-25 08:52:38 UTC (rev 257) @@ -0,0 +1,86 @@ +/* + * $HeadURL$ + * + * Copyright (c) 2010 MindTree Ltd. + * + * This file is part of Insight. + * + * Insight is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) + * any later version. + * + * Insight is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along with + * Insight. If not, see <http://www.gnu.org/licenses/>. + */ +package com.mindtree.techworks.insight.core.api.model; + +import java.io.Externalizable; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; + +/** + * This class represents a single log event from a log source. A log event needs + * to be initialized with a {@link Namespace} which contains information about + * how the log event was parsed and also information about the source of the + * log event. + * <br /> + * Since Insight 2.0, The <code>LogEvent</code> has been designed to be + * independent for Log4j. The <code>LogEvent</code> from this version is + * designed to be a generic log event. Certain fields are defined, and the rest + * are defined as a generic map where log events can be added. The fields in the + * log event are defined in the {@link Namespace}. + * + * @since 2.0 + * @author Bindul Bhowmik + */ +public class LogEvent implements Externalizable { + + /** + * The level of the log message + */ + private LogLevel level; + + /** + * The absolute timestamp of the log event + */ + private long timestamp; + + /** + * The relative timestamp of the log event + */ + private long relativeTimestamp; + + /** + * The message part of the log event + */ + private String message; + + + + /* (non-Javadoc) + * @see java.io.Externalizable#writeExternal(java.io.ObjectOutput) + */ + @Override + public void writeExternal(ObjectOutput out) throws IOException { + // TODO Auto-generated method stub + + } + + /* (non-Javadoc) + * @see java.io.Externalizable#readExternal(java.io.ObjectInput) + */ + @Override + public void readExternal(ObjectInput in) throws IOException, + ClassNotFoundException { + // TODO Auto-generated method stub + + } + +} Property changes on: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogEvent.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogEventModel.java =================================================================== --- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogEventModel.java (rev 0) +++ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogEventModel.java 2010-08-25 08:52:38 UTC (rev 257) @@ -0,0 +1,46 @@ +/* + * $HeadURL$ + * + * Copyright (c) 2010 MindTree Ltd. + * + * This file is part of Insight. + * + * Insight is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) + * any later version. + * + * Insight is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along with + * Insight. If not, see <http://www.gnu.org/licenses/>. + */ +package com.mindtree.techworks.insight.core.api.model; + +/** + * Represents a collection of <code>LogEvent</code>s. + * @TODO Add docs + * + * @see LogEvent + * @since 2.0 + * @author Bindul Bhowmik + */ +public interface LogEventModel extends Iterable<LogEvent> { + + /** + * Returns a string which is a globally unique identifier for this model + */ + String getGUID(); + + /** + * Returns a log level from the global and local store + * @param name the name of the log level + * @return The LogLevel found + */ + LogLevel getLogLevel(String name); + + Log +} Property changes on: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogEventModel.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogLevel.java =================================================================== --- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogLevel.java (rev 0) +++ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogLevel.java 2010-08-25 08:52:38 UTC (rev 257) @@ -0,0 +1,334 @@ +/* + * $HeadURL$ + * + * Copyright (c) 2010 MindTree Ltd. + * + * This file is part of Insight. + * + * Insight is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) + * any later version. + * + * Insight is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along with + * Insight. If not, see <http://www.gnu.org/licenses/>. + */ +package com.mindtree.techworks.insight.core.api.model; + +import java.io.Serializable; +import java.text.MessageFormat; +import java.util.HashMap; +import java.util.Locale; +import java.util.Map; +import java.util.ResourceBundle; + + +/** + * @TODO Add docs + * + * This was a good enough candidate to be defined as an enum, however that would + * prevent runtime definition of new log levels, hence levels have been defined + * as a custom class. + * + * @see http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html + * @see http://download.oracle.com/javase/6/docs/api/java/util/logging/Level.html + * @see http://httpd.apache.org/docs/current/mod/core.html#loglevel + * @since 2.0 + * @author Bindul Bhowmik + */ +public final class LogLevel implements Serializable, Comparable<LogLevel> { + + /** + * Used for object serialization + */ + private static final long serialVersionUID = 6682393873214955672L; + + /** + * Resource bundle name for getting log names + */ + private static final String LOG_LEVEL_RESOURCE_BUNDLE = "com.mindtree.techworks.insight.core.api.model.log-level-names"; + + /** + * API Resource Bundle + */ + private static ResourceBundle apiMessages = ResourceBundle + .getBundle("com.mindtree.techworks.insight.core.api.api-messages"); + + /** + * The global log level store + */ + private static GlobalLogLevelStore GLOBAL_STORE = new GlobalLogLevelStore(); + + /** # Level from [1] java.util.logging.Level [2] org.apache.log4j.Level */ + public static final LogLevel OFF = new LogLevel(Integer.MAX_VALUE, "OFF", GLOBAL_STORE); + /** # Level from [2] org.apache.log4j.Level */ + public static final LogLevel FATAL = new LogLevel(12500, "FATAL", GLOBAL_STORE); + /** # Level from [3] Apache HTTPD LogLevel */ + public static final LogLevel emerg = new LogLevel(12000, "emerg", GLOBAL_STORE); + /** # Level from [3] Apache HTTPD LogLevel */ + public static final LogLevel alert = new LogLevel (11000, "alert", GLOBAL_STORE); + /** # Level from [1] java.util.logging.Level */ + public static final LogLevel SEVERE = new LogLevel(10500, "SEVERE", GLOBAL_STORE); + /** # Level from [3] Apache HTTPD LogLevel */ + public static final LogLevel crit = new LogLevel(10000, "crit", GLOBAL_STORE); + /** # Level from [2] org.apache.log4j.Level */ + public static final LogLevel ERROR = new LogLevel(9000, "ERROR", GLOBAL_STORE); + /** # Level from [3] Apache HTTPD LogLevel */ + public static final LogLevel error = new LogLevel(ERROR.priority, "error", GLOBAL_STORE); + /** # Level from [1] java.util.logging.Level */ + public static final LogLevel WARNING = new LogLevel(8000, "WARNING", GLOBAL_STORE); + /** # Level from [2] org.apache.log4j.Level */ + public static final LogLevel WARN = new LogLevel(WARNING.priority, "WARN", GLOBAL_STORE); + /** # Level from [3] Apache HTTPD LogLevel */ + public static final LogLevel warn = new LogLevel(WARNING.priority, "warn", GLOBAL_STORE); + /** # Level from [3] Apache HTTPD LogLevel */ + public static final LogLevel notice = new LogLevel(7000, "notice", GLOBAL_STORE); + /** # Level from [1] java.util.logging.Level [2] org.apache.log4j.Level */ + public static final LogLevel INFO = new LogLevel(6000, "INFO", GLOBAL_STORE); + /** # Level from [3] Apache HTTPD LogLevel */ + public static final LogLevel info = new LogLevel(INFO.priority, "info", GLOBAL_STORE); + /** # Level from [1] java.util.logging.Level */ + public static final LogLevel CONFIG = new LogLevel(5000, "CONFIG", GLOBAL_STORE); + /** # Level from [1] java.util.logging.Level */ + public static final LogLevel FINE = new LogLevel(4500, "FINE", GLOBAL_STORE); + /** # Level from [2] org.apache.log4j.Level */ + public static final LogLevel DEBUG = new LogLevel(4000, "DEBUG", GLOBAL_STORE); + /** # Level from [3] Apache HTTPD LogLevel */ + public static final LogLevel debug = new LogLevel(DEBUG.priority, "debug", GLOBAL_STORE); + /** # Level from [1] java.util.logging.Level */ + public static final LogLevel FINER = new LogLevel (2500, "FINER", GLOBAL_STORE); + /** # Level from [2] org.apache.log4j.Level */ + public static final LogLevel TRACE = new LogLevel (2000, "TRACE", GLOBAL_STORE); + /** # Level from [1] java.util.logging.Level */ + public static final LogLevel FINEST = new LogLevel (1000, "FINEST", GLOBAL_STORE); + /** # Level from [2] org.apache.log4j.Level */ + public static final LogLevel ALL = new LogLevel(Integer.MIN_VALUE, "ALL", GLOBAL_STORE); + + /** + * The integer priority for log levels, used for comparison + */ + private final int priority; + + /** + * The name of the log levels + */ + private final String name; + + /** + * Creates a new log level instance. This is kept private, to create a new + * custom log level use the <code>#registerLogLevel</code> methods. + * + * @param priority The priority of the log messages + * @param name The name of the log level. + */ + private LogLevel(int priority, String name, LogLevelStore store) { + if (null == name) { + throw new NullPointerException( + apiMessages.getString("model.exception.loglevelnmnull")); + } + this.priority = priority; + this.name = name; + + // Registration + store.storeLogLevel(this); + } + + /** + * Returns the integer priority of this log level + */ + public int getPriority() { + return priority; + } + + /** + * Returns the name of the log level + * @see #getLocalizedName() + */ + public String getName() { + return name; + } + + /** + * Returns the localized log level name for the log level if one is + * configured, otherwise send the name + */ + public String getLocalizedName () { + return getLocalizedName(Locale.getDefault()); + } + + /** + * Returns the localized name of the log level if it is a default log level + * and a log level name is defined for the locale requested. If not, first + * the resource bundle mechanism to locate an appropriate available bundle + * is tried, if none is found the raw name is returned. + * + * @param locale The locale requested + * @return The log level name + */ + public String getLocalizedName (Locale locale) { + String localizedName = name; + if (null != locale) { + ResourceBundle rb = ResourceBundle.getBundle(LOG_LEVEL_RESOURCE_BUNDLE, locale); + if (rb.containsKey(name)) { + localizedName = rb.getString(name); + } + } + + return localizedName; + } + + /** + * Finds a log level by name from the global store + * + * @param name The log level name + * @return The log level if one exists in the global store with the name + */ + public static LogLevel find (String name) { + return find (name, GLOBAL_STORE); + } + + /** + * Finds a log level from the local store, with fall-back to the global + * store + * + * @param name + * The name of the log level being searched + * @param store + * the store being searched, if it is not the global store a fall + * back will be executed + * @return The log level from the local or global store or <code>null</code> + * if no levels exist + */ + public static LogLevel find (String name, LogLevelStore store) { + LogLevel level = null; + if (null == store) { + level = find (name, GLOBAL_STORE); + } else if ((level = store.getLogLevel(name)) == null && !GLOBAL_STORE.equals(store)) { + level = find (name, GLOBAL_STORE); + } + return level; + } + + /** + * Registers a new <code>LogLevel</code> in the global store. Registration + * attempts of a duplicate <code>LogLevel</code> in the global store is not + * allowed. + * + * @param priority + * The priority of the log level + * @param name + * The name of the log level + * @return The <code>LogLevel</code> registered + * @throws IllegalStateException + * If a <code>LogLevel</code> already exists with the name. + */ + public static LogLevel registerLogLevel (int priority, String name) { + return registerLogLevel(priority, name, GLOBAL_STORE); + } + + /** + * Registers a <code>LogLevel</code> in the requested store. Except for the + * global store, registration of a <code>LogLevel</code> with the name of a + * pre-existing level in the store will overwrite the old level. + * + * @param priority + * The priority of the log level being registered + * @param name + * The name of the log level + * @param store + * The store in which to store + * @return The new registered log level + * @throws NullPointerException + * if the store is <code>null</code> + * @throws IllegalStateException + * If a <code>LogLevel</code> already exists with the name and + * the store is the global store + */ + public static LogLevel registerLogLevel (int priority, String name, LogLevelStore store) { + if (null == store) { + throw new NullPointerException(apiMessages.getString("model.exception.nullstore")); + } + return new LogLevel(priority, name, store); + } + + /* (non-Javadoc) + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + priority; + return result; + } + + /* (non-Javadoc) + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + LogLevel other = (LogLevel) obj; + if (priority != other.priority) + return false; + return true; + } + + /* (non-Javadoc) + * @see java.lang.Comparable#compareTo(java.lang.Object) + */ + @Override + public int compareTo(LogLevel o) { + int thisVal = this.priority; + int anotherVal = o.priority; + return (thisVal<anotherVal ? -1 : (thisVal==anotherVal ? 0 : 1)); + } + + /** + * The global log level store. It is a simple wrapper over a + * <code>HashMap</code> exposing methods of the <code>LogLevelStore</code> + * interface, with a check to throw an <code>IllegalStateException</code> if + * duplicate registrations are attempted. + * + * @since 2.0 + * @author Bindul Bhowmik + */ + private static class GlobalLogLevelStore implements LogLevelStore { + + private Map<String, LogLevel> store = new HashMap<String, LogLevel>(); + + /* (non-Javadoc) + * @see com.mindtree.techworks.insight.core.api.model.LogLevelStore#storeLogLevel(com.mindtree.techworks.insight.core.api.model.LogLevel) + */ + @Override + public void storeLogLevel(LogLevel logLevel) { + // The global store does not allow overwrite + if (store.containsKey(logLevel.name)) { + throw new IllegalStateException( + MessageFormat.format( + apiMessages.getString("model.exception.duplicateglobal"), + logLevel.name)); + } + store.put(logLevel.name, logLevel); + } + + /* (non-Javadoc) + * @see com.mindtree.techworks.insight.core.api.model.LogLevelStore#getLogLevel(java.lang.String) + */ + @Override + public LogLevel getLogLevel(String logLevelName) { + return store.get(logLevelName); + } + + } +} Property changes on: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogLevel.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogLevelStore.java =================================================================== --- insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogLevelStore.java (rev 0) +++ insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogLevelStore.java 2010-08-25 08:52:38 UTC (rev 257) @@ -0,0 +1,50 @@ +/* + * $HeadURL$ + * + * Copyright (c) 2010 MindTree Ltd. + * + * This file is part of Insight. + * + * Insight is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) + * any later version. + * + * Insight is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along with + * Insight. If not, see <http://www.gnu.org/licenses/>. + */ +package com.mindtree.techworks.insight.core.api.model; + +/** + * Represents a local / contextual store where {@link LogLevel}s can be stored. + * + * @see LogLevel + * @since 2.0 + * @author Bindul Bhowmik + */ +public interface LogLevelStore { + + /** + * Adds the log level to the store. If the store already contains a + * <code>LogLevel</code> with the provided {@link LogLevel#getName()}, then + * the new log level overwrites the existing log level. + * + * @param logLevel The log level to add to the store + */ + void storeLogLevel(LogLevel logLevel); + + /** + * Retrieves a log level with the given <code>logLevelName</code> from the + * store. If the store does not have a LogLevel with the given name returns + * <code>null</code>. + * + * @param logLevelName The name of the log level being attempted to be retrieved + * @return {@link LogLevel} with the given name or <code>null</code> if none exists in the store + */ + LogLevel getLogLevel (String logLevelName); +} Property changes on: insight-core/trunk/insight-core-api/src/main/java/com/mindtree/techworks/insight/core/api/model/LogLevelStore.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/insight/core/api/api-messages.properties =================================================================== --- insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/insight/core/api/api-messages.properties (rev 0) +++ insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/insight/core/api/api-messages.properties 2010-08-25 08:52:38 UTC (rev 257) @@ -0,0 +1,8 @@ +# Localized messages from the Insight Core API + +#--# +# START Model Section +#--# +model.exception.loglevelnmnull=Log Level name cannot be null +model.exception.duplicateglobal=Attempt to register a global log level with non-unique log level name: {0} +model.exception.nullstore=Store cannot be null \ No newline at end of file Property changes on: insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/insight/core/api/api-messages.properties ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/insight/core/api/model/log-level-names.properties =================================================================== --- insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/insight/core/api/model/log-level-names.properties (rev 0) +++ insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/insight/core/api/model/log-level-names.properties 2010-08-25 08:52:38 UTC (rev 257) @@ -0,0 +1,46 @@ +# Resource bundle for log level names. This is the default log levels defined +# in Insight. +# Level from [1] java.util.logging.Level [2] org.apache.log4j.Level +OFF=OFF +# Level from [2] org.apache.log4j.Level +FATAL=FATAL +# Level from [3] Apache HTTPD LogLevel +emerg=EMERGENCY +# Level from [3] Apache HTTPD LogLevel +alert=ALERT +# Level from [1] java.util.logging.Level +SEVERE=SEVERE +# Level from [3] Apache HTTPD LogLevel +crit=CRITICAL +# Level from [2] org.apache.log4j.Level +ERROR=ERROR +# Level from [3] Apache HTTPD LogLevel +error=ERROR +# Level from [1] java.util.logging.Level +WARNING=WARNING +# Level from [2] org.apache.log4j.Level +WARN=WARNING +# Level from [3] Apache HTTPD LogLevel +warn=WARNING +# Level from [3] Apache HTTPD LogLevel +notice=NOTICE +# Level from [1] java.util.logging.Level [2] org.apache.log4j.Level +INFO=INFO +# Level from [3] Apache HTTPD LogLevel +info=INFO +# Level from [1] java.util.logging.Level +CONFIG=CONFIG +# Level from [1] java.util.logging.Level +FINE=FINE +# Level from [2] org.apache.log4j.Level +DEBUG=DEBUG +# Level from [3] Apache HTTPD LogLevel +debug=DEBUG +# Level from [1] java.util.logging.Level +FINER=FINER +# Level from [2] org.apache.log4j.Level +TRACE=TRACE +# Level from [1] java.util.logging.Level +FINEST=FINEST +# Level from [2] org.apache.log4j.Level +ALL=ALL \ No newline at end of file Property changes on: insight-core/trunk/insight-core-api/src/main/resources/com/mindtree/techworks/insight/core/api/model/log-level-names.properties ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: insight-core/trunk/insight-core-api/src/site/site.xml =================================================================== --- insight-core/trunk/insight-core-api/src/site/site.xml (rev 0) +++ insight-core/trunk/insight-core-api/src/site/site.xml 2010-08-25 08:52:38 UTC (rev 257) @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + | + | Copyright (c) 2010 MindTree Ltd. + | + | This file is part of Insight. + | + | Insight is free software: you can redistribute it + | and/or modify it under the terms of the GNU General Public License as + | published by the Free Software Foundation, either version 3 of the License, + | or (at your option) any later version. + | + | Insight is distributed in the hope that it will be + | useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + | Public License for more details. + | + | You should have received a copy of the GNU General Public License along with + | Insight. If not, see <http://www.gnu.org/licenses />. + | +--> +<project xmlns="http://maven.apache.org/DECORATION/1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.1 http://maven.apache.org/xsd/decoration-1.0.1.xsd" name="Insight Core API"> +</project> Property changes on: insight-core/trunk/insight-core-api/src/site/site.xml ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/api/model/LogLevelTests.java =================================================================== --- insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/api/model/LogLevelTests.java (rev 0) +++ insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/api/model/LogLevelTests.java 2010-08-25 08:52:38 UTC (rev 257) @@ -0,0 +1,60 @@ +/* + * $HeadURL$ + * + * Copyright (c) 2010 MindTree Ltd. + * + * This file is part of Insight. + * + * Insight is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) + * any later version. + * + * Insight is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + * + * You should have received a copy of the GNU General Public License along with + * Insight. If not, see <http://www.gnu.org/licenses/>. + */ +package com.mindtree.techworks.insight.core.api.model; + +import static org.junit.Assert.*; + +import org.junit.Test; + +/** + * @TODO Add docs + * + * @see + * @since 2.0 + * @author Bindul Bhowmik + */ +public class LogLevelTests { + + /** + * Test method for {@link com.mindtree.techworks.insight.core.api.model.LogLevel#getLocalizedName()}. + */ + @Test + public void testGetLocalizedName() { + fail("Not yet implemented"); + } + + /** + * Test method for {@link com.mindtree.techworks.insight.core.api.model.LogLevel#registerLogLevel(int, java.lang.String)}. + */ + @Test + public void testRegisterLogLevelIntString() { + fail("Not yet implemented"); + } + + /** + * Test method for {@link com.mindtree.techworks.insight.core.api.model.LogLevel#registerLogLevel(int, java.lang.String, boolean)}. + */ + @Test + public void testRegisterLogLevelIntStringBoolean() { + fail("Not yet implemented"); + } + +} Property changes on: insight-core/trunk/insight-core-api/src/test/java/com/mindtree/techworks/insight/core/api/model/LogLevelTests.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bi...@us...> - 2010-08-25 08:36:38
|
Revision: 256 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=256&view=rev Author: bindul Date: 2010-08-25 08:36:32 +0000 (Wed, 25 Aug 2010) Log Message: ----------- Work on Insight 2 Added Paths: ----------- insight-core/trunk/src/ insight-core/trunk/src/site/ insight-core/trunk/src/site/apt/ insight-core/trunk/src/site/apt/index.apt Added: insight-core/trunk/src/site/apt/index.apt =================================================================== --- insight-core/trunk/src/site/apt/index.apt (rev 0) +++ insight-core/trunk/src/site/apt/index.apt 2010-08-25 08:36:32 UTC (rev 256) @@ -0,0 +1,19 @@ + ------ + Insight Core + ------ + Bindul Bhowmik + ------ + $Date$ + +Insight Core + + Insight Core is the UI independent core implementation of MindTree Insight. + Insight Core itself is split up into multiple modules: + +*--------------------------+----------------------------------------------+ +|| Component || Description | +*--------------------------+----------------------------------------------+ +| {{{insight-core-api} Core API}} | API module which should be the only compile time dependency of most dependencies (along with other optional API modules defined here | +*--------------------------+----------------------------------------------+ +| {{{insight-core-impl} Core Implementation}} | The default Core Implementation of Insight. +*--------------------------+----------------------------------------------+ \ No newline at end of file Property changes on: insight-core/trunk/src/site/apt/index.apt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |