diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/LICENSE b/Plugins/Aspose.Slides Java (Maven) for NetBeans/LICENSE
new file mode 100644
index 00000000..5d8a0415
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2001-2016 Aspose Pty Ltd
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/README.md b/Plugins/Aspose.Slides Java (Maven) for NetBeans/README.md
new file mode 100644
index 00000000..4ed927cd
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/README.md
@@ -0,0 +1,44 @@
+## Aspose.Slides Java (Maven) for NetBeans
+
+This project is **NetBeans IDE plugin** which lets developers use [Aspose.Slides for Java](http://www.aspose.com/java/powerpoint-component.aspx) in their Maven based Java projects.
+
+## Who is supposed to use this **Plugin?**
+
+This plugin is intended for developers using Maven platform for Java developments and want to use [Aspose.Slides for Java](http://www.aspose.com/java/powerpoint-component.aspx) in their projects.
+
+**NOTE:** [Aspose.Slides for Java](http://www.aspose.com/java/powerpoint-component.aspx) is Java API developed by [Aspose](http://aspose.com) that enables Java applications to read, write and manipulate PowerPoint documents (PPT, PPTX, POS, PPS, POTX, PPSX) PDF, HTML and image file formats without using Microsoft PowerPoint. For the API detailed features list check the [link](http://www.aspose.com/java/powerpoint-component.aspx).
+
+## **Features**
+
+The plugin provides following features to work with [Aspose.Slides for Java](http://www.aspose.com/java/powerpoint-component.aspx) API within **NetBeans IDE** comfortably:
+
+### Aspose.Slides Maven Project (wizard)
+
+
+* By using this wizard plugin creates Maven project for using [Aspose.Slides for Java](http://www.aspose.com/java/powerpoint-component.aspx) from **New Project -> Maven-> Aspose.Slides Maven Project**
+* The wizard will also give option for downloading latest available Code Examples for using the API.
+
+### Aspose.Slides Code Example (wizard)
+
+* By using this wizard plugin lets you copy the downloaded Code Examples into your project for using [Aspose.Slides for Java](http://www.aspose.com/java/powerpoint-component.aspx) from **New File -> Java -> Aspose.Slides Code Example**
+* The wizard will also look for and updates for newly available Code Examples from [Aspose.Slides for Java examples repository.](https://github.com/aspose-slides/Aspose.Slides-for-Java/tree/master/Examples)
+ **NOTE:** Selected Code Examples (category) source codes will be copied under **"com.aspose.slides.examples"** package. Resources needed for running examples will be copied to the corresponding directory (package) within **"src/main/resources"**.
+
+### Other Features
+
+* Supports latest **NetBeans 8.1** version
+* Compatible with **Mac**, **Linux Flavors** and **Windows**
+* Native IDE user experience
+* Open Source
+
+## What is Aspose.Slides Java API?
+
+**Aspose.Slides for Java** is a unique PowerPoint management component that enables Java applications to read, write and manipulate PowerPoint documents (PPT, PPTX, POS, PPS, POTX, PPSX) PDF, HTML and image file formats without using Microsoft PowerPoint.
+
+**Aspose.Slides for Java** is the first and only Java component that provides functionality to manage PowerPoint documents within your own applications. As with all Aspose Java components, Aspose.Slides for Java is written in pure Java, incredibly priced and lightning fast.
+
+For more info about the **Aspose.Slides for Java API**, [please check the api documentation - click here](http://www.aspose.com/java/powerpoint-component.aspx)
+
+## Plugin Documentation
+
+For the most complete documentation, [Please check Aspose Docs](http://www.aspose.com/docs/display/slidesjava/Aspose.Slides+Java+for+NetBeans+-+Maven)
\ No newline at end of file
diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/Release Notes.html b/Plugins/Aspose.Slides Java (Maven) for NetBeans/Release Notes.html
new file mode 100644
index 00000000..15a396a0
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/Release Notes.html
@@ -0,0 +1,17 @@
+
+
+
+Aspose.Slides Java (Maven) for NetBeans - Release Notes
+
+
+
+
+Aspose.Slides Java (Maven) for NetBeans - v1.0
+
This is new Plugin for NetBeans IDE by Aspose. This plugin is intended for developers using Maven platform for Java developments and want to use Aspose.Slides for Java in their projects.
+
NOTE:Aspose.Slides for Java is Java API developed by Aspose that enables Java applications to read, write and manipulate PowerPoint documents (PPT, PPTX, POS, PPS, POTX, PPSX) PDF, HTML and image file formats without using Microsoft PowerPoint. For the API detailed features list check the link.
+
The plugin provides following features to work with Aspose.Slides for Java API within NetBeans IDE comfortably:
+
Aspose.Slides Maven Project
By using this wizard plugin creates Maven project for using Aspose.Slides for Java from New Project -> Maven-> Aspose.Slides Maven Project
The wizard will also give option for downloading latest available Code Examples for using the API.
+
Aspose.Slides Code Example
By using this wizard plugin lets you copy the downloaded Code Examples into your project for using Aspose.Slides for Java from New File -> Java -> Aspose.Slides Code Example
Aspose.Slides for Java is a unique PowerPoint management component that enables Java applications to read, write and manipulate PowerPoint documents (PPT, PPTX, POS, PPS, POTX, PPSX) PDF, HTML and image file formats without using Microsoft PowerPoint.
Aspose.Slides for Java is the first and only Java component that provides functionality to manage PowerPoint documents within your own applications. As with all Aspose Java components, Aspose.Slides for Java is written in pure Java, incredibly priced and lightning fast.
Aspose.Slides Maven Project wizard fetch and configures the latest Maven dependency reference of Aspose.Slides for Java from the Aspose Cloud Maven Repository.
The wizard also gives you option to download the Code Examples to use Aspose.Slides for Java API.
Once you are finished with this wizard - created Maven project and downloaded Code Examples. Next you can insert those Code Examples to use Aspose.Slides for Java API in your Project from New File -> Java -> Aspose.Slides Code Example
The newly created project and the Code Examples you added is now ready to be enhanced, all required resources and references are also automatically added.
+
+
diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/Bundle.properties b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/Bundle.properties
new file mode 100644
index 00000000..549d65ae
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/Bundle.properties
@@ -0,0 +1,43 @@
+OpenIDE-Module-Name=Aspose.Slides Java (Maven) for NetBeans
+LBL_CreateProjectStep=Name and Location
+OpenIDE-Module-Display-Category=Base IDE
+OpenIDE-Module-Long-Description=\
+ Aspose.Slides Maven Project wizard creates Maven Project for using Aspose.Slides for Java API within NetBeans IDE.\
+
Aspose.Slides for Java is a unique PowerPoint management component that enables Java applications to read, write and manipulate PowerPoint documents (PPT, PPTX, POS, PPS, POTX, PPSX) PDF, HTML and image file formats without using Microsoft PowerPoint.\
+
Aspose.Slides for Java is the first and only Java component that provides functionality to manage PowerPoint documents within your own applications. \
+ As with all Aspose Java components, Aspose.Slides for Java is written in pure Java, incredibly priced and lightning fast.\
+
Aspose.Slides Maven Project wizard fetch and configures the latest Maven dependency reference of Aspose.Slides for Java from the Aspose Cloud Maven Repository.\
+
The wizard also gives you option to download the Code Examples to use Aspose.Slides for Java API.\
+
Once you are finished with this wizard - created Maven project and downloaded Code Examples. \
+ Next you can insert those Code Examples to use Aspose.Slides for Java API in your Project from New File -> Java -> Aspose.Slides Code Example
The newly created project and the Code Examples you added is now ready to be enhanced, all required resources and references are also automatically added.\
+
+OpenIDE-Module-Name=Aspose.Slides Java (Maven) for NetBeans
+AsposeMavenPanel.createdFolderLabel.text=Project &Folder:
+OpenIDE-Module-Short-Description=This plugins helps you to create Aspose.Slides Maven based project and tryout samples provided by Aspose.
+AsposeMavenPanel.jLabelCommonUses.toolTipText=
+AsposeMavenBasicPanelVisual.projectLocationLabel.text=Project &Location:
+AsposeMavenBasicPanelVisual.browseButton.actionCommand=BROWSE
+AsposeMavenBasicPanelVisual.browseButton.text=Br&owse...
+AsposeMavenBasicPanelVisual.createdFolderLabel.text=Project &Folder:
+AsposeMavenBasicPanelVisual.projectNameLabel.text=Project &Name:
+AsposeMavenBasicPanelVisual.lblArtifactId.text=Artifact Id:
+AsposeMavenBasicPanelVisual.lblGroupId.text=Group Id:
+AsposeMavenBasicPanelVisual.lblVersion.text=Version:
+AsposeMavenBasicPanelVisual.txtVersion.text=
+AsposeMavenBasicPanelVisual.txtGroupId.AccessibleContext.accessibleName=
+AsposeMavenBasicPanelVisual.txtVersion.AccessibleContext.accessibleName=
+AsposeMavenBasicPanelVisual.lblPackage.text=Package:
+AsposeMavenBasicPanelVisual.txtPackage.AccessibleContext.accessibleName=
+AsposeMavenBasicPanelVisual.lblPackage1.text=(Optional)
+AsposeMavenBasicPanelVisual.lblArtifactId.toolTipText=
+AsposeManager.progressMessage=Retrieving Aspose.Slides for java - Maven Dependency...
+AsposeManager.projectMessage=Creating Aspose.Slides maven project...
+AsposeManager.progressTitle=Retrieving Latest Maven artifact...
+AsposeManager.progressExamplesTitle=Downloading Code Examples...
+AsposeManager.downloadExamplesMessage=Downloading Aspose.Slides for java - Example Source Codes...
+AsposeMavenBasicPanelVisual.toolTipText=Aspose.Slides for Java API - Helps to create and manipulate Microsoft slides documents.
+AsposeMavenBasicPanelVisual.text=
+AsposeMavenBasicPanelVisual.jCheckBox1.label=Also Download Code Examples (for using Aspose.Slides for Java)
+AsposeMavenBasicPanelVisual.jLabel2.text=Please enter project detail:
+AsposeMavenBasicPanelVisual.jLabel3.text=Please enter maven artifact detail:
+AsposeMavenBasicPanelVisual.jLabel3.toolTipText=
diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/MavenSettings.java b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/MavenSettings.java
new file mode 100644
index 00000000..64b2cd73
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/MavenSettings.java
@@ -0,0 +1,74 @@
+package com.aspose.slides.maven;
+
+import java.util.prefs.Preferences;
+import org.openide.util.NbPreferences;
+
+/**
+ *
+ * @author Adeel
+ */
+public final class MavenSettings {
+
+ private static final String PROP_LAST_ARCHETYPE_GROUPID = "lastArchetypeGroupId";
+ private static final String PROP_LAST_ARCHETYPE_VERSION = "lastArchetypeVersion";
+
+ private Preferences getPreferences() {
+ return NbPreferences.forModule(MavenSettings.class);
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getLastArchetypeGroupId() {
+ return getPreferences().get(PROP_LAST_ARCHETYPE_GROUPID, "com.mycompany");
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getLastArchetypeVersion() {
+ return getPreferences().get(PROP_LAST_ARCHETYPE_VERSION, "1.0-SNAPSHOT");
+ }
+
+ /**
+ *
+ * @param version
+ */
+ public void setLastArchetypeVersion(String version) {
+ putProperty(PROP_LAST_ARCHETYPE_VERSION, version);
+ }
+
+ /**
+ *
+ * @param groupId
+ */
+ public void setLastArchetypeGroupId(String groupId) {
+ putProperty(PROP_LAST_ARCHETYPE_GROUPID, groupId);
+ }
+
+ private String putProperty(String key, String value) {
+ String retval = getProperty(key);
+ if (value != null) {
+ getPreferences().put(key, value);
+ } else {
+ getPreferences().remove(key);
+ }
+ return retval;
+ }
+ private static final MavenSettings INSTANCE = new MavenSettings();
+
+ /**
+ *
+ * @return
+ */
+ public static MavenSettings getDefault() {
+ return INSTANCE;
+ }
+
+ private String getProperty(String key) {
+ return getPreferences().get(key, null);
+ }
+
+}
diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/artifacts/Metadata.java b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/artifacts/Metadata.java
new file mode 100644
index 00000000..55f29e0d
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/artifacts/Metadata.java
@@ -0,0 +1,362 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2014.09.26 at 03:01:37 PM PKT
+//
+package com.aspose.slides.maven.artifacts;
+
+import javax.xml.bind.annotation.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ * Java class for anonymous complex type.
+ *
+ *
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ *
+ * <
+ * pre>
+ * <complexType> <complexContent> <restriction
+ * base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence> <element
+ * name="groupId" type="{http://www.w3.org/2001/XMLSchema}string"/> <element
+ * name="artifactId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="version" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="versioning"> <complexType> <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence> <element name="latest"
+ * type="{http://www.w3.org/2001/XMLSchema}string"/> <element name="release"
+ * type="{http://www.w3.org/2001/XMLSchema}string"/> <element
+ * name="versions"> <complexType> <complexContent> <restriction
+ * base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence> <element
+ * name="version" type="{http://www.w3.org/2001/XMLSchema}string"
+ * maxOccurs="unbounded" minOccurs="0"/> </sequence> </restriction>
+ * </complexContent> </complexType> </element> <element
+ * name="lastUpdated" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ * </sequence> </restriction> </complexContent> </complexType>
+ * </element> </sequence> </restriction> </complexContent>
+ * </complexType>
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "groupId",
+ "artifactId",
+ "version",
+ "versioning",
+ "classifier"
+})
+@XmlRootElement(name = "metadata")
+public class Metadata {
+
+ /**
+ *
+ */
+ @XmlElement(required = true)
+ protected String groupId;
+
+ /**
+ *
+ */
+ @XmlElement(required = true)
+ protected String artifactId;
+
+ /**
+ *
+ */
+ @XmlElement(required = true)
+ protected String version;
+
+ /**
+ *
+ */
+ @XmlElement(required = true)
+ protected Metadata.Versioning versioning;
+
+ /**
+ *
+ */
+ protected String classifier;
+
+ /**
+ * Gets the value of the groupId property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getGroupId() {
+ return groupId;
+ }
+
+ /**
+ * Sets the value of the groupId property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setGroupId(String value) {
+ this.groupId = value;
+ }
+
+ /**
+ * Gets the value of the artifactId property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getArtifactId() {
+ return artifactId;
+ }
+
+ /**
+ * Sets the value of the artifactId property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setArtifactId(String value) {
+ this.artifactId = value;
+ }
+
+ /**
+ * Gets the value of the version property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ * Sets the value of the version property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setVersion(String value) {
+ this.version = value;
+ }
+
+ /**
+ * Gets the value of the versioning property.
+ *
+ * @return possible object is {@link Metadata.Versioning }
+ */
+ public Metadata.Versioning getVersioning() {
+ return versioning;
+ }
+
+ /**
+ * Sets the value of the versioning property.
+ *
+ * @param value allowed object is {@link Metadata.Versioning }
+ */
+ public void setVersioning(Metadata.Versioning value) {
+ this.versioning = value;
+ }
+
+ /**
+ *
+ * Java class for anonymous complex type.
+ *
+ *
+ * The following schema fragment specifies the expected content contained
+ * within this class.
+ *
+ * <
+ * pre>
+ * <complexType> <complexContent> <restriction
+ * base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence>
+ * <element name="latest"
+ * type="{http://www.w3.org/2001/XMLSchema}string"/> <element
+ * name="release" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="versions"> <complexType> <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence> <element name="version"
+ * type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"
+ * minOccurs="0"/> </sequence> </restriction> </complexContent>
+ * </complexType> </element> <element name="lastUpdated"
+ * type="{http://www.w3.org/2001/XMLSchema}long"/> </sequence>
+ * </restriction> </complexContent> </complexType>
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "latest",
+ "release",
+ "versions",
+ "lastUpdated"
+ })
+ public static class Versioning {
+
+ /**
+ *
+ */
+ @XmlElement(required = true)
+ protected String latest;
+
+ /**
+ *
+ */
+ @XmlElement(required = true)
+ protected String release;
+
+ /**
+ *
+ */
+ @XmlElement(required = true)
+ protected Metadata.Versioning.Versions versions;
+
+ /**
+ *
+ */
+ protected long lastUpdated;
+
+ /**
+ * Gets the value of the latest property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getLatest() {
+ return latest;
+ }
+
+ /**
+ * Sets the value of the latest property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setLatest(String value) {
+ this.latest = value;
+ }
+
+ /**
+ * Gets the value of the release property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getRelease() {
+ return release;
+ }
+
+ /**
+ * Sets the value of the release property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setRelease(String value) {
+ this.release = value;
+ }
+
+ /**
+ * Gets the value of the versions property.
+ *
+ * @return possible object is {@link Metadata.Versioning.Versions }
+ */
+ public Metadata.Versioning.Versions getVersions() {
+ return versions;
+ }
+
+ /**
+ * Sets the value of the versions property.
+ *
+ * @param value allowed object is {@link Metadata.Versioning.Versions }
+ */
+ public void setVersions(Metadata.Versioning.Versions value) {
+ this.versions = value;
+ }
+
+ /**
+ * Gets the value of the lastUpdated property.
+ * @return
+ */
+ public long getLastUpdated() {
+ return lastUpdated;
+ }
+
+ /**
+ * Sets the value of the lastUpdated property.
+ * @param value
+ */
+ public void setLastUpdated(long value) {
+ this.lastUpdated = value;
+ }
+
+ /**
+ *
+ * Java class for anonymous complex type.
+ *
+ *
+ * The following schema fragment specifies the expected content
+ * contained within this class.
+ *
+ * <
+ * pre>
+ * <complexType> <complexContent> <restriction
+ * base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence>
+ * <element name="version"
+ * type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"
+ * minOccurs="0"/> </sequence> </restriction> </complexContent>
+ * </complexType>
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "version"
+ })
+ public static class Versions {
+
+ /**
+ *
+ */
+ protected List version;
+
+ /**
+ * Gets the value of the version property.
+ *
+ *
+ * This accessor method returns a reference to the live list, not a
+ * snapshot. Therefore any modification you make to the returned
+ * list will be present inside the JAXB object. This is why there is
+ * not a set method for the version property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getVersion().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link String }
+ * @return
+ */
+ public List getVersion() {
+ if (version == null) {
+ version = new ArrayList();
+ }
+ return this.version;
+ }
+
+ }
+
+ }
+
+ /**
+ * Gets the value of the classifier property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getClassifier() {
+ return classifier;
+ }
+
+ /**
+ * Sets the value of the version property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setClassifier(String value) {
+ this.classifier = value;
+ }
+
+}
diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/artifacts/ObjectFactory.java b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/artifacts/ObjectFactory.java
new file mode 100644
index 00000000..fcff5376
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/artifacts/ObjectFactory.java
@@ -0,0 +1,55 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2014.09.26 at 03:01:37 PM PKT
+//
+package com.aspose.slides.maven.artifacts;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+/**
+ * This object contains factory methods for each Java content interface and Java
+ * element interface generated in the com.aspose.maven.artifacts package.
+ *
+ * An ObjectFactory allows you to programatically construct new instances of the
+ * Java representation for XML content. The Java representation of XML content
+ * can consist of schema derived interfaces and classes representing the binding
+ * of schema type definitions, element declarations and model groups. Factory
+ * methods for each of these are provided in this class.
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of
+ * schema derived classes for package: com.aspose.maven.apis.artifacts
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link Metadata.Versioning.Versions }
+ * @return
+ */
+ public Metadata.Versioning.Versions createMetadataVersioningVersions() {
+ return new Metadata.Versioning.Versions();
+ }
+
+ /**
+ * Create an instance of {@link Metadata }
+ * @return
+ */
+ public Metadata createMetadata() {
+ return new Metadata();
+ }
+
+ /**
+ * Create an instance of {@link Metadata.Versioning }
+ * @return
+ */
+ public Metadata.Versioning createMetadataVersioning() {
+ return new Metadata.Versioning();
+ }
+
+}
diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/artifacts/maven-metada.xml b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/artifacts/maven-metada.xml
new file mode 100644
index 00000000..aea2fcb4
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/artifacts/maven-metada.xml
@@ -0,0 +1,17 @@
+
+
+ com.aspose
+ aspose-slides
+ 14.5.0
+
+ 14.8.0
+ 14.8.0
+
+ 14.5.0
+ 14.6.0
+ 14.7.0
+ 14.8.0
+
+ 20140924084136
+
+
\ No newline at end of file
diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/artifacts/maven-metadata.xsd b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/artifacts/maven-metadata.xsd
new file mode 100644
index 00000000..6e3d358e
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/artifacts/maven-metadata.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/examples/AsposeExamplePanel.java b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/examples/AsposeExamplePanel.java
new file mode 100644
index 00000000..e3be4dd4
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/examples/AsposeExamplePanel.java
@@ -0,0 +1,322 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 1998-2016 Aspose Pty Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+package com.aspose.slides.maven.examples;
+
+import com.aspose.slides.maven.utils.AbstractTask;
+import com.aspose.slides.maven.utils.AsposeConstants;
+import com.aspose.slides.maven.utils.AsposeMavenProjectManager;
+import com.aspose.slides.maven.utils.AsposeSlidesJavaAPI;
+import javax.swing.*;
+import javax.swing.tree.TreePath;
+import java.awt.*;
+import javax.swing.tree.DefaultTreeModel;
+import org.netbeans.api.progress.BaseProgressUtils;
+import org.openide.WizardDescriptor;
+import org.openide.util.Exceptions;
+import org.openide.util.NbBundle;
+
+public final class AsposeExamplePanel extends JPanel {
+
+ AsposeExampleWizardPanel panel;
+
+ /**
+ * Creates new form AsposeExamplePanel
+ *
+ * @param panel
+ */
+ public AsposeExamplePanel(AsposeExampleWizardPanel panel) {
+ initComponents();
+ initComponentsUser();
+ this.panel = panel;
+
+ }
+
+ private void initComponentsUser() {
+
+ CustomMutableTreeNode top = new CustomMutableTreeNode("");
+
+ DefaultTreeModel model = (DefaultTreeModel) getExamplesTree().getModel();
+ model.setRoot(top);
+ model.reload(top);
+
+ validateDialog();
+ }
+
+ @Override
+ public String getName() {
+ return AsposeConstants.API_NAME + " for Java API - Code Examples";
+ }
+
+ private void initComponents() {
+
+ jPanel1 = new JPanel();
+ jLabel2 = new JLabel();
+ componentSelection = new JComboBox();
+
+ jLabel1 = new JLabel();
+ jLabelMessage = new JLabel();
+ jLabelMessage.setOpaque(true);
+ jScrollPane1 = new JScrollPane();
+
+ examplesTree = new JTree();
+
+ jPanel1.setBackground(new Color(255, 255, 255));
+ jPanel1.setBorder(BorderFactory.createEtchedBorder());
+ jPanel1.setForeground(new Color(255, 255, 255));
+
+ jLabel2.setIcon(icon); // NOI18N
+ jLabel2.setText("");
+ jLabel2.setHorizontalAlignment(SwingConstants.CENTER);
+ jLabel2.setDoubleBuffered(true);
+ jLabel2.setOpaque(true);
+ jLabel2.addComponentListener(new java.awt.event.ComponentAdapter() {
+ @Override
+ public void componentResized(java.awt.event.ComponentEvent evt) {
+ jLabel2ComponentResized(evt);
+ }
+ });
+
+ GroupLayout jPanel1Layout = new GroupLayout(jPanel1);
+ jPanel1.setLayout(jPanel1Layout);
+ jPanel1Layout.setHorizontalGroup(
+ jPanel1Layout.createParallelGroup()
+ .addComponent(jLabel2, GroupLayout.PREFERRED_SIZE, 390, Short.MAX_VALUE)
+ );
+ jPanel1Layout.setVerticalGroup(
+ jPanel1Layout.createParallelGroup()
+ .addGroup(GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
+ .addComponent(jLabel2)
+ .addGap(0, 0, Short.MAX_VALUE))
+ );
+ componentSelection.setModel(new DefaultComboBoxModel());
+
+ componentSelection.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
+ @Override
+ public void propertyChange(java.beans.PropertyChangeEvent evt) {
+ componentSelection_Propertychanged(evt);
+ }
+ });
+ jLabel1.setText(NbBundle.getMessage(AsposeExamplePanel.class, "AsposeExample.jLabel1_text"));
+ jLabelMessage.setText("");
+ examplesTree.addMouseListener(new java.awt.event.MouseAdapter() {
+ @Override
+ //public void mouseClicked(java.awt.event.MouseEvent evt) { //here
+ public void mousePressed(java.awt.event.MouseEvent evt) {
+ examplesTree_clicked(evt);
+ }
+ });
+ jScrollPane1.setViewportView(examplesTree);
+
+ GroupLayout layout = new GroupLayout(this);
+ this.setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(GroupLayout.Alignment.LEADING)
+ .addComponent(jScrollPane1)
+ .addGroup(layout.createSequentialGroup()
+ .addComponent(jLabel1)
+ .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(componentSelection, GroupLayout.PREFERRED_SIZE, 198, GroupLayout.PREFERRED_SIZE))
+ .addComponent(jLabelMessage, GroupLayout.PREFERRED_SIZE, 361, GroupLayout.PREFERRED_SIZE)
+ .addComponent(jPanel1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addComponent(jPanel1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
+ .addComponent(componentSelection, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
+ .addComponent(jLabel1, GroupLayout.PREFERRED_SIZE, 23, GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE, 229, GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jLabelMessage, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE))
+ );
+ }
+
+
+ private void jLabel2ComponentResized(java.awt.event.ComponentEvent evt) {
+ int labelwidth = jLabel2.getWidth();
+ int labelheight = jLabel2.getHeight();
+ Image img = icon.getImage();
+ jLabel2.setIcon(new ImageIcon(img.getScaledInstance(labelwidth, labelheight, Image.SCALE_FAST)));
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getSelectedProjectRootPath() {
+ return AsposeMavenProjectManager.getInstance().getProjectDir().getPath();
+ }
+
+ void read() {
+ retrieveAPIDependency();
+ retrieveAPIExamples();
+ }
+
+ /**
+ *
+ * @return
+ */
+ private boolean retrieveAPIDependency() {
+ getComponentSelection().removeAllItems();
+ String versionNo = AsposeMavenProjectManager.getInstance().getDependencyVersionFromPOM(AsposeConstants.API_MAVEN_DEPENDENCY);
+ if (versionNo == null) {
+ getComponentSelection().addItem(AsposeConstants.API_DEPENDENCY_NOT_FOUND);
+ } else {
+ getComponentSelection().addItem(versionNo);
+ }
+ return true;
+ }
+
+ private void retrieveAPIExamples() {
+
+ final String item = (String) getComponentSelection().getSelectedItem();
+
+ if (item != null && !item.equals(AsposeConstants.API_DEPENDENCY_NOT_FOUND)) {
+
+ // Downloading Aspose API mvn based examples
+ AbstractTask downloadExamples = AsposeMavenProjectManager.getInstance().createDownloadExamplesTask(AsposeSlidesJavaAPI.getInstance());
+ // Execute the tasks
+ BaseProgressUtils.showProgressDialogAndRun(downloadExamples, NbBundle.getMessage(AsposeExamplePanel.class, "AsposeManager.updateExamplesMessage"));
+
+ // Populating Aspose API mvn based examples
+ Runnable popuplateExamples = AsposeMavenProjectManager.getInstance().populateExamplesTask(AsposeSlidesJavaAPI.getInstance(), this);
+ // Execute the tasks
+ BaseProgressUtils.showProgressDialogAndRun(popuplateExamples, NbBundle.getMessage(AsposeExamplePanel.class, "AsposeManager.populateExamplesMessage"));
+
+ validateDialog();
+
+ }
+
+ }
+
+ boolean valid(WizardDescriptor wizardDescriptor) {
+
+ return validateDialog();
+ }
+
+ @Override
+ public void validate() {
+
+ }
+
+ /**
+ *
+ * @return
+ */
+ public boolean validateDialog() {
+ if (isExampleSelected()) {
+ clearMessage();
+ return true;
+ }
+ final String item = (String) getComponentSelection().getSelectedItem();
+ if (item == null || item.equals(AsposeConstants.API_DEPENDENCY_NOT_FOUND)) {
+ diplayMessage("Please first add maven dependency of " + AsposeConstants.API_NAME + " for java API", true);
+ return false;
+ } else if (!isExampleSelected()) {
+ diplayMessage(AsposeConstants.ASPOSE_SELECT_EXAMPLE, true);
+ return false;
+ }
+ clearMessage();
+ return true;
+ }
+
+ /**
+ *
+ * @return
+ */
+ private boolean isExampleSelected() {
+ CustomMutableTreeNode comp = (CustomMutableTreeNode) getExamplesTree().getLastSelectedPathComponent();
+ if (comp == null) {
+ return false;
+ }
+ try {
+
+ if (!comp.isFolder()) {
+ return false;
+ }
+ } catch (Exception ex) {
+ Exceptions.printStackTrace(ex);
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ *
+ * @param message
+ * @param error
+ */
+ public void diplayMessage(String message, boolean error) {
+
+ if (error) {
+ jLabelMessage.setForeground(Color.RED);
+ } else {
+ jLabelMessage.setForeground(Color.GREEN);
+ }
+ jLabelMessage.setText(message);
+ }
+
+ private void clearMessage() {
+ jLabelMessage.setText("");
+
+ }
+
+ /**
+ *
+ * @param title
+ * @param message
+ * @param buttons
+ * @param icon
+ * @return
+ */
+ public int showMessage(String title, String message, int buttons, int icon) {
+ int result = JOptionPane.showConfirmDialog(null, message, title, buttons, icon);
+ return result;
+ }
+
+ private void componentSelection_Propertychanged(java.beans.PropertyChangeEvent evt) {
+
+ }
+
+ private void examplesTree_clicked(java.awt.event.MouseEvent evt) {
+ TreePath path = getExamplesTree().getSelectionPath();
+ panel.fireChangeEvent();
+ }
+
+ // Variables declaration
+ private JComboBox componentSelection;
+ private JTree examplesTree;
+ private JLabel jLabel1;
+ private JLabel jLabel2;
+ private JLabel jLabelMessage;
+ private JPanel jPanel1;
+ private JScrollPane jScrollPane1;
+ private ImageIcon icon = new ImageIcon(getClass().getResource("/resources/long-banner.png"));
+ // End of variables declaration
+
+ /**
+ * @return the examplesTree
+ */
+ public JTree getExamplesTree() {
+ return examplesTree;
+ }
+
+ /**
+ * @return the componentSelection
+ */
+ public JComboBox getComponentSelection() {
+ return componentSelection;
+ }
+}
diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/examples/AsposeExampleWizard.html b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/examples/AsposeExampleWizard.html
new file mode 100644
index 00000000..e2bb0a78
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/examples/AsposeExampleWizard.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ Aspose.Slides Code Example wizard allows you to insert Code Examples (to use Aspose.Slides for Java API) in your Java Project.
Code Examples demonstrate Aspose.Slides for Java API uses. New Code Examples are coming out all the time!
Available Code Examples are displayed in tree format from where you can select categorically.
Selected Code Examples are added to the selected project along with their sources and required data files.
Newly added Code Examples are ready to be enhanced, all references are automatically added.
+
+
diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/examples/AsposeExampleWizardIterator.java b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/examples/AsposeExampleWizardIterator.java
new file mode 100644
index 00000000..f7f8f70c
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/examples/AsposeExampleWizardIterator.java
@@ -0,0 +1,184 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package com.aspose.slides.maven.examples;
+
+import java.awt.Component;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Set;
+import javax.swing.JComponent;
+import javax.swing.event.ChangeListener;
+import org.netbeans.api.templates.TemplateRegistration;
+import org.openide.WizardDescriptor;
+import org.openide.util.NbBundle.Messages;
+
+/**
+ * @author Adeel Ilyas
+ */
+@TemplateRegistration(
+ folder = "Classes",
+ displayName = "#AsposeNewFileWizardIterator_displayName",
+ iconBase = "com/aspose/slides/maven/Aspose.png",
+ position = 10,
+ description = "AsposeExampleWizard.html")
+@Messages("AsposeNewFileWizardIterator_displayName=Aspose.Slides Code Example")
+public final class AsposeExampleWizardIterator implements WizardDescriptor.InstantiatingIterator {
+
+ private int index;
+
+ private WizardDescriptor wizard;
+ private List> panels;
+
+ private List> getPanels() {
+ if (panels == null) {
+ panels = new ArrayList<>();
+
+ panels.add(new AsposeExampleWizardPanel());
+ String[] steps = createSteps();
+
+ for (int i = 0; i < panels.size(); i++) {
+ Component c = panels.get(i).getComponent();
+ if (steps[i] == null) {
+ // Default step name to component name of panel. Mainly
+ // useful for getting the name of the target chooser to
+ // appear in the list of steps.
+ steps[i] = c.getName();
+ }
+ if (c instanceof JComponent) { // assume Swing components
+ JComponent jc = (JComponent) c;
+ jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, i);
+ jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps);
+ jc.putClientProperty(WizardDescriptor.PROP_AUTO_WIZARD_STYLE, true);
+ jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DISPLAYED, true);
+ jc.putClientProperty(WizardDescriptor.PROP_CONTENT_NUMBERED, true);
+ }
+ }
+ }
+ return panels;
+ }
+
+ /**
+ *
+ * @return
+ * @throws IOException
+ */
+ @Override
+ public Set> instantiate() throws IOException {
+ // TODO return set of FileObject (or DataObject) you have created
+ return Collections.emptySet();
+ }
+
+ /**
+ *
+ * @param wizard
+ */
+ @Override
+ public void initialize(WizardDescriptor wizard) {
+ this.wizard = wizard;
+ }
+
+ /**
+ *
+ * @param wizard
+ */
+ @Override
+ public void uninitialize(WizardDescriptor wizard) {
+ panels = null;
+ }
+
+ /**
+ *
+ * @return
+ */
+ @Override
+ public WizardDescriptor.Panel current() {
+ return getPanels().get(index);
+ }
+
+ /**
+ *
+ * @return
+ */
+ @Override
+ public String name() {
+ return index + 1 + ". from " + getPanels().size();
+ }
+
+ /**
+ *
+ * @return
+ */
+ @Override
+ public boolean hasNext() {
+ return index < getPanels().size() - 1;
+ }
+
+ /**
+ *
+ * @return
+ */
+ @Override
+ public boolean hasPrevious() {
+ return index > 0;
+ }
+
+ /**
+ *
+ */
+ @Override
+ public void nextPanel() {
+ if (!hasNext()) {
+ throw new NoSuchElementException();
+ }
+ index++;
+ }
+
+ /**
+ *
+ */
+ @Override
+ public void previousPanel() {
+ if (!hasPrevious()) {
+ throw new NoSuchElementException();
+ }
+ index--;
+ }
+
+ // If nothing unusual changes in the middle of the wizard, simply:
+
+ /**
+ *
+ * @param l
+ */
+ @Override
+ public void addChangeListener(ChangeListener l) {
+ }
+
+ /**
+ *
+ * @param l
+ */
+ @Override
+ public void removeChangeListener(ChangeListener l) {
+ }
+
+ private String[] createSteps() {
+ String[] beforeSteps = (String[]) wizard.getProperty("WizardPanel_contentData");
+ assert beforeSteps != null : "This wizard may only be used embedded in the template wizard";
+ String[] res = new String[(beforeSteps.length - 1) + panels.size()];
+ for (int i = 0; i < res.length; i++) {
+ if (i < (beforeSteps.length - 1)) {
+ res[i] = beforeSteps[i];
+ } else {
+ res[i] = panels.get(i - beforeSteps.length + 1).getComponent().getName();
+ }
+ }
+ return res;
+ }
+}
diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/examples/AsposeExampleWizardPanel.java b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/examples/AsposeExampleWizardPanel.java
new file mode 100644
index 00000000..63cab39a
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/examples/AsposeExampleWizardPanel.java
@@ -0,0 +1,201 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package com.aspose.slides.maven.examples;
+
+import com.aspose.slides.maven.utils.AsposeConstants;
+import com.aspose.slides.maven.utils.AsposeMavenProjectManager;
+import com.aspose.slides.maven.utils.AsposeSlidesJavaAPI;
+import java.io.File;
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import org.netbeans.api.project.Project;
+import org.netbeans.spi.project.ui.templates.support.Templates;
+import org.openide.WizardDescriptor;
+import org.openide.util.Exceptions;
+import org.openide.util.HelpCtx;
+import org.w3c.dom.NodeList;
+
+/**
+ * @author Adeel Ilyas
+ */
+public class AsposeExampleWizardPanel implements WizardDescriptor.Panel {
+
+ private AsposeExamplePanel component;
+ private static boolean storeSettingsCalled = false;
+
+ /**
+ *
+ * @return
+ */
+ @Override
+ public AsposeExamplePanel getComponent() {
+ if (component == null) {
+ component = new AsposeExamplePanel(this);
+ }
+ return component;
+ }
+
+ /**
+ *
+ * @return
+ */
+ @Override
+ public HelpCtx getHelp() {
+
+ return HelpCtx.DEFAULT_HELP;
+
+ }
+
+ /**
+ *
+ * @return
+ */
+ @Override
+ public boolean isValid() {
+ // Enables Finish / OK /Next button
+ return component.validateDialog();
+
+ }
+
+ private final Set listeners = new HashSet<>(1); // or can use ChangeSupport in NB 6.0
+
+ /**
+ *
+ * @param l
+ */
+ @Override
+ public void addChangeListener(ChangeListener l) {
+ synchronized (listeners) {
+ listeners.add(l);
+ }
+ }
+
+ /**
+ *
+ * @param l
+ */
+ @Override
+ public void removeChangeListener(ChangeListener l) {
+ synchronized (listeners) {
+ listeners.remove(l);
+ }
+ }
+
+ /**
+ *
+ */
+ protected final void fireChangeEvent() {
+
+ Iterator it;
+ synchronized (listeners) {
+ it = new HashSet<>(listeners).iterator();
+ }
+ ChangeEvent ev = new ChangeEvent(this);
+ while (it.hasNext()) {
+ it.next().stateChanged(ev);
+ }
+ }
+
+ /**
+ *
+ * @param wiz
+ */
+ @Override
+ public void readSettings(WizardDescriptor wiz) {
+ Project selectedProject = Templates.getProject(wiz);
+
+ File projdir = new File(selectedProject.getProjectDirectory().getPath());
+
+ wiz.putProperty("projdir", projdir);
+ AsposeMavenProjectManager asposeMavenProjectManager = AsposeMavenProjectManager.initialize(wiz);
+ AsposeSlidesJavaAPI.initialize(asposeMavenProjectManager);
+ component.read();
+ }
+
+ /**
+ *
+ * @param wiz
+ */
+ @Override
+ public void storeSettings(WizardDescriptor wiz) {
+
+ boolean cancelled = wiz.getValue() != WizardDescriptor.FINISH_OPTION;
+ if (!cancelled) {
+ if (!storeSettingsCalled) {
+ storeSettingsCalled = true;
+ createExample();
+ } else {
+ storeSettingsCalled = false;
+
+ }
+ }
+ }
+
+ private boolean createExample() {
+ String projectPath = component.getSelectedProjectRootPath();
+ CustomMutableTreeNode comp = getSelectedNode();
+ if (comp == null || !comp.isFolder()) {
+ return false;
+ }
+ try {
+
+ String sourceRepositoryExamplePath = comp.getExPath();
+ if (sourceRepositoryExamplePath == null) {
+ return false;
+ }
+ String repositorylocation = AsposeSlidesJavaAPI.getInstance().getLocalRepositoryPath();
+ String repositoryPOM_XML = repositorylocation + File.separator + "Examples" + File.separator + AsposeConstants.MAVEN_POM_XML;
+
+ NodeList examplesNoneAsposeDependencies = AsposeMavenProjectManager.getInstance().getDependenciesFromPOM(repositoryPOM_XML, AsposeConstants.ASPOSE_GROUP_ID);
+
+ AsposeMavenProjectManager.getInstance().addMavenDependenciesInProject(examplesNoneAsposeDependencies);
+
+ NodeList examplesNoneAsposeRepositories = AsposeMavenProjectManager.getInstance().getRepositoriesFromPOM(repositoryPOM_XML, AsposeConstants.ASPOSE_MAVEN_REPOSITORY);
+
+ AsposeMavenProjectManager.getInstance().addMavenRepositoriesInProject(examplesNoneAsposeRepositories);
+
+ String sourceExamplesUtilsPath = repositorylocation + File.separator + AsposeConstants.EXAMPLES_UTIL;
+ String destinationExamplesUtilsPath = projectPath + File.separator + sourceExamplesUtilsPath.replace(repositorylocation + File.separator + AsposeConstants.GITHUB_EXAMPLES_SOURCE_LOCATION, AsposeConstants.PROJECT_EXAMPLES_SOURCE_LOCATION);
+
+ String destinationExamplePath = projectPath + File.separator + sourceRepositoryExamplePath.replace(repositorylocation + File.separator + AsposeConstants.GITHUB_EXAMPLES_SOURCE_LOCATION, AsposeConstants.PROJECT_EXAMPLES_SOURCE_LOCATION);
+
+ String destinationResourcePath = projectPath + File.separator + sourceRepositoryExamplePath.replace(repositorylocation + File.separator + AsposeConstants.GITHUB_EXAMPLES_SOURCE_LOCATION, AsposeConstants.PROJECT_EXAMPLES_RESOURCES_LOCATION);
+
+ String sourceRepositoryExampleResourcesPath = sourceRepositoryExamplePath.replace(AsposeConstants.GITHUB_EXAMPLES_SOURCE_LOCATION, AsposeConstants.GITHUB_EXAMPLES_RESOURCES_LOCATION);
+
+ //Copying Example Category
+ copyExample(sourceRepositoryExamplePath, destinationExamplePath);
+
+ //Copying Example Resoureces
+ copyExample(sourceRepositoryExampleResourcesPath, destinationResourcePath);
+
+ //Copying Utils.java
+ AsposeMavenProjectManager.copyDirectory(new File(sourceExamplesUtilsPath + File.separator), new File(destinationExamplesUtilsPath + File.separator));
+
+
+
+ } catch (Exception ex) {
+ return false;
+ }
+ return true;
+ }
+
+ private CustomMutableTreeNode getSelectedNode() {
+ return (CustomMutableTreeNode) component.getExamplesTree().getLastSelectedPathComponent();
+ }
+
+ private void copyExample(String sourcePath, String destinationPath) {
+ try {
+ AsposeMavenProjectManager.copyDirectory(sourcePath, destinationPath);
+ } catch (IOException ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ }
+}
diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/examples/Bundle.properties b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/examples/Bundle.properties
new file mode 100644
index 00000000..e61f0bf2
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/examples/Bundle.properties
@@ -0,0 +1,8 @@
+# To change this license header, choose License Headers in Project Properties.
+# To change this template file, choose Tools | Templates
+# and open the template in the editor.
+
+AsposeExample.jLabel1_text=Aspose.Slides for Java (version):
+AsposeManager.populateExamplesMessage=Populating Aspose.Slides for Java API examples...
+AsposeManager.updateExamplesMessage=Updating Aspose.Slides for Java API examples...
+AsposeManager.populateExamplesTitle=Populating Example code list...
\ No newline at end of file
diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/examples/CustomMutableTreeNode.java b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/examples/CustomMutableTreeNode.java
new file mode 100644
index 00000000..5092f81e
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/examples/CustomMutableTreeNode.java
@@ -0,0 +1,70 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 1998-2016 Aspose Pty Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+package com.aspose.slides.maven.examples;
+
+import javax.swing.tree.DefaultMutableTreeNode;
+
+/**
+ *
+ * @author Adeel Ilyas
+ */
+public final class CustomMutableTreeNode extends DefaultMutableTreeNode {
+
+ private boolean folder;
+ private String _ExPath;
+
+ /**
+ *
+ * @param data
+ */
+ public void setTopTreeNodeText(String data) {
+ this.userObject = data;
+ }
+
+ /**
+ *
+ * @param data
+ */
+ public CustomMutableTreeNode(String data) {
+ this.userObject = data;
+ }
+
+ /**
+ * @return the _ExPath
+ */
+ public String getExPath() {
+ return _ExPath;
+ }
+
+ /**
+ * @param ExPath the _ExPath to set
+ */
+ public void setExPath(String ExPath) {
+ this._ExPath = ExPath;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public boolean isFolder() {
+ return folder;
+ }
+
+ /**
+ *
+ * @param folder
+ */
+ public void setFolder(boolean folder) {
+ this.folder = folder;
+ }
+}
diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/utils/AbstractTask.java b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/utils/AbstractTask.java
new file mode 100644
index 00000000..13147805
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/utils/AbstractTask.java
@@ -0,0 +1,31 @@
+package com.aspose.slides.maven.utils;
+
+import org.netbeans.api.progress.aggregate.AggregateProgressFactory;
+import org.netbeans.api.progress.aggregate.ProgressContributor;
+
+/**
+ * @author Adeel Ilyas
+ */
+public abstract class AbstractTask extends Thread {
+
+ /**
+ *
+ */
+ protected ProgressContributor p = null;
+
+ /**
+ *
+ * @param id
+ */
+ public AbstractTask(String id) {
+ p = AggregateProgressFactory.createProgressContributor(id);
+ }
+
+ /**
+ *
+ * @return
+ */
+ public ProgressContributor getProgressContributor() {
+ return p;
+ }
+}
diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/utils/AsposeConstants.java b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/utils/AsposeConstants.java
new file mode 100644
index 00000000..4bbc4bf0
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/utils/AsposeConstants.java
@@ -0,0 +1,144 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 1998-2016 Aspose Pty Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+package com.aspose.slides.maven.utils;
+
+/*
+ * @author Adeel Ilyas
+ */
+import java.io.File;
+
+/**
+ *
+ * @author Adeel
+ */
+public class AsposeConstants {
+
+ /**
+ *
+ */
+ public static final String API_NAME = "Aspose.Slides";
+
+ /**
+ *
+ */
+ public static final String API_MAVEN_DEPENDENCY = "aspose-slides";
+
+ /**
+ *
+ */
+ public static final String API_EXAMPLES_PACKAGE = "com" + File.separator + API_MAVEN_DEPENDENCY.replace("-", File.separator) + File.separator + "examples";
+
+ /**
+ *
+ */
+ public static final String GITHUB_EXAMPLES_SOURCE_LOCATION = "Examples" + File.separator + "src" + File.separator + "main" + File.separator + "java" + File.separator + API_EXAMPLES_PACKAGE;
+
+ /**
+ *
+ */
+ public static final String GITHUB_EXAMPLES_RESOURCES_LOCATION = "Examples" + File.separator + "src" + File.separator + "main" + File.separator + "resources" + File.separator + API_EXAMPLES_PACKAGE;
+
+ /**
+ *
+ */
+ public static final String PROJECT_EXAMPLES_SOURCE_LOCATION = "src" + File.separator + "main" + File.separator + "java" + File.separator + API_EXAMPLES_PACKAGE;
+
+ /**
+ *
+ */
+ public static final String PROJECT_EXAMPLES_RESOURCES_LOCATION = "src" + File.separator + "main" + File.separator + "resources" + File.separator + API_EXAMPLES_PACKAGE;
+
+ /**
+ *
+ */
+ public static final String EXAMPLES_UTIL = GITHUB_EXAMPLES_SOURCE_LOCATION + File.separator + "Utils.java";
+
+ /**
+ *
+ */
+ public static final String API_DEPENDENCY_NOT_FOUND = "Dependency not found!";
+
+ /**
+ *
+ */
+ public static final String MAVEN_POM_XML = "pom.xml";
+
+ /**
+ *
+ */
+ public static final String WIZARD_NAME = "Aspose.Slides Maven Project";
+
+ /**
+ *
+ */
+ public static final String ASPOSE_SELECT_EXAMPLE = "Please just select one examples category";
+
+ /**
+ *
+ */
+ public static final String INTERNET_CONNNECTIVITY_PING_URL = "java.sun.com";
+
+ /**
+ *
+ */
+ public static final String ASPOSE_MAVEN_REPOSITORY = "http://maven.aspose.com";
+
+ /**
+ *
+ */
+ public static final String ASPOSE_GROUP_ID = "com.aspose";
+
+ /**
+ *
+ */
+ public static final String INTERNET_REQUIRED_MSG = "Internet connectivity is not available!\nInternet connectivity is required to retrieve latest Aspose.Slides Maven Artifact";
+
+ /**
+ *
+ */
+ public static final String EXAMPLES_INTERNET_REQUIRED_MSG = "Internet connectivity is required to download examples";
+
+ /**
+ *
+ */
+ public static final String MAVEN_ARTIFACTS_RETRIEVE_FAIL = "Unknown Error!\nCould not retrieve latest Aspose.Slides Maven Artifact!";
+
+ /**
+ *
+ */
+ public static final String EXAMPLES_DOWNLOAD_FAIL = "Unknown Error!\nCould not download Aspose.Slides for Java API example Source codes!";
+
+ /**
+ *
+ */
+ public static final String EXAMPLES_NOT_AVAILABLE_MSG = "This component does not have examples yet, We will add examples soon";
+
+ /**
+ *
+ */
+ public static final String EXAMPLES_NOT_AVAILABLE_TITLE = "Examples not available";
+
+ /**
+ *
+ */
+ public static boolean printingAllowed = false;
+
+ /**
+ *
+ * @param message
+ */
+ public static final void println(String message) {
+ if (printingAllowed) {
+ System.out.println(message);
+ }
+ }
+}
diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/utils/AsposeJavaAPI.java b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/utils/AsposeJavaAPI.java
new file mode 100644
index 00000000..1aeb7ddc
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/utils/AsposeJavaAPI.java
@@ -0,0 +1,168 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 1998-2016 Aspose Pty Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+package com.aspose.slides.maven.utils;
+
+import javax.swing.*;
+import java.io.File;
+import org.netbeans.api.progress.aggregate.ProgressContributor;
+import org.openide.util.Exceptions;
+
+
+public abstract class AsposeJavaAPI {
+
+ /**
+ *
+ * @return
+ */
+ public abstract String get_name();
+
+ /**
+ *
+ * @return
+ */
+ public abstract String get_mavenRepositoryURL();
+
+ /**
+ *
+ * @return
+ */
+ public abstract String get_remoteExamplesRepository();
+
+ /**
+ *
+ * @return
+ */
+ public boolean isExamplesNotAvailable() {
+ return examplesNotAvailable;
+ }
+
+ /**
+ *
+ */
+ public boolean examplesNotAvailable;
+
+ /**
+ *
+ * @return
+ */
+ public boolean isExamplesDefinitionAvailable() {
+ return examplesDefinitionAvailable;
+ }
+
+ /**
+ *
+ */
+ public boolean examplesDefinitionAvailable;
+
+ /**
+ *
+ */
+ public AsposeMavenProjectManager asposeMavenProjectManager;
+
+ /**
+ *
+ * @param p
+ */
+ public void checkAndUpdateRepo(ProgressContributor p) {
+
+ if (null == get_remoteExamplesRepository()) {
+ AsposeMavenProjectManager.showMessage(AsposeConstants.EXAMPLES_NOT_AVAILABLE_TITLE, get_name() + " - " + AsposeConstants.EXAMPLES_NOT_AVAILABLE_MSG, JOptionPane.CLOSED_OPTION, JOptionPane.INFORMATION_MESSAGE);
+ examplesNotAvailable = true;
+ examplesDefinitionAvailable = false;
+ return;
+ } else {
+ examplesNotAvailable = false;
+ }
+
+ if (isExamplesDefinitionsPresent()) {
+ try {
+ examplesDefinitionAvailable = true;
+ syncRepository(p);
+ p.progress(60);
+ } catch (Exception e) {
+ }
+ } else {
+ updateRepository(p);
+ if (isExamplesDefinitionsPresent()) {
+ examplesDefinitionAvailable = true;
+
+ }
+
+ }
+ p.progress(70);
+ }
+
+ /**
+ *
+ * @param p
+ * @return
+ */
+ public boolean downloadExamples(ProgressContributor p) {
+ try {
+ checkAndUpdateRepo(p);
+ } catch (Exception rex) {
+ Exceptions.printStackTrace(rex);
+ return false;
+ }
+
+ return true;
+
+ }
+
+ /**
+ *
+ * @param p
+ */
+ public void updateRepository(ProgressContributor p) {
+ AsposeMavenProjectManager.checkAndCreateFolder(getLocalRepositoryPath());
+
+ try {
+
+ GitHelper.updateRepository(getLocalRepositoryPath(), get_remoteExamplesRepository());
+ p.progress(55);
+
+ } catch (Exception e) {
+ Exceptions.printStackTrace(e);
+ }
+ }
+
+ /**
+ *
+ * @param p
+ */
+ public void syncRepository(ProgressContributor p) {
+ try {
+
+ GitHelper.syncRepository(getLocalRepositoryPath(), get_remoteExamplesRepository());
+ p.progress(55);
+
+ } catch (Exception e) {
+ Exceptions.printStackTrace(e);
+ }
+ }
+
+ /**
+ *
+ * @return boolean
+ */
+ public boolean isExamplesDefinitionsPresent() {
+ return new File(getLocalRepositoryPath()).exists();
+ }
+
+ /**
+ *
+ * @return String
+ */
+ public String getLocalRepositoryPath() {
+ return asposeMavenProjectManager.getAsposeHomePath() + "GitConsRepos" + File.separator + get_name();
+ }
+}
diff --git a/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/utils/AsposeMavenProjectManager.java b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/utils/AsposeMavenProjectManager.java
new file mode 100644
index 00000000..49958aa2
--- /dev/null
+++ b/Plugins/Aspose.Slides Java (Maven) for NetBeans/src/com/aspose/slides/maven/utils/AsposeMavenProjectManager.java
@@ -0,0 +1,623 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 1998-2016 Aspose Pty Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+package com.aspose.slides.maven.utils;
+
+import com.aspose.slides.maven.AsposeMavenProjectWizardIterator;
+import com.aspose.slides.maven.artifacts.Metadata;
+import com.aspose.slides.maven.artifacts.ObjectFactory;
+import com.aspose.slides.maven.examples.AsposeExamplePanel;
+import com.aspose.slides.maven.examples.CustomMutableTreeNode;
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+import java.util.List;
+import javax.swing.*;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.xpath.*;
+import java.io.*;
+import java.net.*;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.Queue;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
+import javax.xml.bind.JAXBException;
+import org.openide.WizardDescriptor;
+import org.openide.awt.StatusDisplayer;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.util.Exceptions;
+import org.openide.util.NbBundle;
+import org.openide.xml.XMLUtil;
+import org.w3c.dom.Node;
+
+public class AsposeMavenProjectManager {
+
+ private boolean examplesNotAvailable;
+ private File projectDir = null;
+
+ /**
+ *
+ * @return
+ */
+ public File getProjectDir() {
+ return projectDir;
+ }
+ private boolean examplesDefinitionAvailable;
+
+ /**
+ *
+ * @param Url
+ * @return
+ * @throws IOException
+ */
+ public String readURLContents(String Url) throws IOException {
+ URL url = new URL(Url);
+ URLConnection con = url.openConnection();
+ InputStream in = con.getInputStream();
+ String encoding = con.getContentEncoding();
+ encoding = encoding == null ? "UTF-8" : encoding;
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ byte[] buf = new byte[8192];
+ int len = 0;
+ while ((len = in.read(buf)) != -1) {
+ baos.write(buf, 0, len);
+ }
+ String body = new String(baos.toByteArray(), encoding);
+ return body;
+ }
+
+ /**
+ *
+ * @param productMavenRepositoryUrl
+ * @return
+ */
+ public Metadata getProductMavenDependency(String productMavenRepositoryUrl) {
+ final String mavenMetaDataFileName = "maven-metadata.xml";
+ Metadata data = null;
+
+ try {
+ String productMavenInfo;
+ productMavenInfo = readURLContents(productMavenRepositoryUrl + mavenMetaDataFileName);
+ JAXBContext jaxbContext = JAXBContext.newInstance(ObjectFactory.class);
+ Unmarshaller unmarshaller;
+ unmarshaller = jaxbContext.createUnmarshaller();
+
+ data = (Metadata) unmarshaller.unmarshal(new StreamSource(new StringReader(productMavenInfo)));
+
+ String remoteArtifactFile = productMavenRepositoryUrl + data.getVersioning().getLatest() + "/" + data.getArtifactId() + "-" + data.getVersioning().getLatest();
+
+ if (!remoteFileExists(remoteArtifactFile + ".jar")) {
+ AsposeConstants.println("Not Exists");
+ data.setClassifier(getResolveSupportedJDK(remoteArtifactFile));
+ } else {
+ AsposeConstants.println("Exists");
+ }
+ } catch (IOException | JAXBException ex) {
+ Exceptions.printStackTrace(ex);
+ data = null;
+ }
+ return data;
+ }
+
+ /**
+ *
+ * @param ProductURL
+ * @return
+ */
+ public String getResolveSupportedJDK(String ProductURL) {
+ String supportedJDKs[] = {"jdk17", "jdk16", "jdk15", "jdk14", "jdk18"};
+ String classifier = null;
+ for (String jdkCheck : supportedJDKs) {
+ if (remoteFileExists(ProductURL + "-" + jdkCheck + ".jar")) {
+ AsposeConstants.println("Exists");
+ classifier = jdkCheck;
+ break;
+ } else {
+ AsposeConstants.println("Not Exists");
+ }
+ }
+ return classifier;
+ }
+
+ /**
+ *
+ * @param URLName
+ * @return
+ */
+ public boolean remoteFileExists(String URLName) {
+ try {
+ HttpURLConnection.setFollowRedirects(false);
+ // note : you may also need
+ // HttpURLConnection.setInstanceFollowRedirects(false)
+ HttpURLConnection con
+ = (HttpURLConnection) new URL(URLName).openConnection();
+ con.setRequestMethod("HEAD");
+ return (con.getResponseCode() == HttpURLConnection.HTTP_OK);
+ } catch (Exception e) {
+ Exceptions.printStackTrace(e);
+ return false;
+ }
+ }
+
+ /**
+ *
+ * @param asposeAPI
+ * @return
+ */
+ public AbstractTask retrieveAsposeAPIMavenTask(final AsposeJavaAPI asposeAPI) {
+ return new AbstractTask(NbBundle.getMessage(AsposeMavenProjectWizardIterator.class, "AsposeManager.progressTitle")) {
+ @Override
+ public void run() {
+ String progressMsg = NbBundle.getMessage(AsposeMavenProjectWizardIterator.class, "AsposeManager.progressMessage");
+
+ p.progress(progressMsg);
+ StatusDisplayer.getDefault().setStatusText(progressMsg);
+
+ p.start(100);
+ p.progress(50);
+ retrieveAsposeMavenDependencies();
+ StatusDisplayer.getDefault().setStatusText(progressMsg);
+ p.progress(100);
+ p.finish();
+ }
+ };
+ }
+
+ /**
+ *
+ * @param asposeAPI
+ * @return
+ */
+ public AbstractTask createDownloadExamplesTask(final AsposeJavaAPI asposeAPI) {
+ return new AbstractTask(NbBundle.getMessage(AsposeMavenProjectWizardIterator.class, "AsposeManager.progressExamplesTitle")) {
+ @Override
+ public void run() {
+ String downloadExamplesMessage = NbBundle.getMessage(AsposeMavenProjectWizardIterator.class, "AsposeManager.downloadExamplesMessage");
+
+ p.progress(downloadExamplesMessage);
+ StatusDisplayer.getDefault().setStatusText(downloadExamplesMessage);
+ p.start(100);
+ p.progress(50);
+ asposeAPI.downloadExamples(p);
+ p.progress(downloadExamplesMessage);
+ p.progress(100);
+ p.finish();
+ }
+ };
+ }
+
+ /**
+ *
+ * @param asposeAPI
+ * @param panel
+ * @return
+ */
+ public Runnable populateExamplesTask(final AsposeJavaAPI asposeAPI, final AsposeExamplePanel panel) {
+
+ return new Runnable() {
+ @Override
+ public void run() {
+ final CustomMutableTreeNode top = new CustomMutableTreeNode("");
+ DefaultTreeModel model = (DefaultTreeModel) panel.getExamplesTree().getModel();
+ model.setRoot(top);
+ model.reload(top);
+ AsposeJavaAPI component = AsposeSlidesJavaAPI.getInstance();
+ if (component.isExamplesDefinitionAvailable()) {
+ populateExamplesTree(component, top, panel);
+ }
+ top.setTopTreeNodeText(AsposeConstants.API_NAME);
+ model.setRoot(top);
+ model.reload(top);
+ panel.getExamplesTree().expandPath(new TreePath(top.getPath()));
+ }
+ };
+
+ }
+
+ /**
+ *
+ * @return
+ */
+ public boolean retrieveAsposeMavenDependencies() {
+ try {
+ getAsposeProjectMavenDependencies().clear();
+ AsposeJavaAPI component = AsposeSlidesJavaAPI.getInstance();
+ Metadata productMavenDependency = getProductMavenDependency(component.get_mavenRepositoryURL());
+ if (productMavenDependency != null) {
+ getAsposeProjectMavenDependencies().add(productMavenDependency);
+ }
+
+ } catch (Exception rex) {
+ Exceptions.printStackTrace(rex);
+ return false;
+ }
+ return !getAsposeProjectMavenDependencies().isEmpty();
+ }
+
+ /**
+ *
+ * @return
+ */
+ public static boolean isInternetConnected() {
+ try {
+ InetAddress address = InetAddress.getByName(AsposeConstants.INTERNET_CONNNECTIVITY_PING_URL);
+ if (address == null) {
+ return false;
+ }
+ } catch (UnknownHostException e) {
+ Exceptions.printStackTrace(e);
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ *
+ * @param title
+ * @param message
+ * @param buttons
+ * @param icon
+ * @return
+ */
+ public static int showMessage(String title, String message, int buttons, int icon) {
+ int result = JOptionPane.showConfirmDialog(null, message, title, buttons, icon);
+ return result;
+ }
+
+ private Document getXmlDocument(String mavenPomXmlfile) throws ParserConfigurationException, SAXException, IOException {
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
+ Document pomDocument = docBuilder.parse(mavenPomXmlfile);
+
+ return pomDocument;
+ }
+
+ /**
+ *
+ * @param dependencyName
+ * @return
+ */
+ public String getDependencyVersionFromPOM(String dependencyName) {
+ try {
+ String mavenPomXmlfile = projectDir.getPath() + File.separator + AsposeConstants.MAVEN_POM_XML;
+
+ Document pomDocument = getXmlDocument(mavenPomXmlfile);
+
+ XPathFactory xPathfactory = XPathFactory.newInstance();
+ XPath xpath = xPathfactory.newXPath();
+ String expression = "//version[ancestor::dependency/artifactId[text()='" + dependencyName + "']]";
+ XPathExpression xPathExpr = xpath.compile(expression);
+ NodeList nl = (NodeList) xPathExpr.evaluate(pomDocument, XPathConstants.NODESET);
+
+ if (nl != null && nl.getLength() > 0) {
+ return nl.item(0).getTextContent();
+ }
+ } catch (IOException | ParserConfigurationException | SAXException | XPathExpressionException e) {
+ Exceptions.printStackTrace(e);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getAsposeHomePath() {
+
+ return System.getProperty("user.home") + File.separator + "aspose" + File.separator;
+
+ }
+
+ /**
+ *
+ * @param sourceLocation
+ * @param targetLocation
+ * @throws IOException
+ */
+ public static void copyDirectory(String sourceLocation, String targetLocation) throws IOException {
+
+ checkAndCreateFolder(targetLocation);
+ copyDirectory(new File(sourceLocation + File.separator), new File(targetLocation + File.separator));
+ }
+
+ /**
+ *
+ * @param sourceLocation
+ * @param targetLocation
+ * @throws IOException
+ */
+ public static void copyDirectory(File sourceLocation, File targetLocation) throws IOException {
+ if (sourceLocation.isDirectory()) {
+ if (!targetLocation.exists()) {
+ targetLocation.mkdir();
+ }
+
+ String[] children = sourceLocation.list();
+ for (String children1 : children) {
+ copyDirectory(new File(sourceLocation, children1), new File(targetLocation, children1));
+ }
+ } else {
+
+ OutputStream out;
+ try (InputStream in = new FileInputStream(sourceLocation)) {
+ out = new FileOutputStream(targetLocation);
+ // Copy the bits from instream to outstream
+ byte[] buf = new byte[1024];
+ int len;
+ while ((len = in.read(buf)) > 0) {
+ out.write(buf, 0, len);
+ }
+ }
+ out.close();
+ }
+ }
+
+ /**
+ *
+ * @param folderPath
+ */
+ public static void checkAndCreateFolder(String folderPath) {
+ File folder = new File(folderPath);
+ if (!folder.exists()) {
+ folder.mkdirs();
+ }
+ }
+ // Singleton instance
+ private static AsposeMavenProjectManager asposeMavenProjectManager = new AsposeMavenProjectManager();
+
+ /**
+ *
+ * @return
+ */
+ public static AsposeMavenProjectManager getInstance() {
+ return asposeMavenProjectManager;
+ }
+
+ /**
+ *
+ * @param wiz
+ * @return
+ */
+ public static AsposeMavenProjectManager initialize(WizardDescriptor wiz) {
+ asposeMavenProjectManager = new AsposeMavenProjectManager();
+ asposeMavenProjectManager.projectDir = FileUtil.normalizeFile((File) wiz.getProperty("projdir"));
+ return asposeMavenProjectManager;
+ }
+
+ private AsposeMavenProjectManager() {
+ }
+
+ /**
+ *
+ * @return
+ */
+ public static List getAsposeProjectMavenDependencies() {
+ return asposeProjectMavenDependencies;
+ }
+
+ /**
+ *
+ */
+ public static void clearAsposeProjectMavenDependencies() {
+ asposeProjectMavenDependencies.clear();
+ }
+
+ private static final List asposeProjectMavenDependencies = new ArrayList();
+
+ /**
+ *
+ * @param addTheseDependencies
+ */
+ public void addMavenDependenciesInProject(NodeList addTheseDependencies) {
+
+ String mavenPomXmlfile = projectDir.getPath() + File.separator + AsposeConstants.MAVEN_POM_XML;
+
+ try {
+ Document pomDocument = getXmlDocument(mavenPomXmlfile);
+
+ Node dependenciesNode = pomDocument.getElementsByTagName("dependencies").item(0);
+
+ if (addTheseDependencies != null && addTheseDependencies.getLength() > 0) {
+ for (int n = 0; n < addTheseDependencies.getLength(); n++) {
+ String artifactId = addTheseDependencies.item(n).getFirstChild().getNextSibling().getNextSibling().getNextSibling().getFirstChild().getNodeValue();
+
+ XPathFactory xPathfactory = XPathFactory.newInstance();
+ XPath xpath = xPathfactory.newXPath();
+ String expression = "//artifactId[text()='" + artifactId + "']";
+
+ XPathExpression xPathExpr = xpath.compile(expression);
+
+ Node dependencyAlreadyExist = (Node) xPathExpr.evaluate(pomDocument, XPathConstants.NODE);
+
+ if (dependencyAlreadyExist != null) {
+ Node dependencies = pomDocument.getElementsByTagName("dependencies").item(0);
+ dependencies.removeChild(dependencyAlreadyExist.getParentNode());
+ }
+
+ Node importedNode = pomDocument.importNode(addTheseDependencies.item(n), true);
+ dependenciesNode.appendChild(importedNode);
+
+ }
+ }
+ removeEmptyLinesfromDOM(pomDocument);
+ writeToPOM(pomDocument);
+
+ } catch (ParserConfigurationException | SAXException | XPathExpressionException | IOException ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ }
+
+ /**
+ *
+ * @param addTheseRepositories
+ */
+ public void addMavenRepositoriesInProject(NodeList addTheseRepositories) {
+ String mavenPomXmlfile = projectDir.getPath() + File.separator + AsposeConstants.MAVEN_POM_XML;
+
+ try {
+ Document pomDocument = getXmlDocument(mavenPomXmlfile);
+
+ Node repositoriesNode = pomDocument.getElementsByTagName("repositories").item(0);
+
+ if (addTheseRepositories != null && addTheseRepositories.getLength() > 0) {
+ for (int n = 0; n < addTheseRepositories.getLength(); n++) {
+ String repositoryId = addTheseRepositories.item(n).getFirstChild().getNextSibling().getFirstChild().getNodeValue();
+
+ XPathFactory xPathfactory = XPathFactory.newInstance();
+ XPath xpath = xPathfactory.newXPath();
+ String expression = "//id[text()='" + repositoryId + "']";
+
+ XPathExpression xPathExpr = xpath.compile(expression);
+
+ Boolean repositoryAlreadyExist = (Boolean) xPathExpr.evaluate(pomDocument, XPathConstants.BOOLEAN);
+
+ if (!repositoryAlreadyExist) {
+ Node importedNode = pomDocument.importNode(addTheseRepositories.item(n), true);
+ repositoriesNode.appendChild(importedNode);
+ }
+
+ }
+ }
+ removeEmptyLinesfromDOM(pomDocument);
+ writeToPOM(pomDocument);
+
+ } catch (XPathExpressionException | SAXException | ParserConfigurationException | IOException ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ }
+
+ /**
+ *
+ * @param pomDocument
+ * @throws IOException
+ */
+ public void writeToPOM(Document pomDocument) throws IOException {
+
+ FileObject projectRoot = FileUtil.toFileObject(projectDir);
+ FileObject fo = FileUtil.createData(projectRoot, AsposeConstants.MAVEN_POM_XML);
+ try (OutputStream out = fo.getOutputStream()) {
+ XMLUtil.write(pomDocument, out, "UTF-8");
+ }
+ }
+
+ /**
+ *
+ * @param mavenPomXmlfile
+ * @param excludeGroup
+ * @return
+ */
+ public NodeList getDependenciesFromPOM(String mavenPomXmlfile, String excludeGroup) {
+
+ try {
+
+ Document pomDocument = getXmlDocument(mavenPomXmlfile);
+
+ XPathFactory xPathfactory = XPathFactory.newInstance();
+ XPath xpath = xPathfactory.newXPath();
+ String expression = "//dependency[child::groupId[text()!='" + excludeGroup + "']]";
+ XPathExpression xPathExpr = xpath.compile(expression);
+ NodeList nl = (NodeList) xPathExpr.evaluate(pomDocument, XPathConstants.NODESET);
+ if (nl != null && nl.getLength() > 0) {
+ return nl;
+ }
+ } catch (IOException | ParserConfigurationException | SAXException | XPathExpressionException e) {
+ Exceptions.printStackTrace(e);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param mavenPomXmlfile
+ * @param excludeURL
+ * @return
+ */
+ public NodeList getRepositoriesFromPOM(String mavenPomXmlfile, String excludeURL) {
+
+ try {
+
+ Document pomDocument = getXmlDocument(mavenPomXmlfile);
+
+ XPathFactory xPathfactory = XPathFactory.newInstance();
+ XPath xpath = xPathfactory.newXPath();
+ String expression = "//repository[child::url[not(starts-with(.,'" + excludeURL + "'))]]";
+ XPathExpression xPathExpr = xpath.compile(expression);
+ NodeList nl = (NodeList) xPathExpr.evaluate(pomDocument, XPathConstants.NODESET);
+ if (nl != null && nl.getLength() > 0) {
+ return nl;
+ }
+ } catch (IOException | ParserConfigurationException | SAXException | XPathExpressionException e) {
+ Exceptions.printStackTrace(e);
+ }
+ return null;
+ }
+
+ private void removeEmptyLinesfromDOM(Document doc) throws XPathExpressionException {
+ XPath xp = XPathFactory.newInstance().newXPath();
+ NodeList nl = (NodeList) xp.evaluate("//text()[normalize-space(.)='']", doc, XPathConstants.NODESET);
+
+ for (int i = 0; i < nl.getLength(); ++i) {
+ Node node = nl.item(i);
+ node.getParentNode().removeChild(node);
+ }
+ }
+
+ /**
+ *
+ * @param asposeComponent
+ * @param top
+ * @param panel
+ */
+ public void populateExamplesTree(AsposeJavaAPI asposeComponent, CustomMutableTreeNode top, AsposeExamplePanel panel) {
+ String examplesFullPath = asposeComponent.getLocalRepositoryPath() + File.separator + AsposeConstants.GITHUB_EXAMPLES_SOURCE_LOCATION;
+ File directory = new File(examplesFullPath);
+ panel.getExamplesTree().removeAll();
+ top.setExPath(examplesFullPath);
+ Queue