/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* See LICENSE.txt included in this distribution for the specific
* language governing permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at LICENSE.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
/**
*
* @author Jan Berg
*/
// Many of the generated fields cause this warning
@SuppressWarnings("PMD.SingularField")
/* config variables from agent */
private static final String[] projectTableHeaders = new String[]{"Id","Description","Path","Default"};
private static final String[] repositoryTableHeaders = new String[]{"Directory","Type","SCM Working"};
/** Creates new form ConfigurationsFrame
* @param ac AgentConnection connection to the Opengrok agent.
* @throws IOException if objectname or configs could not be created
*/
try {
} catch (MalformedObjectNameException ex) {
}
setLocation(screenSize.width / 2 - (mySize.width / 2), screenSize.height / 2 - (mySize.height / 2));
}
sf.setVisible(true);
}
private void createLogLevelCombos() {
this.consoleLevelCombo.removeAllItems();
this.fileLevelCombo.removeAllItems();
}
}
private void getConfigsFromAgent() {
try {
/* Get Management MBean attributes */
consoleLevel = (Level)con.getMBeanServerConnection().getAttribute(this.managementObjectName, "ConsoleLogLevel");
fileLevel = (Level)con.getMBeanServerConnection().getAttribute(this.managementObjectName, "FileLogLevel");
filePath = (String)con.getMBeanServerConnection().getAttribute(this.managementObjectName, "FileLogPath");
publishURL = (String)con.getMBeanServerConnection().getAttribute(this.managementObjectName, "PublishServerURL");
if (publishURL == null) {
publishURL = "";
}
configurationFile = (String)con.getMBeanServerConnection().getAttribute(this.managementObjectName, "ConfigurationFile");
/* Get Configuration MBean attributes */
String xmlconfig = (String)con.getMBeanServerConnection().getAttribute(this.configObjectName, "Configuration");
this.updateConfigFieldsFromConfig();
} catch (MBeanException ex) {
} catch (AttributeNotFoundException ex) {
} catch (InstanceNotFoundException ex) {
} catch (ReflectionException ex) {
} catch (IOException ex) {
}
}
}
private void updateConfigFieldsFromConfig() {
int row = 0;
defaultval = "Yes";
} else {
defaultval = "";
}
row++;
}
DefaultTableModel ignoredModel = new DefaultTableModel(ignoredNamesHeaders,ignoredpatternlist.size());
row = 0;
row++;
}
row = 0;
row++;
}
/*
this is not documented:
config.setQuickContextScan(rootPaneCheckingEnabled);
* is this necessary with new logging?:
config.setVerbose(rootPaneCheckingEnabled);
*/
}
/** 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() {
consoleLevelCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
fileLevelCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
.addComponent(consoleLevelCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(fileLevelCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
.addComponent(consoleLevelCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(fileLevelCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(logFilePathField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(publishHostField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(configFileField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);
.addComponent(historyReaderTimelimitField, javax.swing.GroupLayout.DEFAULT_SIZE, 113, Short.MAX_VALUE))
.addContainerGap())
);
.addComponent(dataRootField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(sourceRootField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(historyReaderTimelimitField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(indexWordLimitField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(cTagsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);
new Object [][] {
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
.addContainerGap())
);
.addContainerGap())
);
new Object [][] {
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
.addContainerGap())
);
.addContainerGap())
);
javax.swing.GroupLayout historyListingPanelLayout = new javax.swing.GroupLayout(historyListingPanel);
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, historyListingPanelLayout.createSequentialGroup()
.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(urlPrefixField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 410, Short.MAX_VALUE)
.addComponent(bugPageField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 410, Short.MAX_VALUE)
.addComponent(bugPatternField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 410, Short.MAX_VALUE)
.addComponent(reviewPageField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 410, Short.MAX_VALUE)
.addContainerGap())
);
.addComponent(urlPrefixField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(bugPageField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(bugPatternField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(reviewPageField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(reviewPatternField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(userPageField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(webAppLAFField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);
new Object [][] {
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
.addContainerGap())
);
.addContainerGap())
);
}
});
}
});
.addComponent(closeBtn)))
.addContainerGap())
);
.addContainerGap())
);
pack();
}// </editor-fold>//GEN-END:initComponents
@SuppressWarnings("unused")
private void closeBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeBtnActionPerformed
this.dispose();
}//GEN-LAST:event_closeBtnActionPerformed
@SuppressWarnings("unused")
private void updateBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_updateBtnActionPerformed
try {
}
}
}
}
}
//here we just set the configuration object, as we assume the user
//knows that he have done a change before pressing update.
} catch (InstanceNotFoundException ex) {
} catch (AttributeNotFoundException ex) {
} catch (InvalidAttributeValueException ex) {
} catch (MBeanException ex) {
} catch (ReflectionException ex) {
} catch (IOException ex) {
}
}//GEN-LAST:event_updateBtnActionPerformed
// Suppress UnusedFormalParameter until the method has been implemented.
// Also suppress AvoidDuplicateLiterals since PMD doesn't like that we
// use the same literal in multiple SuppressWarning annotations, and it
// doesn't understand what we mean if we use a constant instead.
// Avoid UnusedFormalParameter until the method has been implemented
// Avoid UnusedFormalParameter until the method has been implemented
// Avoid UnusedFormalParameter until the method has been implemented
/**
* put the GUI fields and objects into the OpenGrok Configuration object
*/
private void updateConfigurationFromGUIObjects() {
//index tab settings
/*
config.setQuickContextScan(rootPaneCheckingEnabled);
config.setDefaultProject(defaultProject);
config.setIgnoredNames(ignoredNames);
config.setProjects(projects);
config.setRepositories(repositories);
config.setVerbose(rootPaneCheckingEnabled);
*/
//web app tab settings
}
/**
* @param args the command line arguments
*/
public void run() {
try {
} catch (IOException ex) {
}
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
// End of variables declaration//GEN-END:variables
}