From f76fee63ed9cb3a30d3c0c092d860b1cb93a481b Mon Sep 17 00:00:00 2001 From: Gerard Smyth <gerard.smyth@gmail.com> Date: Thu, 08 May 2014 13:09:30 -0400 Subject: [PATCH] Updated the SyndicationServlet to provide an additional option to return details of the tags in the repository instead of the commits. This uses a new 'ot' request parameter to indicate the object type of the content to return, which can be ither TAG or COMMIT. If this is not provided, then COMMIT is assumed to maintain backwards compatability. If tags are returned, then the paging parameters, 'l' and 'pg' are still supported, but searching options are currently ignored. --- src/main/java/com/gitblit/authority/NewClientCertificateDialog.java | 48 +++++++++++++++++++++++++----------------------- 1 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/gitblit/authority/NewClientCertificateDialog.java b/src/main/java/com/gitblit/authority/NewClientCertificateDialog.java index 3d21439..3d8ea7e 100644 --- a/src/main/java/com/gitblit/authority/NewClientCertificateDialog.java +++ b/src/main/java/com/gitblit/authority/NewClientCertificateDialog.java @@ -45,7 +45,7 @@ public class NewClientCertificateDialog extends JDialog { private static final long serialVersionUID = 1L; - + JDateChooser expirationDate; JPasswordField pw1; JPasswordField pw2; @@ -55,47 +55,48 @@ public NewClientCertificateDialog(Frame owner, String displayname, Date defaultExpiration, boolean allowEmail) { super(owner); - + setTitle(Translation.get("gb.newCertificate")); - - JPanel content = new JPanel(new BorderLayout(Utils.MARGIN, Utils.MARGIN)) { + + JPanel content = new JPanel(new BorderLayout(Utils.MARGIN, Utils.MARGIN)) { private static final long serialVersionUID = 1L; @Override public Insets getInsets() { - + return Utils.INSETS; } }; - + expirationDate = new JDateChooser(defaultExpiration); pw1 = new JPasswordField(20); pw2 = new JPasswordField(20); hint = new JTextField(20); sendEmail = new JCheckBox(Translation.get("gb.sendEmail")); - + JPanel panel = new JPanel(new GridLayout(0, 2, Utils.MARGIN, Utils.MARGIN)); - + panel.add(new JLabel(Translation.get("gb.expires"))); panel.add(expirationDate); - + panel.add(new JLabel(Translation.get("gb.password"))); panel.add(pw1); panel.add(new JLabel(Translation.get("gb.confirmPassword"))); panel.add(pw2); - + panel.add(new JLabel(Translation.get("gb.passwordHint"))); panel.add(hint); - + if (allowEmail) { panel.add(new JLabel("")); panel.add(sendEmail); } - + JButton ok = new JButton(Translation.get("gb.ok")); ok.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { if (validateInputs()) { isCanceled = false; @@ -105,34 +106,35 @@ }); JButton cancel = new JButton(Translation.get("gb.cancel")); cancel.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { isCanceled = true; setVisible(false); } }); - + JPanel controls = new JPanel(); controls.add(ok); controls.add(cancel); - + JTextArea message = new JTextArea(Translation.get("gb.newClientCertificateMessage")); message.setLineWrap(true); message.setWrapStyleWord(true); message.setEditable(false); message.setRows(6); message.setPreferredSize(new Dimension(300, 100)); - + content.add(new JScrollPane(message), BorderLayout.CENTER); content.add(panel, BorderLayout.NORTH); content.add(controls, BorderLayout.SOUTH); - + getContentPane().add(new HeaderPanel(Translation.get("gb.newCertificate") + " (" + displayname + ")", "rosette_16x16.png"), BorderLayout.NORTH); getContentPane().add(content, BorderLayout.CENTER); pack(); - + setLocationRelativeTo(owner); } - + private boolean validateInputs() { if (getExpiration().getTime() < System.currentTimeMillis()) { // expires before now @@ -154,23 +156,23 @@ } return true; } - + public String getPassword() { return new String(pw1.getPassword()); } - + public String getPasswordHint() { return hint.getText(); } - + public Date getExpiration() { return expirationDate.getDate(); } - + public boolean sendEmail() { return sendEmail.isSelected(); } - + public boolean isCanceled() { return isCanceled; } -- Gitblit v1.9.1