rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
customize(item, event);
protected ContainerHistoryItem createItem(final AuditEvent event) { final ContainerHistoryItem item = new ContainerHistoryItem(); item.setContainerId(event.getArtifactId()); if(event instanceof AuditVersionEvent) item.setVersionId(((AuditVersionEvent) event).getArtifactVersionId()); ...
public void run() { window.open(avatar); }
public void run() { status.clearStatusMessage(area); }
public void run() { window.open(avatar); }
public void run() { status.clearStatusMessage(area); }
public void run() { invoke(ActionId.PUBLISH_DOCUMENT, data); }
public void run() { status.clearStatusMessage(area); }
final UUID uniqueId, final Long versionId, final UUID documentUniqueId) {
final UUID uniqueId, final Long versionId) {
public List<DocumentVersion> readArchiveDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { synchronized (getImplLock()) { return getImpl().readArchiveDocumentVersions(userId, uniqueId, versionId...
versionId, documentUniqueId);
versionId);
public List<DocumentVersion> readArchiveDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { synchronized (getImplLock()) { return getImpl().readArchiveDocumentVersions(userId, uniqueId, versionId...
final SystemMessageModel systemMessageModel) {
final SystemMessageModel systemMessageModel, final JabberId loggedInUserId) {
public MainProvider(final ArtifactModel artifactModel, final DocumentModel dModel, final SessionModel sModel, final SystemMessageModel systemMessageModel) { super(); this.documentProvider = new SingleContentProvider() { public Object getElement(final Object input) { final Long documentId =...
try { return toDisplay(sModel, mcd, dModel.readHistory(mcd.getId())); }
try { return toDisplay(sModel, loggedInUserId, mcd, dModel.readHistory(mcd.getId())); }
public MainProvider(final ArtifactModel artifactModel, final DocumentModel dModel, final SessionModel sModel, final SystemMessageModel systemMessageModel) { super(); this.documentProvider = new SingleContentProvider() { public Object getElement(final Object input) { final Long documentId =...
try { return toDisplay(sModel, mcd, dModel.readHistory(mcd.getId())); }
try { return toDisplay(sModel, loggedInUserId, mcd, dModel.readHistory(mcd.getId())); }
public Object[] getElements(final Object input) { final MainCellDocument mcd = (MainCellDocument) input; try { return toDisplay(sModel, mcd, dModel.readHistory(mcd.getId())); } catch(final ParityException px) { throw new RuntimeException(px); } }
jPopupMenu.add(new DeclineAllKeyRequests(application));
private void triggerOnline(final Browser application, final JPopupMenu jPopupMenu, final MouseEvent e) { if(document.isUrgent()) { final List<KeyRequest> keyRequests = document.getKeyRequests(); if(keyRequests.size() >= 1) { final Set<JabberId> requestedBySet = new HashSe...
g.setColor(new Color((float) 0.0, (float) 0.0, (float) 0.0, (float) 0.01));
if (firstFrame) { firstFrame = false; g.setColor(getBackground()); g.fillRect(0, 0, d.width, d.height); } g.setColor(new Color((float) 0.0, (float) 0.0, (float) 0.0, (float) 0.01));
public void paintComponent(Graphics g) { int earthRadius = 50; Dimension d = getSize(); g.setColor(new Color((float) 0.0, (float) 0.0, (float) 0.0, (float) 0.01)); // g.setColor(Color.black); g.fillRect(0, 0, d.width, d.height); g.setColor(getForeground()); g.drawOva...
g.setColor(Color.black); g.fillRect(0, 0, 200, 45); g.setColor(getForeground());
public void paintComponent(Graphics g) { int earthRadius = 50; Dimension d = getSize(); g.setColor(new Color((float) 0.0, (float) 0.0, (float) 0.0, (float) 0.01)); // g.setColor(Color.black); g.fillRect(0, 0, d.width, d.height); g.setColor(getForeground()); g.drawOva...
return getProperty(keyIdentifier);
return getStringProperty(keyIdentifier);
public String getID() { return getProperty(keyIdentifier); }
velocity.r = 40.0 + Math.random();
public void launch() { velocity.theta = -2.0; velocity.r = 40.0 + Math.random(); accel.theta = 0.5; accel.r = -7.5 - Math.random(); state = STATE_LAUNCH; }
accel.theta = 0.5;
accel.theta = 0.75;
public void launch() { velocity.theta = -2.0; velocity.r = 40.0 + Math.random(); accel.theta = 0.5; accel.r = -7.5 - Math.random(); state = STATE_LAUNCH; }
setVelocityEngine(velocity);
protected void initVelocity(ServletConfig config) throws ServletException { velocity = new VelocityEngine(); // register this engine to be the default handler of log messages // if the user points commons-logging to the LogSystemCommonsLog LogSystemCommonsLog.setVelocityEngine(velocit...
ASSERT_USERNAME_EQUALS_PREFS,
formatAssertUsernameEqualsPreferences(username),
void login(final String username, final String password) throws ParityException { logger.info("login(String,String)"); logger.debug(username); logger.debug(mask(password)); final String host = preferences.getServerHost(); final Integer port = preferences.getServerPort(); synchronized(xmppHelperLock) { try { ...
this.auditor = new ArtifactModelAuditor(getContext());
ArtifactModelImpl(final Workspace workspace) { super(workspace); this.artifactIO = IOFactory.getDefault().createArtifactHandler(); }
bootstrapLogging();
bootstrapLog4J();
public WorkspaceImpl(final File workspace) { super(); this.logger = Logger.getLogger(getClass()); this.mode = Mode.valueOf(System.getProperty("thinkparity.mode")); this.workspace = initRoot(workspace); bootstrapLogging(); }
private ConfirmDialog() { super("ConfirmDialog");
public ConfirmDialog() { super("ConfirmDialog", BrowserConstants.DIALOGUE_BACKGROUND);
private ConfirmDialog() { super("ConfirmDialog"); initComponents(); }
this.logger = new Log4JWrapper();
this.logger = new Log4JWrapper(StackUtil.getCallerClassName());
protected AbstractXMPP(final XMPPCore xmppCore) { super(); this.listeners = new ArrayList<T>(); this.logger = new Log4JWrapper(); this.xmppCore = xmppCore; this.xstream = new XStream(); }
logger.logTraceId();
protected boolean addListener(final T listener) { synchronized (listeners) { if (listeners.contains(listener)) { return false; } else { return listeners.add(listener); } } }
logger.logApiId();
protected void clearListeners() { synchronized (listeners) { listeners.clear(); } }
notifier.notifyListener(listener);
try { notifier.notifyListener(listener); } catch (final Throwable t) { logger.logError(t, "Could not handle remote event {0} for listener {1}.", notifier, listener); }
protected void notifyListeners(final EventNotifier<T> notifier) { synchronized (listeners) { for (final T listener : listeners) { notifier.notifyListener(listener); } } }
logger.logTraceId();
protected void notifyListeners(final EventNotifier<T> notifier) { synchronized (listeners) { for (final T listener : listeners) { notifier.notifyListener(listener); } } }
logger.logTraceId();
protected boolean removeListener(final T listener) { synchronized (listeners) { if (listeners.contains(listener)) { return listeners.remove(listener); } else { return false; } } }
public AirBrush(String plugname, String hostname, Integer port) { connect(plugname, hostname, port);
public AirBrush() {
public AirBrush(String plugname, String hostname, Integer port) { connect(plugname, hostname, port); }
logVariable("teamIds", readTeamIds(readUUID("uniqueId")));
logger.logVariable("teamIds", readTeamIds(readUUID("uniqueId")));
public void service() { logApiId(); final List<JabberId> teamIds = logVariable("teamIds", readTeamIds(readUUID("uniqueId"))); writeJabberIds("teamIds", "teamIds", teamIds); }
if(isTestMode()) {
if(getController().isFilterEnabled()) { infoJLabel.setText(getString("Info.FilterOn")); } else if(isTestMode()) {
private void reloadInfo() { infoJLabel.setText(getString("Info.Empty")); if(isTestMode()) { final Contact contact = getContact(); final Object[] infoParityUserArguments = new Object[] { contact.getFirstName(), contact.getLastName(), contact.getOrganization() }; final StringBuffer buffer = new ...
session.setCalendar(5, createdOn);
session.setCalendar(6, createdOn);
private Long insertTestDataLibrary(final HypersonicSession session, final Library.Type type, final String groupId, final String artifactId, final String version, final String path, final Calendar createdOn, final byte[] bytes) { session.prepareStatement(INSERT_TEST_DATA_LIBRA...
nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JLabel();
fillTopJLabel = new javax.swing.JLabel(); fillRightJLabel = new javax.swing.JLabel();
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JL...
containerJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); containerJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); containerJLabel.setPreferredSize(new java.awt.Dimension(76, 25));
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JL...
contactJLabel.setMaximumSize(new java.awt.Dimension(76, 25)); contactJLabel.setMinimumSize(new java.awt.Dimension(76, 25)); contactJLabel.setPreferredSize(new java.awt.Dimension(76, 25));
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JL...
nameJLabel.setFont(Fonts.DefaultFontBold);
fillTopJLabel.setFont(Fonts.DefaultFontBold);
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JL...
add(nameJLabel, gridBagConstraints);
add(fillTopJLabel, gridBagConstraints);
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JL...
fillJLabel.setFont(Fonts.DefaultFontBold); fillJLabel.setMaximumSize(new java.awt.Dimension(100, 18)); fillJLabel.setMinimumSize(new java.awt.Dimension(100, 18)); fillJLabel.setPreferredSize(new java.awt.Dimension(100, 18));
fillRightJLabel.setFont(Fonts.DefaultFontBold); fillRightJLabel.setMaximumSize(new java.awt.Dimension(100, 18)); fillRightJLabel.setMinimumSize(new java.awt.Dimension(100, 18)); fillRightJLabel.setPreferredSize(new java.awt.Dimension(100, 18));
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JL...
add(fillJLabel, gridBagConstraints);
add(fillRightJLabel, gridBagConstraints);
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; containerJLabel = createTab(TabId.CONTAINER, Boolean.TRUE).jLabel; contactJLabel = createTab(TabId.CONTACT, Boolean.FALSE).jLabel; nameJLabel = new javax.swing.JLabel(); fillJLabel = new javax.swing.JL...
reloadDisplayTab(); reloadDisplayName();
for (final Tab tab : pluginTabs.values()) { tab.jLabel.setIcon(getTabIcon(selectedTab.isLeftmost(), Boolean.FALSE, Boolean.FALSE)); } for (final Tab tab : allTabs.values()) { tab.jLabel.setIcon(getTabIcon(selectedTab.isLeftmost(), Boolean.FALSE, Boolean.FALSE)); } selectedTab.jLabel.setIcon(getTabIcon(selectedTab.isLef...
private void reloadDisplay() { reloadDisplayTab(); reloadDisplayName(); }
notifyUpdate_objectClosed(d);
void close(final Long documentId) throws ParityException { logger.info("close(Long)"); logger.debug(documentId); assertLoggedInUserIsKeyHolder(documentId); try { // close the document final Document document = get(documentId); assertStateTransition(document.getState(), ArtifactState.CLOSED); documentIO.upd...
final Calendar now = getTimestamp();
final Calendar now = currentDateTime();
Document create(final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); assertIsSessionValid(); Assert.assertTrue( // TODO Central...
now, description, NO_FLAGS, UUIDGenerator.nextUUID(), name, preferences.getUsername(), now);
now, description, Collections.<ArtifactFlag>emptyList(), UUIDGenerator.nextUUID(), name, preferences.getUsername(), now);
Document create(final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); assertIsSessionValid(); Assert.assertTrue( // TODO Central...
flagAsSEEN(document);
final InternalArtifactModel iAModel = getInternalArtifactModel(); iAModel.applyFlagKey(document.getId()); iAModel.applyFlagSeen(document.getId());
Document create(final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); assertIsSessionValid(); Assert.assertTrue( // TODO Central...
notifyCreation_objectCreated(document);
final Document d = get(document.getId()); notifyCreation_objectCreated(d);
Document create(final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); assertIsSessionValid(); Assert.assertTrue( // TODO Central...
final Document d = get(document.getId());
Document create(final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); assertIsSessionValid(); Assert.assertTrue( // TODO Central...
return document;
return d;
Document create(final String name, final String description, final File file) throws ParityException { logger.info("create(Project,String,String,File)"); logger.debug(name); logger.debug(description); logger.debug(file); assertCanCreateArtifacts(); assertIsSessionValid(); Assert.assertTrue( // TODO Central...
document.setUpdatedOn(getTimestamp());
document.setUpdatedOn(currentDateTime());
DocumentVersion createVersion(final Long documentId) throws ParityException { logger.info("createVersion(Long)"); logger.debug(documentId); assertLoggedInUserIsKeyHolder(documentId); try { final Document document = get(documentId); final DocumentContent content = getContent(documentId); // read the document ...
logger.info("open(Long)");
logger.info("[LMODEL] [DOCUMENT] [OPEN]");
void open(final Long documentId) throws ParityException { logger.info("open(Long)"); logger.debug(documentId); try { final Document document = get(documentId); // open the local file final LocalFile localFile = getLocalFile(document); localFile.open(); // flag it as having been seen flagAsSEEN(document)...
flagAsSEEN(document);
final InternalArtifactModel iAModel = getInternalArtifactModel(); iAModel.applyFlagSeen(documentId);
void open(final Long documentId) throws ParityException { logger.info("open(Long)"); logger.debug(documentId); try { final Document document = get(documentId); // open the local file final LocalFile localFile = getLocalFile(document); localFile.open(); // flag it as having been seen flagAsSEEN(document)...
else { receiveUpdate(xmppDocument, document); }
else { final DocumentVersion version = getVersion(document.getId(), xmppDocument.getVersionId()); if(null == version) { receiveUpdate(xmppDocument, document); } }
void receive(final XMPPDocument xmppDocument) throws ParityException { logger.info("receiveDocument(XMPPDocument)"); logger.debug(xmppDocument); try { final JabberId receivedFromJabberId = JabberIdBuilder.parseUsername(xmppDocument.getReceivedFrom()); Document document = get(xmppDocument.getUniqueId()); lo...
receivedFromJabberId, JabberIdBuilder.parseUsername(preferences.getUsername()), xmppDocument.getUpdatedOn());
receivedFromJabberId, JabberIdBuilder.parseUsername(preferences.getUsername()), currentDateTime());
void receive(final XMPPDocument xmppDocument) throws ParityException { logger.info("receiveDocument(XMPPDocument)"); logger.debug(xmppDocument); try { final JabberId receivedFromJabberId = JabberIdBuilder.parseUsername(xmppDocument.getReceivedFrom()); Document document = get(xmppDocument.getUniqueId()); lo...
if(!iSModel.isLoggedInUserKeyHolder(document.getId())) lock(document.getId());
if(iSModel.isLoggedInUserKeyHolder(document.getId())) { final InternalArtifactModel iAModel = getInternalArtifactModel(); iAModel.applyFlagKey(document.getId()); } else { lock(document.getId()); }
private void receiveUpdate(final XMPPDocument xmppDocument, final Document document) throws FileNotFoundException, IOException, ParityException { final DocumentVersion version = new DocumentVersion(); version.setArtifactId(document.getId()); version.setArtifactType(document.getType()); version.setArtifactUniqu...
flagAsNotSEEN(document);
final InternalArtifactModel iAModel = getInternalArtifactModel(); iAModel.removeFlagSeen(document.getId());
private void receiveUpdate(final XMPPDocument xmppDocument, final Document document) throws FileNotFoundException, IOException, ParityException { final DocumentVersion version = new DocumentVersion(); version.setArtifactId(document.getId()); version.setArtifactType(document.getType()); version.setArtifactUniqu...
try { airBrush.startListening(); } catch (Exception e) { e.printStackTrace(); }
public Module(String moduleName) { airBrush = new AirBrush(moduleName, airHostName, airPort); airBrush.setCallbackObject(this); connected = true; }
return new JPopupMenu();
JPopupMenu jPopupMenu = new JPopupMenu(); jPopupMenu.addPopupMenuListener(new PopupMenuListener() { public void popupMenuCanceled(PopupMenuEvent e) { } public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { final Timer popupTimer = new Timer(PopupMenuInfo.ACTIVATION_DELAY, new ActionListener() { public void actio...
private JPopupMenu doCreatePopup() { return new JPopupMenu(); }
this.logger = Logger.getLogger(getClass());
XMPPSession(final String serverHost, final Integer serverPort) { super(); try { this.connection = new XMPPConnection(serverHost, serverPort); this.connection.loginAnonymously(); } catch(final org.jivesoftware.smack.XMPPException xmppx) { throw new XMPPExc...
private void debugLongParameters(final String listName, final String name, final List<Long> values) {}
private final void debugLongParameters(final String listName, final String name, final List<Long> values) {}
private void debugLongParameters(final String listName, final String name, final List<Long> values) {}
final void setLongParameters(final String listName, final String name,
public final void setLongParameters(final String listName, final String name,
final void setLongParameters(final String listName, final String name, final List<Long> values) { final List<Parameter> parameters = new LinkedList<Parameter>(); for(final Long value : values) parameters.add(new Parameter(name, Long.class, value)); this.parameters.add(new ...
setForeground(Swing.LIST_SELECTION_FG); setBackground(Swing.LIST_SELECTION_BG);
setForeground(Colors.Browser.List.LIST_SELECTION_FG); setBackground(Colors.Browser.List.LIST_SELECTION_BG);
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { setText(((Scenario) value).getDisplayName()); if (isSelected) { setForeground(Swing.LIST...
setForeground(Swing.LIST_FG);
setForeground(Colors.Browser.List.LIST_FG);
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { setText(((Scenario) value).getDisplayName()); if (isSelected) { setForeground(Swing.LIST...
setBackground(Swing.LIST_EVEN_BG);
setBackground(Colors.Browser.List.LIST_EVEN_BG);
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { setText(((Scenario) value).getDisplayName()); if (isSelected) { setForeground(Swing.LIST...
setBackground(Swing.LIST_ODD_BG);
setBackground(Colors.Browser.List.LIST_ODD_BG);
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { setText(((Scenario) value).getDisplayName()); if (isSelected) { setForeground(Swing.LIST...
if (session.getInetAddress().equals(sessionAddress)) {
final InetAddress inetAddress = session.getInetAddress(); if (null == inetAddress) {
StreamSession authenticate(final String sessionId, final InetAddress sessionAddress) { synchronized (SESSIONS) { final ServerSession session = SESSIONS.get(sessionId); if (session.getInetAddress().equals(sessionAddress)) { return session; } else { ...
logger.logWarning("Session address {0} does not match original.", sessionAddress); return null;
if (inetAddress.equals(sessionAddress)) { return session; } else { logger.logFatal("Session address {0} does not match original.", sessionAddress); return null; }
StreamSession authenticate(final String sessionId, final InetAddress sessionAddress) { synchronized (SESSIONS) { final ServerSession session = SESSIONS.get(sessionId); if (session.getInetAddress().equals(sessionAddress)) { return session; } else { ...
Assert.assertNotNull("Session inet address is null.", session.getInetAddress());
void initialize(final ServerSession session) { Assert.assertNotNull("Session is null.", session); Assert.assertNotNull("Session buffer size is null.", session.getBufferSize()); Assert.assertNotNull("Session charset is null.", session.getCharset()); Assert.assertNotNull("Session environme...
this.getSesion().removeAttribute("claveAlumno");
public void procesarEvento(){ String claveAlumno= (String)this.getSesion().getAttribute("claveAlumno"); ObjetoBean alumnoEdicion= (ObjetoBean)(this.getSesion().getAttribute("beanAlumno")); alumnoEdicion.cambiaValor(Constantes.ID_ISALUMNO_ISUSUARIO_DNI,claveAlumno); this.getSesion().setAttribute("beanAlumno",alum...
try { return dModel.list().size(); }
try { return sModel.readContact(); }
public Object getElement(final Object input) { // TODO Create a statistics model to obtain and build // reports try { return dModel.list().size(); } catch(final ParityException px) { throw new RuntimeException(px); } }
public Object getElement(final Object input) { return countProvider.getElement(input);
public Object getElement(final Integer index, final Object input) { return singleProviders[index].getElement(input);
public Object getElement(final Object input) { return countProvider.getElement(input); }
int touchedIndex;
int visibleIndex;
private void syncDocuments() { // sync the documents with the visible documents visibleDocuments.clear(); visibleDocuments.addAll(documents); ModelFilterManager.filter(visibleDocuments, documentFilter); // sync visible documents with the swing list's model ListItem li; ...
touchedIndex = touchedDocuments.indexOf(dli.getDisplayDocument());
visibleIndex = visibleDocuments.indexOf(dli.getDisplayDocument());
private void syncDocuments() { // sync the documents with the visible documents visibleDocuments.clear(); visibleDocuments.addAll(documents); ModelFilterManager.filter(visibleDocuments, documentFilter); // sync visible documents with the swing list's model ListItem li; ...
jListModel.add(i, ListItem.create(touchedDocuments.get(touchedIndex)));
jListModel.add(visibleIndex, ListItem.create(visibleDocuments.get(visibleIndex)));
private void syncDocuments() { // sync the documents with the visible documents visibleDocuments.clear(); visibleDocuments.addAll(documents); ModelFilterManager.filter(visibleDocuments, documentFilter); // sync visible documents with the swing list's model ListItem li; ...
preferences.setUsername(xmppHelper.getUser().getUsername());
if(!preferences.isSetUsername()) { preferences.setUsername(usernameAtHost); }
void login(final String username, final String password) throws ParityException { final String host = preferences.getServerHost(); final Integer port = preferences.getServerPort(); synchronized(xmppHelperLock) { try { xmppHelper.login(host, port, username, password); preferences.setUsername(xmppHelper.getUs...
public static JMenuItem createCheckBox(final String text, final Integer mnemonic) { synchronized(singletonLock) { return singleton.doCreateCheckBox(text, mnemonic); } }
public static JCheckBoxMenuItem createCheckBox(final String text, final Integer mnemonic) { synchronized(singletonLock) { return singleton.doCreateCheckBox(text, mnemonic); } }
public static JMenuItem createCheckBox(final String text, final Integer mnemonic) { synchronized(singletonLock) { return singleton.doCreateCheckBox(text, mnemonic); } }
private JMenuItem doCreateCheckBox(final String text, final Integer mnemonic) { logger.debug(text); final JMenuItem jMenuItem = new JCheckBoxMenuItem(text); applyDefaultFont(jMenuItem); applyMnemonic(jMenuItem, mnemonic); return jMenuItem; }
private JCheckBoxMenuItem doCreateCheckBox(final String text, final Integer mnemonic) { logger.debug(text); final JCheckBoxMenuItem jCheckBoxMenuItem = new JCheckBoxMenuItem(text); applyDefaultFont(jCheckBoxMenuItem); applyMnemonic(jCheckBoxMenuItem, mnemonic); return jCheckBoxMenuItem; }
private JMenuItem doCreateCheckBox(final String text, final Integer mnemonic) { logger.debug(text); final JMenuItem jMenuItem = new JCheckBoxMenuItem(text); applyDefaultFont(jMenuItem); applyMnemonic(jMenuItem, mnemonic); return jMenuItem; }
this.eastCountJLabel.setVisible(false); this.eastFirstJLabel.setVisible(false); this.eastLastJLabel.setVisible(false); this.eastNextJLabel.setVisible(false); this.eastPreviousJLabel.setVisible(false); this.westCountJLabel.setVisible(false); this.westFirstJLabel.setVisible(false); this.westLastJLabel.setVisible(false); ...
public ContainerPanel(final BrowserSession session) { super(session); this.eastListModel = new DefaultListModel(); this.expanded = Boolean.FALSE; this.fileIconReader = new FileIconReader(); this.localization = new MainCellL18n("ContainerPanel"); this.westListModel = new Def...
color = new Color(255, 255, 255);
color = new Color(255, 255, 127);
public void bind() { bound = true; color = new Color(255, 255, 255); }
return (1 / Math.sqrt(r * r * r)) * 1000.0;
Double r2 = r * 1.5; return (1 / Math.sqrt(r2 * r2 * r2)) * 1000.0;
private Double keplerRotation(Double r) { return (1 / Math.sqrt(r * r * r)) * 1000.0; }
if (isSelected && list.isFocusOwner()) { textJLabel.setForeground(Colors.Browser.List.INNER_LIST_SELECTION_FG); setBackground(Colors.Browser.List.INNER_LIST_SELECTION_BG);
if (isSelected && cell.isSelectedContainer()) { if (cell.isFocusOnRight()) { textJLabel.setForeground(Colors.Browser.List.INNER_LIST_SELECTION_FG); setBackground(Colors.Browser.List.INNER_LIST_SELECTION_BG); } else { textJLabel.setForeground(Colors.Browser.List.INNER_LEFT_LIST_SELECTION_NOFOCUS_FG); setBackground(Color...
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { final AbstractContentCell cell = (AbstractContentCell) value; textJLabel.setText(cell.getText()); final Icon icon = ...
this.logger = new Log4JWrapper();
protected StreamClient(final StreamSession session) { super(); this.logger = new Log4JWrapper(); this.session = session; final Environment environment = session.getEnvironment(); this.socketAddress = new InetSocketAddress( environment.getStreamHost(), environment.ge...
protected final void connect(final Type type) { try { doConnect(); write(new StreamHeader(StreamHeader.Type.SESSION_BEGIN, session.getId())); write(new StreamHeader(StreamHeader.Type.SESSION_TYPE, type.name())); } catch (final IOException iox) { if (isConnected()) try { doDisconnect(); } catch (final IOException iox2) ...
protected final void connect(final Type type) throws IOException { doConnect(); write(new StreamHeader(StreamHeader.Type.SESSION_ID, session.getId())); write(new StreamHeader(StreamHeader.Type.SESSION_TYPE, type.name()));
protected final void connect(final Type type) { try { doConnect(); write(new StreamHeader(StreamHeader.Type.SESSION_BEGIN, session.getId())); write(new StreamHeader(StreamHeader.Type.SESSION_TYPE, type.name())); } catch (final IOException iox) { if (isConnec...
protected final void disconnect() { try { doDisconnect(); } catch (final IOException iox) { throw new StreamException(iox); }
protected final void disconnect() throws IOException { doDisconnect();
protected final void disconnect() { try { doDisconnect(); } catch (final IOException iox) { throw new StreamException(iox); } }
protected final void write(final InputStream stream) {
protected final void write(final InputStream stream, final Long streamSize) {
protected final void write(final InputStream stream) { logger.logApiId(); try { StreamUtil.copy(stream, output, session.getBufferSize()); output.flush(); } catch (final IOException iox) { throw new StreamException(iox); } }
StreamUtil.copy(stream, output, session.getBufferSize()); output.flush();
int len, total = 0; final byte[] b = new byte[session.getBufferSize()]; try { while((len = stream.read(b)) > 0) { logger.logDebug("UPSTREAM SENT {0}/{1}", total += len, streamSize); output.write(b, 0, len); output.flush(); } } finally { stream.close(); output.flush(); output.close(); }
protected final void write(final InputStream stream) { logger.logApiId(); try { StreamUtil.copy(stream, output, session.getBufferSize()); output.flush(); } catch (final IOException iox) { throw new StreamException(iox); } }
final Long versionId, final UUID documentUniqueId);
final Long versionId);
public List<DocumentVersion> readDocumentVersions(final UUID uniqueId, final Long versionId, final UUID documentUniqueId);
getInternalArtifactModel().applyFlagBookmark(containerId);
getArtifactModel().applyFlagBookmark(containerId);
void addBookmark(final Long containerId) { logger.logApiId(); logger.logVariable("containerId", containerId); try { getInternalArtifactModel().applyFlagBookmark(containerId); notifyContainerUpdated(read(containerId), localEventGenerator); } catch (final Throwable t)...
final InternalArtifactModel artifactModel = getInternalArtifactModel();
final InternalArtifactModel artifactModel = getArtifactModel();
Container create(final String name) { logger.logApiId(); logger.logVariable("name", name); try { final Container container = new Container(); container.setCreatedBy(localUserId()); container.setCreatedOn(currentDateTime()); container.setName(name); ...
final InternalArtifactModel artifactModel = getInternalArtifactModel();
final InternalArtifactModel artifactModel = getArtifactModel();
ContainerDraft createDraft(final Long containerId) { logger.logApiId(); logger.logVariable("containerId", containerId); try { assertContainerDraftDoesNotExist(containerId); if (isFirstDraft(containerId)) { createFirstDraft(containerId, localTeamMember(contai...
getInternalArtifactModel().createTeam(containerId);
getArtifactModel().createTeam(containerId);
private TeamMember createTeam(final Long containerId) { final List<TeamMember> team = getInternalArtifactModel().createTeam(containerId); return team.get(0); }
getSessionModel().removeTeamMember( container.getUniqueId(), localTeamMember.getId());
void delete(final Long containerId) { logger.logApiId(); logger.logVariable("containerId", containerId); try { final Container container = read(containerId); if (isDistributed(container.getId())) { final TeamMember localTeamMember = localTeamMember(container...
final InternalArtifactModel artifactModel = getInternalArtifactModel();
final InternalArtifactModel artifactModel = getArtifactModel();
private void deleteLocal(final Long containerId) { // delete the draft final ContainerDraft draft = readDraft(containerId); if (null != draft) { for(final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); ...
final InternalArtifactModel artifactModel = getInternalArtifactModel();
final InternalArtifactModel artifactModel = getArtifactModel();
private void doPublishVersion(final PublishMonitor monitor, final Long containerId, final Long versionId, final List<Contact> contacts, final List<TeamMember> teamMembers) throws IOException { final Container container = read(containerId); final ContainerVersion versio...
sessionModel.addTeamMember(container.getUniqueId(), contact.getId());
sessionModel.addTeamMember(container.getUniqueId(), artifactModel .readTeamIds(container.getId()), contact.getId());
private void doPublishVersion(final PublishMonitor monitor, final Long containerId, final Long versionId, final List<Contact> contacts, final List<TeamMember> teamMembers) throws IOException { final Container container = read(containerId); final ContainerVersion versio...
final InternalArtifactModel artifactModel = getInternalArtifactModel();
final InternalArtifactModel artifactModel = getArtifactModel();
void handleArtifactPublished(final ContainerArtifactPublishedEvent event) { logger.logApiId(); logger.logVariable("event", event); try { // determine the existance of the container and the version. final InternalArtifactModel artifactModel = getInternalArtifactModel(); ...
final InternalArtifactModel artifactModel = getInternalArtifactModel();
final InternalArtifactModel artifactModel = getArtifactModel();
void handlePublished(final ContainerPublishedEvent event) { logger.logApiId(); logger.logVariable("event", event); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long containerId = artifactModel.readId(event.getUniqueId()); /...
getIndexModel().indexContainer(containerId);
void handlePublished(final ContainerPublishedEvent event) { logger.logApiId(); logger.logVariable("event", event); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long containerId = artifactModel.readId(event.getUniqueId()); /...
return getInternalArtifactModel().doesVersionExist(containerId, Versioning.START);
return getArtifactModel().doesVersionExist(containerId, Versioning.START);
Boolean isDistributed(final Long containerId) { logger.logApiId(); logger.logVariable("containerId", containerId); try { return getInternalArtifactModel().doesVersionExist(containerId, Versioning.START); } catch (final Throwable t) { throw translateError(t); ...
getInternalArtifactModel().removeFlagKey(containerId);
getArtifactModel().removeFlagKey(containerId);
void publishVersion(final Long containerId, final Long versionId, final List<Contact> contacts) { logger.logApiId(); logger.logVariable("containerId", containerId); logger.logVariable("versionId", versionId); logger.logVariable("contacts", contacts); try { //...
return getInternalArtifactModel().readTeam(containerId,
return getArtifactModel().readTeam(containerId,
List<TeamMember> readTeam(final Long containerId) { logger.logApiId(); logger.logVariable("containerId", containerId); return getInternalArtifactModel().readTeam(containerId, UserComparatorFactory.createName(Boolean.TRUE), FilterManager.createDefault()); }
getInternalArtifactModel().removeFlagBookmark(containerId);
getArtifactModel().removeFlagBookmark(containerId);
void removeBookmark(final Long containerId) { logger.logApiId(); logger.logVariable("containerId", containerId); try { getInternalArtifactModel().removeFlagBookmark(containerId); notifyContainerUpdated(read(containerId), localEventGenerator); } catch (final Throwabl...
final UUID uniqueId, final Long versionId, final UUID documentUniqueId) {
final UUID uniqueId, final Long versionId) {
void restore(final UUID uniqueId) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); try { final InternalArchiveModel archiveModel = getArchiveModel(); // restore container info final Container container = archiveModel.readContainer(uniqueId); ...
versionId, documentUniqueId);
versionId);
void restore(final UUID uniqueId) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); try { final InternalArchiveModel archiveModel = getArchiveModel(); // restore container info final Container container = archiveModel.readContainer(uniqueId); ...
final UUID uniqueId, final Long versionId, final UUID documentUniqueId) {
final UUID uniqueId, final Long versionId) {
public List<DocumentVersion> readDocumentVersions( final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { return archiveModel.readDocumentVersions(uniqueId, versionId, documentUniqueId); ...