rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if(!jList.isSelectionEmpty()) { return true; }
if(!jList.isSelectionEmpty()) { if(Connection.ONLINE == application.getConnectionStatus()) { return true; } }
public boolean canImport(final JComponent comp, final DataFlavor[] transferFlavors) { logger.debug(comp.getClass().getSimpleName()); // when updating a document; only 1 file must be imported if(1 == transferFlavors.length) { if(TxUtils.containsJavaFileList(transferFlavors)) { if(!jList.isSelectionEmpty()) { return true; } } } return false; }
System.out.println(".inlined");
System.out.println("inlined");
public void testInlined() throws Exception { System.out.println(".inlined"); B expB = new B(); expB.setB1("b1value"); expB.setB2("b2value"); D expD = new D(); expD.setPath("/someD"); expD.setD1("d1value"); expD.setB1(expB); this.objectConverter.insert(getSession(), expD); getSession().save(); D actD = (D) this.objectConverter.getObject(getSession(), D.class, "/someD"); assertEquals(expD.getD1(), actD.getD1()); assertEquals(expB.getB1(), actD.getB1().getB1()); assertNull("B.b2 is protected", actD.getB1().getB2()); DFull actDFull = (DFull) this.objectConverter.getObject(getSession(), DFull.class, "/someD"); assertEquals(expD.getD1(), actDFull.getD1()); assertEquals(expB.getB1(), actDFull.getB1()); assertNull("B.b2 is protected", actDFull.getB2()); expB.setB1("updatedvalue1"); this.objectConverter.update(getSession(), expD); getSession().save(); actD = (D) this.objectConverter.getObject(getSession(), D.class, "/someD"); assertEquals(expD.getD1(), actD.getD1()); assertEquals(expB.getB1(), actD.getB1().getB1()); assertNull("B.b2 is protected", actD.getB1().getB2()); actDFull = (DFull) this.objectConverter.getObject(getSession(), DFull.class, "/someD"); assertEquals(expD.getD1(), actDFull.getD1()); assertEquals(expB.getB1(), actDFull.getB1()); assertNull("B.b2 is protected", actDFull.getB2()); // Comment from Christophe : // The following code breaks the unit test : D has an inner bean (b1) which contains a protected field (b2) . If b1 is set to null, // it is not possible to drop the inner bean because property b2 is never set to null// I'm wondering why to authorize a null value to a inner bean if this one contains a mandatory/protected property // expD.setB1(null);// this.objectConverter.update(getSession(), expD);// getSession().save();// // actD = (D) this.objectConverter.getObject(getSession(), D.class, "/someD");// // assertEquals(expD.getD1(), actD.getD1());// assertNull("b1 was removed", actD.getB1());// // actDFull = (DFull) this.objectConverter.getObject(getSession(), DFull.class, "/someD");// // assertEquals(expD.getD1(), actDFull.getD1());// assertNull("b1 was removed", actDFull.getB1());// assertNull("B.b2 is protected", actDFull.getB2()); }
assertNull("B.b2 is protected", actD.getB1().getB2());
assertEquals(expB.getB2(), actD.getB1().getB2());
public void testInlined() throws Exception { System.out.println(".inlined"); B expB = new B(); expB.setB1("b1value"); expB.setB2("b2value"); D expD = new D(); expD.setPath("/someD"); expD.setD1("d1value"); expD.setB1(expB); this.objectConverter.insert(getSession(), expD); getSession().save(); D actD = (D) this.objectConverter.getObject(getSession(), D.class, "/someD"); assertEquals(expD.getD1(), actD.getD1()); assertEquals(expB.getB1(), actD.getB1().getB1()); assertNull("B.b2 is protected", actD.getB1().getB2()); DFull actDFull = (DFull) this.objectConverter.getObject(getSession(), DFull.class, "/someD"); assertEquals(expD.getD1(), actDFull.getD1()); assertEquals(expB.getB1(), actDFull.getB1()); assertNull("B.b2 is protected", actDFull.getB2()); expB.setB1("updatedvalue1"); this.objectConverter.update(getSession(), expD); getSession().save(); actD = (D) this.objectConverter.getObject(getSession(), D.class, "/someD"); assertEquals(expD.getD1(), actD.getD1()); assertEquals(expB.getB1(), actD.getB1().getB1()); assertNull("B.b2 is protected", actD.getB1().getB2()); actDFull = (DFull) this.objectConverter.getObject(getSession(), DFull.class, "/someD"); assertEquals(expD.getD1(), actDFull.getD1()); assertEquals(expB.getB1(), actDFull.getB1()); assertNull("B.b2 is protected", actDFull.getB2()); // Comment from Christophe : // The following code breaks the unit test : D has an inner bean (b1) which contains a protected field (b2) . If b1 is set to null, // it is not possible to drop the inner bean because property b2 is never set to null// I'm wondering why to authorize a null value to a inner bean if this one contains a mandatory/protected property // expD.setB1(null);// this.objectConverter.update(getSession(), expD);// getSession().save();// // actD = (D) this.objectConverter.getObject(getSession(), D.class, "/someD");// // assertEquals(expD.getD1(), actD.getD1());// assertNull("b1 was removed", actD.getB1());// // actDFull = (DFull) this.objectConverter.getObject(getSession(), DFull.class, "/someD");// // assertEquals(expD.getD1(), actDFull.getD1());// assertNull("b1 was removed", actDFull.getB1());// assertNull("B.b2 is protected", actDFull.getB2()); }
assertNull("B.b2 is protected", actDFull.getB2());
assertEquals(expB.getB2(), actDFull.getB2());
public void testInlined() throws Exception { System.out.println(".inlined"); B expB = new B(); expB.setB1("b1value"); expB.setB2("b2value"); D expD = new D(); expD.setPath("/someD"); expD.setD1("d1value"); expD.setB1(expB); this.objectConverter.insert(getSession(), expD); getSession().save(); D actD = (D) this.objectConverter.getObject(getSession(), D.class, "/someD"); assertEquals(expD.getD1(), actD.getD1()); assertEquals(expB.getB1(), actD.getB1().getB1()); assertNull("B.b2 is protected", actD.getB1().getB2()); DFull actDFull = (DFull) this.objectConverter.getObject(getSession(), DFull.class, "/someD"); assertEquals(expD.getD1(), actDFull.getD1()); assertEquals(expB.getB1(), actDFull.getB1()); assertNull("B.b2 is protected", actDFull.getB2()); expB.setB1("updatedvalue1"); this.objectConverter.update(getSession(), expD); getSession().save(); actD = (D) this.objectConverter.getObject(getSession(), D.class, "/someD"); assertEquals(expD.getD1(), actD.getD1()); assertEquals(expB.getB1(), actD.getB1().getB1()); assertNull("B.b2 is protected", actD.getB1().getB2()); actDFull = (DFull) this.objectConverter.getObject(getSession(), DFull.class, "/someD"); assertEquals(expD.getD1(), actDFull.getD1()); assertEquals(expB.getB1(), actDFull.getB1()); assertNull("B.b2 is protected", actDFull.getB2()); // Comment from Christophe : // The following code breaks the unit test : D has an inner bean (b1) which contains a protected field (b2) . If b1 is set to null, // it is not possible to drop the inner bean because property b2 is never set to null// I'm wondering why to authorize a null value to a inner bean if this one contains a mandatory/protected property // expD.setB1(null);// this.objectConverter.update(getSession(), expD);// getSession().save();// // actD = (D) this.objectConverter.getObject(getSession(), D.class, "/someD");// // assertEquals(expD.getD1(), actD.getD1());// assertNull("b1 was removed", actD.getB1());// // actDFull = (DFull) this.objectConverter.getObject(getSession(), DFull.class, "/someD");// // assertEquals(expD.getD1(), actDFull.getD1());// assertNull("b1 was removed", actDFull.getB1());// assertNull("B.b2 is protected", actDFull.getB2()); }
expD.setB1(null); this.objectConverter.update(getSession(), expD); getSession().save();
public void testInlined() throws Exception { System.out.println(".inlined"); B expB = new B(); expB.setB1("b1value"); expB.setB2("b2value"); D expD = new D(); expD.setPath("/someD"); expD.setD1("d1value"); expD.setB1(expB); this.objectConverter.insert(getSession(), expD); getSession().save(); D actD = (D) this.objectConverter.getObject(getSession(), D.class, "/someD"); assertEquals(expD.getD1(), actD.getD1()); assertEquals(expB.getB1(), actD.getB1().getB1()); assertNull("B.b2 is protected", actD.getB1().getB2()); DFull actDFull = (DFull) this.objectConverter.getObject(getSession(), DFull.class, "/someD"); assertEquals(expD.getD1(), actDFull.getD1()); assertEquals(expB.getB1(), actDFull.getB1()); assertNull("B.b2 is protected", actDFull.getB2()); expB.setB1("updatedvalue1"); this.objectConverter.update(getSession(), expD); getSession().save(); actD = (D) this.objectConverter.getObject(getSession(), D.class, "/someD"); assertEquals(expD.getD1(), actD.getD1()); assertEquals(expB.getB1(), actD.getB1().getB1()); assertNull("B.b2 is protected", actD.getB1().getB2()); actDFull = (DFull) this.objectConverter.getObject(getSession(), DFull.class, "/someD"); assertEquals(expD.getD1(), actDFull.getD1()); assertEquals(expB.getB1(), actDFull.getB1()); assertNull("B.b2 is protected", actDFull.getB2()); // Comment from Christophe : // The following code breaks the unit test : D has an inner bean (b1) which contains a protected field (b2) . If b1 is set to null, // it is not possible to drop the inner bean because property b2 is never set to null// I'm wondering why to authorize a null value to a inner bean if this one contains a mandatory/protected property // expD.setB1(null);// this.objectConverter.update(getSession(), expD);// getSession().save();// // actD = (D) this.objectConverter.getObject(getSession(), D.class, "/someD");// // assertEquals(expD.getD1(), actD.getD1());// assertNull("b1 was removed", actD.getB1());// // actDFull = (DFull) this.objectConverter.getObject(getSession(), DFull.class, "/someD");// // assertEquals(expD.getD1(), actDFull.getD1());// assertNull("b1 was removed", actDFull.getB1());// assertNull("B.b2 is protected", actDFull.getB2()); }
assertEquals(expD.getD1(), actD.getD1()); assertNull("b1 was not removed", actD.getB1()); actDFull = (DFull) this.objectConverter.getObject(getSession(), DFull.class, "/someD"); assertEquals(expD.getD1(), actDFull.getD1()); assertNull("b1 was not removed", actDFull.getB1()); assertNull("b2 wan not remove", actDFull.getB2());
public void testInlined() throws Exception { System.out.println(".inlined"); B expB = new B(); expB.setB1("b1value"); expB.setB2("b2value"); D expD = new D(); expD.setPath("/someD"); expD.setD1("d1value"); expD.setB1(expB); this.objectConverter.insert(getSession(), expD); getSession().save(); D actD = (D) this.objectConverter.getObject(getSession(), D.class, "/someD"); assertEquals(expD.getD1(), actD.getD1()); assertEquals(expB.getB1(), actD.getB1().getB1()); assertNull("B.b2 is protected", actD.getB1().getB2()); DFull actDFull = (DFull) this.objectConverter.getObject(getSession(), DFull.class, "/someD"); assertEquals(expD.getD1(), actDFull.getD1()); assertEquals(expB.getB1(), actDFull.getB1()); assertNull("B.b2 is protected", actDFull.getB2()); expB.setB1("updatedvalue1"); this.objectConverter.update(getSession(), expD); getSession().save(); actD = (D) this.objectConverter.getObject(getSession(), D.class, "/someD"); assertEquals(expD.getD1(), actD.getD1()); assertEquals(expB.getB1(), actD.getB1().getB1()); assertNull("B.b2 is protected", actD.getB1().getB2()); actDFull = (DFull) this.objectConverter.getObject(getSession(), DFull.class, "/someD"); assertEquals(expD.getD1(), actDFull.getD1()); assertEquals(expB.getB1(), actDFull.getB1()); assertNull("B.b2 is protected", actDFull.getB2()); // Comment from Christophe : // The following code breaks the unit test : D has an inner bean (b1) which contains a protected field (b2) . If b1 is set to null, // it is not possible to drop the inner bean because property b2 is never set to null// I'm wondering why to authorize a null value to a inner bean if this one contains a mandatory/protected property // expD.setB1(null);// this.objectConverter.update(getSession(), expD);// getSession().save();// // actD = (D) this.objectConverter.getObject(getSession(), D.class, "/someD");// // assertEquals(expD.getD1(), actD.getD1());// assertNull("b1 was removed", actD.getB1());// // actDFull = (DFull) this.objectConverter.getObject(getSession(), DFull.class, "/someD");// // assertEquals(expD.getD1(), actDFull.getD1());// assertNull("b1 was removed", actDFull.getB1());// assertNull("B.b2 is protected", actDFull.getB2()); }
this.sessionModel = modelFactory.getSessionModel(getClass());
private ArtifactUtil() { super(); this.documentModel = modelFactory.getDocumentModel(getClass()); this.sessionModel = modelFactory.getSessionModel(getClass()); }
try { return sessionModel.isLoggedInUserKeyHolder(artifactId); } catch(final ParityException px) { throw new RuntimeException(px); }
return artifactModel.isFlagApplied(artifactId, ArtifactFlag.KEY);
private Boolean determineIsKeyHolder(final Long artifactId) { try { return sessionModel.isLoggedInUserKeyHolder(artifactId); } catch(final ParityException px) { throw new RuntimeException(px); } }
javax.swing.JButton closeJButton;
private void initComponents() { javax.swing.JButton closeJButton; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JLabel eaJLabel; javax.swing.JButton inviteJButton; javax.swing.JButton manageJButton; eaJLabel = LabelFactory.create(getString("EmbeddedAssistance")); contactsJScrollPane = new javax.swing.JScrollPane(); contactsJList = ListFactory.create(); searchJTextField = TextFactory.create(); searchJButton = ButtonFactory.create(getString("SearchButton")); addJButton = ButtonFactory.create(getString("AddButton")); closeJButton = ButtonFactory.create(getString("CloseButton")); manageJButton = ButtonFactory.create(getString("ManageButton")); inviteJButton = ButtonFactory.create(getString("InviteButton")); contactsModel = new DefaultListModel(); contactsJList.setModel(contactsModel); contactsJList.setCellRenderer(new ContactCellRenderer()); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); searchJTextField.getDocument().addDocumentListener(new DocumentListener() { public void insertUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldInsertUpdate(e); } public void removeUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldRemoveUpdate(e); } public void changedUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldChangedUpdate(e); } }); searchJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { searchJButtonActionPerformed(e); } }); addJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { addJButtonActionPerformed(e); } }); closeJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { closeJButtonActionPerformed(e); } }); manageJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { manageJButtonActionPerformed(e); } }); inviteJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { inviteJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, searchJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .add(inviteJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(manageJButton))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(closeJButton) .add(searchJButton) .add(addJButton)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(eaJLabel) .add(6, 6, 6) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(searchJTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(searchJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE) .add(addJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(closeJButton) .add(manageJButton) .add(inviteJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents
javax.swing.JButton inviteJButton; javax.swing.JButton manageJButton;
private void initComponents() { javax.swing.JButton closeJButton; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JLabel eaJLabel; javax.swing.JButton inviteJButton; javax.swing.JButton manageJButton; eaJLabel = LabelFactory.create(getString("EmbeddedAssistance")); contactsJScrollPane = new javax.swing.JScrollPane(); contactsJList = ListFactory.create(); searchJTextField = TextFactory.create(); searchJButton = ButtonFactory.create(getString("SearchButton")); addJButton = ButtonFactory.create(getString("AddButton")); closeJButton = ButtonFactory.create(getString("CloseButton")); manageJButton = ButtonFactory.create(getString("ManageButton")); inviteJButton = ButtonFactory.create(getString("InviteButton")); contactsModel = new DefaultListModel(); contactsJList.setModel(contactsModel); contactsJList.setCellRenderer(new ContactCellRenderer()); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); searchJTextField.getDocument().addDocumentListener(new DocumentListener() { public void insertUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldInsertUpdate(e); } public void removeUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldRemoveUpdate(e); } public void changedUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldChangedUpdate(e); } }); searchJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { searchJButtonActionPerformed(e); } }); addJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { addJButtonActionPerformed(e); } }); closeJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { closeJButtonActionPerformed(e); } }); manageJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { manageJButtonActionPerformed(e); } }); inviteJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { inviteJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, searchJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .add(inviteJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(manageJButton))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(closeJButton) .add(searchJButton) .add(addJButton)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(eaJLabel) .add(6, 6, 6) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(searchJTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(searchJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE) .add(addJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(closeJButton) .add(manageJButton) .add(inviteJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents
closeJButton = ButtonFactory.create(getString("CloseButton")); manageJButton = ButtonFactory.create(getString("ManageButton")); inviteJButton = ButtonFactory.create(getString("InviteButton"));
eaJLabel.setText("!Embedded Assistance!");
private void initComponents() { javax.swing.JButton closeJButton; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JLabel eaJLabel; javax.swing.JButton inviteJButton; javax.swing.JButton manageJButton; eaJLabel = LabelFactory.create(getString("EmbeddedAssistance")); contactsJScrollPane = new javax.swing.JScrollPane(); contactsJList = ListFactory.create(); searchJTextField = TextFactory.create(); searchJButton = ButtonFactory.create(getString("SearchButton")); addJButton = ButtonFactory.create(getString("AddButton")); closeJButton = ButtonFactory.create(getString("CloseButton")); manageJButton = ButtonFactory.create(getString("ManageButton")); inviteJButton = ButtonFactory.create(getString("InviteButton")); contactsModel = new DefaultListModel(); contactsJList.setModel(contactsModel); contactsJList.setCellRenderer(new ContactCellRenderer()); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); searchJTextField.getDocument().addDocumentListener(new DocumentListener() { public void insertUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldInsertUpdate(e); } public void removeUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldRemoveUpdate(e); } public void changedUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldChangedUpdate(e); } }); searchJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { searchJButtonActionPerformed(e); } }); addJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { addJButtonActionPerformed(e); } }); closeJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { closeJButtonActionPerformed(e); } }); manageJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { manageJButtonActionPerformed(e); } }); inviteJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { inviteJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, searchJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .add(inviteJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(manageJButton))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(closeJButton) .add(searchJButton) .add(addJButton)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(eaJLabel) .add(6, 6, 6) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(searchJTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(searchJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE) .add(addJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(closeJButton) .add(manageJButton) .add(inviteJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents
} }); closeJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { closeJButtonActionPerformed(e); } }); manageJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { manageJButtonActionPerformed(e); } }); inviteJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { inviteJButtonActionPerformed(e);
private void initComponents() { javax.swing.JButton closeJButton; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JLabel eaJLabel; javax.swing.JButton inviteJButton; javax.swing.JButton manageJButton; eaJLabel = LabelFactory.create(getString("EmbeddedAssistance")); contactsJScrollPane = new javax.swing.JScrollPane(); contactsJList = ListFactory.create(); searchJTextField = TextFactory.create(); searchJButton = ButtonFactory.create(getString("SearchButton")); addJButton = ButtonFactory.create(getString("AddButton")); closeJButton = ButtonFactory.create(getString("CloseButton")); manageJButton = ButtonFactory.create(getString("ManageButton")); inviteJButton = ButtonFactory.create(getString("InviteButton")); contactsModel = new DefaultListModel(); contactsJList.setModel(contactsModel); contactsJList.setCellRenderer(new ContactCellRenderer()); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); searchJTextField.getDocument().addDocumentListener(new DocumentListener() { public void insertUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldInsertUpdate(e); } public void removeUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldRemoveUpdate(e); } public void changedUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldChangedUpdate(e); } }); searchJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { searchJButtonActionPerformed(e); } }); addJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { addJButtonActionPerformed(e); } }); closeJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { closeJButtonActionPerformed(e); } }); manageJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { manageJButtonActionPerformed(e); } }); inviteJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { inviteJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, searchJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .add(inviteJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(manageJButton))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(closeJButton) .add(searchJButton) .add(addJButton)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(eaJLabel) .add(6, 6, 6) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(searchJTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(searchJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE) .add(addJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(closeJButton) .add(manageJButton) .add(inviteJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, searchJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .add(inviteJButton)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 303, Short.MAX_VALUE) .add(eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 303, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(searchJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE)
private void initComponents() { javax.swing.JButton closeJButton; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JLabel eaJLabel; javax.swing.JButton inviteJButton; javax.swing.JButton manageJButton; eaJLabel = LabelFactory.create(getString("EmbeddedAssistance")); contactsJScrollPane = new javax.swing.JScrollPane(); contactsJList = ListFactory.create(); searchJTextField = TextFactory.create(); searchJButton = ButtonFactory.create(getString("SearchButton")); addJButton = ButtonFactory.create(getString("AddButton")); closeJButton = ButtonFactory.create(getString("CloseButton")); manageJButton = ButtonFactory.create(getString("ManageButton")); inviteJButton = ButtonFactory.create(getString("InviteButton")); contactsModel = new DefaultListModel(); contactsJList.setModel(contactsModel); contactsJList.setCellRenderer(new ContactCellRenderer()); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); searchJTextField.getDocument().addDocumentListener(new DocumentListener() { public void insertUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldInsertUpdate(e); } public void removeUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldRemoveUpdate(e); } public void changedUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldChangedUpdate(e); } }); searchJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { searchJButtonActionPerformed(e); } }); addJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { addJButtonActionPerformed(e); } }); closeJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { closeJButtonActionPerformed(e); } }); manageJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { manageJButtonActionPerformed(e); } }); inviteJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { inviteJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, searchJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .add(inviteJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(manageJButton))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(closeJButton) .add(searchJButton) .add(addJButton)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(eaJLabel) .add(6, 6, 6) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(searchJTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(searchJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE) .add(addJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(closeJButton) .add(manageJButton) .add(inviteJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents
.add(manageJButton)))
.add(searchJButton)))
private void initComponents() { javax.swing.JButton closeJButton; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JLabel eaJLabel; javax.swing.JButton inviteJButton; javax.swing.JButton manageJButton; eaJLabel = LabelFactory.create(getString("EmbeddedAssistance")); contactsJScrollPane = new javax.swing.JScrollPane(); contactsJList = ListFactory.create(); searchJTextField = TextFactory.create(); searchJButton = ButtonFactory.create(getString("SearchButton")); addJButton = ButtonFactory.create(getString("AddButton")); closeJButton = ButtonFactory.create(getString("CloseButton")); manageJButton = ButtonFactory.create(getString("ManageButton")); inviteJButton = ButtonFactory.create(getString("InviteButton")); contactsModel = new DefaultListModel(); contactsJList.setModel(contactsModel); contactsJList.setCellRenderer(new ContactCellRenderer()); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); searchJTextField.getDocument().addDocumentListener(new DocumentListener() { public void insertUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldInsertUpdate(e); } public void removeUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldRemoveUpdate(e); } public void changedUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldChangedUpdate(e); } }); searchJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { searchJButtonActionPerformed(e); } }); addJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { addJButtonActionPerformed(e); } }); closeJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { closeJButtonActionPerformed(e); } }); manageJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { manageJButtonActionPerformed(e); } }); inviteJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { inviteJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, searchJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .add(inviteJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(manageJButton))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(closeJButton) .add(searchJButton) .add(addJButton)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(eaJLabel) .add(6, 6, 6) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(searchJTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(searchJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE) .add(addJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(closeJButton) .add(manageJButton) .add(inviteJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(closeJButton) .add(searchJButton) .add(addJButton))
.add(addJButton)
private void initComponents() { javax.swing.JButton closeJButton; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JLabel eaJLabel; javax.swing.JButton inviteJButton; javax.swing.JButton manageJButton; eaJLabel = LabelFactory.create(getString("EmbeddedAssistance")); contactsJScrollPane = new javax.swing.JScrollPane(); contactsJList = ListFactory.create(); searchJTextField = TextFactory.create(); searchJButton = ButtonFactory.create(getString("SearchButton")); addJButton = ButtonFactory.create(getString("AddButton")); closeJButton = ButtonFactory.create(getString("CloseButton")); manageJButton = ButtonFactory.create(getString("ManageButton")); inviteJButton = ButtonFactory.create(getString("InviteButton")); contactsModel = new DefaultListModel(); contactsJList.setModel(contactsModel); contactsJList.setCellRenderer(new ContactCellRenderer()); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); searchJTextField.getDocument().addDocumentListener(new DocumentListener() { public void insertUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldInsertUpdate(e); } public void removeUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldRemoveUpdate(e); } public void changedUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldChangedUpdate(e); } }); searchJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { searchJButtonActionPerformed(e); } }); addJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { addJButtonActionPerformed(e); } }); closeJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { closeJButtonActionPerformed(e); } }); manageJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { manageJButtonActionPerformed(e); } }); inviteJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { inviteJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, searchJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .add(inviteJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(manageJButton))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(closeJButton) .add(searchJButton) .add(addJButton)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(eaJLabel) .add(6, 6, 6) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(searchJTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(searchJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE) .add(addJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(closeJButton) .add(manageJButton) .add(inviteJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents
.add(searchJTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(searchJButton))
.add(searchJButton) .add(searchJTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
private void initComponents() { javax.swing.JButton closeJButton; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JLabel eaJLabel; javax.swing.JButton inviteJButton; javax.swing.JButton manageJButton; eaJLabel = LabelFactory.create(getString("EmbeddedAssistance")); contactsJScrollPane = new javax.swing.JScrollPane(); contactsJList = ListFactory.create(); searchJTextField = TextFactory.create(); searchJButton = ButtonFactory.create(getString("SearchButton")); addJButton = ButtonFactory.create(getString("AddButton")); closeJButton = ButtonFactory.create(getString("CloseButton")); manageJButton = ButtonFactory.create(getString("ManageButton")); inviteJButton = ButtonFactory.create(getString("InviteButton")); contactsModel = new DefaultListModel(); contactsJList.setModel(contactsModel); contactsJList.setCellRenderer(new ContactCellRenderer()); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); searchJTextField.getDocument().addDocumentListener(new DocumentListener() { public void insertUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldInsertUpdate(e); } public void removeUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldRemoveUpdate(e); } public void changedUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldChangedUpdate(e); } }); searchJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { searchJButtonActionPerformed(e); } }); addJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { addJButtonActionPerformed(e); } }); closeJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { closeJButtonActionPerformed(e); } }); manageJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { manageJButtonActionPerformed(e); } }); inviteJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { inviteJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, searchJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .add(inviteJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(manageJButton))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(closeJButton) .add(searchJButton) .add(addJButton)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(eaJLabel) .add(6, 6, 6) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(searchJTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(searchJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE) .add(addJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(closeJButton) .add(manageJButton) .add(inviteJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE) .add(addJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(closeJButton) .add(manageJButton) .add(inviteJButton)) .addContainerGap())
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(addJButton) .add(127, 127, 127)) .add(layout.createSequentialGroup() .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE) .addContainerGap())))
private void initComponents() { javax.swing.JButton closeJButton; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JLabel eaJLabel; javax.swing.JButton inviteJButton; javax.swing.JButton manageJButton; eaJLabel = LabelFactory.create(getString("EmbeddedAssistance")); contactsJScrollPane = new javax.swing.JScrollPane(); contactsJList = ListFactory.create(); searchJTextField = TextFactory.create(); searchJButton = ButtonFactory.create(getString("SearchButton")); addJButton = ButtonFactory.create(getString("AddButton")); closeJButton = ButtonFactory.create(getString("CloseButton")); manageJButton = ButtonFactory.create(getString("ManageButton")); inviteJButton = ButtonFactory.create(getString("InviteButton")); contactsModel = new DefaultListModel(); contactsJList.setModel(contactsModel); contactsJList.setCellRenderer(new ContactCellRenderer()); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); searchJTextField.getDocument().addDocumentListener(new DocumentListener() { public void insertUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldInsertUpdate(e); } public void removeUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldRemoveUpdate(e); } public void changedUpdate(final javax.swing.event.DocumentEvent e) { searchJTextFieldChangedUpdate(e); } }); searchJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { searchJButtonActionPerformed(e); } }); addJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { addJButtonActionPerformed(e); } }); closeJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { closeJButtonActionPerformed(e); } }); manageJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { manageJButtonActionPerformed(e); } }); inviteJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { inviteJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, searchJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .add(inviteJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(manageJButton))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(closeJButton) .add(searchJButton) .add(addJButton)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(eaJLabel) .add(6, 6, 6) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(searchJTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(searchJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE) .add(addJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(closeJButton) .add(manageJButton) .add(inviteJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents
private Fixture(final ArtifactModel aModel, final ContainerModel cModel, final Long containerId, final Integer eTeamSize) { this.aModel = aModel; this.cModel = cModel; this.containerId = containerId;
private Fixture(final ContainerModel cModel, final Long containerId, final Integer eTeamSize) { this.cModel = cModel; this.containerId = containerId;
private Fixture(final ArtifactModel aModel, final ContainerModel cModel, final Long containerId, final Integer eTeamSize) { this.aModel = aModel; this.cModel = cModel; this.containerId = containerId; this.eTeamSize = eTeamSize; }
super.setUp(); final ArtifactModel aModel = getArtifactModel(); final ContainerModel cModel = getContainerModel();
super.setUp(); final ContainerModel cModel = getContainerModel();
protected void setUp() throws Exception { super.setUp(); final ArtifactModel aModel = getArtifactModel(); final ContainerModel cModel = getContainerModel(); login(); final Container container = createContainer(NAME); final Document document = create(getInputFiles()[0]); cModel.addDocument(container.getId(), document.getId()); addTeam(container); modifyDocument(document); cModel.publish(container.getId()); datum = new Fixture(aModel, cModel, container.getId(), aModel.readTeam(container.getId()).size()); }
datum = new Fixture(aModel, cModel, container.getId(), aModel.readTeam(container.getId()).size()); }
datum = new Fixture(cModel, container.getId(), cModel.readTeam( container.getId()).size()); }
protected void setUp() throws Exception { super.setUp(); final ArtifactModel aModel = getArtifactModel(); final ContainerModel cModel = getContainerModel(); login(); final Container container = createContainer(NAME); final Document document = create(getInputFiles()[0]); cModel.addDocument(container.getId(), document.getId()); addTeam(container); modifyDocument(document); cModel.publish(container.getId()); datum = new Fixture(aModel, cModel, container.getId(), aModel.readTeam(container.getId()).size()); }
final Set<User> team = datum.aModel.readTeam(datum.containerId);
final List<User> team = datum.cModel.readTeam(datum.containerId);
public void testClose() { try { datum.cModel.close(datum.containerId); } catch(final ParityException px) { fail(createFailMessage(px)); } // assert the container remains intact final Container container = datum.cModel.read(datum.containerId); assertNotNull(NAME, container); assertEquals(NAME + " [CONTAINER STATE DOES NOT MATCH EXPECTATION]", container.getState(), ArtifactState.CLOSED); // the local team remains intact final Set<User> team = datum.aModel.readTeam(datum.containerId); assertNotNull(NAME + " [TEAM IS NULL]", team); assertEquals(NAME + " [TEAM SIZE DOES NOT MATCH EXPECTATION]", datum.eTeamSize.intValue(), team.size()); }
QueueItem enqueue(final String message) throws ParityServerModelException {
QueueItem enqueue(final JID jid, final IQ iq) throws ParityServerModelException {
QueueItem enqueue(final String message) throws ParityServerModelException { logger.info("enqueue(JID,String)"); logger.debug(message); try { final String username = session.getJID().getNode(); final Integer queueId = queueSql.insert(username, message); return queueSql.select(queueId); } catch(SQLException sqlx) { logger.error("enqueue(JID,String)", sqlx); throw ParityErrorTranslator.translate(sqlx); } catch(RuntimeException rx) { logger.error("enqueue(JID,String)", rx); throw ParityErrorTranslator.translate(rx); } }
logger.debug(message);
logger.debug(jid); logger.debug(iq);
QueueItem enqueue(final String message) throws ParityServerModelException { logger.info("enqueue(JID,String)"); logger.debug(message); try { final String username = session.getJID().getNode(); final Integer queueId = queueSql.insert(username, message); return queueSql.select(queueId); } catch(SQLException sqlx) { logger.error("enqueue(JID,String)", sqlx); throw ParityErrorTranslator.translate(sqlx); } catch(RuntimeException rx) { logger.error("enqueue(JID,String)", rx); throw ParityErrorTranslator.translate(rx); } }
final String username = session.getJID().getNode();
final String username = jid.getNode(); final String message = iq.toXML();
QueueItem enqueue(final String message) throws ParityServerModelException { logger.info("enqueue(JID,String)"); logger.debug(message); try { final String username = session.getJID().getNode(); final Integer queueId = queueSql.insert(username, message); return queueSql.select(queueId); } catch(SQLException sqlx) { logger.error("enqueue(JID,String)", sqlx); throw ParityErrorTranslator.translate(sqlx); } catch(RuntimeException rx) { logger.error("enqueue(JID,String)", rx); throw ParityErrorTranslator.translate(rx); } }
return getDate();
return new Date();
public static Date getDate() { return getDate(); }
Mapper mapper = new DigesterMapperImpl("./src/test-config/jcrmapping-inheritance.xml").buildMapper();
String[] files = { "./src/test-config/jcrmapping.xml", "./src/test-config/jcrmapping-atomic.xml", "./src/test-config/jcrmapping-beandescriptor.xml", "./src/test-config/jcrmapping-inheritance.xml"}; Mapper mapper = new DigesterMapperImpl(files) .buildMapper();
public void testMapperInheritance() { try { Mapper mapper = new DigesterMapperImpl("./src/test-config/jcrmapping-inheritance.xml").buildMapper(); assertNotNull("Mapper is null", mapper); ClassDescriptor classDescriptor = mapper.getClassDescriptor(Ancestor.class); assertNotNull("Mapper is null", classDescriptor); assertEquals("Incorrect path field", classDescriptor.getPathFieldDescriptor().getFieldName(), "path"); assertEquals("Incorrect discriminator field", classDescriptor.getDiscriminatorFieldDescriptor().getFieldName(), "discriminator"); assertTrue("The ancestor class is not abstract", classDescriptor.isAbstract()); assertNull("The ancestor class has an ancestor", classDescriptor.getSuperClassDescriptor()); classDescriptor = mapper.getClassDescriptor(Descendant.class); assertNotNull("Mapper is null", classDescriptor); assertEquals("Incorrect path field", classDescriptor.getPathFieldDescriptor().getFieldName(), "path"); assertEquals("Incorrect discriminator field", classDescriptor.getDiscriminatorFieldDescriptor().getFieldName(), "discriminator"); assertNotNull("ancerstorField is null in the descendant class", classDescriptor.getFieldDescriptor("ancestorField")); assertFalse("The descendant class is abstract", classDescriptor.isAbstract()); assertNotNull("The descendant class has not an ancestor", classDescriptor.getSuperClassDescriptor()); assertEquals("Invalid ancestor class for the descendant class", classDescriptor.getSuperClassDescriptor().getClassName(), "org.apache.portals.graffito.jcr.testmodel.inheritance.Ancestor"); } catch (JcrMappingException e) { e.printStackTrace(); fail("Impossible to retrieve the converter " + e); } }
assertNotNull("Mapper is null", classDescriptor);
assertNotNull("Classdescriptor is null", classDescriptor);
public void testMapperInheritance() { try { Mapper mapper = new DigesterMapperImpl("./src/test-config/jcrmapping-inheritance.xml").buildMapper(); assertNotNull("Mapper is null", mapper); ClassDescriptor classDescriptor = mapper.getClassDescriptor(Ancestor.class); assertNotNull("Mapper is null", classDescriptor); assertEquals("Incorrect path field", classDescriptor.getPathFieldDescriptor().getFieldName(), "path"); assertEquals("Incorrect discriminator field", classDescriptor.getDiscriminatorFieldDescriptor().getFieldName(), "discriminator"); assertTrue("The ancestor class is not abstract", classDescriptor.isAbstract()); assertNull("The ancestor class has an ancestor", classDescriptor.getSuperClassDescriptor()); classDescriptor = mapper.getClassDescriptor(Descendant.class); assertNotNull("Mapper is null", classDescriptor); assertEquals("Incorrect path field", classDescriptor.getPathFieldDescriptor().getFieldName(), "path"); assertEquals("Incorrect discriminator field", classDescriptor.getDiscriminatorFieldDescriptor().getFieldName(), "discriminator"); assertNotNull("ancerstorField is null in the descendant class", classDescriptor.getFieldDescriptor("ancestorField")); assertFalse("The descendant class is abstract", classDescriptor.isAbstract()); assertNotNull("The descendant class has not an ancestor", classDescriptor.getSuperClassDescriptor()); assertEquals("Invalid ancestor class for the descendant class", classDescriptor.getSuperClassDescriptor().getClassName(), "org.apache.portals.graffito.jcr.testmodel.inheritance.Ancestor"); } catch (JcrMappingException e) { e.printStackTrace(); fail("Impossible to retrieve the converter " + e); } }
assertEquals("Incorrect JcrName", classDescriptor.getJcrName("discriminator"),"discriminator"); descendandDescriptors = classDescriptor.getDescendantClassDescriptors(); assertEquals("Invalid number of descendants", descendandDescriptors.size(), 1); assertTrue("Descendant class doesn't have a node type per hierarchy strategy", classDescriptor.usesNodeTypePerHierarchyStrategy()); assertFalse("Descendant class have a node type per hierarchy strategy", classDescriptor.usesNodeTypePerConcreteClassStrategy()); classDescriptor = mapper.getClassDescriptor(SubDescendant.class); assertNotNull("Classdescriptor is null", classDescriptor); assertEquals("Incorrect path field", classDescriptor.getPathFieldDescriptor().getFieldName(), "path"); assertEquals("Incorrect discriminator field", classDescriptor.getDiscriminatorFieldDescriptor().getFieldName(), "discriminator"); assertTrue("The subdescendant class has no discriminator", classDescriptor.hasDiscriminatorField()); assertNotNull("ancestorField is null in the descendant class", classDescriptor.getFieldDescriptor("ancestorField")); assertFalse("The subdescendant class is abstract", classDescriptor.isAbstract()); assertNotNull("The subdescendant class has not an ancestor", classDescriptor.getSuperClassDescriptor()); assertEquals("Invalid ancestor class for the descendant class", classDescriptor.getSuperClassDescriptor().getClassName(), "org.apache.portals.graffito.jcr.testmodel.inheritance.Descendant"); assertEquals("Incorrect JcrName", classDescriptor.getJcrName("discriminator"),"discriminator"); descendandDescriptors = classDescriptor.getDescendantClassDescriptors(); assertEquals("Invalid number of descendants", descendandDescriptors.size(), 0); assertTrue("SubDescendant class doesn't have a node type per hierarchy strategy", classDescriptor.usesNodeTypePerHierarchyStrategy()); assertFalse("SubDescendant class have a node type per hierarchy strategy", classDescriptor.usesNodeTypePerConcreteClassStrategy());
public void testMapperInheritance() { try { Mapper mapper = new DigesterMapperImpl("./src/test-config/jcrmapping-inheritance.xml").buildMapper(); assertNotNull("Mapper is null", mapper); ClassDescriptor classDescriptor = mapper.getClassDescriptor(Ancestor.class); assertNotNull("Mapper is null", classDescriptor); assertEquals("Incorrect path field", classDescriptor.getPathFieldDescriptor().getFieldName(), "path"); assertEquals("Incorrect discriminator field", classDescriptor.getDiscriminatorFieldDescriptor().getFieldName(), "discriminator"); assertTrue("The ancestor class is not abstract", classDescriptor.isAbstract()); assertNull("The ancestor class has an ancestor", classDescriptor.getSuperClassDescriptor()); classDescriptor = mapper.getClassDescriptor(Descendant.class); assertNotNull("Mapper is null", classDescriptor); assertEquals("Incorrect path field", classDescriptor.getPathFieldDescriptor().getFieldName(), "path"); assertEquals("Incorrect discriminator field", classDescriptor.getDiscriminatorFieldDescriptor().getFieldName(), "discriminator"); assertNotNull("ancerstorField is null in the descendant class", classDescriptor.getFieldDescriptor("ancestorField")); assertFalse("The descendant class is abstract", classDescriptor.isAbstract()); assertNotNull("The descendant class has not an ancestor", classDescriptor.getSuperClassDescriptor()); assertEquals("Invalid ancestor class for the descendant class", classDescriptor.getSuperClassDescriptor().getClassName(), "org.apache.portals.graffito.jcr.testmodel.inheritance.Ancestor"); } catch (JcrMappingException e) { e.printStackTrace(); fail("Impossible to retrieve the converter " + e); } }
assertTrue(b2Field.isJcrAutoCreated()); assertTrue(b2Field.isJcrMandatory()); assertTrue(b2Field.isJcrProtected()); assertTrue(b2Field.isJcrMultiple()); assertEquals(b2Field.getJcrOnParentVersion(), "COPY");
assertFalse(b2Field.isJcrAutoCreated()); assertFalse(b2Field.isJcrMandatory()); assertFalse(b2Field.isJcrProtected()); assertFalse(b2Field.isJcrMultiple()); assertEquals(b2Field.getJcrOnParentVersion(), "IGNORE");
public void testMapperOptionalProperties() { try { Mapper mapper = new DigesterMapperImpl("./src/test-config/jcrmapping.xml") .buildMapper(); assertNotNull("Mapper is null", mapper); ClassDescriptor classDescriptor = mapper.getClassDescriptor(B.class); assertNotNull("ClassDescriptor is null", classDescriptor); assertTrue("Invalid classname", classDescriptor.getClassName().equals(B.class.getName())); assertEquals(classDescriptor.getJcrSuperTypes(), "nt:base"); FieldDescriptor b1Field = classDescriptor.getFieldDescriptor("b1"); assertNotNull("FieldDescriptor is null", b1Field); assertEquals(b1Field.getFieldName(), "b1"); assertEquals(b1Field.getJcrType(), "String"); assertFalse(b1Field.isJcrAutoCreated()); assertFalse(b1Field.isJcrMandatory()); assertFalse(b1Field.isJcrProtected()); assertFalse(b1Field.isJcrMultiple()); assertEquals(b1Field.getJcrOnParentVersion(), "IGNORE"); FieldDescriptor b2Field = classDescriptor.getFieldDescriptor("b2"); assertNotNull("FieldDescriptor is null", b2Field); assertEquals(b2Field.getFieldName(), "b2"); assertEquals(b2Field.getJcrType(), "String"); assertTrue(b2Field.isJcrAutoCreated()); assertTrue(b2Field.isJcrMandatory()); assertTrue(b2Field.isJcrProtected()); assertTrue(b2Field.isJcrMultiple()); assertEquals(b2Field.getJcrOnParentVersion(), "COPY"); ClassDescriptor classDescriptor2 = mapper.getClassDescriptor(A.class); assertNotNull("ClassDescriptor is null", classDescriptor2); assertTrue("Invalid classname", classDescriptor2.getClassName().equals(A.class.getName())); BeanDescriptor beanDescriptor = classDescriptor2.getBeanDescriptor("b"); assertNotNull(beanDescriptor); assertEquals(beanDescriptor.getFieldName(), "b"); assertEquals(beanDescriptor.getJcrNodeType(), "nt:unstructured"); assertFalse(beanDescriptor.isJcrAutoCreated()); assertFalse(beanDescriptor.isJcrMandatory()); assertFalse(beanDescriptor.isJcrProtected()); assertFalse(beanDescriptor.isJcrSameNameSiblings()); assertEquals(beanDescriptor.getJcrOnParentVersion(), "IGNORE"); CollectionDescriptor collectionDescriptor = classDescriptor2.getCollectionDescriptor("collection"); assertNotNull(collectionDescriptor); assertEquals(collectionDescriptor.getJcrNodeType(), "graffito:C"); assertFalse(collectionDescriptor.isJcrAutoCreated()); assertFalse(collectionDescriptor.isJcrMandatory()); assertFalse(collectionDescriptor.isJcrProtected()); assertFalse(collectionDescriptor.isJcrSameNameSiblings()); assertEquals(collectionDescriptor.getJcrOnParentVersion(), "IGNORE"); } catch (JcrMappingException e) { e.printStackTrace(); fail("Impossible to retrieve the converter " + e); } }
String layout = (String)context.get(KEY_LAYOUT);
Object obj = context.get(KEY_LAYOUT); String layout = (obj == null) ? null : obj.toString();
protected void mergeTemplate(Template template, Context context, HttpServletResponse response) throws ResourceNotFoundException, ParseErrorException, MethodInvocationException, IOException, UnsupportedEncodingException, Exception { // // this section is based on Tim Colson's "two pass render" // // Render the screen content StringWriter sw = new StringWriter(); template.merge(context, sw); // Add the resulting content to the context context.put(KEY_SCREEN_CONTENT, sw.toString()); // Check for an alternate layout // // we check after merging the screen template so the screen // can overrule any layout set in the request parameters // by doing #set( $layout = "MyLayout.vm" ) String layout = (String)context.get(KEY_LAYOUT); if (layout == null) { // no alternate, use default layout = defaultLayout; } else { // make it a full(er) path layout = layoutDir + layout; } try { //load the layout template template = getTemplate(layout); } catch (Exception e) { Velocity.error("Can't load layout \"" + layout + "\": " + e); // if it was an alternate layout we couldn't get... if (layout != defaultLayout) { // try to get the default layout // if this also fails, let the exception go template = getTemplate(defaultLayout); } } // Render the layout template into the response super.mergeTemplate(template, context, response); }
if (layout != defaultLayout)
if (!layout.equals(defaultLayout))
protected void mergeTemplate(Template template, Context context, HttpServletResponse response) throws ResourceNotFoundException, ParseErrorException, MethodInvocationException, IOException, UnsupportedEncodingException, Exception { // // this section is based on Tim Colson's "two pass render" // // Render the screen content StringWriter sw = new StringWriter(); template.merge(context, sw); // Add the resulting content to the context context.put(KEY_SCREEN_CONTENT, sw.toString()); // Check for an alternate layout // // we check after merging the screen template so the screen // can overrule any layout set in the request parameters // by doing #set( $layout = "MyLayout.vm" ) String layout = (String)context.get(KEY_LAYOUT); if (layout == null) { // no alternate, use default layout = defaultLayout; } else { // make it a full(er) path layout = layoutDir + layout; } try { //load the layout template template = getTemplate(layout); } catch (Exception e) { Velocity.error("Can't load layout \"" + layout + "\": " + e); // if it was an alternate layout we couldn't get... if (layout != defaultLayout) { // try to get the default layout // if this also fails, let the exception go template = getTemplate(defaultLayout); } } // Render the layout template into the response super.mergeTemplate(template, context, response); }
final Map<User, ArtifactReceipt> sharedWith = this.sharedWith.get(version); final List<PDFXMLUser> pdfXML = new ArrayList<PDFXMLUser>(publishedTo.size() + sharedWith.size());
final List<PDFXMLUser> pdfXML = new ArrayList<PDFXMLUser>(publishedTo.size());
private List<PDFXMLUser> createPDFXMLUsers(final ContainerVersion version) { final Map<User, ArtifactReceipt> publishedTo = this.publishedTo.get(version); final Map<User, ArtifactReceipt> sharedWith = this.sharedWith.get(version); final List<PDFXMLUser> pdfXML = new ArrayList<PDFXMLUser>(publishedTo.size() + sharedWith.size()); for (final Entry<User, ArtifactReceipt> entry : publishedTo.entrySet()) { pdfXML.add(createPDFXMLUser(entry.getKey(), entry.getValue())); } for (final Entry<User, ArtifactReceipt> entry : sharedWith.entrySet()) { pdfXML.add(createPDFXMLUser(entry.getKey(), entry.getValue())); } return pdfXML; }
pdfXML.add(createPDFXMLUser(entry.getKey(), entry.getValue())); } for (final Entry<User, ArtifactReceipt> entry : sharedWith.entrySet()) {
private List<PDFXMLUser> createPDFXMLUsers(final ContainerVersion version) { final Map<User, ArtifactReceipt> publishedTo = this.publishedTo.get(version); final Map<User, ArtifactReceipt> sharedWith = this.sharedWith.get(version); final List<PDFXMLUser> pdfXML = new ArrayList<PDFXMLUser>(publishedTo.size() + sharedWith.size()); for (final Entry<User, ArtifactReceipt> entry : publishedTo.entrySet()) { pdfXML.add(createPDFXMLUser(entry.getKey(), entry.getValue())); } for (final Entry<User, ArtifactReceipt> entry : sharedWith.entrySet()) { pdfXML.add(createPDFXMLUser(entry.getKey(), entry.getValue())); } return pdfXML; }
for (final ContainerVersion version : sharedWith.keySet()) { this.statistics.usersPerVersion.put(version, this.statistics.usersPerVersion.get(version) + sharedWith.get(version).size()); this.statistics.usersSum += sharedWith.get(version).size(); }
private void generateStatistics() { this.statistics = new Statistics(); this.statistics.documentsPerVersion.clear(); this.statistics.documentSum = 0; this.statistics.usersSum = 0; this.statistics.versionSum = versions.size(); for (final Entry<ContainerVersion, List<DocumentVersion>> entry : documents.entrySet()) { this.statistics.documentSum += entry.getValue().size(); this.statistics.documentsPerVersion.put( entry.getKey(), entry.getValue().size()); } for (final ContainerVersion version : publishedTo.keySet()) { this.statistics.usersPerVersion.put(version, publishedTo.get(version).size()); this.statistics.usersSum += publishedTo.get(version).size(); } for (final ContainerVersion version : sharedWith.keySet()) { this.statistics.usersPerVersion.put(version, this.statistics.usersPerVersion.get(version) + sharedWith.get(version).size()); this.statistics.usersSum += sharedWith.get(version).size(); } }
if (!initialized) { component.addMouseMotionListener(new MouseMotionAdapter() {
if (!initialized) { final MouseMotionAdapter mouseMotionAdapter = new MouseMotionAdapter() {
private void initComponents() { if (!initialized) { component.addMouseMotionListener(new MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { formMouseDragged(evt, component); } public void mouseMoved(java.awt.event.MouseEvent evt) { formMouseMoved(evt, component); } }); component.addMouseListener(new MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { formMouseEntered(evt, component); } public void mouseExited(java.awt.event.MouseEvent evt) { formMouseExited(evt, component); } public void mousePressed(java.awt.event.MouseEvent evt) { formMousePressed(evt, component); } public void mouseReleased(java.awt.event.MouseEvent evt) { formMouseReleased(evt, component); } }); final Window window = SwingUtilities.getWindowAncestor(component); if (null!=window && window instanceof JDialog) { window.addMouseMotionListener(new MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { formMouseDragged(evt, window); } public void mouseMoved(java.awt.event.MouseEvent evt) { formMouseMoved(evt, window); } }); window.addMouseListener(new MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { formMouseEntered(evt, window); } public void mouseExited(java.awt.event.MouseEvent evt) { formMouseExited(evt, window); } public void mousePressed(java.awt.event.MouseEvent evt) { formMousePressed(evt, window); } public void mouseReleased(java.awt.event.MouseEvent evt) { formMouseReleased(evt, window); } }); } initialized = Boolean.TRUE; } }
}); component.addMouseListener(new MouseAdapter() {
}; final MouseAdapter mouseAdapter = new MouseAdapter() {
private void initComponents() { if (!initialized) { component.addMouseMotionListener(new MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { formMouseDragged(evt, component); } public void mouseMoved(java.awt.event.MouseEvent evt) { formMouseMoved(evt, component); } }); component.addMouseListener(new MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { formMouseEntered(evt, component); } public void mouseExited(java.awt.event.MouseEvent evt) { formMouseExited(evt, component); } public void mousePressed(java.awt.event.MouseEvent evt) { formMousePressed(evt, component); } public void mouseReleased(java.awt.event.MouseEvent evt) { formMouseReleased(evt, component); } }); final Window window = SwingUtilities.getWindowAncestor(component); if (null!=window && window instanceof JDialog) { window.addMouseMotionListener(new MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { formMouseDragged(evt, window); } public void mouseMoved(java.awt.event.MouseEvent evt) { formMouseMoved(evt, window); } }); window.addMouseListener(new MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { formMouseEntered(evt, window); } public void mouseExited(java.awt.event.MouseEvent evt) { formMouseExited(evt, window); } public void mousePressed(java.awt.event.MouseEvent evt) { formMousePressed(evt, window); } public void mouseReleased(java.awt.event.MouseEvent evt) { formMouseReleased(evt, window); } }); } initialized = Boolean.TRUE; } }
});
}; component.addMouseMotionListener(mouseMotionAdapter); component.addMouseListener(mouseAdapter); components.add(component); mouseMotionAdapters.put(component, mouseMotionAdapter); mouseAdapters.put(component, mouseAdapter);
private void initComponents() { if (!initialized) { component.addMouseMotionListener(new MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { formMouseDragged(evt, component); } public void mouseMoved(java.awt.event.MouseEvent evt) { formMouseMoved(evt, component); } }); component.addMouseListener(new MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { formMouseEntered(evt, component); } public void mouseExited(java.awt.event.MouseEvent evt) { formMouseExited(evt, component); } public void mousePressed(java.awt.event.MouseEvent evt) { formMousePressed(evt, component); } public void mouseReleased(java.awt.event.MouseEvent evt) { formMouseReleased(evt, component); } }); final Window window = SwingUtilities.getWindowAncestor(component); if (null!=window && window instanceof JDialog) { window.addMouseMotionListener(new MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { formMouseDragged(evt, window); } public void mouseMoved(java.awt.event.MouseEvent evt) { formMouseMoved(evt, window); } }); window.addMouseListener(new MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { formMouseEntered(evt, window); } public void mouseExited(java.awt.event.MouseEvent evt) { formMouseExited(evt, window); } public void mousePressed(java.awt.event.MouseEvent evt) { formMousePressed(evt, window); } public void mouseReleased(java.awt.event.MouseEvent evt) { formMouseReleased(evt, window); } }); } initialized = Boolean.TRUE; } }
window.addMouseMotionListener(new MouseMotionAdapter() {
final MouseMotionAdapter mouseMotionAdapterWindow = new MouseMotionAdapter() {
private void initComponents() { if (!initialized) { component.addMouseMotionListener(new MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { formMouseDragged(evt, component); } public void mouseMoved(java.awt.event.MouseEvent evt) { formMouseMoved(evt, component); } }); component.addMouseListener(new MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { formMouseEntered(evt, component); } public void mouseExited(java.awt.event.MouseEvent evt) { formMouseExited(evt, component); } public void mousePressed(java.awt.event.MouseEvent evt) { formMousePressed(evt, component); } public void mouseReleased(java.awt.event.MouseEvent evt) { formMouseReleased(evt, component); } }); final Window window = SwingUtilities.getWindowAncestor(component); if (null!=window && window instanceof JDialog) { window.addMouseMotionListener(new MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { formMouseDragged(evt, window); } public void mouseMoved(java.awt.event.MouseEvent evt) { formMouseMoved(evt, window); } }); window.addMouseListener(new MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { formMouseEntered(evt, window); } public void mouseExited(java.awt.event.MouseEvent evt) { formMouseExited(evt, window); } public void mousePressed(java.awt.event.MouseEvent evt) { formMousePressed(evt, window); } public void mouseReleased(java.awt.event.MouseEvent evt) { formMouseReleased(evt, window); } }); } initialized = Boolean.TRUE; } }
}); window.addMouseListener(new MouseAdapter() {
}; final MouseAdapter mouseAdapterWindow = new MouseAdapter() {
private void initComponents() { if (!initialized) { component.addMouseMotionListener(new MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { formMouseDragged(evt, component); } public void mouseMoved(java.awt.event.MouseEvent evt) { formMouseMoved(evt, component); } }); component.addMouseListener(new MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { formMouseEntered(evt, component); } public void mouseExited(java.awt.event.MouseEvent evt) { formMouseExited(evt, component); } public void mousePressed(java.awt.event.MouseEvent evt) { formMousePressed(evt, component); } public void mouseReleased(java.awt.event.MouseEvent evt) { formMouseReleased(evt, component); } }); final Window window = SwingUtilities.getWindowAncestor(component); if (null!=window && window instanceof JDialog) { window.addMouseMotionListener(new MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { formMouseDragged(evt, window); } public void mouseMoved(java.awt.event.MouseEvent evt) { formMouseMoved(evt, window); } }); window.addMouseListener(new MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { formMouseEntered(evt, window); } public void mouseExited(java.awt.event.MouseEvent evt) { formMouseExited(evt, window); } public void mousePressed(java.awt.event.MouseEvent evt) { formMousePressed(evt, window); } public void mouseReleased(java.awt.event.MouseEvent evt) { formMouseReleased(evt, window); } }); } initialized = Boolean.TRUE; } }
});
}; window.addMouseMotionListener(mouseMotionAdapterWindow); window.addMouseListener(mouseAdapterWindow); components.add(window); mouseMotionAdapters.put(window, mouseMotionAdapterWindow); mouseAdapters.put(window, mouseAdapterWindow);
private void initComponents() { if (!initialized) { component.addMouseMotionListener(new MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { formMouseDragged(evt, component); } public void mouseMoved(java.awt.event.MouseEvent evt) { formMouseMoved(evt, component); } }); component.addMouseListener(new MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { formMouseEntered(evt, component); } public void mouseExited(java.awt.event.MouseEvent evt) { formMouseExited(evt, component); } public void mousePressed(java.awt.event.MouseEvent evt) { formMousePressed(evt, component); } public void mouseReleased(java.awt.event.MouseEvent evt) { formMouseReleased(evt, component); } }); final Window window = SwingUtilities.getWindowAncestor(component); if (null!=window && window instanceof JDialog) { window.addMouseMotionListener(new MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { formMouseDragged(evt, window); } public void mouseMoved(java.awt.event.MouseEvent evt) { formMouseMoved(evt, window); } }); window.addMouseListener(new MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { formMouseEntered(evt, window); } public void mouseExited(java.awt.event.MouseEvent evt) { formMouseExited(evt, window); } public void mousePressed(java.awt.event.MouseEvent evt) { formMousePressed(evt, window); } public void mouseReleased(java.awt.event.MouseEvent evt) { formMouseReleased(evt, window); } }); } initialized = Boolean.TRUE; } }
this.maximumHeight = jFrame.getPreferredSize().height;
public ShowJFrameAnimator(final JFrame jFrame) { super(jFrame); this.isDone = false; }
if(newHeight <= MAX_BROWSER_HEIGHT) {
if(newHeight <= maximumHeight) {
private Dimension incrementHeight(final Dimension size) { final double newHeight = size.getHeight() + INCREMENT_STEP; if(newHeight <= MAX_BROWSER_HEIGHT) { size.setSize(size.getWidth(), newHeight); } else { isDone = true; } return size; }
c.insets.left = 167;
c.insets.left = 275;
private void initComponents() { searchJTextField = TextFactory.create(); // COLOR SearchText 237,241,244,255 searchJTextField.setBackground(new Color(237, 241, 244, 255)); // BORDER SearchText TopBottom 204,215,226,255 searchJTextField.setBorder(new TopBottomBorder(new Color(204, 215, 226, 255))); searchJTextField.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { searchJTextFieldActionPerformed(e); } }); searchJTextField.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(final DocumentEvent e) { searchJTextFieldChangedUpdate(e); } public void insertUpdate(final DocumentEvent e) { searchJTextFieldInsertUpdate(e); } public void removeUpdate(final DocumentEvent e) { searchJTextFieldRemoveUpdate(e); } }); searchJTextField.setTransferHandler(new CreateDocumentTxHandler(getBrowser())); searchLeftJLabel = LabelFactory.create(SEARCH_LEFT_ICON); searchRightJLabel = LabelFactory.create(SEARCH_RIGHT_ICON); final GridBagConstraints c = new GridBagConstraints(); c.anchor = GridBagConstraints.EAST; c.insets.left = 167; add(searchLeftJLabel, c.clone()); c.anchor = GridBagConstraints.CENTER; c.fill = GridBagConstraints.BOTH; c.insets.left = 0; c.weightx = 1; add(searchJTextField, c.clone()); c.fill = GridBagConstraints.NONE; c.insets.left = 0; c.insets.right = 7; c.weightx = 0; add(searchRightJLabel, c.clone()); }
public void drawingBarcodeDirectToGraphics() throws BarcodeException {
public void drawingBarcodeDirectToGraphics() throws BarcodeException, OutputException {
public void drawingBarcodeDirectToGraphics() throws BarcodeException { // Always get a Barcode from the BarcodeFactory Barcode barcode = BarcodeFactory.createCode128B("My Barcode"); // We are created an image from scratch here, but for printing in Java, your // print renderer should have a Graphics internally anyway BufferedImage image = new BufferedImage(500, 500, BufferedImage.TYPE_BYTE_GRAY); // We need to cast the Graphics from the Image to a Graphics2D - this is OK Graphics2D g = (Graphics2D) image.getGraphics(); // Barcode supports a direct draw method to Graphics2D that lets you position the // barcode on the canvas barcode.draw(g, 10, 56); }
xmppSystem.processEventQueue(getUserId());
xmppSystem.processEventQueue(userId);
public void processEventQueue(final JabberId userId) { xmppSystem.processEventQueue(getUserId()); }
IParityModelConstants.PROJECT_CREATED_BY_INBOX,
systemUsername,
private Project lazyCreateInbox() throws FileNotFoundException, IOException { final Project inbox = new Project( IParityModelConstants.PROJECT_CREATED_BY_INBOX, IParityModelConstants.PROJECT_CREATED_ON_INBOX, IParityModelConstants.PROJECT_DESCRIPTION_INBOX, NO_FLAGS, IParityModelConstants.PROJECT_ID_INBOX, IParityModelConstants.PROJECT_NAME_INBOX, null, IParityModelConstants.PROJECT_UPDATED_BY_MYPROJECTS, IParityModelConstants.PROJECT_UPDATED_ON_MYPROJECTS); inbox.add(ParityObjectFlag.SEEN); projectXmlIO.create(inbox); return inbox; }
IParityModelConstants.PROJECT_UPDATED_BY_MYPROJECTS,
systemUsername,
private Project lazyCreateInbox() throws FileNotFoundException, IOException { final Project inbox = new Project( IParityModelConstants.PROJECT_CREATED_BY_INBOX, IParityModelConstants.PROJECT_CREATED_ON_INBOX, IParityModelConstants.PROJECT_DESCRIPTION_INBOX, NO_FLAGS, IParityModelConstants.PROJECT_ID_INBOX, IParityModelConstants.PROJECT_NAME_INBOX, null, IParityModelConstants.PROJECT_UPDATED_BY_MYPROJECTS, IParityModelConstants.PROJECT_UPDATED_ON_MYPROJECTS); inbox.add(ParityObjectFlag.SEEN); projectXmlIO.create(inbox); return inbox; }
IParityModelConstants.PROJECT_CREATED_BY_MYPROJECTS,
systemUsername,
private Project lazyCreateMyProjects() throws FileNotFoundException, IOException { final Project myProjects = new Project( IParityModelConstants.PROJECT_CREATED_BY_MYPROJECTS, IParityModelConstants.PROJECT_CREATED_ON_MYPROJECTS, IParityModelConstants.PROJECT_DESCRIPTION_MYPROJECTS, NO_FLAGS, IParityModelConstants.PROJECT_ID_MYPROJECTS, IParityModelConstants.PROJECT_NAME_MYPROJECTS, null, IParityModelConstants.PROJECT_UPDATED_BY_MYPROJECTS, IParityModelConstants.PROJECT_UPDATED_ON_MYPROJECTS); myProjects.add(ParityObjectFlag.SEEN); projectXmlIO.create(myProjects); return myProjects; }
IParityModelConstants.PROJECT_UPDATED_BY_MYPROJECTS,
systemUsername,
private Project lazyCreateMyProjects() throws FileNotFoundException, IOException { final Project myProjects = new Project( IParityModelConstants.PROJECT_CREATED_BY_MYPROJECTS, IParityModelConstants.PROJECT_CREATED_ON_MYPROJECTS, IParityModelConstants.PROJECT_DESCRIPTION_MYPROJECTS, NO_FLAGS, IParityModelConstants.PROJECT_ID_MYPROJECTS, IParityModelConstants.PROJECT_NAME_MYPROJECTS, null, IParityModelConstants.PROJECT_UPDATED_BY_MYPROJECTS, IParityModelConstants.PROJECT_UPDATED_ON_MYPROJECTS); myProjects.add(ParityObjectFlag.SEEN); projectXmlIO.create(myProjects); return myProjects; }
final void setJabberIdParameters(final String listName, final String name,
public final void setJabberIdParameters(final String listName, final String name,
final void setJabberIdParameters(final String listName, final String name, final List<JabberId> values) { final List<Parameter> parameters = new LinkedList<Parameter>(); for(final JabberId value : values) { parameters.add(new Parameter(name, JabberId.class, value)); } this.parameters.add(new Parameter(listName, List.class, parameters)); }
digester.addSetNext("toolbox/data", "addTool");
digester.addSetNext("toolbox/data", "addData");
protected void addDataRules(Digester digester) { digester.addObjectCreate("toolbox/data", getDataInfoClass()); digester.addSetProperties("toolbox/data"); digester.addBeanPropertySetter("toolbox/data/key", "key"); digester.addBeanPropertySetter("toolbox/data/value", "value"); digester.addSetNext("toolbox/data", "addTool"); }
LabelFactory.createLink(text, UIConstants.DefaultFontBold);
LabelFactory.createLink(text, UIConstants.SmallFont);
private JLabel createJLabelLink(final String text, final ActionListener actionListener) { final JLabel jLabelLink = LabelFactory.createLink(text, UIConstants.DefaultFontBold); jLabelLink.addMouseListener(new MouseAdapter() { public void mouseClicked(final MouseEvent e) { actionListener.actionPerformed( new ActionEvent(e.getSource(), ActionEvent.ACTION_PERFORMED, "")); } }); return jLabelLink; }
final JPopupMenu jPopupMenu = new JPopupMenu(); final JMenuItem newContactMenuItem = MenuItemFactory.create(getString("Contact"), 0); newContactMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddContact(); } }); final JMenuItem newDocumentMenuItem = MenuItemFactory.create(getString("Document"), 0); newDocumentMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddDocument(); } }); jPopupMenu.add(newContactMenuItem); jPopupMenu.add(newDocumentMenuItem);
private void initComponents() { final GridBagConstraints c = new GridBagConstraints(); final GridBagConstraints c2 = new GridBagConstraints(); final JPopupMenu jPopupMenu = new JPopupMenu(); final JMenuItem newContactMenuItem = MenuItemFactory.create(getString("Contact"), 0); newContactMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddContact(); } }); final JMenuItem newDocumentMenuItem = MenuItemFactory.create(getString("Document"), 0); newDocumentMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddDocument(); } }); jPopupMenu.add(newContactMenuItem); jPopupMenu.add(newDocumentMenuItem); final JLabel addJLabelLink = createJLabelLink( getString("New"), jPopupMenu); c.anchor = GridBagConstraints.EAST; c.insets.top = 9; c.weightx = 1; add(addJLabelLink, c.clone()); final JLabel separatorJLabel = createJLabelSeparator(); c.anchor = GridBagConstraints.CENTER; c.insets.left = c.insets.right = 7; c.weightx = 0; add(separatorJLabel, c.clone()); final JLabel inviteJLabelLink = createJLabelLink(getString("Invite"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = c.insets.right = 0; add(inviteJLabelLink, c.clone()); final JLabel separatorJLabel2 = createJLabelSeparator(); c.insets.left = c.insets.right = 7; add(separatorJLabel2, c.clone()); final JLabel helpJLabelLink = createJLabelLink(getString("Help"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = 0; c.insets.right = 6; add(helpJLabelLink, c.clone()); final JPanel searchJPanel = new JPanel(); searchJPanel.setLayout(new GridBagLayout()); searchJPanel.setOpaque(false); final JLabel leftSearchJLabel = createLeftSearchJLabel(); c2.anchor = GridBagConstraints.EAST; c2.insets.left = 168; searchJPanel.add(leftSearchJLabel, c2.clone()); final JTextField searchJTextField = createSearchTextField(); c2.fill = GridBagConstraints.BOTH; c2.insets.top = c2.insets.bottom = 1; c2.insets.left = 0; c2.weightx = 1; searchJPanel.add(searchJTextField, c2.clone()); final JLabel rightSearchJLabel = createRightSearchJLabel(); c2.fill = GridBagConstraints.NONE; c2.insets.top = c2.insets.bottom = 0; c2.insets.right = 13; c2.weightx = 0; searchJPanel.add(rightSearchJLabel, c2.clone()); c.fill = GridBagConstraints.BOTH; c.gridwidth = 5; c.gridy = 1; c.insets.top = c.insets.left = c.insets.bottom = c.insets.right = 0; c.weighty = 1; add(searchJPanel, c.clone()); }
getString("New"), jPopupMenu);
getString("AddContact"), new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddContact(); } });
private void initComponents() { final GridBagConstraints c = new GridBagConstraints(); final GridBagConstraints c2 = new GridBagConstraints(); final JPopupMenu jPopupMenu = new JPopupMenu(); final JMenuItem newContactMenuItem = MenuItemFactory.create(getString("Contact"), 0); newContactMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddContact(); } }); final JMenuItem newDocumentMenuItem = MenuItemFactory.create(getString("Document"), 0); newDocumentMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddDocument(); } }); jPopupMenu.add(newContactMenuItem); jPopupMenu.add(newDocumentMenuItem); final JLabel addJLabelLink = createJLabelLink( getString("New"), jPopupMenu); c.anchor = GridBagConstraints.EAST; c.insets.top = 9; c.weightx = 1; add(addJLabelLink, c.clone()); final JLabel separatorJLabel = createJLabelSeparator(); c.anchor = GridBagConstraints.CENTER; c.insets.left = c.insets.right = 7; c.weightx = 0; add(separatorJLabel, c.clone()); final JLabel inviteJLabelLink = createJLabelLink(getString("Invite"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = c.insets.right = 0; add(inviteJLabelLink, c.clone()); final JLabel separatorJLabel2 = createJLabelSeparator(); c.insets.left = c.insets.right = 7; add(separatorJLabel2, c.clone()); final JLabel helpJLabelLink = createJLabelLink(getString("Help"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = 0; c.insets.right = 6; add(helpJLabelLink, c.clone()); final JPanel searchJPanel = new JPanel(); searchJPanel.setLayout(new GridBagLayout()); searchJPanel.setOpaque(false); final JLabel leftSearchJLabel = createLeftSearchJLabel(); c2.anchor = GridBagConstraints.EAST; c2.insets.left = 168; searchJPanel.add(leftSearchJLabel, c2.clone()); final JTextField searchJTextField = createSearchTextField(); c2.fill = GridBagConstraints.BOTH; c2.insets.top = c2.insets.bottom = 1; c2.insets.left = 0; c2.weightx = 1; searchJPanel.add(searchJTextField, c2.clone()); final JLabel rightSearchJLabel = createRightSearchJLabel(); c2.fill = GridBagConstraints.NONE; c2.insets.top = c2.insets.bottom = 0; c2.insets.right = 13; c2.weightx = 0; searchJPanel.add(rightSearchJLabel, c2.clone()); c.fill = GridBagConstraints.BOTH; c.gridwidth = 5; c.gridy = 1; c.insets.top = c.insets.left = c.insets.bottom = c.insets.right = 0; c.weighty = 1; add(searchJPanel, c.clone()); }
c.insets.top = 9;
c.insets.top = 21;
private void initComponents() { final GridBagConstraints c = new GridBagConstraints(); final GridBagConstraints c2 = new GridBagConstraints(); final JPopupMenu jPopupMenu = new JPopupMenu(); final JMenuItem newContactMenuItem = MenuItemFactory.create(getString("Contact"), 0); newContactMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddContact(); } }); final JMenuItem newDocumentMenuItem = MenuItemFactory.create(getString("Document"), 0); newDocumentMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddDocument(); } }); jPopupMenu.add(newContactMenuItem); jPopupMenu.add(newDocumentMenuItem); final JLabel addJLabelLink = createJLabelLink( getString("New"), jPopupMenu); c.anchor = GridBagConstraints.EAST; c.insets.top = 9; c.weightx = 1; add(addJLabelLink, c.clone()); final JLabel separatorJLabel = createJLabelSeparator(); c.anchor = GridBagConstraints.CENTER; c.insets.left = c.insets.right = 7; c.weightx = 0; add(separatorJLabel, c.clone()); final JLabel inviteJLabelLink = createJLabelLink(getString("Invite"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = c.insets.right = 0; add(inviteJLabelLink, c.clone()); final JLabel separatorJLabel2 = createJLabelSeparator(); c.insets.left = c.insets.right = 7; add(separatorJLabel2, c.clone()); final JLabel helpJLabelLink = createJLabelLink(getString("Help"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = 0; c.insets.right = 6; add(helpJLabelLink, c.clone()); final JPanel searchJPanel = new JPanel(); searchJPanel.setLayout(new GridBagLayout()); searchJPanel.setOpaque(false); final JLabel leftSearchJLabel = createLeftSearchJLabel(); c2.anchor = GridBagConstraints.EAST; c2.insets.left = 168; searchJPanel.add(leftSearchJLabel, c2.clone()); final JTextField searchJTextField = createSearchTextField(); c2.fill = GridBagConstraints.BOTH; c2.insets.top = c2.insets.bottom = 1; c2.insets.left = 0; c2.weightx = 1; searchJPanel.add(searchJTextField, c2.clone()); final JLabel rightSearchJLabel = createRightSearchJLabel(); c2.fill = GridBagConstraints.NONE; c2.insets.top = c2.insets.bottom = 0; c2.insets.right = 13; c2.weightx = 0; searchJPanel.add(rightSearchJLabel, c2.clone()); c.fill = GridBagConstraints.BOTH; c.gridwidth = 5; c.gridy = 1; c.insets.top = c.insets.left = c.insets.bottom = c.insets.right = 0; c.weighty = 1; add(searchJPanel, c.clone()); }
c.insets.left = c.insets.right = 0;
c.insets.left = 0; c.insets.right = 15;
private void initComponents() { final GridBagConstraints c = new GridBagConstraints(); final GridBagConstraints c2 = new GridBagConstraints(); final JPopupMenu jPopupMenu = new JPopupMenu(); final JMenuItem newContactMenuItem = MenuItemFactory.create(getString("Contact"), 0); newContactMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddContact(); } }); final JMenuItem newDocumentMenuItem = MenuItemFactory.create(getString("Document"), 0); newDocumentMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddDocument(); } }); jPopupMenu.add(newContactMenuItem); jPopupMenu.add(newDocumentMenuItem); final JLabel addJLabelLink = createJLabelLink( getString("New"), jPopupMenu); c.anchor = GridBagConstraints.EAST; c.insets.top = 9; c.weightx = 1; add(addJLabelLink, c.clone()); final JLabel separatorJLabel = createJLabelSeparator(); c.anchor = GridBagConstraints.CENTER; c.insets.left = c.insets.right = 7; c.weightx = 0; add(separatorJLabel, c.clone()); final JLabel inviteJLabelLink = createJLabelLink(getString("Invite"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = c.insets.right = 0; add(inviteJLabelLink, c.clone()); final JLabel separatorJLabel2 = createJLabelSeparator(); c.insets.left = c.insets.right = 7; add(separatorJLabel2, c.clone()); final JLabel helpJLabelLink = createJLabelLink(getString("Help"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = 0; c.insets.right = 6; add(helpJLabelLink, c.clone()); final JPanel searchJPanel = new JPanel(); searchJPanel.setLayout(new GridBagLayout()); searchJPanel.setOpaque(false); final JLabel leftSearchJLabel = createLeftSearchJLabel(); c2.anchor = GridBagConstraints.EAST; c2.insets.left = 168; searchJPanel.add(leftSearchJLabel, c2.clone()); final JTextField searchJTextField = createSearchTextField(); c2.fill = GridBagConstraints.BOTH; c2.insets.top = c2.insets.bottom = 1; c2.insets.left = 0; c2.weightx = 1; searchJPanel.add(searchJTextField, c2.clone()); final JLabel rightSearchJLabel = createRightSearchJLabel(); c2.fill = GridBagConstraints.NONE; c2.insets.top = c2.insets.bottom = 0; c2.insets.right = 13; c2.weightx = 0; searchJPanel.add(rightSearchJLabel, c2.clone()); c.fill = GridBagConstraints.BOTH; c.gridwidth = 5; c.gridy = 1; c.insets.top = c.insets.left = c.insets.bottom = c.insets.right = 0; c.weighty = 1; add(searchJPanel, c.clone()); }
final JLabel separatorJLabel2 = createJLabelSeparator(); c.insets.left = c.insets.right = 7; add(separatorJLabel2, c.clone()); final JLabel helpJLabelLink = createJLabelLink(getString("Help"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = 0; c.insets.right = 6; add(helpJLabelLink, c.clone());
private void initComponents() { final GridBagConstraints c = new GridBagConstraints(); final GridBagConstraints c2 = new GridBagConstraints(); final JPopupMenu jPopupMenu = new JPopupMenu(); final JMenuItem newContactMenuItem = MenuItemFactory.create(getString("Contact"), 0); newContactMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddContact(); } }); final JMenuItem newDocumentMenuItem = MenuItemFactory.create(getString("Document"), 0); newDocumentMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddDocument(); } }); jPopupMenu.add(newContactMenuItem); jPopupMenu.add(newDocumentMenuItem); final JLabel addJLabelLink = createJLabelLink( getString("New"), jPopupMenu); c.anchor = GridBagConstraints.EAST; c.insets.top = 9; c.weightx = 1; add(addJLabelLink, c.clone()); final JLabel separatorJLabel = createJLabelSeparator(); c.anchor = GridBagConstraints.CENTER; c.insets.left = c.insets.right = 7; c.weightx = 0; add(separatorJLabel, c.clone()); final JLabel inviteJLabelLink = createJLabelLink(getString("Invite"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = c.insets.right = 0; add(inviteJLabelLink, c.clone()); final JLabel separatorJLabel2 = createJLabelSeparator(); c.insets.left = c.insets.right = 7; add(separatorJLabel2, c.clone()); final JLabel helpJLabelLink = createJLabelLink(getString("Help"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = 0; c.insets.right = 6; add(helpJLabelLink, c.clone()); final JPanel searchJPanel = new JPanel(); searchJPanel.setLayout(new GridBagLayout()); searchJPanel.setOpaque(false); final JLabel leftSearchJLabel = createLeftSearchJLabel(); c2.anchor = GridBagConstraints.EAST; c2.insets.left = 168; searchJPanel.add(leftSearchJLabel, c2.clone()); final JTextField searchJTextField = createSearchTextField(); c2.fill = GridBagConstraints.BOTH; c2.insets.top = c2.insets.bottom = 1; c2.insets.left = 0; c2.weightx = 1; searchJPanel.add(searchJTextField, c2.clone()); final JLabel rightSearchJLabel = createRightSearchJLabel(); c2.fill = GridBagConstraints.NONE; c2.insets.top = c2.insets.bottom = 0; c2.insets.right = 13; c2.weightx = 0; searchJPanel.add(rightSearchJLabel, c2.clone()); c.fill = GridBagConstraints.BOTH; c.gridwidth = 5; c.gridy = 1; c.insets.top = c.insets.left = c.insets.bottom = c.insets.right = 0; c.weighty = 1; add(searchJPanel, c.clone()); }
c2.insets.left = 168;
c2.insets.left = 209;
private void initComponents() { final GridBagConstraints c = new GridBagConstraints(); final GridBagConstraints c2 = new GridBagConstraints(); final JPopupMenu jPopupMenu = new JPopupMenu(); final JMenuItem newContactMenuItem = MenuItemFactory.create(getString("Contact"), 0); newContactMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddContact(); } }); final JMenuItem newDocumentMenuItem = MenuItemFactory.create(getString("Document"), 0); newDocumentMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddDocument(); } }); jPopupMenu.add(newContactMenuItem); jPopupMenu.add(newDocumentMenuItem); final JLabel addJLabelLink = createJLabelLink( getString("New"), jPopupMenu); c.anchor = GridBagConstraints.EAST; c.insets.top = 9; c.weightx = 1; add(addJLabelLink, c.clone()); final JLabel separatorJLabel = createJLabelSeparator(); c.anchor = GridBagConstraints.CENTER; c.insets.left = c.insets.right = 7; c.weightx = 0; add(separatorJLabel, c.clone()); final JLabel inviteJLabelLink = createJLabelLink(getString("Invite"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = c.insets.right = 0; add(inviteJLabelLink, c.clone()); final JLabel separatorJLabel2 = createJLabelSeparator(); c.insets.left = c.insets.right = 7; add(separatorJLabel2, c.clone()); final JLabel helpJLabelLink = createJLabelLink(getString("Help"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = 0; c.insets.right = 6; add(helpJLabelLink, c.clone()); final JPanel searchJPanel = new JPanel(); searchJPanel.setLayout(new GridBagLayout()); searchJPanel.setOpaque(false); final JLabel leftSearchJLabel = createLeftSearchJLabel(); c2.anchor = GridBagConstraints.EAST; c2.insets.left = 168; searchJPanel.add(leftSearchJLabel, c2.clone()); final JTextField searchJTextField = createSearchTextField(); c2.fill = GridBagConstraints.BOTH; c2.insets.top = c2.insets.bottom = 1; c2.insets.left = 0; c2.weightx = 1; searchJPanel.add(searchJTextField, c2.clone()); final JLabel rightSearchJLabel = createRightSearchJLabel(); c2.fill = GridBagConstraints.NONE; c2.insets.top = c2.insets.bottom = 0; c2.insets.right = 13; c2.weightx = 0; searchJPanel.add(rightSearchJLabel, c2.clone()); c.fill = GridBagConstraints.BOTH; c.gridwidth = 5; c.gridy = 1; c.insets.top = c.insets.left = c.insets.bottom = c.insets.right = 0; c.weighty = 1; add(searchJPanel, c.clone()); }
c2.insets.right = 13;
c2.insets.right = 14;
private void initComponents() { final GridBagConstraints c = new GridBagConstraints(); final GridBagConstraints c2 = new GridBagConstraints(); final JPopupMenu jPopupMenu = new JPopupMenu(); final JMenuItem newContactMenuItem = MenuItemFactory.create(getString("Contact"), 0); newContactMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddContact(); } }); final JMenuItem newDocumentMenuItem = MenuItemFactory.create(getString("Document"), 0); newDocumentMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddDocument(); } }); jPopupMenu.add(newContactMenuItem); jPopupMenu.add(newDocumentMenuItem); final JLabel addJLabelLink = createJLabelLink( getString("New"), jPopupMenu); c.anchor = GridBagConstraints.EAST; c.insets.top = 9; c.weightx = 1; add(addJLabelLink, c.clone()); final JLabel separatorJLabel = createJLabelSeparator(); c.anchor = GridBagConstraints.CENTER; c.insets.left = c.insets.right = 7; c.weightx = 0; add(separatorJLabel, c.clone()); final JLabel inviteJLabelLink = createJLabelLink(getString("Invite"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = c.insets.right = 0; add(inviteJLabelLink, c.clone()); final JLabel separatorJLabel2 = createJLabelSeparator(); c.insets.left = c.insets.right = 7; add(separatorJLabel2, c.clone()); final JLabel helpJLabelLink = createJLabelLink(getString("Help"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = 0; c.insets.right = 6; add(helpJLabelLink, c.clone()); final JPanel searchJPanel = new JPanel(); searchJPanel.setLayout(new GridBagLayout()); searchJPanel.setOpaque(false); final JLabel leftSearchJLabel = createLeftSearchJLabel(); c2.anchor = GridBagConstraints.EAST; c2.insets.left = 168; searchJPanel.add(leftSearchJLabel, c2.clone()); final JTextField searchJTextField = createSearchTextField(); c2.fill = GridBagConstraints.BOTH; c2.insets.top = c2.insets.bottom = 1; c2.insets.left = 0; c2.weightx = 1; searchJPanel.add(searchJTextField, c2.clone()); final JLabel rightSearchJLabel = createRightSearchJLabel(); c2.fill = GridBagConstraints.NONE; c2.insets.top = c2.insets.bottom = 0; c2.insets.right = 13; c2.weightx = 0; searchJPanel.add(rightSearchJLabel, c2.clone()); c.fill = GridBagConstraints.BOTH; c.gridwidth = 5; c.gridy = 1; c.insets.top = c.insets.left = c.insets.bottom = c.insets.right = 0; c.weighty = 1; add(searchJPanel, c.clone()); }
c.gridwidth = 5;
c.gridwidth = 3;
private void initComponents() { final GridBagConstraints c = new GridBagConstraints(); final GridBagConstraints c2 = new GridBagConstraints(); final JPopupMenu jPopupMenu = new JPopupMenu(); final JMenuItem newContactMenuItem = MenuItemFactory.create(getString("Contact"), 0); newContactMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddContact(); } }); final JMenuItem newDocumentMenuItem = MenuItemFactory.create(getString("Document"), 0); newDocumentMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddDocument(); } }); jPopupMenu.add(newContactMenuItem); jPopupMenu.add(newDocumentMenuItem); final JLabel addJLabelLink = createJLabelLink( getString("New"), jPopupMenu); c.anchor = GridBagConstraints.EAST; c.insets.top = 9; c.weightx = 1; add(addJLabelLink, c.clone()); final JLabel separatorJLabel = createJLabelSeparator(); c.anchor = GridBagConstraints.CENTER; c.insets.left = c.insets.right = 7; c.weightx = 0; add(separatorJLabel, c.clone()); final JLabel inviteJLabelLink = createJLabelLink(getString("Invite"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = c.insets.right = 0; add(inviteJLabelLink, c.clone()); final JLabel separatorJLabel2 = createJLabelSeparator(); c.insets.left = c.insets.right = 7; add(separatorJLabel2, c.clone()); final JLabel helpJLabelLink = createJLabelLink(getString("Help"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = 0; c.insets.right = 6; add(helpJLabelLink, c.clone()); final JPanel searchJPanel = new JPanel(); searchJPanel.setLayout(new GridBagLayout()); searchJPanel.setOpaque(false); final JLabel leftSearchJLabel = createLeftSearchJLabel(); c2.anchor = GridBagConstraints.EAST; c2.insets.left = 168; searchJPanel.add(leftSearchJLabel, c2.clone()); final JTextField searchJTextField = createSearchTextField(); c2.fill = GridBagConstraints.BOTH; c2.insets.top = c2.insets.bottom = 1; c2.insets.left = 0; c2.weightx = 1; searchJPanel.add(searchJTextField, c2.clone()); final JLabel rightSearchJLabel = createRightSearchJLabel(); c2.fill = GridBagConstraints.NONE; c2.insets.top = c2.insets.bottom = 0; c2.insets.right = 13; c2.weightx = 0; searchJPanel.add(rightSearchJLabel, c2.clone()); c.fill = GridBagConstraints.BOTH; c.gridwidth = 5; c.gridy = 1; c.insets.top = c.insets.left = c.insets.bottom = c.insets.right = 0; c.weighty = 1; add(searchJPanel, c.clone()); }
c.insets.top = c.insets.left = c.insets.bottom = c.insets.right = 0;
c.insets.top = c.insets.left = c.insets.right = 0; c.insets.bottom = 18;
private void initComponents() { final GridBagConstraints c = new GridBagConstraints(); final GridBagConstraints c2 = new GridBagConstraints(); final JPopupMenu jPopupMenu = new JPopupMenu(); final JMenuItem newContactMenuItem = MenuItemFactory.create(getString("Contact"), 0); newContactMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddContact(); } }); final JMenuItem newDocumentMenuItem = MenuItemFactory.create(getString("Document"), 0); newDocumentMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { runAddDocument(); } }); jPopupMenu.add(newContactMenuItem); jPopupMenu.add(newDocumentMenuItem); final JLabel addJLabelLink = createJLabelLink( getString("New"), jPopupMenu); c.anchor = GridBagConstraints.EAST; c.insets.top = 9; c.weightx = 1; add(addJLabelLink, c.clone()); final JLabel separatorJLabel = createJLabelSeparator(); c.anchor = GridBagConstraints.CENTER; c.insets.left = c.insets.right = 7; c.weightx = 0; add(separatorJLabel, c.clone()); final JLabel inviteJLabelLink = createJLabelLink(getString("Invite"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = c.insets.right = 0; add(inviteJLabelLink, c.clone()); final JLabel separatorJLabel2 = createJLabelSeparator(); c.insets.left = c.insets.right = 7; add(separatorJLabel2, c.clone()); final JLabel helpJLabelLink = createJLabelLink(getString("Help"), new ActionListener() { public void actionPerformed(final ActionEvent e) {} }); c.insets.left = 0; c.insets.right = 6; add(helpJLabelLink, c.clone()); final JPanel searchJPanel = new JPanel(); searchJPanel.setLayout(new GridBagLayout()); searchJPanel.setOpaque(false); final JLabel leftSearchJLabel = createLeftSearchJLabel(); c2.anchor = GridBagConstraints.EAST; c2.insets.left = 168; searchJPanel.add(leftSearchJLabel, c2.clone()); final JTextField searchJTextField = createSearchTextField(); c2.fill = GridBagConstraints.BOTH; c2.insets.top = c2.insets.bottom = 1; c2.insets.left = 0; c2.weightx = 1; searchJPanel.add(searchJTextField, c2.clone()); final JLabel rightSearchJLabel = createRightSearchJLabel(); c2.fill = GridBagConstraints.NONE; c2.insets.top = c2.insets.bottom = 0; c2.insets.right = 13; c2.weightx = 0; searchJPanel.add(rightSearchJLabel, c2.clone()); c.fill = GridBagConstraints.BOTH; c.gridwidth = 5; c.gridy = 1; c.insets.top = c.insets.left = c.insets.bottom = c.insets.right = 0; c.weighty = 1; add(searchJPanel, c.clone()); }
public void actionPerformed(final ActionEvent e) { runAddContact(); }
public void actionPerformed(final ActionEvent e) {}
public void actionPerformed(final ActionEvent e) { runAddContact(); }
void create(final JabberId createdBy, final Calendar createdOn, final Long id, final JabberId keyHolder, final String name, final List<JabberId> contacts) throws ParityException { final ArtifactIndex index = new ArtifactIndex(); index.setCreatedBy(createdBy); index.setCreatedOn(createdOn); index.setId(id); index.setKeyHolder(keyHolder); index.setName(name); index.addAllContacts(contacts); getInternalIndexModel().index(index);
void create(final Long artifactId, final String artifactName) throws ParityException { getInternalIndexModel().createArtifact(artifactId, artifactName);
void create(final JabberId createdBy, final Calendar createdOn, final Long id, final JabberId keyHolder, final String name, final List<JabberId> contacts) throws ParityException { final ArtifactIndex index = new ArtifactIndex(); index.setCreatedBy(createdBy); index.setCreatedOn(createdOn); index.setId(id); index.setKeyHolder(keyHolder); index.setName(name); index.addAllContacts(contacts); getInternalIndexModel().index(index); }
if ( !(errormsgs.hasNext()) ) { return null; }
public ArrayList get(String property) { if ( errors == null || errors.empty()) { return null; } Iterator errormsgs; if (property == null) { errormsgs = errors.get(); if ( !(errormsgs.hasNext()) ) { return null; } } else { errormsgs = errors.get(property); if ( !(errormsgs.hasNext()) ) { return null; } } ArrayList list = new ArrayList(); if (resources == null) { log(ERROR, "Message resources are not available."); return null; } while (errormsgs.hasNext()) { ActionError errormsg = (ActionError)errormsgs.next(); String message = resources.getMessage(locale, errormsg.getKey(), errormsg.getValues()); if (message != null) { list.add(message); } else { // if error message cannot be found for a key, return key instead log(WARNING, "Message for key " + errormsg.getKey() + " could not be found in message resources."); list.add(errormsg.getKey()); } } return list; }
if ( !(errormsgs.hasNext()) ) { return null; }
} if (!(errormsgs.hasNext())) { return null;
public ArrayList get(String property) { if ( errors == null || errors.empty()) { return null; } Iterator errormsgs; if (property == null) { errormsgs = errors.get(); if ( !(errormsgs.hasNext()) ) { return null; } } else { errormsgs = errors.get(property); if ( !(errormsgs.hasNext()) ) { return null; } } ArrayList list = new ArrayList(); if (resources == null) { log(ERROR, "Message resources are not available."); return null; } while (errormsgs.hasNext()) { ActionError errormsg = (ActionError)errormsgs.next(); String message = resources.getMessage(locale, errormsg.getKey(), errormsg.getValues()); if (message != null) { list.add(message); } else { // if error message cannot be found for a key, return key instead log(WARNING, "Message for key " + errormsg.getKey() + " could not be found in message resources."); list.add(errormsg.getKey()); } } return list; }
if (resources == null) { log(ERROR, "Message resources are not available."); return null; }
public ArrayList get(String property) { if ( errors == null || errors.empty()) { return null; } Iterator errormsgs; if (property == null) { errormsgs = errors.get(); if ( !(errormsgs.hasNext()) ) { return null; } } else { errormsgs = errors.get(property); if ( !(errormsgs.hasNext()) ) { return null; } } ArrayList list = new ArrayList(); if (resources == null) { log(ERROR, "Message resources are not available."); return null; } while (errormsgs.hasNext()) { ActionError errormsg = (ActionError)errormsgs.next(); String message = resources.getMessage(locale, errormsg.getKey(), errormsg.getValues()); if (message != null) { list.add(message); } else { // if error message cannot be found for a key, return key instead log(WARNING, "Message for key " + errormsg.getKey() + " could not be found in message resources."); list.add(errormsg.getKey()); } } return list; }
public Analysis doAnalysis(Story story) {
public Analysis doAnalysis(Story story, String topic) {
public Analysis doAnalysis(Story story) { Analysis a = new Analysis(); a.setID(story.getID()); String content = story.getContent(); if (content.matches("IJsland")) { // If the string IJsland appears in the text, it's definitely about // Iceland a.setTopicRelevance("1.0"); } String author = story.getAuthor(); if (author.matches("Christian Luijten")) { // Christian Luijten writes 75% of the time about the topic a.setTopicRelevance("0.75"); } return a; }
a.setTopicRelevance("1.0");
a.setTopicRelevance(1.0);
public Analysis doAnalysis(Story story) { Analysis a = new Analysis(); a.setID(story.getID()); String content = story.getContent(); if (content.matches("IJsland")) { // If the string IJsland appears in the text, it's definitely about // Iceland a.setTopicRelevance("1.0"); } String author = story.getAuthor(); if (author.matches("Christian Luijten")) { // Christian Luijten writes 75% of the time about the topic a.setTopicRelevance("0.75"); } return a; }
if (author.matches("Christian Luijten")) { a.setTopicRelevance("0.75");
if (author.matches("Christian")) { a.setTopicRelevance(0.75);
public Analysis doAnalysis(Story story) { Analysis a = new Analysis(); a.setID(story.getID()); String content = story.getContent(); if (content.matches("IJsland")) { // If the string IJsland appears in the text, it's definitely about // Iceland a.setTopicRelevance("1.0"); } String author = story.getAuthor(); if (author.matches("Christian Luijten")) { // Christian Luijten writes 75% of the time about the topic a.setTopicRelevance("0.75"); } return a; }
final DocumentModel documentModel = DocumentModel.getModel();
final DocumentModel documentModel = getDocumentModel();
void delete(final Project project) throws ParityException { logger.info("delete(Project)"); logger.debug(project); try { final DocumentModel documentModel = DocumentModel.getModel(); for(Document subDocument : documentModel.list(project)) { documentModel.delete(subDocument); } for(Project subProject : list(project)) { delete(subProject); } projectXmlIO.delete(project); notifyUpdate_objectDeleted(project); } catch(IOException iox) { logger.error("delete(Project)", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("delete(Project)", rx); throw ParityErrorTranslator.translate(rx); } }
public TimestampTypeConverterImpl(ValueFactory factory) { super(factory); }
public TimestampTypeConverterImpl() { super(); }
public TimestampTypeConverterImpl(ValueFactory factory) { super(factory); }
this.testContext = TestModel.getTestContext();
private OpheliaTestModelFactory() { super(); this.testContext = TestModel.getTestContext(); }
return ArchiveModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace());
return ArchiveModel.getInternalModel(getContext(testUser), testUser.getEnvironment(), testUser.getWorkspace());
public InternalArchiveModel getArchiveModel(final OpheliaTestUser testUser) { return ArchiveModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace()); }
return ArtifactModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace());
return ArtifactModel.getInternalModel(getContext(testUser), testUser.getEnvironment(), testUser.getWorkspace());
public InternalArtifactModel getArtifactModel(final OpheliaTestUser testUser) { return ArtifactModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace()); }
return ContactModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace());
return ContactModel.getInternalModel(getContext(testUser), testUser.getEnvironment(), testUser.getWorkspace());
public InternalContactModel getContactModel(final OpheliaTestUser testUser) { return ContactModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace()); }
return ContainerModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace());
return ContainerModel.getInternalModel(getContext(testUser), testUser.getEnvironment(), testUser.getWorkspace());
public InternalContainerModel getContainerModel(final OpheliaTestUser testUser) { return ContainerModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace()); }
return DocumentModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace());
return DocumentModel.getInternalModel(getContext(testUser), testUser.getEnvironment(), testUser.getWorkspace());
public InternalDocumentModel getDocumentModel(final OpheliaTestUser testUser) { return DocumentModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace()); }
return LibraryModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace());
return LibraryModel.getInternalModel(getContext(testUser), testUser.getEnvironment(), testUser.getWorkspace());
public InternalLibraryModel getLibraryModel(final OpheliaTestUser testUser) { return LibraryModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace()); }
return ProfileModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace());
return ProfileModel.getInternalModel(getContext(testUser), testUser.getEnvironment(), testUser.getWorkspace());
public InternalProfileModel getProfileModel(final OpheliaTestUser testUser) { return ProfileModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace()); }
return ReleaseModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace());
return ReleaseModel.getInternalModel(getContext(testUser), testUser.getEnvironment(), testUser.getWorkspace());
public InternalReleaseModel getReleaseModel(final OpheliaTestUser testUser) { return ReleaseModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace()); }
return ScriptModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace());
return ScriptModel.getInternalModel(getContext(testUser), testUser.getEnvironment(), testUser.getWorkspace());
public InternalScriptModel getScriptModel(final OpheliaTestUser testUser) { return ScriptModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace()); }
return SessionModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace());
return SessionModel.getInternalModel(getContext(testUser), testUser.getEnvironment(), testUser.getWorkspace());
public InternalSessionModel getSessionModel(final OpheliaTestUser testUser) { return SessionModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace()); }
return SystemMessageModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace());
return SystemMessageModel.getInternalModel(getContext(testUser), testUser.getEnvironment(), testUser.getWorkspace());
public InternalSystemMessageModel getSystemMessageModel(final OpheliaTestUser testUser) { return SystemMessageModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace()); }
return UserModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace());
return UserModel.getInternalModel(getContext(testUser), testUser.getEnvironment(), testUser.getWorkspace());
public InternalUserModel getUserModel(final OpheliaTestUser testUser) { return UserModel.getInternalModel(testContext, testUser.getEnvironment(), testUser.getWorkspace()); }
return WorkspaceModel.getInternalModel(testContext, testUser.getEnvironment());
return WorkspaceModel.getInternalModel(getContext(testUser), testUser.getEnvironment());
public InternalWorkspaceModel getWorkspaceModel(final OpheliaTestUser testUser) { return WorkspaceModel.getInternalModel(testContext, testUser.getEnvironment()); }
public DeclineInvitation() { super("DeclineInvitation", ID, NAME, ICON); }
public DeclineInvitation(final Browser browser) { super("DeclineInvitation", ID, NAME, ICON); this.browser = browser; }
public DeclineInvitation() { super("DeclineInvitation", ID, NAME, ICON); }
try { final SystemMessageModel sMModel = getSystemMessageModel(); final ContactInvitationMessage message = (ContactInvitationMessage) sMModel.read(messageId); getSessionModel().declineInvitation(message.getInvitedBy()); sMModel.delete(messageId); } catch(final ParityException px) { throw new RuntimeException(px); }
final SystemMessageModel sMModel = getSystemMessageModel(); final ContactInvitationMessage message = (ContactInvitationMessage) sMModel.read(messageId); getSessionModel().declineInvitation(message.getInvitedBy()); sMModel.delete(messageId); browser.fireSystemMessageDeleted(messageId);
public void invoke(final Data data) throws Exception { final Long messageId = (Long) data.get(DataKey.SYSTEM_MESSAGE_ID); try { final SystemMessageModel sMModel = getSystemMessageModel(); final ContactInvitationMessage message = (ContactInvitationMessage) sMModel.read(messageId); getSessionModel().declineInvitation(message.getInvitedBy()); sMModel.delete(messageId); } catch(final ParityException px) { throw new RuntimeException(px); } }
folder = new Folder();
document = new Document(); document.setName("document4"); document.setContentType("plain/text"); documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content 4".getBytes()); document.setDocumentStream(documentStream); Folder subFolder = new Folder(); subFolder.setName("subfolder"); folder = new Folder();
public void testRetrieveCollection() { PersistenceManager persistenceManager = this.getPersistenceManager(); //--------------------------------------------------------------------------------------------------------- // Insert descendant objects //--------------------------------------------------------------------------------------------------------- Document document = new Document(); document.setPath("/document1"); document.setName("document name 1"); document.setContentType("plain/text"); DocumentStream documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content".getBytes()); document.setDocumentStream(documentStream); persistenceManager.insert(document); document = new Document(); document.setPath("/document2"); document.setName("document name 2"); document.setContentType("plain/text"); documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content".getBytes()); document.setDocumentStream(documentStream); persistenceManager.insert(document); document = new Document(); document.setPath("/document3"); document.setName("document 3"); document.setContentType("plain/text"); documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content 3".getBytes()); document.setDocumentStream(documentStream); persistenceManager.insert(document); Folder folder = new Folder(); folder.setPath("/folder1"); folder.setName("folder1"); persistenceManager.insert(folder); folder = new Folder(); folder.setPath("/folder2"); folder.setName("folder2"); persistenceManager.insert(folder); Atomic a = new Atomic(); a.setPath("/atomic"); a.setBooleanPrimitive(true); persistenceManager.insert(a); persistenceManager.save(); //--------------------------------------------------------------------------------------------------------- // Retrieve Folders //--------------------------------------------------------------------------------------------------------- QueryManager queryManager = persistenceManager.getQueryManager(); Filter filter = queryManager.createFilter(Folder.class); Query query = queryManager.createQuery(filter); Collection result = persistenceManager.getObjects(query); assertEquals("Invalid number of folders found", result.size(), 2); assertTrue("Invalid item in the collection", this.contains(result, "/folder1",Folder.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder2", Folder.class)); //--------------------------------------------------------------------------------------------------------- // Retrieve Documents //--------------------------------------------------------------------------------------------------------- queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(Document.class); filter.addLike("name", "document name%"); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid number of documents found", result.size(),2); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); //--------------------------------------------------------------------------------------------------------- // Retrieve Contents (ancestor of Documents) //--------------------------------------------------------------------------------------------------------- queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(Content.class); filter.addLike("name", "document name%"); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid number of documents found", result.size(),2); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); //--------------------------------------------------------------------------------------------------------- // Retrieve all cmsobjects //--------------------------------------------------------------------------------------------------------- queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(CmsObject.class); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid ancestor object found", result.size(),5); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document3", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder1",Folder.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder2",Folder.class)); }
folder.setName("folder2");
folder.setName("folder2"); folder.addChild(document); folder.addChild(subFolder);
public void testRetrieveCollection() { PersistenceManager persistenceManager = this.getPersistenceManager(); //--------------------------------------------------------------------------------------------------------- // Insert descendant objects //--------------------------------------------------------------------------------------------------------- Document document = new Document(); document.setPath("/document1"); document.setName("document name 1"); document.setContentType("plain/text"); DocumentStream documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content".getBytes()); document.setDocumentStream(documentStream); persistenceManager.insert(document); document = new Document(); document.setPath("/document2"); document.setName("document name 2"); document.setContentType("plain/text"); documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content".getBytes()); document.setDocumentStream(documentStream); persistenceManager.insert(document); document = new Document(); document.setPath("/document3"); document.setName("document 3"); document.setContentType("plain/text"); documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content 3".getBytes()); document.setDocumentStream(documentStream); persistenceManager.insert(document); Folder folder = new Folder(); folder.setPath("/folder1"); folder.setName("folder1"); persistenceManager.insert(folder); folder = new Folder(); folder.setPath("/folder2"); folder.setName("folder2"); persistenceManager.insert(folder); Atomic a = new Atomic(); a.setPath("/atomic"); a.setBooleanPrimitive(true); persistenceManager.insert(a); persistenceManager.save(); //--------------------------------------------------------------------------------------------------------- // Retrieve Folders //--------------------------------------------------------------------------------------------------------- QueryManager queryManager = persistenceManager.getQueryManager(); Filter filter = queryManager.createFilter(Folder.class); Query query = queryManager.createQuery(filter); Collection result = persistenceManager.getObjects(query); assertEquals("Invalid number of folders found", result.size(), 2); assertTrue("Invalid item in the collection", this.contains(result, "/folder1",Folder.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder2", Folder.class)); //--------------------------------------------------------------------------------------------------------- // Retrieve Documents //--------------------------------------------------------------------------------------------------------- queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(Document.class); filter.addLike("name", "document name%"); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid number of documents found", result.size(),2); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); //--------------------------------------------------------------------------------------------------------- // Retrieve Contents (ancestor of Documents) //--------------------------------------------------------------------------------------------------------- queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(Content.class); filter.addLike("name", "document name%"); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid number of documents found", result.size(),2); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); //--------------------------------------------------------------------------------------------------------- // Retrieve all cmsobjects //--------------------------------------------------------------------------------------------------------- queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(CmsObject.class); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid ancestor object found", result.size(),5); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document3", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder1",Folder.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder2",Folder.class)); }
filter.setScope("/");
public void testRetrieveCollection() { PersistenceManager persistenceManager = this.getPersistenceManager(); //--------------------------------------------------------------------------------------------------------- // Insert descendant objects //--------------------------------------------------------------------------------------------------------- Document document = new Document(); document.setPath("/document1"); document.setName("document name 1"); document.setContentType("plain/text"); DocumentStream documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content".getBytes()); document.setDocumentStream(documentStream); persistenceManager.insert(document); document = new Document(); document.setPath("/document2"); document.setName("document name 2"); document.setContentType("plain/text"); documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content".getBytes()); document.setDocumentStream(documentStream); persistenceManager.insert(document); document = new Document(); document.setPath("/document3"); document.setName("document 3"); document.setContentType("plain/text"); documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content 3".getBytes()); document.setDocumentStream(documentStream); persistenceManager.insert(document); Folder folder = new Folder(); folder.setPath("/folder1"); folder.setName("folder1"); persistenceManager.insert(folder); folder = new Folder(); folder.setPath("/folder2"); folder.setName("folder2"); persistenceManager.insert(folder); Atomic a = new Atomic(); a.setPath("/atomic"); a.setBooleanPrimitive(true); persistenceManager.insert(a); persistenceManager.save(); //--------------------------------------------------------------------------------------------------------- // Retrieve Folders //--------------------------------------------------------------------------------------------------------- QueryManager queryManager = persistenceManager.getQueryManager(); Filter filter = queryManager.createFilter(Folder.class); Query query = queryManager.createQuery(filter); Collection result = persistenceManager.getObjects(query); assertEquals("Invalid number of folders found", result.size(), 2); assertTrue("Invalid item in the collection", this.contains(result, "/folder1",Folder.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder2", Folder.class)); //--------------------------------------------------------------------------------------------------------- // Retrieve Documents //--------------------------------------------------------------------------------------------------------- queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(Document.class); filter.addLike("name", "document name%"); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid number of documents found", result.size(),2); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); //--------------------------------------------------------------------------------------------------------- // Retrieve Contents (ancestor of Documents) //--------------------------------------------------------------------------------------------------------- queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(Content.class); filter.addLike("name", "document name%"); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid number of documents found", result.size(),2); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); //--------------------------------------------------------------------------------------------------------- // Retrieve all cmsobjects //--------------------------------------------------------------------------------------------------------- queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(CmsObject.class); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid ancestor object found", result.size(),5); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document3", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder1",Folder.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder2",Folder.class)); }
queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(CmsObject.class); filter.setScope("/"); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid ancestor object found", result.size(),5); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document3", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder1",Folder.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder2",Folder.class));
public void testRetrieveCollection() { PersistenceManager persistenceManager = this.getPersistenceManager(); //--------------------------------------------------------------------------------------------------------- // Insert descendant objects //--------------------------------------------------------------------------------------------------------- Document document = new Document(); document.setPath("/document1"); document.setName("document name 1"); document.setContentType("plain/text"); DocumentStream documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content".getBytes()); document.setDocumentStream(documentStream); persistenceManager.insert(document); document = new Document(); document.setPath("/document2"); document.setName("document name 2"); document.setContentType("plain/text"); documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content".getBytes()); document.setDocumentStream(documentStream); persistenceManager.insert(document); document = new Document(); document.setPath("/document3"); document.setName("document 3"); document.setContentType("plain/text"); documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content 3".getBytes()); document.setDocumentStream(documentStream); persistenceManager.insert(document); Folder folder = new Folder(); folder.setPath("/folder1"); folder.setName("folder1"); persistenceManager.insert(folder); folder = new Folder(); folder.setPath("/folder2"); folder.setName("folder2"); persistenceManager.insert(folder); Atomic a = new Atomic(); a.setPath("/atomic"); a.setBooleanPrimitive(true); persistenceManager.insert(a); persistenceManager.save(); //--------------------------------------------------------------------------------------------------------- // Retrieve Folders //--------------------------------------------------------------------------------------------------------- QueryManager queryManager = persistenceManager.getQueryManager(); Filter filter = queryManager.createFilter(Folder.class); Query query = queryManager.createQuery(filter); Collection result = persistenceManager.getObjects(query); assertEquals("Invalid number of folders found", result.size(), 2); assertTrue("Invalid item in the collection", this.contains(result, "/folder1",Folder.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder2", Folder.class)); //--------------------------------------------------------------------------------------------------------- // Retrieve Documents //--------------------------------------------------------------------------------------------------------- queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(Document.class); filter.addLike("name", "document name%"); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid number of documents found", result.size(),2); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); //--------------------------------------------------------------------------------------------------------- // Retrieve Contents (ancestor of Documents) //--------------------------------------------------------------------------------------------------------- queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(Content.class); filter.addLike("name", "document name%"); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid number of documents found", result.size(),2); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); //--------------------------------------------------------------------------------------------------------- // Retrieve all cmsobjects //--------------------------------------------------------------------------------------------------------- queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(CmsObject.class); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid ancestor object found", result.size(),5); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document3", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder1",Folder.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder2",Folder.class)); }
assertEquals("Invalid ancestor object found", result.size(),5);
assertEquals("Invalid ancestor object found", result.size(),7);
public void testRetrieveCollection() { PersistenceManager persistenceManager = this.getPersistenceManager(); //--------------------------------------------------------------------------------------------------------- // Insert descendant objects //--------------------------------------------------------------------------------------------------------- Document document = new Document(); document.setPath("/document1"); document.setName("document name 1"); document.setContentType("plain/text"); DocumentStream documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content".getBytes()); document.setDocumentStream(documentStream); persistenceManager.insert(document); document = new Document(); document.setPath("/document2"); document.setName("document name 2"); document.setContentType("plain/text"); documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content".getBytes()); document.setDocumentStream(documentStream); persistenceManager.insert(document); document = new Document(); document.setPath("/document3"); document.setName("document 3"); document.setContentType("plain/text"); documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content 3".getBytes()); document.setDocumentStream(documentStream); persistenceManager.insert(document); Folder folder = new Folder(); folder.setPath("/folder1"); folder.setName("folder1"); persistenceManager.insert(folder); folder = new Folder(); folder.setPath("/folder2"); folder.setName("folder2"); persistenceManager.insert(folder); Atomic a = new Atomic(); a.setPath("/atomic"); a.setBooleanPrimitive(true); persistenceManager.insert(a); persistenceManager.save(); //--------------------------------------------------------------------------------------------------------- // Retrieve Folders //--------------------------------------------------------------------------------------------------------- QueryManager queryManager = persistenceManager.getQueryManager(); Filter filter = queryManager.createFilter(Folder.class); Query query = queryManager.createQuery(filter); Collection result = persistenceManager.getObjects(query); assertEquals("Invalid number of folders found", result.size(), 2); assertTrue("Invalid item in the collection", this.contains(result, "/folder1",Folder.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder2", Folder.class)); //--------------------------------------------------------------------------------------------------------- // Retrieve Documents //--------------------------------------------------------------------------------------------------------- queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(Document.class); filter.addLike("name", "document name%"); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid number of documents found", result.size(),2); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); //--------------------------------------------------------------------------------------------------------- // Retrieve Contents (ancestor of Documents) //--------------------------------------------------------------------------------------------------------- queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(Content.class); filter.addLike("name", "document name%"); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid number of documents found", result.size(),2); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); //--------------------------------------------------------------------------------------------------------- // Retrieve all cmsobjects //--------------------------------------------------------------------------------------------------------- queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(CmsObject.class); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid ancestor object found", result.size(),5); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document3", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder1",Folder.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder2",Folder.class)); }
assertTrue("Invalid item in the collection", this.contains(result, "/folder2/subfolder",Folder.class));
public void testRetrieveCollection() { PersistenceManager persistenceManager = this.getPersistenceManager(); //--------------------------------------------------------------------------------------------------------- // Insert descendant objects //--------------------------------------------------------------------------------------------------------- Document document = new Document(); document.setPath("/document1"); document.setName("document name 1"); document.setContentType("plain/text"); DocumentStream documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content".getBytes()); document.setDocumentStream(documentStream); persistenceManager.insert(document); document = new Document(); document.setPath("/document2"); document.setName("document name 2"); document.setContentType("plain/text"); documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content".getBytes()); document.setDocumentStream(documentStream); persistenceManager.insert(document); document = new Document(); document.setPath("/document3"); document.setName("document 3"); document.setContentType("plain/text"); documentStream = new DocumentStream(); documentStream.setEncoding("utf-8"); documentStream.setContent("Test Content 3".getBytes()); document.setDocumentStream(documentStream); persistenceManager.insert(document); Folder folder = new Folder(); folder.setPath("/folder1"); folder.setName("folder1"); persistenceManager.insert(folder); folder = new Folder(); folder.setPath("/folder2"); folder.setName("folder2"); persistenceManager.insert(folder); Atomic a = new Atomic(); a.setPath("/atomic"); a.setBooleanPrimitive(true); persistenceManager.insert(a); persistenceManager.save(); //--------------------------------------------------------------------------------------------------------- // Retrieve Folders //--------------------------------------------------------------------------------------------------------- QueryManager queryManager = persistenceManager.getQueryManager(); Filter filter = queryManager.createFilter(Folder.class); Query query = queryManager.createQuery(filter); Collection result = persistenceManager.getObjects(query); assertEquals("Invalid number of folders found", result.size(), 2); assertTrue("Invalid item in the collection", this.contains(result, "/folder1",Folder.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder2", Folder.class)); //--------------------------------------------------------------------------------------------------------- // Retrieve Documents //--------------------------------------------------------------------------------------------------------- queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(Document.class); filter.addLike("name", "document name%"); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid number of documents found", result.size(),2); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); //--------------------------------------------------------------------------------------------------------- // Retrieve Contents (ancestor of Documents) //--------------------------------------------------------------------------------------------------------- queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(Content.class); filter.addLike("name", "document name%"); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid number of documents found", result.size(),2); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); //--------------------------------------------------------------------------------------------------------- // Retrieve all cmsobjects //--------------------------------------------------------------------------------------------------------- queryManager = persistenceManager.getQueryManager(); filter = queryManager.createFilter(CmsObject.class); query = queryManager.createQuery(filter); result = persistenceManager.getObjects(query); assertEquals("Invalid ancestor object found", result.size(),5); assertTrue("Invalid item in the collection", this.contains(result, "/document1", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document2", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/document3", Document.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder1",Folder.class)); assertTrue("Invalid item in the collection", this.contains(result, "/folder2",Folder.class)); }
session.processOfflineQueue(session.readCurrentUser().getId());
final JabberId userId = JabberIdBuilder.build( credentials.getUsername(), Constants.Jabber.DOMAIN, credentials.getResource()); session.processOfflineQueue(userId);
private void processOfflineQueue() { assertIsReachable(environment); XMPPSession session = null; try { session = new XMPPSessionImpl(); session.login(environment, credentials); session.processOfflineQueue(session.readCurrentUser().getId()); } finally { Assert.assertNotNull(session, "User {0}'s session is null.", credentials.getUsername()); Assert.assertTrue(session.isLoggedIn(), "User {0} not logged in.", credentials.getUsername()); session.logout(); } }
case SESSION_ACCEPT_INVITATION: return new com.thinkparity.browser.platform.action.session.AcceptInvitation(); case SESSION_DECLINE_INVITATION: return new com.thinkparity.browser.platform.action.session.DeclineInvitation(); case SYSTEM_MESSAGE_DELETE: return new com.thinkparity.browser.platform.action.system.message.DeleteSystemMessage();
private AbstractAction doCreateAction(final ActionId actionId) { switch(actionId) { case ARTIFACT_APPLY_FLAG_SEEN: return new com.thinkparity.browser.platform.action.artifact.ApplyFlagSeen(); case DOCUMENT_CLOSE: return new com.thinkparity.browser.platform.action.document.Close(); case SESSION_ACCEPT_INVITATION: return new com.thinkparity.browser.platform.action.session.AcceptInvitation(); case SESSION_DECLINE_INVITATION: return new com.thinkparity.browser.platform.action.session.DeclineInvitation(); case SYSTEM_MESSAGE_DELETE: return new com.thinkparity.browser.platform.action.system.message.DeleteSystemMessage(); default: throw Assert.createUnreachable("Unable to create action [" + actionId + "]."); } }
if (session != null) { synchronized(session)
if (session != null) { synchronized(getMutex(session))
public ToolboxContext getToolboxContext(Object initData) { //we know the initData is a ViewContext ViewContext ctx = (ViewContext)initData; //create the toolbox map with the application tools in it Map toolbox = new HashMap(appTools); if (!sessionToolInfo.isEmpty()) { HttpSession session = ctx.getRequest().getSession(createSession); if (session != null) { //synchronize session tool initialization to avoid potential //conflicts from multiple simultaneous requests in the same session synchronized(session) { //get the initialized session tools Map stmap = (Map)session.getAttribute(SESSION_TOOLS_KEY); //if session tools aren't initialized, //do so and store them in the session if (stmap == null) { stmap = new HashMap(sessionToolInfo.size()); Iterator i = sessionToolInfo.iterator(); while(i.hasNext()) { ToolInfo info = (ToolInfo)i.next(); stmap.put(info.getKey(), info.getInstance(ctx)); } session.setAttribute(SESSION_TOOLS_KEY, stmap); } //add the initialized session tools to the toolbox toolbox.putAll(stmap); } } } //add and initialize request tools Iterator i = requestToolInfo.iterator(); while(i.hasNext()) { ToolInfo info = (ToolInfo)i.next(); toolbox.put(info.getKey(), info.getInstance(ctx)); } return new ToolboxContext(toolbox); }
ToolInfo info = (ToolInfo)i.next(); stmap.put(info.getKey(), info.getInstance(ctx));
ToolInfo ti = (ToolInfo)i.next(); stmap.put(ti.getKey(), ti.getInstance(ctx));
public ToolboxContext getToolboxContext(Object initData) { //we know the initData is a ViewContext ViewContext ctx = (ViewContext)initData; //create the toolbox map with the application tools in it Map toolbox = new HashMap(appTools); if (!sessionToolInfo.isEmpty()) { HttpSession session = ctx.getRequest().getSession(createSession); if (session != null) { //synchronize session tool initialization to avoid potential //conflicts from multiple simultaneous requests in the same session synchronized(session) { //get the initialized session tools Map stmap = (Map)session.getAttribute(SESSION_TOOLS_KEY); //if session tools aren't initialized, //do so and store them in the session if (stmap == null) { stmap = new HashMap(sessionToolInfo.size()); Iterator i = sessionToolInfo.iterator(); while(i.hasNext()) { ToolInfo info = (ToolInfo)i.next(); stmap.put(info.getKey(), info.getInstance(ctx)); } session.setAttribute(SESSION_TOOLS_KEY, stmap); } //add the initialized session tools to the toolbox toolbox.putAll(stmap); } } } //add and initialize request tools Iterator i = requestToolInfo.iterator(); while(i.hasNext()) { ToolInfo info = (ToolInfo)i.next(); toolbox.put(info.getKey(), info.getInstance(ctx)); } return new ToolboxContext(toolbox); }
new Log4JWrapper("SQL_DEBUGGER").logInfo("{0} - {1} - {2}", Version.getName(), Version.getMode(), Version.getBuildId()); new Log4JWrapper("XMPP_DEBUGGER").logInfo("{0} - {1} - {2}", Version.getName(), Version.getMode(), Version.getBuildId());
new Log4JWrapper("SQL_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0"); new Log4JWrapper("XMPP_DEBUGGER").logInfo("{0} - {1}", "thinkParity", "1.0");
private void bootstrapLogging() { if ((Mode.DEVELOPMENT == mode || Mode.TESTING == mode)) { final Properties logging = new Properties(); // sql debugger logging.setProperty("log4j.logger.SQL_DEBUGGER", "DEBUG, SQL_DEBUGGER"); logging.setProperty("log4j.appender.SQL_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.SQL_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.SQL_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity SQL.log")); // xmpp debugger logging.setProperty("log4j.logger.XMPP_DEBUGGER", "DEBUG, XMPP_DEBUGGER"); logging.setProperty("log4j.appender.XMPP_DEBUGGER", "org.apache.log4j.RollingFileAppender"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout", "org.apache.log4j.PatternLayout"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.layout.ConversionPattern", "%d %m%n"); logging.setProperty("log4j.appender.XMPP_DEBUGGER.File", MessageFormat.format("{0}{1}logs{1}{2}", workspace.getRoot().getAbsolutePath(), File.separatorChar, "thinkParity XMPP.log")); PropertyConfigurator.configure(logging); new Log4JWrapper("SQL_DEBUGGER").logInfo("{0} - {1} - {2}", Version.getName(), Version.getMode(), Version.getBuildId()); new Log4JWrapper("XMPP_DEBUGGER").logInfo("{0} - {1} - {2}", Version.getName(), Version.getMode(), Version.getBuildId()); } }
public void addTeamMember(final UUID uniqueId, final JabberId jabberId) {
public void addTeamMember(final UUID uniqueId, final List<JabberId> team, final JabberId jabberId) {
public void addTeamMember(final UUID uniqueId, final JabberId jabberId) { synchronized(getImplLock()) { getImpl().addTeamMember(uniqueId, jabberId); } }
getImpl().addTeamMember(uniqueId, jabberId);
getImpl().addTeamMember(uniqueId, team, jabberId);
public void addTeamMember(final UUID uniqueId, final JabberId jabberId) { synchronized(getImplLock()) { getImpl().addTeamMember(uniqueId, jabberId); } }