rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
((JLabel) evt.getSource()).setIcon(MIN_ICON);
((JLabel) evt.getSource()).setIcon(MINIMIZE_ICON);
private void minimizeJLabelMouseExited(java.awt.event.MouseEvent evt) { ((JLabel) evt.getSource()).setIcon(MIN_ICON); }
logVariable("preSendPacket", DateUtil.getInstance());
logger.logVariable("preSendPacket", DateUtil.getInstance());
public XMPPMethodResponse execute(final XMPPConnection xmppConnection) { // add an executed on parameter setParameter(Xml.All.EXECUTED_ON, DateUtil.getInstance()); // create a collector for the response final PacketCollector idCollector = createPacketCollector(xmppConnection); // ...
logVariable("postSendPacket", DateUtil.getInstance());
logger.logVariable("postSendPacket", DateUtil.getInstance());
public XMPPMethodResponse execute(final XMPPConnection xmppConnection) { // add an executed on parameter setParameter(Xml.All.EXECUTED_ON, DateUtil.getInstance()); // create a collector for the response final PacketCollector idCollector = createPacketCollector(xmppConnection); // ...
logVariable("preResponseCollected", DateUtil.getInstance());
logger.logVariable("preResponseCollected", DateUtil.getInstance());
public XMPPMethodResponse execute(final XMPPConnection xmppConnection) { // add an executed on parameter setParameter(Xml.All.EXECUTED_ON, DateUtil.getInstance()); // create a collector for the response final PacketCollector idCollector = createPacketCollector(xmppConnection); // ...
logVariable("postResponseCollected", DateUtil.getInstance());
logger.logVariable("postResponseCollected", DateUtil.getInstance());
public XMPPMethodResponse execute(final XMPPConnection xmppConnection) { // add an executed on parameter setParameter(Xml.All.EXECUTED_ON, DateUtil.getInstance()); // create a collector for the response final PacketCollector idCollector = createPacketCollector(xmppConnection); // ...
logVariable("childElementXML.length():", childElementXML.length());
logger.logVariable("childElementXML.length()", childElementXML.length()); logger.logVariable("childElementXML", childElementXML);
public String getChildElementXML() { final StringBuffer childElementXML = new StringBuffer() .append("<query xmlns=\"jabber:iq:parity:") .append(name) .append("\">") .append(getParametersXML()) .append("</query>"); logVariable("childElementXML.len...
if(!isLoggedIn()) { login(); }
private void doStart() { if(!isFirstRun()) { firstRun(); } ApplicationFactory.create(this, ApplicationId.SYS_APP).start(this); ApplicationFactory.create(this, ApplicationId.BROWSER2).start(this); }
public String getPublicationDate() { return getProperty(keyPublicationDate);
public Date getPublicationDate() { return (Date) getProperty(keyPublicationDate);
public String getPublicationDate() { return getProperty(keyPublicationDate); }
return getProperty(keyTitle);
return (String) getProperty(keyTitle);
public String getTitle() { return getProperty(keyTitle); }
storage = new Properties();
storage = new Hashtable<String, Object>();
public AmberMessage() { storage = new Properties(); }
public void setProperty(String key, String value) { storage.setProperty(key, value);
public void setProperty(String key, Object value) { storage.put(key, value);
public void setProperty(String key, String value) { storage.setProperty(key, value); }
storage = (Properties) YAML.load(in);
storage = (Hashtable<String, Object>) YAML.load(in);
public void fromYAML(String in) { storage = (Properties) YAML.load(in); }
public String getProperty(String key) { return storage.getProperty(key);
public Object getProperty(String key) { return storage.get(key);
public String getProperty(String key) { return storage.getProperty(key); }
protected File getXmlFile(final Document document, final DocumentVersion version) throws FileNotFoundException, IOException { logger.info("getXmlFile(Document,DocumentVersion)"); logger.debug(document); logger.debug(version); return new File( getXmlFileDirectory(document), new StringBuffer(document.getName()) .append("...
protected File getXmlFile(final Document document) throws FileNotFoundException, IOException { final File xmlFile = lookupXmlFile(document.getId()); if(null != xmlFile) { return xmlFile; } else { return xmlPathBuilder.getXmlFile(document, fillInStack(document)); }
protected File getXmlFile(final Document document, final DocumentVersion version) throws FileNotFoundException, IOException { logger.info("getXmlFile(Document,DocumentVersion)"); logger.debug(document); logger.debug(version); return new File( getXmlFileDirectory(document), new StringBuffer(document.getNa...
index.addLookup(document.getId(), getXmlFile(document));
index.addXmlFileLookup(document.getId(), getXmlFile(document));
private void writeIndexXml(final Document document) throws FileNotFoundException, IOException { synchronized(indexLock) { final IndexXmlIO indexXmlIO = new IndexXmlIO(workspace); final Index index = indexXmlIO.get(); index.addLookup(document.getId(), getXmlFile(document)); write(index, getIndexXmlFile()); ...
if ((!resizeDragging) && (!moveDragging) && (resizeEdges!=ResizeEdges.NO_EDGE)) {
if (enabled &&(!resizeDragging) && (!moveDragging) && (resizeEdges!=ResizeEdges.NO_EDGE)) {
private void formMouseEntered(final java.awt.event.MouseEvent evt, final Component component) { if ((!resizeDragging) && (!moveDragging) && (resizeEdges!=ResizeEdges.NO_EDGE)) { initResize(evt, component); } }
if ((!resizeDragging) && (!moveDragging) && (resizeEdges!=ResizeEdges.NO_EDGE)) {
if (enabled && (!resizeDragging) && (!moveDragging) && (resizeEdges!=ResizeEdges.NO_EDGE)) {
private void formMouseMoved(final java.awt.event.MouseEvent evt, final Component component) { if ((!resizeDragging) && (!moveDragging) && (resizeEdges!=ResizeEdges.NO_EDGE)) { initResize(evt, component); } }
resizeOffsetX = evt.getPoint().x; resizeOffsetY = evt.getPoint().y; if ((resizeDirection == ResizeDirection.NONE) && (supportMouseMove)) { moveDragging = Boolean.TRUE; } else if (resizeDirection != ResizeDirection.NONE) { resizeDragging = Boolean.TRUE;
if (enabled) { resizeOffsetX = evt.getPoint().x; resizeOffsetY = evt.getPoint().y; if ((resizeDirection == ResizeDirection.NONE) && (supportMouseMove)) { moveDragging = Boolean.TRUE; } else if (resizeDirection != ResizeDirection.NONE) { resizeDragging = Boolean.TRUE; }
private void formMousePressed(final java.awt.event.MouseEvent evt, final Component component) { resizeOffsetX = evt.getPoint().x; resizeOffsetY = evt.getPoint().y; if ((resizeDirection == ResizeDirection.NONE) && (supportMouseMove)) { moveDragging = Boolean.TRUE; } else if (re...
public ParityException() { super(); }
ParityException(final Throwable cause) { super(cause); fillInStackTrace(); }
public ParityException() { super(); }
super(list, ICON, getListItemText(document));
super(list, ICON, document.getName());
BrowserMainListItemDocument(final BrowserMainAvatar list, final Document document) { super(list, ICON, getListItemText(document)); this.documentId = document.getId(); this.selectionTimer = new Timer(500, new ActionListener() { public void actionPerformed(final ActionEvent e) { getController().selectDocument(...
protected BrowserMainListItem(final BrowserMainAvatar list, final ImageIcon listItemIcon, final String listItemText) { this(list, listItemIcon, listItemText, null);
protected BrowserMainListItem(final Type type, final ImageIcon icon, final String name, final Object data) { super(); this.data = data; this.type = type; this.name = name; this.icon = icon;
protected BrowserMainListItem(final BrowserMainAvatar list, final ImageIcon listItemIcon, final String listItemText) { this(list, listItemIcon, listItemText, null); }
searchLeftJLabel.addMouseListener(new MouseAdapter() { public void mouseClicked(final MouseEvent e) { searchLeftJLabelMouseClicked(e); } });
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))); searchLeftJLab...
receiveKeyHistoryItem.setVersionId(receiveKeyEvent.getArtifactVersionId());
private static ReceiveKeyHistoryItem buildReceiveKeyHistoryItem( final Document document, final ReceiveKeyEvent receiveKeyEvent, final Map<JabberId, User> receiveKeyEventUsers) { final ReceiveKeyHistoryItem receiveKeyHistoryItem = new ReceiveKeyHistoryItem(); receiveKeyHistoryItem.setDate(receiveKeyEvent.getCrea...
if (cell.isSelectedContainer()) { int x = 3; x++; } if (list.hasFocus()) { int y = 4; y++; } if (cell.isSelectedContainer() && list.hasFocus()) {
if (cell.isSelectedContainer() && !cell.isFocusOnRight()) {
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { final AbstractVersionCell cell = (AbstractVersionCell) value; textJLabel.setText(cell.getText()); final Icon icon = cell.getIcon(); ...
logger.debug("JMenuItem.Mnemonic[" + mnemonic + "]");
private void applyMnemonic(final JMenuItem jMenuItem, final Integer mnemonic) { logger.debug("JMenuItem.Mnemonic[" + mnemonic + "]"); jMenuItem.setMnemonic(mnemonic); }
logger.debug("JMenuItem[" + text + "]");
private JMenuItem doCreate(final String text) { logger.debug("JMenuItem[" + text + "]"); final JMenuItem jMenuItem = new JMenuItem(text); applyDefaultFont(jMenuItem); applyMinimumWidth(jMenuItem, 150); return jMenuItem; }
logger.debug(text);
private JCheckBoxMenuItem doCreateCheckBox(final String text, final Integer mnemonic) { logger.debug(text); final JCheckBoxMenuItem jCheckBoxMenuItem = new JCheckBoxMenuItem(text); applyDefaultFont(jCheckBoxMenuItem); applyMnemonic(jCheckBoxMenuItem, mnemonic); return jChe...
this.mainKeyProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { try { return sessionModel.getArtifactKeys().toArray(new Long[] {}); } catch(final ParityException px) { throw new RuntimeException(px); } } };
private ProviderFactory() { super(); final ModelFactory modelFactory = ModelFactory.getInstance(); this.documentModel = modelFactory.getDocumentModel(getClass()); this.sessionModel = modelFactory.getSessionModel(getClass()); this.systemMessageModel = modelFactory.getSystemMessageModel(getClass()); this.historyPr...
private final ContentProvider[] contentProviders = new ContentProvider[] {mainDocumentProvider, mainMessageProvider, mainKeyProvider};
private final ContentProvider[] contentProviders = new ContentProvider[] {mainDocumentProvider, mainMessageProvider};
private ProviderFactory() { super(); final ModelFactory modelFactory = ModelFactory.getInstance(); this.documentModel = modelFactory.getDocumentModel(getClass()); this.sessionModel = modelFactory.getSessionModel(getClass()); this.systemMessageModel = modelFactory.getSystemMessageModel(getClass()); this.historyPr...
return sessionModel.getArtifactKeys().toArray(new Long[] {});
final Collection<SystemMessage> messages = systemMessageModel.read(); return messages.toArray(new SystemMessage[] {});
public Object[] getElements(final Object input) { try { return sessionModel.getArtifactKeys().toArray(new Long[] {}); } catch(final ParityException px) { throw new RuntimeException(px); } }
public Object[] getElements(final Object input) { try { final Collection<SystemMessage> messages = systemMessageModel.read(); return messages.toArray(new SystemMessage[] {}); } catch(final ParityException px) { throw new RuntimeException(px); }
public Object[] getElements(final Integer index, final Object input) { Assert.assertNotNull("Index cannot be null.", index); Assert.assertTrue( "Index must lie within [0," + (contentProviders.length - 1) + "]", index >= 0 && index < contentProviders.length); return ((FlatContentProvider) getProvider(index)).getElements...
public Object[] getElements(final Object input) { try { final Collection<SystemMessage> messages = systemMessageModel.read(); return messages.toArray(new SystemMessage[] {}); } catch(final ParityException px) { throw new RuntimeException(px); } }
public Object[] getElements(final Integer index, final Object input) { Assert.assertNotNull("Index cannot be null.", index); Assert.assertTrue( "Index must lie within [0," + (contentProviders.length - 1) + "]", index >= 0 && index < contentProviders.length); return ((FlatContentProvider) getProvider(index)).getElements...
public Object[] getElements(final Object input) { List<Contact> roster; try { roster = sessionModel.readContacts(); final Contact[] team = (Contact[]) input; if(null != team) { for(final Contact contact : team) roster.remove(contact); } } catch(final ParityException px) { throw new RuntimeException(px); } return rost...
public Object[] getElements(final Integer index, final Object input) { Assert.assertNotNull("Index cannot be null.", index); Assert.assertTrue( "Index must lie within [0," + (contentProviders.length - 1) + "]", index >= 0 && index < contentProviders.length); return ((FlatContentProvider) getProvid...
List<Contact> roster;
Assert.assertNotNull( "The team provider requires an artifact id: java.lang.Long.", input); Assert.assertOfType( "The team provider requires an artifact id: java.lang.Long.", Long.class, input); final Long artifactId = (Long) input; List<Contact> artifactContacts;
public Object[] getElements(final Object input) { List<Contact> roster; try { roster = sessionModel.readContacts(); // remove all team members from the roster list final Contact[] team = (Contact[]) input; if(null != team) { for(final Contact contact : team) roster.remove(contact); ...
roster = sessionModel.readContacts(); final Contact[] team = (Contact[]) input; if(null != team) { for(final Contact contact : team) roster.remove(contact);
artifactContacts = sessionModel.readArtifactContacts(artifactId); Contact contact; for(final Iterator<Contact> i = artifactContacts.iterator(); i.hasNext();) { contact= i.next(); if(contact.getId().equals(jabberId)) { i.remove(); }
public Object[] getElements(final Object input) { List<Contact> roster; try { roster = sessionModel.readContacts(); // remove all team members from the roster list final Contact[] team = (Contact[]) input; if(null != team) { for(final Contact contact : team) roster.remove(contact); ...
return roster.toArray(new Contact[] {});
public Object[] getElements(final Object input) { List<Contact> roster; try { roster = sessionModel.readContacts(); // remove all team members from the roster list final Contact[] team = (Contact[]) input; if(null != team) { for(final Contact contact : team) roster.remove(contact); ...
"The team provider requires an artifact id: java.lang.Long.",
"The send artifact version provider requires an artifact id: java.lang.Long.",
public Object[] getElements(final Object input) { Assert.assertNotNull( "The team provider requires an artifact id: java.lang.Long.", input); Assert.assertOfType( "The team provider requires an artifact id: java.lang.Long.", Long.class, input); final Long artifactId = (Long) input; ...
List<Contact> artifactContacts;
final List<DocumentVersion> versions = new LinkedList<DocumentVersion>();
public Object[] getElements(final Object input) { Assert.assertNotNull( "The team provider requires an artifact id: java.lang.Long.", input); Assert.assertOfType( "The team provider requires an artifact id: java.lang.Long.", Long.class, input); final Long artifactId = (Long) input; ...
artifactContacts = sessionModel.readArtifactContacts(artifactId); Contact contact; for(final Iterator<Contact> i = artifactContacts.iterator(); i.hasNext();) { contact= i.next(); if(contact.getId().equals(jabberId)) { i.remove(); }
versions.addAll(documentModel.listVersions(artifactId)); if(sessionModel.isLoggedInUserKeyHolder(artifactId)) { versions.add(0, WorkingVersion.getWorkingVersion());
public Object[] getElements(final Object input) { Assert.assertNotNull( "The team provider requires an artifact id: java.lang.Long.", input); Assert.assertOfType( "The team provider requires an artifact id: java.lang.Long.", Long.class, input); final Long artifactId = (Long) input; ...
return artifactContacts.toArray(new Contact[] {});
return versions.toArray(new DocumentVersion[] {});
public Object[] getElements(final Object input) { Assert.assertNotNull( "The team provider requires an artifact id: java.lang.Long.", input); Assert.assertOfType( "The team provider requires an artifact id: java.lang.Long.", Long.class, input); final Long artifactId = (Long) input; ...
public Object[] getElements(final Object input) {
public Object[] getElements(final Integer index, final Object input) {
public Object[] getElements(final Object input) { Assert.assertNotNull( "The send artifact version provider requires an artifact id: java.lang.Long.", input); Assert.assertOfType( "The send artifact version provider requires an artifact id: java.lang.Long.", Long.class, input); final L...
"The send artifact version provider requires an artifact id: java.lang.Long.", input); Assert.assertOfType( "The send artifact version provider requires an artifact id: java.lang.Long.", Long.class, input); final Long artifactId = (Long) input; final List<DocumentVersion> versions = new LinkedList<DocumentVersion>();...
"Index for composite content provider cannot be null.", index); Assert.assertTrue( "Index for the send artifact content provider mus lie within [0," + 2 + "]", index >= 0 && index <= 2); return getProvider(index).getElements(input);
public Object[] getElements(final Object input) { Assert.assertNotNull( "The send artifact version provider requires an artifact id: java.lang.Long.", input); Assert.assertOfType( "The send artifact version provider requires an artifact id: java.lang.Long.", Long.class, input); final L...
browser.fireDocumentUpdated(e.getDocument().getId());
browser.fireDocumentUpdated(e.getDocument().getId(), Boolean.TRUE);
private DocumentListener createDocumentListener() { return new DocumentAdapter() { public void confirmationReceived(final DocumentEvent e) { if(e.isRemote()) { browser.fireDocumentConfirmationReceived(e.getDocument().getId()); } } publi...
browser.fireDocumentUpdated(e.getDocument().getId());
browser.fireDocumentUpdated(e.getDocument().getId(), Boolean.TRUE);
public void documentUpdated(final DocumentEvent e) { if(e.isRemote()) { browser.fireDocumentUpdated(e.getDocument().getId()); } }
try { return projectXmlIO.list(); } catch(IOException iox) { logger.error("list()", iox); throw ParityErrorTranslator.translate(iox);
try { final Collection<Project> list = new Vector<Project>(2); list.add(getInbox()); list.add(getMyProjects()); return list;
Collection<Project> list() throws ParityException { logger.info("list()"); try { return projectXmlIO.list(); } catch(IOException iox) { logger.error("list()", iox); throw ParityErrorTranslator.translate(iox); } catch(RuntimeException rx) { logger.error("list()", rx); throw ParityErrorTranslator.translate(...
Long.valueOf(streamOffset.getValue()),
public void run() { try { final HeaderReader headerReader = new HeaderReader(); final StreamHeader sessionId = headerReader.readNext(); if (null != sessionId) { final StreamSession streamSession = streamServer.authenticate(sessionId.getValue(...
public String getSystemUsername() { return "system"; }
public String getSystemUsername() { return new StringBuffer("system@") .append(getServerHost()).toString(); }
Preferences getPreferences() { final Properties javaProperties = loadPreferences(); // save the preferences on shutdown Runtime.getRuntime().addShutdownHook(new Thread() { public void run() { storePreferences(javaProperties); } }); return new Preferences() { public Locale getLocale() { return Locale.getDefaul...
public String getSystemUsername() { return "system"; }
public String getSystemUsername() { return new StringBuffer("system@") .append(getServerHost()).toString(); }
public String getSystemUsername() { return "system"; }
loginAvatar = new LoginAvatar(this); openWindow(loginAvatar);
final LoginWindow window = new LoginWindow(); window.setVisibleAndWait();
public void firstRun() { loginAvatar = new LoginAvatar(this); openWindow(loginAvatar); final String username = loginAvatar.getUsername(); final String password = loginAvatar.getPassword(); if(null != username && null != password) { final Credentials credentials = new Cr...
final String username = loginAvatar.getUsername(); final String password = loginAvatar.getPassword();
final String username = window.getUsername(); final String password = window.getPassword();
public void firstRun() { loginAvatar = new LoginAvatar(this); openWindow(loginAvatar); final String username = loginAvatar.getUsername(); final String password = loginAvatar.getPassword(); if(null != username && null != password) { final Credentials credentials = new Cr...
final ConfirmSynchronize confirmSynchronize = new ConfirmSynchronize(); openWindow(confirmSynchronize); return confirmSynchronize.didConfirm();
final ConfirmSynchronizeWindow confirmWindow = new ConfirmSynchronizeWindow(); confirmWindow.setVisibleAndWait(); return confirmWindow.didConfirm();
public void firstRun() { loginAvatar = new LoginAvatar(this); openWindow(loginAvatar); final String username = loginAvatar.getUsername(); final String password = loginAvatar.getPassword(); if(null != username && null != password) { final Credentials credentials = new Cr...
private static final long serialVersionUID = 1;
public ErrorAvatar() { super("ErrorDialog", BrowserConstants.DIALOGUE_BACKGROUND); bindEscapeKey("Cancel", new AbstractAction() { /** @see java.io.Serializable */ private static final long serialVersionUID = 1; /** * @see java.awt.event.ActionListener#actio...
javax.swing.JScrollPane errorJScrollPane;
private void initComponents() { javax.swing.JButton closeJButton; javax.swing.JScrollPane errorJScrollPane; closeJButton = new javax.swing.JButton(); errorMessageJLabel = new javax.swing.JLabel(); errorJScrollPane = new javax.swing.JScrollPane(); errorJTextArea = new javax....
closeJButton = new javax.swing.JButton();
private void initComponents() { javax.swing.JButton closeJButton; javax.swing.JScrollPane errorJScrollPane; closeJButton = new javax.swing.JButton(); errorMessageJLabel = new javax.swing.JLabel(); errorJScrollPane = new javax.swing.JScrollPane(); errorJTextArea = new javax....
errorJTextArea.setColumns(20); errorJTextArea.setRows(5); errorJScrollPane.setViewportView(errorJTextArea);
private void initComponents() { javax.swing.JButton closeJButton; javax.swing.JScrollPane errorJScrollPane; closeJButton = new javax.swing.JButton(); errorMessageJLabel = new javax.swing.JLabel(); errorJScrollPane = new javax.swing.JScrollPane(); errorJTextArea = new javax....
.add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() .addContainerGap() .add(errorJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 352, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() .addContainerGap() .add(errorMessageJLabel, org.jdeskto...
.add(org.jdesktop.layout.GroupLayout.LEADING, errorJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 372, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, errorMessageJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 372, Short.MAX_VALUE)
private void initComponents() { javax.swing.JButton closeJButton; javax.swing.JScrollPane errorJScrollPane; closeJButton = new javax.swing.JButton(); errorMessageJLabel = new javax.swing.JLabel(); errorJScrollPane = new javax.swing.JScrollPane(); errorJTextArea = new javax....
.addContainerGap(303, Short.MAX_VALUE)
.add(copyDetailsJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 220, Short.MAX_VALUE)
private void initComponents() { javax.swing.JButton closeJButton; javax.swing.JScrollPane errorJScrollPane; closeJButton = new javax.swing.JButton(); errorMessageJLabel = new javax.swing.JLabel(); errorJScrollPane = new javax.swing.JScrollPane(); errorJTextArea = new javax....
.add(errorMessageJLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 46, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(errorMessageJLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 49, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
private void initComponents() { javax.swing.JButton closeJButton; javax.swing.JScrollPane errorJScrollPane; closeJButton = new javax.swing.JButton(); errorMessageJLabel = new javax.swing.JLabel(); errorJScrollPane = new javax.swing.JScrollPane(); errorJTextArea = new javax....
.add(errorJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 115, Short.MAX_VALUE)
.add(errorJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 116, Short.MAX_VALUE)
private void initComponents() { javax.swing.JButton closeJButton; javax.swing.JScrollPane errorJScrollPane; closeJButton = new javax.swing.JButton(); errorMessageJLabel = new javax.swing.JLabel(); errorJScrollPane = new javax.swing.JScrollPane(); errorJTextArea = new javax....
.add(closeJButton)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(closeJButton) .add(copyDetailsJButton))
private void initComponents() { javax.swing.JButton closeJButton; javax.swing.JScrollPane errorJScrollPane; closeJButton = new javax.swing.JButton(); errorMessageJLabel = new javax.swing.JLabel(); errorJScrollPane = new javax.swing.JScrollPane(); errorJTextArea = new javax....
closeJButtonActionPerformed(e);
copyDetailsJButtonActionPerformed(e);
public void actionPerformed(java.awt.event.ActionEvent e) { closeJButtonActionPerformed(e); }
if(null != error) { errorJTextArea.setText(error); }
if (null != error) { errorJScrollPane.setVisible(true); copyDetailsJButton.setVisible(true); errorJTextArea.setText(error); errorJTextArea.setCaretPosition(0); } else { errorJScrollPane.setVisible(false); copyDetailsJButton.setVisible(false); }
private void reloadError() { errorJTextArea.setText(""); final String error = readInputError(); if(null != error) { errorJTextArea.setText(error); } }
super(workspace, L18nContext.DOCUMENT);
super(workspace);
DocumentModelImpl(final Workspace workspace) { super(workspace, L18nContext.DOCUMENT); final ComparatorBuilder comparatorBuilder = new ComparatorBuilder(); this.auditor = new DocumentModelAuditor(getContext()); this.defaultComparator = comparatorBuilder.createByName(Boolean.TRUE); this.defaultHistoryCompara...
modifyDocument(OpheliaTestUser.JUNIT, document);
modifyDocument(OpheliaTestUser.JUNIT, document.getId());
protected void setUp() throws Exception { super.setUp(); final InternalContainerModel containerModel = getContainerModel(OpheliaTestUser.JUNIT); final Container container = createContainer(OpheliaTestUser.JUNIT, NAME); final Document document = addDocument(OpheliaTestUser.JUNIT, containe...
final JabberId userId = JabberIdBuilder.build( credentials.getUsername(), Constants.Jabber.DOMAIN, credentials.getResource()); session.processEventQueue(userId);
private void processOfflineQueue() { assertIsReachable(environment); XMPPSession session = null; try { session = new XMPPSessionImpl(); session.login(environment, credentials); final JabberId userId = JabberIdBuilder.build( credentials.getUser...
private Fixture(final Document d, final DocumentModel dModel, final Integer hitsExpectedSize, final IndexModel iModel) { this.d = d;
private Fixture(final String criteria, final DocumentModel dModel, final IndexModel iModel) { this.criteria = criteria;
private Fixture(final Document d, final DocumentModel dModel, final Integer hitsExpectedSize, final IndexModel iModel) { this.d = d; this.dModel = dModel; this.hitsExpectedSize = hitsExpectedSize; this.iModel = iModel; }
this.hitsExpectedSize = hitsExpectedSize;
private Fixture(final Document d, final DocumentModel dModel, final Integer hitsExpectedSize, final IndexModel iModel) { this.d = d; this.dModel = dModel; this.hitsExpectedSize = hitsExpectedSize; this.iModel = iModel; }
Document d;
protected void setUp() throws Exception { super.setUp(); final DocumentModel dModel = getDocumentModel(); final IndexModel iModel = getIndexModel(); data = new LinkedList<Fixture>(); Document d; for(final File inputFile : getInputFiles()) { d = dModel.create(inputFile.getName(), inputFile.getName(), inputFile)...
d = dModel.create(inputFile.getName(), inputFile.getName(), inputFile); data.add(new Fixture(d, dModel, 1, iModel));
dModel.create(inputFile.getName(), inputFile.getName(), inputFile); data.add(new Fixture("JUnit", dModel, iModel));
protected void setUp() throws Exception { super.setUp(); final DocumentModel dModel = getDocumentModel(); final IndexModel iModel = getIndexModel(); data = new LinkedList<Fixture>(); Document d; for(final File inputFile : getInputFiles()) { d = dModel.create(inputFile.getName(), inputFile.getName(), inputFile)...
indexHits = datum.iModel.search(datum.d.getName());
indexHits = datum.iModel.search(datum.criteria);
public void testSearch() { try { List<IndexHit> indexHits; for(final Fixture datum : data) { indexHits = datum.iModel.search(datum.d.getName()); assertNotNull("Index hits is null.", indexHits); Document searchHit; for(final IndexHit indexHit : indexHits) { searchHit = datum.dModel.get(indexHit.get...
assertEquals(searchHit.getName(), datum.d.getName());
assertTrue(searchHit.getName().contains(datum.criteria));
public void testSearch() { try { List<IndexHit> indexHits; for(final Fixture datum : data) { indexHits = datum.iModel.search(datum.d.getName()); assertNotNull("Index hits is null.", indexHits); Document searchHit; for(final IndexHit indexHit : indexHits) { searchHit = datum.dModel.get(indexHit.get...
void setValueFactory(ValueFactory valueFactory)
public void setValueFactory(ValueFactory valueFactory)
void setValueFactory(ValueFactory valueFactory) { this.valueFactory = valueFactory; }
String pathname = servletContext.getRealPath(toolboxFile);
String uniqueKey = servletContext.hashCode() + ':' + toolboxFile;
public static synchronized ServletToolboxManager getInstance(ServletContext servletContext, String toolboxFile) { // little fix up if (!toolboxFile.startsWith("/")) { toolboxFile = "/" + toolboxFile; } /...
(ServletToolboxManager)managersMap.get(pathname);
(ServletToolboxManager)managersMap.get(uniqueKey);
public static synchronized ServletToolboxManager getInstance(ServletContext servletContext, String toolboxFile) { // little fix up if (!toolboxFile.startsWith("/")) { toolboxFile = "/" + toolboxFile; } /...
managersMap.put(pathname, toolboxManager);
managersMap.put(uniqueKey, toolboxManager);
public static synchronized ServletToolboxManager getInstance(ServletContext servletContext, String toolboxFile) { // little fix up if (!toolboxFile.startsWith("/")) { toolboxFile = "/" + toolboxFile; } /...
setBorder(cell.getBorder());
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { final MainCell cell = (MainCell) value; remove(paddingJLabel); final GridBagConstraints gridBagConstraints = new java.awt.GridBagConstrain...
containerPanel.setExpanded(expanded);
private void doToggleExpansion(final TabPanel tabPanel) { final ContainerPanel containerPanel = (ContainerPanel) tabPanel; final Boolean expanded; if (isExpanded(containerPanel)) { expanded = Boolean.FALSE; } else { // NOTE-BEGIN:multi-expand to allow multiple selec...
final StreamSession streamSession = streamModel.createSession(userId); final StreamWriter writer = new StreamWriter(streamSession); writer.open(); try { writer.write(streamId, stream, streamSize); } finally { try { stream.close(); } finally { writer.close();
final StreamSession streamSession = streamModel.createArchiveSession(archiveId); uploadStream(new UploadMonitor() { public void chunkUploaded(final int chunkSize) { logger.logApiId(); logger.logVariable("chunkSize", chunkSize);
void createStream(final JabberId userId, final String streamId, final UUID uniqueId, final Long versionId) { logApiId(); logVariable("userId", userId); logVariable("streamId", streamId); logVariable("uniqueId", uniqueId); logVariable("versionId", versionId); try ...
}
}, streamId, streamSession, stream, streamSize);
void createStream(final JabberId userId, final String streamId, final UUID uniqueId, final Long versionId) { logApiId(); logVariable("userId", userId); logVariable("streamId", streamId); logVariable("uniqueId", uniqueId); logVariable("versionId", versionId); try ...
return InsetFactors.LEVEL_2;
return InsetFactors.LEVEL_3;
public Float getTextInsetFactor() { return InsetFactors.LEVEL_2; }
if(jList.isSelectionEmpty()) { if(!jListModel.isEmpty()) { jList.setSelectedIndex(0); } }
private void reloadDocuments(final Long documentId) { // TODO Maintain the document selection final DisplayDocument[] displayDocuments = getDisplayDocuments(); int index = 0; for(final DisplayDocument displayDocument : displayDocuments) { jListModel.addElement(DocumentListItem.create(displayDocument)); if(disp...
private Fixture(final String description, final File file, final String documentContentChecksum, final DocumentModel documentModel, final String name) {
private Fixture(final String description, final File file, final String documentContentChecksum, final DocumentModel documentModel, final int expectedVersionsSize, final String name) {
private Fixture(final String description, final File file, final String documentContentChecksum, final DocumentModel documentModel, final String name) { this.description = description; this.file = file; this.documentContentChecksum = documentContentChecksum; this.documentModel = documentModel; this.na...
this.expectedVersionsSize = expectedVersionsSize;
private Fixture(final String description, final File file, final String documentContentChecksum, final DocumentModel documentModel, final String name) { this.description = description; this.file = file; this.documentContentChecksum = documentContentChecksum; this.documentModel = documentModel; this.na...
documentContentChecksum, documentModel, name));
documentContentChecksum, documentModel, 0, name));
protected void setUp() throws Exception { super.setUp(); final DocumentModel documentModel = getDocumentModel(); data = new Vector<Fixture>(4); String name, description; String documentContentChecksum; for(File testFile : getInputFiles()) { name = testFile.getName(); description = name; documentContentChec...
DocumentVersion version; DocumentVersionContent versionContent; DocumentContent versionContentSnapshot;
Collection<DocumentVersion> versions;
public void testCreate() { try { Document document; DocumentContent content; DocumentVersion version; DocumentVersionContent versionContent; DocumentContent versionContentSnapshot; for(Fixture datum : data) { document = datum.documentModel.create(datum.name, datum.description, datum.file); asse...
version = datum.documentModel.listVersions(document.getId()).iterator().next(); assertNotNull(version); assertEquals(version.getArtifactId(), document.getId()); assertEquals(version.getArtifactUniqueId(), document.getUniqueId()); versionContent = datum.documentModel.getVersionContent(document.getId(), version.getVersi...
versions = datum.documentModel.listVersions(document.getId()); assertNotNull(versions); assertEquals("Number of versions does not match expectation.", datum.expectedVersionsSize, versions.size());
public void testCreate() { try { Document document; DocumentContent content; DocumentVersion version; DocumentVersionContent versionContent; DocumentContent versionContentSnapshot; for(Fixture datum : data) { document = datum.documentModel.create(datum.name, datum.description, datum.file); asse...
protected void backup(final JabberId userId) {
private void backup(final JabberId userId, final IQ query) { final JabberId archiveId = getUserModel().readArchiveId(userId); if (null != archiveId) { query.setTo(getJID(archiveId)); enqueue(archiveId, query); if (isOnline(archiveId)) { sendQueueUpdated(archiveId); } else { logWarning(MessageFormat.format("Archive {0} ...
protected void backup(final JabberId userId) { }
boolean success = Velocity.evaluate(ctx, sw, LOG_TAG, vtl);
boolean success; if (engine == null) { success = Velocity.evaluate(ctx, sw, LOG_TAG, vtl); } else { success = engine.evaluate(ctx, sw, LOG_TAG, vtl); }
public String eval(Context ctx, String vtl) throws Exception { /* don't waste time with null or empty strings */ if (vtl == null || vtl.length() == 0) { return null; } StringWriter sw = new StringWriter(); boolean success = Velocity.evaluate(ctx, sw, LOG_TAG, ...
final UUID uniqueId = getInternalArtifactModel().readUniqueId(artifactId);
final UUID uniqueId = getArtifactModel().readUniqueId(artifactId);
void archive(final Long artifactId) { logger.logApiId(); logger.logVariable("artifactId", artifactId); try { assertArchiveOnline(); final UUID uniqueId = getInternalArtifactModel().readUniqueId(artifactId); getSessionModel().archiveArtifact(localUserId(), unique...
if (null != getInternalArtifactModel().readId(uniqueId)) {
if (null != getArtifactModel().readId(uniqueId)) {
Container readContainer(final UUID uniqueId) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); try { assertArchiveOnline(); // HACK A quck'n'dirty check to see if the container exists locally if (null != getInternalArtifactModel().readId(uniqueId)) ...
final Long versionId, final UUID documentUniqueId) {
final Long versionId) {
List<DocumentVersion> readDocumentVersions(final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("documentUniqueId", documentUniqueId...
logger.logVariable("documentUniqueId", documentUniqueId); return readDocumentVersions(uniqueId, versionId, documentUniqueId,
return readDocumentVersions(uniqueId, versionId,
List<DocumentVersion> readDocumentVersions(final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("documentUniqueId", documentUniqueId...
new StreamSocketDelegate(streamServer, clientSocket).run();
new Thread(new StreamSocketDelegate(streamServer, clientSocket), clientSocket.getRemoteSocketAddress().toString()).start();
public void run() { logger.logApiId(); logger.logVariable("run", run); try { while (run) { started = true; synchronized (this) { notifyAll(); } final Socket clientSocket = serverSocket.accept(); ...
} finally { clientSocket.close();
public void run() { logger.logApiId(); logger.logVariable("run", run); try { while (run) { started = true; synchronized (this) { notifyAll(); } final Socket clientSocket = serverSocket.accept(); ...
if(isKeyHolder(documentId)) { if(isClosed(document)) { deleteLocal(document); } else if(!isDistributed(documentId)) { deleteLocal(document); } else { throw Assert.createUnreachable( "[LMODEL] [DOCUMENT MODEL] [DELETE] [CANNOT DELETE DOCUMENT UNTIL IT HAS BEEN CLOSED]");
if(isClosed(document)) { deleteLocal(document); } else { if(isKeyHolder(documentId)) { if(!isDistributed(documentId)) { deleteLocal(document); } else { throw Assert.createUnreachable( "[LMODEL] [DOCUMENT] [DELETE] [CAN ONLY DELETE CLOSED DOCUMENTS IF YOU ARE THE KEY HOLDER]"); }
void delete(final Long documentId) throws ParityException { logger.info("[LMODEL] [DOCUMENT MODEL] [DELETE]"); logger.debug(documentId); assertOnline("[LMODEL] [DOCUMENT MODEL] [DELETE] [USER IS NOT ONLINE]"); final Document document = get(documentId); if(isKeyHolder(documentId)) { if...
else { deleteLocal(document); }
void delete(final Long documentId) throws ParityException { logger.info("[LMODEL] [DOCUMENT MODEL] [DELETE]"); logger.debug(documentId); assertOnline("[LMODEL] [DOCUMENT MODEL] [DELETE] [USER IS NOT ONLINE]"); final Document document = get(documentId); if(isKeyHolder(documentId)) { if...
add(container.getFlags());
setDraft(container.isDraft()); setId(container.getId()); setLocalDraft(container.isLocalDraft()); setName(container.getName()); setRemoteInfo(container.getRemoteInfo()); setState(container.getState());
public ContainerCell(final Container container) { super(); setCreatedBy(container.getCreatedBy()); setCreatedOn(container.getCreatedOn()); add(container.getFlags()); setUniqueId(container.getUniqueId()); setName(container.getName()); setUpdatedBy(container.getUpdated...
setName(container.getName());
public ContainerCell(final Container container) { super(); setCreatedBy(container.getCreatedBy()); setCreatedOn(container.getCreatedOn()); add(container.getFlags()); setUniqueId(container.getUniqueId()); setName(container.getName()); setUpdatedBy(container.getUpdated...
setId(container.getId()); setLocalDraft(container.isSetLocalDraft()); setRemoteInfo(container.getRemoteInfo()); setState(container.getState());
add(container.getFlags());
public ContainerCell(final Container container) { super(); setCreatedBy(container.getCreatedBy()); setCreatedOn(container.getCreatedOn()); add(container.getFlags()); setUniqueId(container.getUniqueId()); setName(container.getName()); setUpdatedBy(container.getUpdated...
if (!isSetDraft()) {
if (!isDraft()) {
public void triggerPopup(final Connection connection, final Component invoker, final MouseEvent e, final int x, final int y) { final JPopupMenu jPopupMenu = MenuFactory.createPopup(); if (!isSetDraft()) { final Data createDraftData = new Data(1); createDraftData.set(CreateDraft.D...
final Data deleteData = new Data(1); deleteData.set(Delete.DataKey.CONTAINER_ID, getId()); jPopupMenu.add(popupItemFactory.createPopupItem(ActionId.CONTAINER_DELETE, deleteData)); }
final Data deleteData = new Data(1); deleteData.set(Delete.DataKey.CONTAINER_ID, getId()); jPopupMenu.add(popupItemFactory.createPopupItem(ActionId.CONTAINER_DELETE, deleteData));
public void triggerPopup(final Connection connection, final Component invoker, final MouseEvent e, final int x, final int y) { final JPopupMenu jPopupMenu = MenuFactory.createPopup(); if (!isSetDraft()) { final Data createDraftData = new Data(1); createDraftData.set(CreateDraft.D...