Archtype Projects extracted from zip for

master
logicoyparam 2013-07-31 13:57:08 +05:30
parent 9e5be72012
commit aa5e1701bf
676 changed files with 75429 additions and 0 deletions

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Document : pom.xml
Created on : 26 July, 2013, 12:34 PM
Author : Paramjeet Singh, Logicoy
Description:
Maven project Archtype for OpenESB Service Engine Netbeans Plugin.
-->
<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>
<groupId>open-jbi-components</groupId>
<artifactId>ServiceEngine-Plugin-archetype</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>maven-archetype</packaging>
<name>ServiceEngine-Plugin-archetype</name>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.2</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<description>Maven project Archtype for OpenESB Service Engine Netbeans Plugin</description>
<url>http://open-esb.org</url>
</project>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Document : archtype descripter
Created on : 23 July, 2013, 12:34 PM
Author : Paramjeet Singh, Logicoy
Description:
Maven project Archtype descripter for OpenESB Service Engine Plugin archtype, this contains All
necessory logic for building the archType packages and classes.
-->
<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="ServiceEngine"
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<fileSets>
<fileSet filtered="true" encoding="UTF-8">
<directory>deploy-plugin/nbproject</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>deploy-plugin/src</directory>
<includes>
<include>**/*.html</include>
<include>**/*.java</include>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>nbproject</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>nbproject/private</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>deploy-plugin</directory>
<includes>
<include>**/*.xml</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8">
<directory>deploy-plugin/src</directory>
<includes>
<include>**/*.xsl</include>
<include>**/*.form</include>
<include>**/*.wsdl</include>
<include>**/*.png</include>
<include>**/*.AntBasedProjectType</include>
<include>**/*.CollocationQueryImplementation</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8">
<directory>deploy-plugin</directory>
<includes>
<include>**/*.mf</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory></directory>
<includes>
<include>build.xml</include>
<include>install-params.properties</include>
<include>m2nbbuild-impl.xml</include>
<include>m2nbbuild.properties</include>
<include>m2nbbuild.xml</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>

View File

@ -0,0 +1,72 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<project name="${artifactId}" default="default" basedir=".">
<description>Builds, tests, and runs the project ${artifactId}.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${symbol_dollar}{build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="${artifactId}-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${symbol_dollar}{dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
</project>

View File

@ -0,0 +1,38 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>${package}</groupId>
<artifactId>${artifactId}-archetype</artifactId>
<version>${version}</version>
<packaging>maven-archetype</packaging>
<name>${artifactId}-archetype</name>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.2</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<description>Maven project for JBI Component that contains the
maven and netbeans build setup and component code to build and test the JBI Component.</description>
<url>http://open-esb.org</url>
</project>

View File

@ -0,0 +1,33 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
<?xml version="1.0" encoding="UTF-8"?>
<!--
*** GENERATED FROM project.xml - DO NOT EDIT ***
*** EDIT ../build.xml INSTEAD ***
-->
<project name="serviceengine-impl" basedir="..">
<property file="nbproject/private/platform-private.properties"/>
<property file="nbproject/platform.properties"/>
<macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
<attribute name="name"/>
<attribute name="value"/>
<sequential>
<property name="@{name}" value="${symbol_dollar}{symbol_dollar}{@{value}}"/>
</sequential>
</macrodef>
<property file="${symbol_dollar}{symbol_dollar}{user.properties.file}"/>
<nbmproject2:property name="harness.dir" value="nbplatform.${symbol_dollar}{symbol_dollar}{nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
<nbmproject2:property name="netbeans.dest.dir" value="nbplatform.${symbol_dollar}{symbol_dollar}{nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
<fail message="You must define 'nbplatform.${symbol_dollar}{symbol_dollar}{nbplatform.active}.harness.dir'">
<condition>
<not>
<available file="${symbol_dollar}{symbol_dollar}{harness.dir}" type="dir"/>
</not>
</condition>
</fail>
<import file="${symbol_dollar}{symbol_dollar}{harness.dir}/build.xml"/>
</project>

View File

@ -0,0 +1,146 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.apisupport.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/nb-module-project/2">
<code-name-base>serviceengine</code-name-base>
<standalone/>
<module-dependencies>
<dependency>
<code-name-base>org.apache.tools.ant.module</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>3</release-version>
<specification-version>3.27.0.2</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.jdesktop.layout</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.4</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.java.project</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.12</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.project.ant</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.16</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.projectapi</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.13</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.projectuiapi</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.24.0.6</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.queries</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.10</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.actions</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.6.0.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.awt</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.11.0.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.dialogs</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.5</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.execution</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.10</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.filesystems</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.3</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.loaders</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.5</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.nodes</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.2.0.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.util</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.9.0.1</specification-version>
</run-dependency>
</dependency>
</module-dependencies>
<public-packages/>
</data>
</configuration>
</project>

View File

@ -0,0 +1,18 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/types/">
<soapenv:Header/>
<soapenv:Body>
<greet:user xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/types/">
<greet:first-name>Srinivasan</greet:first-name>
<greet:last-name>Chikkala</greet:last-name>
</greet:user>
</soapenv:Body>
</soapenv:Envelope>

View File

@ -0,0 +1,18 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:part="http://www.sun.com/jbi/examples/sample-service/greetings/">
<soapenv:Header/>
<soapenv:Body>
<part:userPart xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/types/">
<greet:first-name>Srinivasan</greet:first-name>
<greet:last-name>Chikkala</greet:last-name>
</part:userPart>
</soapenv:Body>
</soapenv:Envelope>

View File

@ -0,0 +1,143 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
<?xml version="1.0"?>
<project name="testSA" default="default" basedir="." xmlns:jbi="http://www.sun.com/ns/jbi/jbi-ant/1" >
<target name="default" depends="package" description="compiles and packages the project."/>
<target name="-pre-init">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the build.xml file. -->
</target>
<target name="-init-user" depends="-pre-init" >
<echo message="loading user properties from ${symbol_dollar}{symbol_dollar}{user.properties.file}" />
<property file="${symbol_dollar}{symbol_dollar}{user.properties.file}"/>
</target>
<target name="-init-project" depends="-pre-init, -init-user" >
<echo level="debug" message="loading build.properties" />
<property file="build.properties"/>
</target>
<target name="-do-init" depends="-pre-init, -init-user, -init-project" >
<echo level="debug" message="-do-init called to initialize the build properties " />
<property name="build.service.assembly.dir" location="${symbol_dollar}{symbol_dollar}{build.dir}/${symbol_dollar}{symbol_dollar}{service.assembly.name}" />
<property name="build.service.assembly.zip" location="${symbol_dollar}{symbol_dollar}{build.dir}/${symbol_dollar}{symbol_dollar}{service.assembly.name}.zip" />
</target>
<target name="-init-check" depends="-pre-init, -init-user, -init-project, -do-init">
<fail unless="src.dir">Must set src.dir</fail>
<fail unless="build.dir">Must set build.dir</fail>
<fail unless="service.assembly.name">Must set service.assembly.name</fail>
</target>
<target name="-init-su-macros"
depends="-pre-init, -init-user, -init-project, -do-init" >
<macrodef name="jbi-su-package" uri="http://www.sun.com/ns/jbi/jbi-ant/1">
<attribute name="suDir"/>
<attribute name="suName"/>
<element name="target-options" optional="true"/>
<sequential>
<ant inheritAll="false" antfile="@{suDir}/build.xml">
<property name="build.dir" location="${symbol_dollar}{symbol_dollar}{build.dir}" />
<property name="service.unit.name" value="@{suName}" />
<target-options/>
<target name="package"/>
</ant>
<echo level="debug" message ="Copying service unit @{suName} to SA build dir ${symbol_dollar}{symbol_dollar}{build.service.assembly.dir}" />
<copy file="${symbol_dollar}{symbol_dollar}{build.dir}/@{suName}.zip" todir="${symbol_dollar}{symbol_dollar}{build.service.assembly.dir}" overwrite="true" />
</sequential>
</macrodef>
<macrodef name="jbi-su-clean" uri="http://www.sun.com/ns/jbi/jbi-ant/1">
<attribute name="suDir"/>
<attribute name="suName"/>
<element name="target-options" optional="true"/>
<sequential>
<ant inheritAll="false" antfile="@{suDir}/build.xml">
<property name="build.dir" location="${symbol_dollar}{symbol_dollar}{build.dir}" />
<property name="service.unit.name" value="@{suName}" />
<target-options/>
<target name="clean"/>
</ant>
</sequential>
</macrodef>
</target>
<!-- Init project -->
<target name="init"
depends="-pre-init, -init-user, -init-project, -do-init, -init-check, -init-su-macros"
description="initilizes the build settings">
</target>
<!--
===================
COMPILATION SECTION
===================
-->
<target name="deps-package" depends="init" unless="no.deps">
<mkdir dir="${symbol_dollar}{symbol_dollar}{build.dir}"/>
<mkdir dir="${symbol_dollar}{symbol_dollar}{build.service.assembly.dir}"/>
<!-- for each testSU package -->
<!-- package testSUBC -->
<jbi:jbi-su-package suDir="${symbol_dollar}{symbol_dollar}{project.testSUBC}" suName="${symbol_dollar}{symbol_dollar}{service.unit.name.testSUBC}" />
<!-- package testSUSE -->
<jbi:jbi-su-package suDir="${symbol_dollar}{symbol_dollar}{project.testSUSE}" suName="${symbol_dollar}{symbol_dollar}{service.unit.name.testSUSE}" />
</target>
<!-- SA Compile target -->
<target name="compile" depends="init, deps-package" description="Compile Service Assembly">
<echo level="debug" message ="Compiling Service Assembly" />
<mkdir dir="${symbol_dollar}{symbol_dollar}{build.service.assembly.dir}"/>
<copy file="${symbol_dollar}{symbol_dollar}{src.dir}/META-INF/jbi.xml" todir="${symbol_dollar}{symbol_dollar}{build.service.assembly.dir}/META-INF" overwrite="true" />
</target>
<!--
===================
PACKAGING SECTION
===================
-->
<target name="-pre-package" depends="init, deps-package"
description="Copy the deps su to the build dir">
</target>
<!-- SA Package target -->
<target name="package" depends="init, compile, -pre-package"
description="Package the Service Assembly">
<echo level="debug" message ="Packaging Service Assembly" />
<zip destfile="${symbol_dollar}{symbol_dollar}{build.service.assembly.zip}" basedir="${symbol_dollar}{symbol_dollar}{build.service.assembly.dir}" />
</target>
<!--
===============
CLEANUP SECTION
===============
-->
<target name="deps-clean" depends="init" unless="no.deps">
<!-- clean testSUBC -->
<jbi:jbi-su-clean suDir="${symbol_dollar}{symbol_dollar}{project.testSUBC}" suName="${symbol_dollar}{symbol_dollar}{service.unit.name.testSUBC}" />
<!-- clean testSUSE -->
<jbi:jbi-su-clean suDir="${symbol_dollar}{symbol_dollar}{project.testSUSE}" suName="${symbol_dollar}{symbol_dollar}{service.unit.name.testSUSE}" />
</target>
<!-- Clean target -->
<target name="clean" depends="init, deps-clean"
description="Clean the Service Assembly" >
<delete dir="${symbol_dollar}{symbol_dollar}{build.dir}"/>
<delete dir="${symbol_dollar}{symbol_dollar}{dist.dir}"/>
<echo level="debug" message ="Cleaned Service Assembly" />
</target>
<!-- Help target -->
<target name="help" depends="init" description="Display Help on Service Assembly">
<echo message ="Builds Service Assembly ${symbol_dollar}{symbol_dollar}{dist.zip}" />
</target>
</project>

View File

@ -0,0 +1,47 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<jbi version="1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/jbi"
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/"
>
<service-assembly>
<identification>
<name>${symbol_dollar}{artifactId}_TestSA</name>
<description>This is a test Service Assembly to test Engine</description>
</identification>
<service-unit>
<identification>
<name>${symbol_dollar}{artifactId}_TestSUBC</name>
<description>This service unit enables soap inbound endpoint for a service in service engine</description>
</identification>
<target>
<artifacts-zip>testSUBC.zip</artifacts-zip>
<component-name>sun-http-binding</component-name>
</target>
</service-unit>
<service-unit>
<identification>
<name>${symbol_dollar}{artifactId}_TestSUSE</name>
<description>This service unit enables greetings service provider in service engine</description>
</identification>
<target>
<artifacts-zip>testSUSE.zip</artifacts-zip>
<component-name>${symbol_dollar}{artifactId}</component-name>
</target>
</service-unit>
<connections>
<connection>
<consumer endpoint-name="port" service-name="greet:greetService"/>
<provider endpoint-name="${symbol_dollar}{artifactId}_JBIPort" service-name="greet:greetService"/>
</connection>
</connections>
</service-assembly>
</jbi>

View File

@ -0,0 +1,77 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
<?xml version="1.0"?>
<project name="testSUBC" default="default" basedir=".">
<target name="default" depends="package" description="compiles and packages the project."/>
<target name="-pre-init">
<!-- Empty placeholder for easier customization. -->
</target>
<target name="-init-user" depends="-pre-init" >
<echo level="debug" message="loading user properties from ${symbol_dollar}{symbol_dollar}{user.properties.file}" />
<property file="${symbol_dollar}{symbol_dollar}{user.properties.file}"/>
</target>
<target name="-init-project" depends="-pre-init, -init-user" >
<echo level="debug" message="loading build.properties" />
<property file="build.properties"/>
</target>
<target name="-do-init" depends="-pre-init, -init-user, -init-project" >
<echo level="debug" message="Nothing to -do-init" />
<property name="build.service.unit.dir" location="${symbol_dollar}{symbol_dollar}{build.dir}/${symbol_dollar}{symbol_dollar}{service.unit.name}" />
<property name="build.service.unit.zip" location="${symbol_dollar}{symbol_dollar}{build.dir}/${symbol_dollar}{symbol_dollar}{service.unit.name}.zip" />
</target>
<target name="-init-check" depends="-pre-init, -init-user, -init-project,-do-init">
<fail unless="src.dir">Must set src.dir</fail>
<fail unless="build.dir">Must set build.dir</fail>
<fail unless="service.unit.name">Must set service.unit.name</fail>
</target>
<!-- Init project -->
<target name="init"
depends="-pre-init, -init-user, -init-project,-do-init, -init-check"
description="initilizes the build settings">
</target>
<target name="-post-compile-su">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the build.xml file. -->
</target>
<!-- Clean target -->
<target name="clean" depends="init" description="Clean the Service Unit" >
<echo level="debug" message ="Cleaning the Service Unit" />
<delete dir="${symbol_dollar}{symbol_dollar}{build.dir}"/>
</target>
<!-- Compile target -->
<target name="compile" depends="init" description="Compile Service Unit">
<echo level="debug" message ="Compiling Service Unit" />
<mkdir dir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}"/>
<copy file="${symbol_dollar}{symbol_dollar}{src.dir}/META-INF/jbi.xml" todir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}/META-INF" overwrite="true" />
<copy todir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}" overwrite="true" >
<fileset dir="${symbol_dollar}{symbol_dollar}{src.dir}" >
</fileset>
</copy>
</target>
<!-- Package target -->
<target name="package" depends="init, compile" description="Package the Service Unit" >
<echo level="debug" message ="Packaging Service Unit" />
<zip destfile="${symbol_dollar}{symbol_dollar}{build.service.unit.zip}" basedir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}" />
</target>
<!-- Help target -->
<target name="help" depends="init" description="Display Help on Service Unit">
<echo message ="Builds Service Unit ${symbol_dollar}{symbol_dollar}{build.service.unit.zip}" />
</target>
</project>

View File

@ -0,0 +1,20 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
<?xml version='1.0' encoding="UTF-8" standalone="yes" ?>
<jbi version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/jbi"
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/"
>
<services binding-component="true">
<consumes service-name="greet:greetService"
interface-name="greet:greetings"
endpoint-name="port">
</consumes>
</services>
</jbi>

View File

@ -0,0 +1,20 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
<?xml version='1.0' encoding="UTF-8" standalone="yes" ?>
<jbi version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/jbi"
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/"
>
<services binding-component="true">
<consumes service-name="greet:greetService"
interface-name="greet:greetings"
endpoint-name="port">
</consumes>
</services>
</jbi>

View File

@ -0,0 +1,77 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
<?xml version="1.0"?>
<project name="testSUSE" default="default" basedir=".">
<target name="default" depends="package" description="compiles and packages the project."/>
<target name="-pre-init">
<!-- Empty placeholder for easier customization. -->
</target>
<target name="-init-user" depends="-pre-init" >
<echo level="debug" message="loading user properties from ${symbol_dollar}{symbol_dollar}{user.properties.file}" />
<property file="${symbol_dollar}{symbol_dollar}{user.properties.file}"/>
</target>
<target name="-init-project" depends="-pre-init, -init-user" >
<echo level="debug" message="loading build.properties" />
<property file="build.properties"/>
</target>
<target name="-do-init" depends="-pre-init, -init-user, -init-project" >
<echo level="debug" message="Nothing to -do-init" />
<property name="build.service.unit.dir" location="${symbol_dollar}{symbol_dollar}{build.dir}/${symbol_dollar}{symbol_dollar}{service.unit.name}" />
<property name="build.service.unit.zip" location="${symbol_dollar}{symbol_dollar}{build.dir}/${symbol_dollar}{symbol_dollar}{service.unit.name}.zip" />
</target>
<target name="-init-check" depends="-pre-init, -init-user, -init-project,-do-init">
<fail unless="src.dir">Must set src.dir</fail>
<fail unless="build.dir">Must set build.dir</fail>
<fail unless="service.unit.name">Must set service.unit.name</fail>
</target>
<!-- Init project -->
<target name="init"
depends="-pre-init, -init-user, -init-project,-do-init, -init-check"
description="initilizes the build settings">
</target>
<target name="-post-compile-su">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the build.xml file. -->
</target>
<!-- Clean target -->
<target name="clean" depends="init" description="Clean the Service Unit" >
<echo level="debug" message ="Cleaning the Service Unit" />
<delete dir="${symbol_dollar}{symbol_dollar}{build.dir}"/>
</target>
<!-- Compile target -->
<target name="compile" depends="init" description="Compile Service Unit">
<echo level="debug" message ="Compiling Service Unit" />
<mkdir dir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}"/>
<copy file="${symbol_dollar}{symbol_dollar}{src.dir}/META-INF/jbi.xml" todir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}/META-INF" overwrite="true" />
<copy todir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}" overwrite="true" >
<fileset dir="${symbol_dollar}{symbol_dollar}{src.dir}" >
</fileset>
</copy>
</target>
<!-- Package target -->
<target name="package" depends="init, compile" description="Package the Service Unit" >
<echo level="debug" message ="Packaging Service Unit" />
<zip destfile="${symbol_dollar}{symbol_dollar}{build.service.unit.zip}" basedir="${symbol_dollar}{symbol_dollar}{build.service.unit.dir}" />
</target>
<!-- Help target -->
<target name="help" depends="init" description="Display Help on Service Unit">
<echo message ="Builds Service Unit ${symbol_dollar}{symbol_dollar}{build.service.unit.zip}" />
</target>
</project>

View File

@ -0,0 +1,20 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
<?xml version='1.0' encoding="UTF-8" standalone="yes" ?>
<jbi version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/jbi"
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/"
>
<services binding-component="false">
<provides service-name="greet:greetService"
interface-name="greet:greetings"
endpoint-name="${symbol_dollar}{artifactId}_JBIPort">
</provides>
</services>
</jbi>

View File

@ -0,0 +1,20 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
${symbol_pound}set( ${symbol_dollar}symbol_pound = '${symbol_pound}' )
${symbol_pound}set( ${symbol_dollar}symbol_dollar = '${symbol_dollar}' )
${symbol_pound}set( ${symbol_dollar}symbol_escape = '${symbol_escape}' )
<?xml version='1.0' encoding="UTF-8" standalone="yes" ?>
<jbi version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/jbi"
xmlns:greet="http://www.sun.com/jbi/examples/sample-service/greetings/"
>
<services binding-component="false">
<provides service-name="greet:greetService"
interface-name="greet:greetings"
endpoint-name="${symbol_dollar}{artifactId}_JBIPort">
</provides>
</services>
</jbi>

View File

@ -0,0 +1,11 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
<!-- for some information on what you could do (e.g. targets to override). -->
<!-- If you delete this file and reopen the project it will be recreated. -->
<project name="${artifactId}" default="netbeans" basedir=".">
<description>Builds, tests, and runs the project ${artifactId}.</description>
<import file="nbproject/build-impl.xml"/>
</project>

View File

@ -0,0 +1,6 @@
Manifest-Version: 1.0
OpenIDE-Module: ${artifactId}
OpenIDE-Module-Layer: ${artifactId}/layer.xml
OpenIDE-Module-Localizing-Bundle: ${artifactId}/Bundle.properties
OpenIDE-Module-Specification-Version: 1.0

View File

@ -0,0 +1,30 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
<?xml version="1.0" encoding="UTF-8"?>
<!--
*** GENERATED FROM project.xml - DO NOT EDIT ***
*** EDIT ../build.xml INSTEAD ***
-->
<project name="serviceengine-impl" basedir="..">
<property file="nbproject/private/platform-private.properties"/>
<property file="nbproject/platform.properties"/>
<macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
<attribute name="name"/>
<attribute name="value"/>
<sequential>
<property name="@{name}" value="${symbol_dollar}{@{value}}"/>
</sequential>
</macrodef>
<property file="${symbol_dollar}{user.properties.file}"/>
<nbmproject2:property name="harness.dir" value="nbplatform.${symbol_dollar}{nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
<nbmproject2:property name="netbeans.dest.dir" value="nbplatform.${symbol_dollar}{nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
<fail message="You must define 'nbplatform.${symbol_dollar}{nbplatform.active}.harness.dir'">
<condition>
<not>
<available file="${symbol_dollar}{harness.dir}" type="dir"/>
</not>
</condition>
</fail>
<import file="${symbol_dollar}{harness.dir}/build.xml"/>
</project>

View File

@ -0,0 +1,11 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
build.xml.data.CRC32=10d1596b
build.xml.script.CRC32=11ff9e8e
build.xml.stylesheet.CRC32=a56c6a5b@2.50.1
${symbol_pound} This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
${symbol_pound} Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=10d1596b
nbproject/build-impl.xml.script.CRC32=a0f936cd
nbproject/build-impl.xml.stylesheet.CRC32=68e521fc@2.50.1

View File

@ -0,0 +1,4 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
nbplatform.active=default

View File

@ -0,0 +1,4 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
user.properties.file=D:${symbol_escape}${symbol_escape}softwares${symbol_escape}${symbol_escape}openesb_logicoy_last_working57${symbol_escape}${symbol_escape}.netbeans${symbol_escape}${symbol_escape}openesb${symbol_escape}${symbol_escape}build.properties

View File

@ -0,0 +1,7 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
javac.compilerargs=-Xlint -Xlint:-serial
javac.source=1.5
nbm.homepage=http://www.netbeans.org
nbm.module.author=logicoyparam

View File

@ -0,0 +1,151 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.apisupport.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/nb-module-project/2">
<code-name-base>${artifactId}</code-name-base>
<standalone/>
<module-dependencies>
<dependency>
<code-name-base>org.apache.tools.ant.module</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>3</release-version>
<specification-version>3.27.0.2</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.jdesktop.layout</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.4</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.java.project</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.12</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.project.ant</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.16</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.projectapi</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.13</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.projectuiapi</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.24.0.6</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.queries</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.10</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.actions</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.6.0.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.awt</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.11.0.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.dialogs</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.5</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.execution</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.10</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.filesystems</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.3</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.loaders</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.5</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.nodes</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.2.0.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.util</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.9.0.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.util.lookup</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>8.15.2</specification-version>
</run-dependency>
</dependency>
</module-dependencies>
<public-packages/>
</data>
</configuration>
</project>

View File

@ -0,0 +1,15 @@
# binding component deployment plugin resource bundle
# binding deploy plugin
OpenIDE-Module-Name=JBI Deployment Plugin[${artifactId}]
# deployment plugin
OpenIDE-Module-Short-Description=Service engine deployment plugin for ${artifactId}
# deployment plugin for adding wsdl extensions related to the binding component to the wsdl editor
OpenIDE-Module-Long-Description=Deployment plugin for creating service units related to this service engine in composite application
# category
OpenIDE-Module-Display-Category=CAPS
# plugin project template
Templates/Project/SOA/${artifactId}JBIModule.xml=${artifactId} JBI Module

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
<filesystem>
<folder name="Templates">
<folder name="Project">
<folder name="SOA">
<file name="paramv4sepluginJBIModule.xml" url="/serviceengine/project/resources/se-jbi-module.xml">
<attr name="SystemFileSystem.localizingBundle" stringvalue="serviceengine.Bundle"/>
<attr name="SystemFileSystem.icon" urlvalue="nbresloc:/serviceengine/project/resources/projectIcon.png"/>
<attr name="instantiatingIterator" methodvalue="serviceengine.project.wizard.SEPluginProjectWizardIterator.createIterator"/>
<attr name="instantiatingWizardURL" urlvalue="nbresloc:/serviceengine/project/wizard/SEPluginProjectDescription.html"/>
<attr name="templateCategory" stringvalue="jbi-se-plugin-prj-types"/>
<attr name="template" boolvalue="true"/>
</file>
</folder>
</folder>
</folder>
<folder name="JbiComponents">
<!-- JBI Component -->
<file name="paramv4seplugin">
<attr name="id" stringvalue="paramv4seplugin"/>
<attr name="type" stringvalue="Engine"/>
<attr name="description" stringvalue="Description of service engine : paramv4seplugin"/>
</file>
</folder>
</filesystem>

View File

@ -0,0 +1,408 @@
/*
* SEPluginProject.java
*
*/
package net.openesb.component.${artifactId}.project;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.File;
import java.io.IOException;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import org.netbeans.api.project.FileOwnerQuery;
import org.netbeans.api.project.Project;
import org.netbeans.api.project.ProjectInformation;
import org.netbeans.api.project.ProjectManager;
import org.netbeans.api.project.Sources;
import org.netbeans.api.project.ant.AntArtifact;
import net.openesb.component.${artifactId}.project.customizer.SEPluginProjectCustomizerProvider;
import org.netbeans.spi.java.project.support.ui.BrokenReferencesSupport;
import org.netbeans.spi.project.AuxiliaryConfiguration;
import org.netbeans.spi.project.SubprojectProvider;
import org.netbeans.spi.project.ant.AntArtifactProvider;
import org.netbeans.spi.project.support.ant.AntProjectEvent;
import org.netbeans.spi.project.support.ant.AntProjectHelper;
import org.netbeans.spi.project.support.ant.AntProjectListener;
import org.netbeans.spi.project.support.ant.EditableProperties;
import org.netbeans.spi.project.support.ant.GeneratedFilesHelper;
import org.netbeans.spi.project.support.ant.ProjectXmlSavedHook;
import org.netbeans.spi.project.support.ant.PropertyEvaluator;
import org.netbeans.spi.project.support.ant.ReferenceHelper;
import org.netbeans.spi.project.support.ant.SourcesHelper;
import org.netbeans.spi.project.ui.PrivilegedTemplates;
import org.netbeans.spi.project.ui.ProjectOpenedHook;
import org.netbeans.spi.project.ui.RecommendedTemplates;
import org.netbeans.spi.queries.FileBuiltQueryImplementation;
import org.netbeans.spi.queries.SharabilityQueryImplementation;
import org.openide.ErrorManager;
import org.openide.filesystems.FileObject;
import org.openide.util.Lookup;
import org.openide.util.Mutex;
import org.openide.util.NbBundle;
import org.openide.util.Utilities;
import org.openide.util.lookup.Lookups;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;
/**
*
* @author chikkala
*/
public final class SEPluginProject implements Project, AntProjectListener {
private static final Icon PROJECT_ICON = new ImageIcon(Utilities.loadImage(SEPluginProjectProperties.SE_PLUGIN_PROJECT_ICON_PATH)); // NOI18N
private AntProjectHelper helper;
private PropertyEvaluator evaluator;
private ReferenceHelper refHelper;
private GeneratedFilesHelper genFilesHelper;
private Lookup lookup;
public SEPluginProject(AntProjectHelper helper) throws IOException {
this.helper = helper;
this.evaluator = createEvaluator();
AuxiliaryConfiguration aux = helper.createAuxiliaryConfiguration();
this.refHelper = new ReferenceHelper(helper, aux, helper.getStandardPropertyEvaluator());
this.genFilesHelper = new GeneratedFilesHelper(helper);
this.lookup = createLookup(aux);
helper.addAntProjectListener(this);
}
@Override
public String toString() {
return "SEPluginProject[" + getProjectDirectory() + "]"; // NOI18N
}
public FileObject getProjectDirectory() {
return helper.getProjectDirectory();
}
public Lookup getLookup() {
return lookup;
}
public void configurationXmlChanged(AntProjectEvent event) {
if (event.getPath().equals(AntProjectHelper.PROJECT_XML_PATH)) {
// Could be various kinds of changes, but name & displayName might have changed.
Info info = (Info) getLookup().lookup(ProjectInformation.class);
info.firePropertyChange(ProjectInformation.PROP_NAME);
info.firePropertyChange(ProjectInformation.PROP_DISPLAY_NAME);
}
//TODO: add other configuration xml change event handling code.
}
public void propertiesChanged(AntProjectEvent event) {
//TODO: add property change event processing.
}
public AntProjectHelper getAntProjectHelper() {
return helper;
}
public ReferenceHelper getReferenceHelper() {
return this.refHelper;
}
public PropertyEvaluator getEvaluator() {
return this.evaluator;
}
/**
* Return configured project name.
*/
@SuppressWarnings(value = "unchecked")
public String getName() {
return (String) ProjectManager.mutex().readAccess(new Mutex.Action() {
public Object run() {
Element data = helper.getPrimaryConfigurationData(true);
NodeList nl = data.getElementsByTagNameNS(SEPluginProjectType.PROJECT_CONFIGURATION_NAMESPACE, "name");
if (nl.getLength() == 1) {
nl = nl.item(0).getChildNodes();
if (nl.getLength() == 1 && nl.item(0).getNodeType() == Node.TEXT_NODE) {
return ((Text) nl.item(0)).getNodeValue();
}
}
return "???"; // NOI18N
}
});
}
/**
* Store configured project name.
*/
@SuppressWarnings(value = "unchecked")
public void setName(final String name) {
ProjectManager.mutex().writeAccess(new Mutex.Action() {
public Object run() {
Element data = helper.getPrimaryConfigurationData(true);
NodeList nl = data.getElementsByTagNameNS(SEPluginProjectType.PROJECT_CONFIGURATION_NAMESPACE, "name");
Element nameEl;
if (nl.getLength() == 1) {
nameEl = (Element) nl.item(0);
NodeList deadKids = nameEl.getChildNodes();
while (deadKids.getLength() > 0) {
nameEl.removeChild(deadKids.item(0));
}
} else {
nameEl = data.getOwnerDocument().createElementNS(SEPluginProjectType.PROJECT_CONFIGURATION_NAMESPACE, "name");
data.insertBefore(nameEl, data.getChildNodes().item(0));
}
nameEl.appendChild(data.getOwnerDocument().createTextNode(name));
helper.putPrimaryConfigurationData(data, true);
return null;
}
});
}
private PropertyEvaluator createEvaluator() {
//TODO: might need to use a custom evaluator to handle active platform substitutions...
return helper.getStandardPropertyEvaluator();
}
private FileBuiltQueryImplementation createFileBuiltQuery() {
return helper.createGlobFileBuiltQuery(getEvaluator(),
new String[]{"${src.dir}/*.java"}, // NOI18N
new String[]{"${build.classes.dir}/*.class"} // NOI18N
);
}
private SharabilityQueryImplementation createSharabilityQuery() {
return helper.createSharabilityQuery(getEvaluator(),
new String[]{"${src.dir}"}, // NOI18N
new String[]{"${build.dir}"} // NOI18N
);
}
private Sources getSources() {
final SourcesHelper sourcesHelper = new SourcesHelper(helper, getEvaluator());
//TODO: add pricipal and typed source roots if required.
String srcLabel = NbBundle.getMessage(SEPluginProject.class, "LBL_Node_Sources"); //NOI18N
String srcLoc = "${" + SEPluginProjectProperties.SRC_DIR + "}";
sourcesHelper.addPrincipalSourceRoot(srcLoc, srcLabel, null, null);
sourcesHelper.addTypedSourceRoot(srcLoc, SEPluginProjectProperties.SOURCES_TYPE_XML,
srcLabel, null, null);
ProjectManager.mutex().postWriteRequest(new Runnable() {
public void run() {
sourcesHelper.registerExternalRoots(FileOwnerQuery.EXTERNAL_ALGORITHM_TRANSIENT);
}
});
return sourcesHelper.createSources();
}
private Lookup createLookup(AuxiliaryConfiguration aux) {
SubprojectProvider spp = refHelper.createSubprojectProvider();
return Lookups.fixed(new Object[]{
this, // to lookup this project from externally obtained Project
aux,
helper.createCacheDirectoryProvider(),
spp,
new Info(),
new SEPluginProjectActionProvider(this, helper, refHelper),
new SEPluginProjectLogicalViewProvider(this, helper, getEvaluator(), spp, refHelper),
new SEPluginProjectCustomizerProvider(this, helper, refHelper),
new AntArtifactProviderImpl(),
new ProjectXmlSavedHookImpl(),
new ProjectOpenedHookImpl(),
new RecommendedTemplatesImpl(),
new SEPluginProjectOperations(this),
getSources(),
createSharabilityQuery(),
createFileBuiltQuery()
});
}
// Private inner classes -------------------------------------------------------
/**
* @see org.netbeans.api.project.ProjectInformation
*/
private final class Info implements ProjectInformation {
private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
Info() {
}
void firePropertyChange(String prop) {
pcs.firePropertyChange(prop, null, null);
}
public String getName() {
return SEPluginProject.this.getName();
}
public String getDisplayName() {
return SEPluginProject.this.getName();
}
public Icon getIcon() {
return PROJECT_ICON;
}
public Project getProject() {
return SEPluginProject.this;
}
public void addPropertyChangeListener(PropertyChangeListener listener) {
pcs.addPropertyChangeListener(listener);
}
public void removePropertyChangeListener(PropertyChangeListener listener) {