You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2017/04/18 08:54:33 UTC
[48/50] [abbrv] syncope git commit: Several pom fixes,
proper LICENSE and NOTICE, package reorganization, checkstyle setup
http://git-wip-us.apache.org/repos/asf/syncope/blob/06fd9e37/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/service/ReportTemplateManagerService.java
----------------------------------------------------------------------
diff --git a/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/service/ReportTemplateManagerService.java b/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/service/ReportTemplateManagerService.java
deleted file mode 100644
index e56b24b..0000000
--- a/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/service/ReportTemplateManagerService.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.netbeans.plugin.service;
-
-import java.io.InputStream;
-import java.util.List;
-import javax.ws.rs.core.Response;
-import org.apache.syncope.client.lib.SyncopeClient;
-import org.apache.syncope.client.lib.SyncopeClientFactoryBean;
-import org.apache.syncope.common.lib.to.ReportTemplateTO;
-import org.apache.syncope.common.lib.types.ReportTemplateFormat;
-import org.apache.syncope.common.rest.api.service.ReportTemplateService;
-
-public class ReportTemplateManagerService {
-
- private ReportTemplateService service;
-
- public ReportTemplateManagerService(final String url, final String userName, final String password) {
- SyncopeClient syncopeClient = new SyncopeClientFactoryBean().setAddress(url).create(userName, password);
- service = syncopeClient.getService(ReportTemplateService.class);
- }
-
- public List<ReportTemplateTO> list() {
- return service.list();
- }
-
- public boolean create(final ReportTemplateTO reportTemplateTO) {
- return Response.Status.CREATED.getStatusCode() == service.create(reportTemplateTO).getStatus();
- }
-
- public ReportTemplateTO read(final String key) {
- return service.read(key);
- }
-
- public boolean delete(final String key) {
- service.delete(key);
- return true;
- }
-
- public Object getFormat(final String key, final ReportTemplateFormat format) {
- return service.getFormat(key, format).getEntity();
- }
-
- public void setFormat(final String key, final ReportTemplateFormat format, final InputStream templateIn) {
- service.setFormat(key, format, templateIn);
- }
-
- public boolean removeFormat(final String key, final ReportTemplateFormat format) {
- return false;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/06fd9e37/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/view/ResourceExplorerTopComponent.form
----------------------------------------------------------------------
diff --git a/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/view/ResourceExplorerTopComponent.form b/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/view/ResourceExplorerTopComponent.form
deleted file mode 100644
index 79458db..0000000
--- a/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/view/ResourceExplorerTopComponent.form
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright owership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<Form version="1.7" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
- <AuxValues>
- <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
- <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
- <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
- <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
- <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
- <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
- <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
- <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
- <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
- </AuxValues>
-
- <Layout>
- <DimensionLayout dim="0">
- <Group type="103" groupAlignment="0" attributes="0">
- <Component id="jScrollPane1" alignment="0" pref="258" max="32767" attributes="0"/>
- </Group>
- </DimensionLayout>
- <DimensionLayout dim="1">
- <Group type="103" groupAlignment="0" attributes="0">
- <Component id="jScrollPane1" alignment="0" pref="445" max="32767" attributes="0"/>
- </Group>
- </DimensionLayout>
- </Layout>
- <SubComponents>
- <Container class="javax.swing.JScrollPane" name="jScrollPane1">
- <AuxValues>
- <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
- </AuxValues>
-
- <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
- <SubComponents>
- <Component class="javax.swing.JTree" name="resourceExplorerTree">
- <Properties>
- <Property name="model" type="javax.swing.tree.TreeModel" editor="org.netbeans.modules.form.editors2.TreeModelEditor">
- <TreeModel code=""/>
- </Property>
- <Property name="rootVisible" type="boolean" value="false"/>
- <Property name="scrollsOnExpand" type="boolean" value="true"/>
- </Properties>
- <Events>
- <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="resourceExplorerTreeMouseClicked"/>
- </Events>
- </Component>
- </SubComponents>
- </Container>
- </SubComponents>
-</Form>
http://git-wip-us.apache.org/repos/asf/syncope/blob/06fd9e37/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/view/ResourceExplorerTopComponent.java
----------------------------------------------------------------------
diff --git a/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/view/ResourceExplorerTopComponent.java b/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/view/ResourceExplorerTopComponent.java
deleted file mode 100644
index 4c91ec5..0000000
--- a/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/view/ResourceExplorerTopComponent.java
+++ /dev/null
@@ -1,553 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.netbeans.plugin.view;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.MouseEvent;
-import java.beans.PropertyChangeListener;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.charset.Charset;
-import java.util.List;
-import javax.swing.Action;
-import javax.swing.JMenuItem;
-import javax.swing.JOptionPane;
-import javax.swing.JPopupMenu;
-import javax.swing.text.BadLocationException;
-import javax.swing.text.Document;
-import javax.swing.text.JTextComponent;
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.DefaultTreeModel;
-import org.apache.commons.io.IOUtils;
-import org.apache.syncope.common.lib.to.MailTemplateTO;
-import org.apache.syncope.common.lib.to.ReportTemplateTO;
-import org.apache.syncope.common.lib.types.MailTemplateFormat;
-import org.apache.syncope.common.lib.types.ReportTemplateFormat;
-import org.apache.syncope.netbeans.plugin.connector.ResourceConnector;
-import org.apache.syncope.netbeans.plugin.constants.PluginConstants;
-import org.apache.syncope.netbeans.plugin.service.MailTemplateManagerService;
-import org.apache.syncope.netbeans.plugin.service.ReportTemplateManagerService;
-import org.netbeans.api.editor.EditorRegistry;
-import org.netbeans.api.progress.ProgressHandle;
-import org.netbeans.api.progress.ProgressHandleFactory;
-import org.netbeans.api.settings.ConvertAsProperties;
-import org.openide.awt.ActionID;
-import org.openide.awt.ActionReference;
-import org.openide.cookies.OpenCookie;
-import org.openide.filesystems.FileObject;
-import org.openide.filesystems.FileUtil;
-import org.openide.loaders.DataObject;
-import org.openide.util.Cancellable;
-import org.openide.util.Exceptions;
-import org.openide.util.RequestProcessor;
-import org.openide.windows.TopComponent;
-
-/**
- * Top component which displays something.
- */
-@ConvertAsProperties(
- dtd = "-//org.apache.syncope.netbeans.plugin//ResourceExplorer//EN",
- autostore = false
-)
-@TopComponent.Description(
- preferredID = "ResourceExplorerTopComponent",
- iconBase = "images/syncope.png",
- persistenceType = TopComponent.PERSISTENCE_ALWAYS
-)
-@TopComponent.Registration(mode = "explorer", openAtStartup = false)
-@ActionID(category = "Window", id = "org.apache.syncope.netbeans.plugin.ResourceExplorerTopComponent")
-@ActionReference(path = "Menu/Window" /*, position = 333 */)
-@TopComponent.OpenActionRegistration(
- displayName = "Apache Syncope",
- preferredID = "ResourceExplorerTopComponent"
-)
-
-public final class ResourceExplorerTopComponent extends TopComponent {
-
- private DefaultTreeModel treeModel;
- private DefaultMutableTreeNode root;
- private DefaultMutableTreeNode mailTemplates;
- private DefaultMutableTreeNode reportXslts;
- private MailTemplateManagerService mailTemplateManagerService;
- private ReportTemplateManagerService reportTemplateManagerService;
- private Charset encodingPattern;
-
- public ResourceExplorerTopComponent() {
-
- initComponents();
- setName(PluginConstants.DISPLAY_NAME);
- setToolTipText(PluginConstants.TOOL_TIP_TEXT);
-
- treeModel = (DefaultTreeModel) resourceExplorerTree.getModel();
- root = (DefaultMutableTreeNode) treeModel.getRoot();
- DefaultMutableTreeNode visibleRoot
- = new DefaultMutableTreeNode(PluginConstants.DISPLAY_NAME);
- mailTemplates = new DefaultMutableTreeNode(PluginConstants.MAIL_TEMPLTAE_CONSTANT);
- reportXslts = new DefaultMutableTreeNode(PluginConstants.REPORT_XSLTS_CONSTANT);
- root.add(visibleRoot);
- visibleRoot.add(mailTemplates);
- visibleRoot.add(reportXslts);
- treeModel.reload();
-
- }
-
- /**
- * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The
- * content of this method is always regenerated by the Form Editor.
- */
- // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
- private void initComponents() {
-
- jScrollPane1 = new javax.swing.JScrollPane();
- resourceExplorerTree = new javax.swing.JTree();
-
- javax.swing.tree.DefaultMutableTreeNode treeNode1 = new javax.swing.tree.DefaultMutableTreeNode("root");
- resourceExplorerTree.setModel(new javax.swing.tree.DefaultTreeModel(treeNode1));
- resourceExplorerTree.setRootVisible(false);
- resourceExplorerTree.setScrollsOnExpand(true);
- resourceExplorerTree.addMouseListener(new java.awt.event.MouseAdapter() {
- public void mouseClicked(final java.awt.event.MouseEvent evt) {
- resourceExplorerTreeMouseClicked(evt);
- }
- });
- jScrollPane1.setViewportView(resourceExplorerTree);
-
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
- this.setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 258, Short.MAX_VALUE)
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 445, Short.MAX_VALUE)
- );
- }
- // </editor-fold>//GEN-END:initComponents
-
- private void resourceExplorerTreeMouseClicked(final java.awt.event.MouseEvent evt) {
- if (evt.getButton() == MouseEvent.BUTTON1 && evt.getClickCount() == 2) {
- DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode) resourceExplorerTree.
- getLastSelectedPathComponent();
- DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode) selectedNode.getParent();
- if (selectedNode.isLeaf()) {
- String name = (String) selectedNode.getUserObject();
- if (parentNode.getUserObject().equals(PluginConstants.MAIL_TEMPLTAE_CONSTANT)) {
- try {
- openMailEditor(name);
- } catch (IOException ex) {
- Exceptions.printStackTrace(ex);
- }
- } else {
- try {
- openReportEditor(name);
- } catch (IOException ex) {
- Exceptions.printStackTrace(ex);
- }
- }
- }
- } else if (evt.getButton() == MouseEvent.BUTTON3 && evt.getClickCount() == 1) {
- DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode) resourceExplorerTree.
- getLastSelectedPathComponent();
- String selectedNodeName = (String) selectedNode.getUserObject();
- if (selectedNode.isLeaf()) {
- leafRightClickAction(evt, selectedNode);
- } else if (selectedNodeName.equals(PluginConstants.MAIL_TEMPLTAE_CONSTANT)) {
- folderRightClickAction(evt, mailTemplates);
- } else if (selectedNodeName.equals(PluginConstants.REPORT_XSLTS_CONSTANT)) {
- folderRightClickAction(evt, reportXslts);
- } else if (selectedNodeName.equals(PluginConstants.DISPLAY_NAME)) {
- rootRightClickAction(evt);
- }
- }
- }
-
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JScrollPane jScrollPane1;
- private javax.swing.JTree resourceExplorerTree;
- // End of variables declaration//GEN-END:variables
-
- @Override
- public void componentOpened() {
- File file = new File("UserData.txt");
- if (!file.exists()) {
- new ServerDetailsView(null, true).setVisible(true);
- }
- try {
- mailTemplateManagerService = ResourceConnector.getMailTemplateManagerService();
- } catch (IOException ex) {
- JOptionPane.showMessageDialog(null, "Error Occured.", "Error",
- JOptionPane.ERROR_MESSAGE);
- new ServerDetailsView(null, true).setVisible(true);
- }
- try {
- reportTemplateManagerService
- = ResourceConnector.getReportTemplateManagerService();
- } catch (IOException ex) {
- new ServerDetailsView(null, true).setVisible(true);
- }
-
- Runnable tsk = new Runnable() {
- @Override
- public void run() {
- final ProgressHandle progr = ProgressHandleFactory.createHandle("Loading Templates", new Cancellable() {
- @Override
- public boolean cancel() {
- return true;
- }
- }, new Action() {
- @Override
- public Object getValue(final String key) {
- return null;
- }
-
- @Override
- public void putValue(final String key, final Object value) {
- }
-
- @Override
- public void setEnabled(final boolean b) {
- }
-
- @Override
- public boolean isEnabled() {
- return false;
- }
-
- @Override
- public void addPropertyChangeListener(final PropertyChangeListener listener) {
- }
-
- @Override
- public void removePropertyChangeListener(final PropertyChangeListener listener) {
- }
-
- @Override
- public void actionPerformed(final ActionEvent e) {
- }
- });
-
- progr.start();
- progr.progress("Loading Templates.");
- addMailTemplates();
- addReportXslts();
- progr.finish();
- }
-
- };
- RequestProcessor.getDefault().post(tsk);
- }
-
- @Override
- public void componentClosed() {
- // TODO add custom code on component closing
- }
-
- void writeProperties(final java.util.Properties p) {
- // better to version settings since initial version as advocated at
- // http://wiki.apidesign.org/wiki/PropertyFiles
- p.setProperty("version", "1.0");
- // TODO store your settings
- }
-
- void readProperties(final java.util.Properties p) {
- String version = p.getProperty("version");
- // TODO read your settings according to their version
- }
-
- private void addMailTemplates() {
- List<MailTemplateTO> mailTemplateList = mailTemplateManagerService.list();
- for (MailTemplateTO mailTemplate : mailTemplateList) {
- this.mailTemplates.add(new DefaultMutableTreeNode(
- mailTemplate.getKey()));
- }
- treeModel.reload();
- }
-
- private void addReportXslts() {
- List<ReportTemplateTO> reportTemplates = reportTemplateManagerService.list();
- for (ReportTemplateTO reportTemplate : reportTemplates) {
- reportXslts.add(new DefaultMutableTreeNode(
- reportTemplate.getKey()));
- }
- treeModel.reload();
- }
-
- private void rootRightClickAction(final MouseEvent evt) {
- JPopupMenu menu = new JPopupMenu();
- JMenuItem saveItem = new JMenuItem("Save");
- JMenuItem resetConnectionItem = new JMenuItem("Reset Connection");
- menu.add(saveItem);
- menu.add(resetConnectionItem);
-
- saveItem.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(final ActionEvent e) {
- saveContent();
- }
- });
-
- resetConnectionItem.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(final ActionEvent e) {
- File file = new File("UserData.txt");
- try {
- BufferedReader bf = new BufferedReader(new FileReader(file));
- String host = bf.readLine();
- String userName = bf.readLine();
- String password = bf.readLine();
- ServerDetailsView serverDetails = new ServerDetailsView(null, true);
- serverDetails.setDetails(host, userName, password);
- serverDetails.setVisible(true);
- } catch (FileNotFoundException ex) {
- Exceptions.printStackTrace(ex);
- } catch (IOException ex) {
- Exceptions.printStackTrace(ex);
- }
- }
- });
-
- menu.show(evt.getComponent(), evt.getX(), evt.getY());
- }
-
- private void folderRightClickAction(final MouseEvent evt,
- final DefaultMutableTreeNode node) {
- JPopupMenu menu = new JPopupMenu();
- JMenuItem addItem = new JMenuItem("New");
- menu.add(addItem);
-
- addItem.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(final ActionEvent e) {
- String name = JOptionPane.showInputDialog("Enter Name");
- boolean added = false;
- if (node.getUserObject().equals(
- PluginConstants.MAIL_TEMPLTAE_CONSTANT)) {
- MailTemplateTO mailTemplate = new MailTemplateTO();
- mailTemplate.setKey(name);
- added = mailTemplateManagerService.create(mailTemplate);
- mailTemplateManagerService.setFormat(name,
- MailTemplateFormat.HTML,
- IOUtils.toInputStream("//Enter Content here", encodingPattern));
- mailTemplateManagerService.setFormat(name,
- MailTemplateFormat.TEXT,
- IOUtils.toInputStream("//Enter Content here", encodingPattern));
- try {
- openMailEditor(name);
- } catch (IOException ex) {
- Exceptions.printStackTrace(ex);
- }
- } else {
- ReportTemplateTO reportTemplate = new ReportTemplateTO();
- reportTemplate.setKey(name);
- added = reportTemplateManagerService.create(reportTemplate);
- reportTemplateManagerService.setFormat(name,
- ReportTemplateFormat.FO,
- IOUtils.toInputStream("//Enter content here", encodingPattern));
- reportTemplateManagerService.setFormat(name,
- ReportTemplateFormat.CSV,
- IOUtils.toInputStream("//Enter content here", encodingPattern));
- reportTemplateManagerService.setFormat(name,
- ReportTemplateFormat.HTML,
- IOUtils.toInputStream("//Enter content here", encodingPattern));
- try {
- openReportEditor(name);
- } catch (IOException ex) {
- Exceptions.printStackTrace(ex);
- }
- }
-
- if (added) {
- node.add(new DefaultMutableTreeNode(name));
- treeModel.reload(node);
- } else {
- JOptionPane.showMessageDialog(null, "Error while creating "
- + "new element", "Error", JOptionPane.ERROR_MESSAGE);
- }
- }
- });
-
- menu.show(evt.getComponent(), evt.getX(), evt.getY());
- }
-
- private void leafRightClickAction(final MouseEvent evt,
- final DefaultMutableTreeNode node) {
- JPopupMenu menu = new JPopupMenu();
- JMenuItem deleteItem = new JMenuItem("Delete");
- menu.add(deleteItem);
-
- deleteItem.addActionListener(new ActionListener() {
- public void actionPerformed(final ActionEvent e) {
- int result = JOptionPane.showConfirmDialog(null,
- "Do you want to delete ?");
- if (result == JOptionPane.OK_OPTION) {
- DefaultMutableTreeNode parent
- = (DefaultMutableTreeNode) node.getParent();
- String name = (String) node.getUserObject();
- boolean deleted;
- if (parent.getUserObject().equals(
- PluginConstants.MAIL_TEMPLTAE_CONSTANT)) {
- deleted = mailTemplateManagerService.delete(
- (String) node.getUserObject());
- } else {
- deleted = reportTemplateManagerService.delete(
- (String) node.getUserObject());
- }
- if (deleted) {
- node.removeFromParent();
- treeModel.reload(parent);
- } else {
-
- JOptionPane.showMessageDialog(null,
- "Error while deleting new element", "Error",
- JOptionPane.ERROR_MESSAGE);
- }
- }
- }
- });
-
- menu.show(evt.getComponent(), evt.getX(), evt.getY());
- }
-
- private void openMailEditor(final String name) throws IOException {
- String type = null;
- String content = null;
- InputStream is = null;
- String formatStr = (String) JOptionPane.showInputDialog(null, "Select File Format",
- "File format", JOptionPane.QUESTION_MESSAGE, null,
- PluginConstants.MAIL_TEMPLATE_FORMATS, "TEXT");
- MailTemplateFormat format = MailTemplateFormat.valueOf(formatStr);
-
- switch (format) {
- case HTML: type = "html";
- is = (InputStream) mailTemplateManagerService.getFormat(name,
- MailTemplateFormat.HTML);
- break;
- case TEXT: type = "txt";
- is = (InputStream) mailTemplateManagerService.getFormat(name,
- MailTemplateFormat.TEXT);
- break;
- default: break;
- }
- content = IOUtils.toString(is, encodingPattern);
-
- File directory = new File("Template/Mail");
- if (!directory.exists()) {
- directory.mkdirs();
- }
- File file = new File("Template/Mail/" + name + "." + type);
- FileWriter fw = new FileWriter(file);
- fw.write(content);
- fw.flush();
- FileObject fob = FileUtil.toFileObject(file.getAbsoluteFile());
- fob.setAttribute("description", "TEXT");
- DataObject data = DataObject.find(fob);
- OpenCookie cookie = (OpenCookie) data.getCookie(OpenCookie.class);
- cookie.open();
- }
-
- private void openReportEditor(final String name) throws IOException {
- String type = null;
- String content = null;
- InputStream is = null;
- String formatStr = (String) JOptionPane.showInputDialog(null, "Select File Format",
- "File format", JOptionPane.QUESTION_MESSAGE, null,
- PluginConstants.REPORT_TEMPLATE_FORMATS, "TEXT");
- ReportTemplateFormat format = ReportTemplateFormat.valueOf(formatStr);
-
- switch (format) {
- case HTML: type = "html";
- is = (InputStream) reportTemplateManagerService.getFormat(name,
- ReportTemplateFormat.HTML);
- break;
- case CSV: type = "csv";
- is = (InputStream) reportTemplateManagerService.getFormat(name,
- ReportTemplateFormat.CSV);
- break;
- case FO: type = "fo";
- is = (InputStream) reportTemplateManagerService.getFormat(name,
- ReportTemplateFormat.FO);
- break;
- default: break;
- }
- content = IOUtils.toString(is, encodingPattern);
-
- File directory = new File("Template/Report");
- if (!directory.exists()) {
- directory.mkdirs();
- }
- File file = new File("Template/Report/" + name + "." + type);
- FileWriter fw = new FileWriter(file);
- fw.write(content);
- fw.flush();
- FileObject fob = FileUtil.toFileObject(file.getAbsoluteFile());
- DataObject data = DataObject.find(fob);
- OpenCookie cookie = (OpenCookie) data.getCookie(OpenCookie.class);
- cookie.open();
- }
-
- private void saveContent() {
-
- try {
- JTextComponent ed = EditorRegistry.lastFocusedComponent();
- Document document = ed.getDocument();
- String content = document.getText(0, document.getLength());
- String path = (String) document.getProperty(Document.TitleProperty);
- String[] temp = path.split(File.separator);
- String name = temp[temp.length - 1];
- String templateType = temp[temp.length - 2];
- temp = name.split("\\.");
- String format = temp[1];
- String key = temp[0];
-
- if (templateType.equals("Mail")) {
- if (format.equals("txt")) {
- mailTemplateManagerService.setFormat(key,
- MailTemplateFormat.TEXT,
- IOUtils.toInputStream(content, encodingPattern));
- } else {
- mailTemplateManagerService.setFormat(key,
- MailTemplateFormat.HTML,
- IOUtils.toInputStream(content, encodingPattern));
- }
- } else if (format.equals("html")) {
- reportTemplateManagerService.setFormat(key,
- ReportTemplateFormat.HTML,
- IOUtils.toInputStream(content, encodingPattern));
- } else if (format.equals("fo")) {
- reportTemplateManagerService.setFormat(key,
- ReportTemplateFormat.FO,
- IOUtils.toInputStream(content, encodingPattern));
- } else {
- reportTemplateManagerService.setFormat(key,
- ReportTemplateFormat.CSV,
- IOUtils.toInputStream(content, encodingPattern));
- }
- } catch (BadLocationException ex) {
- Exceptions.printStackTrace(ex);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/06fd9e37/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/view/ServerDetailsView.form
----------------------------------------------------------------------
diff --git a/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/view/ServerDetailsView.form b/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/view/ServerDetailsView.form
deleted file mode 100644
index da41034..0000000
--- a/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/view/ServerDetailsView.form
+++ /dev/null
@@ -1,161 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright owership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
- <Properties>
- <Property name="defaultCloseOperation" type="int" value="2"/>
- </Properties>
- <SyntheticProperties>
- <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
- <SyntheticProperty name="generateCenter" type="boolean" value="false"/>
- </SyntheticProperties>
- <AuxValues>
- <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
- <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
- <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
- <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
- <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
- <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
- <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
- <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
- <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
- </AuxValues>
-
- <Layout>
- <DimensionLayout dim="0">
- <Group type="103" groupAlignment="0" attributes="0">
- <Group type="102" attributes="0">
- <Group type="103" groupAlignment="0" attributes="0">
- <Group type="102" attributes="0">
- <EmptySpace min="-2" pref="41" max="-2" attributes="0"/>
- <Group type="103" groupAlignment="1" attributes="0">
- <Component id="okButton" min="-2" pref="74" max="-2" attributes="0"/>
- <Group type="102" attributes="0">
- <Group type="103" groupAlignment="0" attributes="0">
- <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
- <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
- <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/>
- </Group>
- <EmptySpace min="-2" pref="39" max="-2" attributes="0"/>
- <Group type="103" groupAlignment="0" max="-2" attributes="0">
- <Component id="userNameTxt" max="32767" attributes="0"/>
- <Component id="urlTxt" max="32767" attributes="0"/>
- <Component id="passwordTxt" alignment="0" min="-2" pref="155" max="-2" attributes="0"/>
- </Group>
- </Group>
- </Group>
- </Group>
- <Group type="102" alignment="0" attributes="0">
- <EmptySpace min="-2" pref="101" max="-2" attributes="0"/>
- <Component id="jLabel4" min="-2" max="-2" attributes="0"/>
- </Group>
- </Group>
- <EmptySpace pref="41" max="32767" attributes="0"/>
- </Group>
- </Group>
- </DimensionLayout>
- <DimensionLayout dim="1">
- <Group type="103" groupAlignment="0" attributes="0">
- <Group type="102" alignment="1" attributes="0">
- <EmptySpace max="-2" attributes="0"/>
- <Component id="jLabel4" pref="32" max="32767" attributes="0"/>
- <EmptySpace type="separate" max="-2" attributes="0"/>
- <Group type="103" groupAlignment="3" attributes="0">
- <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
- <Component id="urlTxt" alignment="3" min="-2" max="-2" attributes="0"/>
- </Group>
- <EmptySpace type="separate" max="-2" attributes="0"/>
- <Group type="103" groupAlignment="3" attributes="0">
- <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
- <Component id="userNameTxt" alignment="3" min="-2" max="-2" attributes="0"/>
- </Group>
- <EmptySpace type="separate" max="-2" attributes="0"/>
- <Group type="103" groupAlignment="3" attributes="0">
- <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
- <Component id="passwordTxt" alignment="3" min="-2" max="-2" attributes="0"/>
- </Group>
- <EmptySpace max="-2" attributes="0"/>
- <Component id="okButton" min="-2" max="-2" attributes="0"/>
- <EmptySpace max="-2" attributes="0"/>
- </Group>
- </Group>
- </DimensionLayout>
- </Layout>
- <SubComponents>
- <Component class="javax.swing.JLabel" name="jLabel1">
- <Properties>
- <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString bundle="org/apache/syncope/netbeans/plugin/view/Bundle.properties" key="ServerDetailsView.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
- </Property>
- </Properties>
- </Component>
- <Component class="javax.swing.JLabel" name="jLabel2">
- <Properties>
- <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString bundle="org/apache/syncope/netbeans/plugin/view/Bundle.properties" key="ServerDetailsView.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
- </Property>
- </Properties>
- </Component>
- <Component class="javax.swing.JLabel" name="jLabel3">
- <Properties>
- <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString bundle="org/apache/syncope/netbeans/plugin/view/Bundle.properties" key="ServerDetailsView.jLabel3.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
- </Property>
- </Properties>
- </Component>
- <Component class="javax.swing.JTextField" name="urlTxt">
- <Properties>
- <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString bundle="org/apache/syncope/netbeans/plugin/view/Bundle.properties" key="ServerDetailsView.urlTxt.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
- </Property>
- </Properties>
- </Component>
- <Component class="javax.swing.JTextField" name="userNameTxt">
- <Properties>
- <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString bundle="org/apache/syncope/netbeans/plugin/view/Bundle.properties" key="ServerDetailsView.userNameTxt.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
- </Property>
- </Properties>
- </Component>
- <Component class="javax.swing.JPasswordField" name="passwordTxt">
- <Properties>
- <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString bundle="org/apache/syncope/netbeans/plugin/view/Bundle.properties" key="ServerDetailsView.passwordTxt.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
- </Property>
- </Properties>
- </Component>
- <Component class="javax.swing.JButton" name="okButton">
- <Properties>
- <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString bundle="org/apache/syncope/netbeans/plugin/view/Bundle.properties" key="ServerDetailsView.okButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
- </Property>
- </Properties>
- <Events>
- <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="okButtonActionPerformed"/>
- </Events>
- </Component>
- <Component class="javax.swing.JLabel" name="jLabel4">
- <Properties>
- <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString bundle="org/apache/syncope/netbeans/plugin/view/Bundle.properties" key="ServerDetailsView.jLabel4.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
- </Property>
- </Properties>
- </Component>
- </SubComponents>
-</Form>
http://git-wip-us.apache.org/repos/asf/syncope/blob/06fd9e37/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/view/ServerDetailsView.java
----------------------------------------------------------------------
diff --git a/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/view/ServerDetailsView.java b/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/view/ServerDetailsView.java
deleted file mode 100644
index dc03d4d..0000000
--- a/ide/netbeans/src/main/java/org/apache/syncope/netbeans/plugin/view/ServerDetailsView.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.netbeans.plugin.view;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import javax.swing.JOptionPane;
-
-public class ServerDetailsView extends javax.swing.JDialog {
-
- /**
- * Creates new form LoginView
- */
- public ServerDetailsView(final java.awt.Frame parent, final boolean modal) {
- super(parent, modal);
- initComponents();
- setLocationRelativeTo(this);
- }
-
- /**
- * This method is called from within the constructor to initialize the form.
- * WARNING: Do NOT modify this code. The content of this method is always
- * regenerated by the Form Editor.
- */
- @SuppressWarnings("unchecked")
- // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
- private void initComponents() {
-
- jLabel1 = new javax.swing.JLabel();
- jLabel2 = new javax.swing.JLabel();
- jLabel3 = new javax.swing.JLabel();
- urlTxt = new javax.swing.JTextField();
- userNameTxt = new javax.swing.JTextField();
- passwordTxt = new javax.swing.JPasswordField();
- okButton = new javax.swing.JButton();
- jLabel4 = new javax.swing.JLabel();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
-
- org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(
- ServerDetailsView.class, "ServerDetailsView.jLabel1.text"));
-
- org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(
- ServerDetailsView.class, "ServerDetailsView.jLabel2.text"));
-
- org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(
- ServerDetailsView.class, "ServerDetailsView.jLabel3.text"));
-
- urlTxt.setText(org.openide.util.NbBundle.getMessage(ServerDetailsView.class, "ServerDetailsView.urlTxt.text"));
-
- userNameTxt.setText(org.openide.util.NbBundle.getMessage(ServerDetailsView.class,
- "ServerDetailsView.userNameTxt.text"));
-
- passwordTxt.setText(org.openide.util.NbBundle.getMessage(ServerDetailsView.class,
- "ServerDetailsView.passwordTxt.text"));
-
- org.openide.awt.Mnemonics.setLocalizedText(okButton, org.openide.util.NbBundle.getMessage(
- ServerDetailsView.class, "ServerDetailsView.okButton.text"));
- okButton.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(final java.awt.event.ActionEvent evt) {
- okButtonActionPerformed(evt);
- }
- });
-
- org.openide.awt.Mnemonics.setLocalizedText(jLabel4, org.openide.util.NbBundle.getMessage(
- ServerDetailsView.class, "ServerDetailsView.jLabel4.text"));
-
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addGap(41, 41, 41)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
- .addComponent(okButton, javax.swing.GroupLayout.PREFERRED_SIZE, 74,
- javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGroup(layout.createSequentialGroup()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jLabel1)
- .addComponent(jLabel2)
- .addComponent(jLabel3))
- .addGap(39, 39, 39)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
- .addComponent(userNameTxt)
- .addComponent(urlTxt)
- .addComponent(passwordTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 155,
- javax.swing.GroupLayout.PREFERRED_SIZE)))))
- .addGroup(layout.createSequentialGroup()
- .addGap(101, 101, 101)
- .addComponent(jLabel4)))
- .addContainerGap(41, Short.MAX_VALUE))
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 32, Short.MAX_VALUE)
- .addGap(18, 18, 18)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(jLabel1)
- .addComponent(urlTxt, javax.swing.GroupLayout.PREFERRED_SIZE,
- javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGap(18, 18, 18)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(jLabel2)
- .addComponent(userNameTxt, javax.swing.GroupLayout.PREFERRED_SIZE,
- javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGap(18, 18, 18)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(jLabel3)
- .addComponent(passwordTxt, javax.swing.GroupLayout.PREFERRED_SIZE,
- javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(okButton)
- .addContainerGap())
- );
-
- pack();
- }
- // </editor-fold>//GEN-END:initComponents
-
- private void okButtonActionPerformed(final java.awt.event.ActionEvent evt) {
- String url = urlTxt.getText();
- String userName = userNameTxt.getText();
- String password = new String(passwordTxt.getPassword());
- File file = new File("UserData.txt");
- try {
- FileWriter fileWriter = new FileWriter(file);
- fileWriter.write(url + "\n" + userName + "\n" + password);
- fileWriter.flush();
- this.dispose();
- } catch (IOException ex) {
- JOptionPane.showMessageDialog(this, "Error while saving Data.", "Error", JOptionPane.ERROR_MESSAGE);
- }
- }
-
- public void setDetails(final String host, final String userName,
- final String password) {
- urlTxt.setText(host);
- userNameTxt.setText(userName);
- passwordTxt.setText(password);
- }
-
- public static void main(final String[] args) {
- /* Set the Nimbus look and feel */
- //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
- /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
- * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
- */
- try {
- for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
- if ("Nimbus".equals(info.getName())) {
- javax.swing.UIManager.setLookAndFeel(info.getClassName());
- break;
- }
- }
- } catch (ClassNotFoundException ex) {
- java.util.logging.Logger.getLogger(ServerDetailsView.class.getName()).log(
- java.util.logging.Level.SEVERE, null, ex);
- } catch (InstantiationException ex) {
- java.util.logging.Logger.getLogger(ServerDetailsView.class.getName()).log(
- java.util.logging.Level.SEVERE, null, ex);
- } catch (IllegalAccessException ex) {
- java.util.logging.Logger.getLogger(ServerDetailsView.class.getName()).log(
- java.util.logging.Level.SEVERE, null, ex);
- } catch (javax.swing.UnsupportedLookAndFeelException ex) {
- java.util.logging.Logger.getLogger(ServerDetailsView.class.getName()).log(
- java.util.logging.Level.SEVERE, null, ex);
- }
- //</editor-fold>
- //</editor-fold>
- /* Create and display the dialog */
- java.awt.EventQueue.invokeLater(new Runnable() {
- public void run() {
- ServerDetailsView dialog = new ServerDetailsView(
- new javax.swing.JFrame(), true);
- dialog.addWindowListener(new java.awt.event.WindowAdapter() {
- @Override
- public void windowClosing(
- final java.awt.event.WindowEvent e) {
- System.exit(0);
- }
- });
- dialog.setVisible(true);
- }
- });
- }
-
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JLabel jLabel1;
- private javax.swing.JLabel jLabel2;
- private javax.swing.JLabel jLabel3;
- private javax.swing.JLabel jLabel4;
- private javax.swing.JButton okButton;
- private javax.swing.JPasswordField passwordTxt;
- private javax.swing.JTextField urlTxt;
- private javax.swing.JTextField userNameTxt;
- // End of variables declaration//GEN-END:variables
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/06fd9e37/ide/netbeans/src/main/resources/org/apache/syncope/checkstyle.xml
----------------------------------------------------------------------
diff --git a/ide/netbeans/src/main/resources/org/apache/syncope/checkstyle.xml b/ide/netbeans/src/main/resources/org/apache/syncope/checkstyle.xml
deleted file mode 100644
index 74e9d97..0000000
--- a/ide/netbeans/src/main/resources/org/apache/syncope/checkstyle.xml
+++ /dev/null
@@ -1,223 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
-"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
-<!--
-
- Checkstyle configuration that checks the sun coding conventions from:
-
- - the Java Language Specification at
- http://java.sun.com/docs/books/jls/second_edition/html/index.html
-
- - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
-
- - the Javadoc guidelines at
- http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
-
- - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
-
- - some best practices
-
- Checkstyle is very configurable. Be sure to read the documentation at
- http://checkstyle.sf.net (or in your downloaded distribution).
-
- Most Checks are configurable, be sure to consult the documentation.
-
- To completely disable a check, just comment it out or delete it from the file.
-
- Finally, it is worth reading the documentation.
-
--->
-<module name="Checker">
- <!--
- If you set the basedir property below, then all reported file
- names will be relative to the specified directory. See
- http://checkstyle.sourceforge.net/5.x/config.html#Checker
-
- <property name="basedir" value="${basedir}"/>
- -->
-
- <!-- Checks that a package-info.java file exists for each package. -->
- <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
- <!--<module name="JavadocPackage"/>-->
-
- <!-- Checks whether files end with a new line. -->
- <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
- <module name="NewlineAtEndOfFile"/>
-
- <!-- Checks that property files contain the same keys. -->
- <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
- <module name="Translation"/>
-
- <!-- Checks for Size Violations. -->
- <!-- See http://checkstyle.sf.net/config_sizes.html -->
- <module name="FileLength"/>
-
- <!-- Checks for whitespace -->
- <!-- See http://checkstyle.sf.net/config_whitespace.html -->
- <module name="FileTabCharacter"/>
-
- <!-- Miscellaneous other checks. -->
- <!-- See http://checkstyle.sf.net/config_misc.html -->
- <module name="RegexpSingleline">
- <property name="format" value="\s+$"/>
- <property name="minimum" value="0"/>
- <property name="maximum" value="2"/>
- <property name="message" value="Line has trailing spaces."/>
- </module>
-
- <module name="TreeWalker">
-
- <property name="cacheFile" value="target/checkstyle.cache"/>
-
- <!-- Checks for Javadoc comments. -->
- <!-- See http://checkstyle.sf.net/config_javadoc.html -->
- <!--<module name="JavadocMethod">
- <property name="scope" value="public"/>
- <property name="allowMissingPropertyJavadoc" value="true"/>
- </module>
- <module name="JavadocType"/>
- <module name="JavadocVariable">
- <property name="scope" value="public"/>
- <property name="ignoreNamePattern" value="LOG"/>
- </module>
- <module name="JavadocStyle"/>-->
-
-
- <!-- Checks for Naming Conventions. -->
- <!-- See http://checkstyle.sf.net/config_naming.html -->
- <module name="ConstantName"/>
- <module name="LocalFinalVariableName"/>
- <module name="LocalVariableName"/>
- <module name="MemberName"/>
- <module name="MethodName"/>
- <module name="PackageName"/>
- <module name="ParameterName"/>
- <module name="StaticVariableName">
- <property name="format" value="^[A-Z][A-Z0-9_]*$"/>
- </module>
- <module name="TypeName"/>
-
-
- <!-- Checks for Headers -->
- <!-- See http://checkstyle.sf.net/config_header.html -->
- <!-- <module name="Header"> -->
- <!-- The follow property value demonstrates the ability -->
- <!-- to have access to ANT properties. In this case it uses -->
- <!-- the ${basedir} property to allow Checkstyle to be run -->
- <!-- from any directory within a project. See property -->
- <!-- expansion, -->
- <!-- http://checkstyle.sf.net/config.html#properties -->
- <!-- <property -->
- <!-- name="headerFile" -->
- <!-- value="${basedir}/java.header"/> -->
- <!-- </module> -->
-
- <!-- Following interprets the header file as regular expressions. -->
- <!-- <module name="RegexpHeader"/> -->
-
-
- <!-- Checks for imports -->
- <!-- See http://checkstyle.sf.net/config_import.html -->
- <module name="AvoidStarImport"/>
- <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
- <module name="RedundantImport"/>
- <module name="UnusedImports"/>
-
-
- <!-- Checks for Size Violations. -->
- <!-- See http://checkstyle.sf.net/config_sizes.html -->
- <module name="LineLength">
- <property name="max" value="120"/>
- <property name="ignorePattern" value="^import"/>
- </module>
- <!--<module name="MethodLength"/>-->
- <!--<module name="ParameterNumber"/>-->
-
-
- <!-- Checks for whitespace -->
- <!-- See http://checkstyle.sf.net/config_whitespace.html -->
- <module name="EmptyForIteratorPad"/>
- <module name="GenericWhitespace"/>
- <module name="MethodParamPad"/>
- <!--<module name="NoWhitespaceAfter"/>
- <module name="NoWhitespaceBefore"/>-->
- <module name="OperatorWrap"/>
- <module name="ParenPad"/>
- <module name="TypecastParenPad"/>
- <module name="WhitespaceAfter"/>
- <module name="WhitespaceAround"/>
-
-
- <!-- Modifier Checks -->
- <!-- See http://checkstyle.sf.net/config_modifiers.html -->
- <module name="ModifierOrder"/>
- <module name="RedundantModifier"/>
-
-
- <!-- Checks for blocks. You know, those {}'s -->
- <!-- See http://checkstyle.sf.net/config_blocks.html -->
- <module name="AvoidNestedBlocks"/>
- <module name="EmptyBlock">
- <property name="option" value="text"/>
- </module>
- <module name="LeftCurly"/>
- <module name="NeedBraces"/>
- <module name="RightCurly"/>
-
-
- <!-- Checks for common coding problems -->
- <!-- See http://checkstyle.sf.net/config_coding.html -->
- <!-- <module name="AvoidInlineConditionals"/>-->
- <module name="EmptyStatement"/>
- <module name="EqualsHashCode"/>
- <module name="HiddenField">
- <property name="ignoreSetter" value="true"/>
- <property name="ignoreConstructorParameter" value="true"/>
- <property name="tokens" value="VARIABLE_DEF"/>
- </module>
- <module name="IllegalInstantiation"/>
- <module name="InnerAssignment"/>
- <!--<module name="MagicNumber"/>-->
- <module name="MissingSwitchDefault"/>
- <module name="SimplifyBooleanExpression"/>
- <module name="SimplifyBooleanReturn"/>
-
- <!-- Checks for class design -->
- <!-- See http://checkstyle.sf.net/config_design.html -->
- <!--<module name="DesignForExtension"/>-->
- <module name="FinalClass"/>
- <module name="HideUtilityClassConstructor"/>
- <!--<module name="InterfaceIsType"/>-->
- <module name="VisibilityModifier">
- <property name="protectedAllowed" value="true"/>
- </module>
-
-
- <!-- Miscellaneous other checks. -->
- <!-- See http://checkstyle.sf.net/config_misc.html -->
- <module name="ArrayTypeStyle"/>
- <module name="FinalParameters"/>
- <module name="TodoComment"/>
- <module name="UpperEll"/>
-
- </module>
-
-</module>
http://git-wip-us.apache.org/repos/asf/syncope/blob/06fd9e37/ide/netbeans/src/main/resources/org/apache/syncope/ide/netbeans/view/Bundle.properties
----------------------------------------------------------------------
diff --git a/ide/netbeans/src/main/resources/org/apache/syncope/ide/netbeans/view/Bundle.properties b/ide/netbeans/src/main/resources/org/apache/syncope/ide/netbeans/view/Bundle.properties
new file mode 100644
index 0000000..17de78d
--- /dev/null
+++ b/ide/netbeans/src/main/resources/org/apache/syncope/ide/netbeans/view/Bundle.properties
@@ -0,0 +1,28 @@
+#Licensed to the Apache Software Foundation (ASF) under one
+#or more contributor license agreements. See the NOTICE file
+#distributed with this work for additional information
+#regarding copyright ownership. The ASF licenses this file
+#to you under the Apache License, Version 2.0 (the
+#"License"); you may not use this file except in compliance
+#with the License. You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+#Unless required by applicable law or agreed to in writing,
+#software distributed under the License is distributed on an
+#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#KIND, either express or implied. See the License for the
+#specific language governing permissions and limitations
+#under the License.
+
+TemplateViewTopComponent.jPanel1.TabConstraints.tabTitle=TEXT
+TemplateViewTopComponent.jPanel2.TabConstraints.tabTitle=XML
+
+ServerDetailsView.jLabel1.text=URL
+ServerDetailsView.jLabel4.text=Apache Syncope
+ServerDetailsView.okButton.text=OK
+ServerDetailsView.passwordTxt.text=
+ServerDetailsView.userNameTxt.text=
+ServerDetailsView.urlTxt.text=
+ServerDetailsView.jLabel3.text=Password
+ServerDetailsView.jLabel2.text=User Name