bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.FALSE); }
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.TRUE); }
1,114,102
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.TRUE); }
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, remoteReload); }
1,114,103
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, remoteReload); }
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadSystemMessage(systemMessageId); }
1,114,104
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadSystemMessage(systemMessageId); }
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadSystemMessage(systemMessageId); }
1,114,105
public void removeSearchFilter() { SwingUtilities.invokeLater(new Runnable() { public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).removeFilter(searchFilter); } }); }
public void removeSearchFilter() { SwingUtilities.invokeLater(new Runnable() { public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).removeFilter(searchFilter); } }); }
1,114,106
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).removeFilter(searchFilter); }
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).removeFilter(searchFilter); }
1,114,107
List<User> readTeam(final Long containerId) { logger.info(getApiId("[READ TEAM]")); logger.debug(containerId); return CollectionsUtil.proxy(getInternalArtifactModel().readTeam(containerId)); }
List<User> readTeam(final Long containerId) { logger.info(getApiId("[READ TEAM]")); logger.debug(containerId); final Set<User> team = getInternalArtifactModel().readTeam(containerId); if(team.isEmpty()) { return new ArrayList<User>(0); } else { return CollectionsUtil.proxy(getInternalArtifactModel().readTeam(containerId)); } }
1,114,108
public void invoke(final Data data) { final Long containerId = (Long) data.get(DataKey.CONTAINER_ID); getContainerModel().createDraft(containerId); browser.fireContainerDraftCreated(containerId, Boolean.FALSE); }
public void invoke(final Data data) { final Long containerId = (Long) data.get(DataKey.CONTAINER_ID); getContainerModel().createDraft(containerId); browser.fireContainerDraftCreated(containerId, Boolean.FALSE); }
1,114,109
public CreateDocumentTxHandler(final Browser browser) { super(); this.browser = browser; this.dModel = browser.getDocumentModel(); this.javaFileListFlavor = DataFlavor.javaFileListFlavor; this.logger = LoggerFactory.getLogger(getClass()); }
public CreateDocumentTxHandler(final Browser browser) { super(); this.browser = browser; this.dModel = browser.getDocumentModel(); this.logger = LoggerFactory.getLogger(getClass()); }
1,114,110
public boolean importData(final JComponent comp, final Transferable t) { if(!canImport(comp, t.getTransferDataFlavors())) { return false; } List data = null; try { data = (List) t.getTransferData(javaFileListFlavor); } catch(final UnsupportedFlavorException ufx) { logger.error(IMPORT_UFX, ufx); return false; } catch(final IOException iox) { logger.error(IMPORT_IOX, iox); return false; } // create documents for each file transferred final Set<Long> createdIds = new HashSet<Long>(); boolean didPass = true; for(final Object datum : data) { final File file = (File) datum; try { final Document document = dModel.create(file.getName(), null, file); createdIds.add(document.getId()); } catch(final ParityException px) { logger.error(IMPORT_PX, px); didPass = false; } } if(didPass) { browser.fireDocumentsCreated(createdIds); browser.setInfoMessage("Document.Created"); return true; } else { // try to undo the created docs for(final Long id : createdIds) { try { dModel.delete(id); } catch(final ParityException px) { logger.error(IMPORT_UNDO_PX, px); } } return false; } }
public boolean importData(final JComponent comp, final Transferable t) { if(!canImport(comp, t.getTransferDataFlavors())) { return false; } List data = null; try { data = (List) t.getTransferData(javaFileListFlavor); } catch(final UnsupportedFlavorException ufx) { logger.error(IMPORT_UFX, ufx); return false; } catch(final IOException iox) { logger.error(IMPORT_IOX, iox); return false; } // create documents for each file transferred final Set<Long> createdIds = new HashSet<Long>(); boolean didPass = true; for(final Object datum : data) { final File file = (File) datum; try { final Document document = dModel.create(file.getName(), null, file); createdIds.add(document.getId()); } catch(final ParityException px) { logger.error(IMPORT_PX, px); didPass = false; } } if(didPass) { browser.fireDocumentsCreated(createdIds); browser.setInfoMessage("Document.Created"); return true; } else { // try to undo the created docs for(final Long id : createdIds) { try { dModel.delete(id); } catch(final ParityException px) { logger.error(IMPORT_UNDO_PX, px); } } return false; } }
1,114,111
public boolean importData(final JComponent comp, final Transferable t) { if(!canImport(comp, t.getTransferDataFlavors())) { return false; } List data = null; try { data = (List) t.getTransferData(javaFileListFlavor); } catch(final UnsupportedFlavorException ufx) { logger.error(IMPORT_UFX, ufx); return false; } catch(final IOException iox) { logger.error(IMPORT_IOX, iox); return false; } // create documents for each file transferred final Set<Long> createdIds = new HashSet<Long>(); boolean didPass = true; for(final Object datum : data) { final File file = (File) datum; try { final Document document = dModel.create(file.getName(), null, file); createdIds.add(document.getId()); } catch(final ParityException px) { logger.error(IMPORT_PX, px); didPass = false; } } if(didPass) { browser.fireDocumentsCreated(createdIds); browser.setInfoMessage("Document.Created"); return true; } else { // try to undo the created docs for(final Long id : createdIds) { try { dModel.delete(id); } catch(final ParityException px) { logger.error(IMPORT_UNDO_PX, px); } } return false; } }
public boolean importData(final JComponent comp, final Transferable t) { if(!canImport(comp, t.getTransferDataFlavors())) { return false; } List data = null; try { data = (List) t.getTransferData(javaFileListFlavor); } catch(final UnsupportedFlavorException ufx) { logger.error(IMPORT_UFX, ufx); return false; } catch(final IOException iox) { logger.error(IMPORT_IOX, iox); return false; } // create documents for each file transferred final Set<Long> createdIds = new HashSet<Long>(); boolean didPass = true; for(final Object datum : data) { final File file = (File) datum; try { final Document document = dModel.create(file.getName(), null, file); createdIds.add(document.getId()); } catch(final ParityException px) { logger.error(IMPORT_PX, px); didPass = false; } } if(didPass) { browser.fireDocumentsCreated(createdIds); browser.setInfoMessage("Document.Created"); return true; } else { // try to undo the created docs for(final Long id : createdIds) { try { dModel.delete(id); } catch(final ParityException px) { logger.error(IMPORT_UNDO_PX, px); } } return false; } }
1,114,112
public boolean importData(final JComponent comp, final Transferable t) { if(!canImport(comp, t.getTransferDataFlavors())) { return false; } List data = null; try { data = (List) t.getTransferData(javaFileListFlavor); } catch(final UnsupportedFlavorException ufx) { logger.error(IMPORT_UFX, ufx); return false; } catch(final IOException iox) { logger.error(IMPORT_IOX, iox); return false; } // create documents for each file transferred final Set<Long> createdIds = new HashSet<Long>(); boolean didPass = true; for(final Object datum : data) { final File file = (File) datum; try { final Document document = dModel.create(file.getName(), null, file); createdIds.add(document.getId()); } catch(final ParityException px) { logger.error(IMPORT_PX, px); didPass = false; } } if(didPass) { browser.fireDocumentsCreated(createdIds); browser.setInfoMessage("Document.Created"); return true; } else { // try to undo the created docs for(final Long id : createdIds) { try { dModel.delete(id); } catch(final ParityException px) { logger.error(IMPORT_UNDO_PX, px); } } return false; } }
public boolean importData(final JComponent comp, final Transferable t) { if(!canImport(comp, t.getTransferDataFlavors())) { return false; } List data = null; try { data = (List) t.getTransferData(javaFileListFlavor); } catch(final UnsupportedFlavorException ufx) { logger.error(IMPORT_UFX, ufx); return false; } catch(final IOException iox) { logger.error(IMPORT_IOX, iox); return false; } // create documents for each file transferred final Set<Long> createdIds = new HashSet<Long>(); boolean didPass = true; for(final Object datum : data) { final File file = (File) datum; try { final Document document = dModel.create(file.getName(), null, file); createdIds.add(document.getId()); } catch(final ParityException px) { logger.error(IMPORT_PX, px); didPass = false; } } if(didPass) { browser.fireDocumentsCreated(createdIds); browser.setInfoMessage("Document.Created"); return true; } else { // try to undo the created docs for(final Long id : createdIds) { try { dModel.delete(id); } catch(final ParityException px) { logger.error(IMPORT_UNDO_PX, px); } } return false; } }
1,114,113
private static void initLogging(final Workspace workspace) { final Properties log4j = ConfigFactory.newInstance("log4j.properties"); switch (Version.getMode()) { case DEVELOPMENT: log4j.setProperty("log4j.logger.com.thinkparity", "DEBUG,FILE"); break; case DEMO: case PRODUCTION: log4j.setProperty("log4j.logger.com.thinkparity", "WARN,FILE"); break; case TESTING: log4j.setProperty("log4j.logger.com.thinkparity", "INFO,FILE"); break; default: Assert.assertUnreachable("UNKNOWN MODE"); } log4j.setProperty("log4j.appender.FILE.File", new File(workspace.getLogDirectory(), "thinkParity.log").getAbsolutePath()); PropertyConfigurator.configure(log4j); new Log4JWrapper().logInfo("{0} - {1} - {2}", Version.getName(), Version.getMode(), Version.getBuildId()); }
private static void initLogging(final Workspace workspace) { final Properties log4j = ConfigFactory.newInstance("log4j.properties"); switch (Version.getMode()) { case DEVELOPMENT: log4j.setProperty("log4j.logger.com.thinkparity", "DEBUG,FILE"); break; case DEMO: case PRODUCTION: log4j.setProperty("log4j.logger.com.thinkparity", "WARN,FILE"); break; case TESTING: log4j.setProperty("log4j.logger.com.thinkparity", "INFO,FILE"); break; default: Assert.assertUnreachable("UNKNOWN MODE"); } log4j.setProperty("log4j.appender.FILE.File", new File(workspace.getLogDirectory(), "thinkParity.log").getAbsolutePath()); PropertyConfigurator.configure(log4j); new Log4JWrapper().logInfo("{0} - {1} - {2}", Version.getName(), Version.getMode(), Version.getBuildId()); }
1,114,114
private Display createContent() { if(null == content) { content = new ContentDisplay(); // HEIGHT ContentDisplay 472 applySize(content, 472); } return content; }
private Display createContent() { if(null == content) { content = new ContentDisplay(); // HEIGHT ContentDisplay 472 applySize(content, 469); } return content; }
1,114,116
private Display createStatus() { if(null == status) { status = new StatusDisplay(); // HEIGHT Status Display 20 applySize(status, 20); } return status; }
private Display createStatus() { if(null == status) { status = new StatusDisplay(); // HEIGHT Status Display 20 applySize(status, 23); } return status; }
1,114,117
void displayMainStatusAvatar() { final Data input = new Data(1); input.set(MainStatusAvatar.DataKey.PROFILE, getProfile()); setInput(AvatarId.MAIN_STATUS, input); displayStatus(AvatarId.MAIN_STATUS); }
void displayMainStatusAvatar() { final Data input = new Data(2); input.set(MainStatusAvatar.DataKey.PROFILE, getProfile()); setInput(AvatarId.MAIN_STATUS, input); displayStatus(AvatarId.MAIN_STATUS); }
1,114,118
protected void assertNotTeamMember(final Object assertion, final Long artifactId, final JabberId userId) { final List<TeamMember> team = getInternalArtifactModel().readTeam2(artifactId); final User user = getInternalUserModel().read(userId); if (null != user) Assert.assertNotTrue(assertion, contains(team, user)); }
protected void assertNotTeamMember(final Object assertion, final Long artifactId, final JabberId userId) { final List<TeamMember> team = getArtifactModel().readTeam2(artifactId); final User user = getInternalUserModel().read(userId); if (null != user) Assert.assertNotTrue(assertion, contains(team, user)); }
1,114,121
protected void assertTeamMember(final Object assertion, final Long artifactId, final JabberId userId) { final List<TeamMember> team = getInternalArtifactModel().readTeam2(artifactId); Assert.assertNotTrue(assertion, contains(team, getInternalUserModel().read(userId))); }
protected void assertTeamMember(final Object assertion, final Long artifactId, final JabberId userId) { final List<TeamMember> team = getArtifactModel().readTeam2(artifactId); Assert.assertNotTrue(assertion, contains(team, getInternalUserModel().read(userId))); }
1,114,122
protected Boolean doesExistVersion(final Long artifactId, final Long versionId) { return getInternalArtifactModel().doesVersionExist(artifactId, versionId); }
protected Boolean doesExistVersion(final Long artifactId, final Long versionId) { return getArtifactModel().doesVersionExist(artifactId, versionId); }
1,114,123
protected Boolean isKeyHolder(final Long artifactId) throws ParityException { assertOnline("USER NOT ONLINE"); final InternalArtifactModel artifactModel = getInternalArtifactModel(); return artifactModel.isFlagApplied(artifactId, ArtifactFlag.KEY) && isRemoteKeyHolder(artifactModel.readUniqueId(artifactId)); }
protected Boolean isKeyHolder(final Long artifactId) throws ParityException { assertOnline("USER NOT ONLINE"); final InternalArtifactModel artifactModel = getArtifactModel(); return artifactModel.isFlagApplied(artifactId, ArtifactFlag.KEY) && isRemoteKeyHolder(artifactModel.readUniqueId(artifactId)); }
1,114,124
protected TeamMember localTeamMember(final Long artifactId) { final List<TeamMember> team = getInternalArtifactModel().readTeam2(artifactId); return get(team, localUser()); }
protected TeamMember localTeamMember(final Long artifactId) { final List<TeamMember> team = getArtifactModel().readTeam2(artifactId); return get(team, localUser()); }
1,114,125
protected UUID readArtifactUniqueId(final Long artifactId) { return getInternalArtifactModel().readUniqueId(artifactId); }
protected UUID readArtifactUniqueId(final Long artifactId) { return getArtifactModel().readUniqueId(artifactId); }
1,114,126
protected Long readNextVersionId(final Long artifactId) { final Long latestVersionId = getInternalArtifactModel().readLatestVersionId(artifactId); return null == latestVersionId ? Versioning.START : latestVersionId + Versioning.INCREMENT; }
protected Long readNextVersionId(final Long artifactId) { final Long latestVersionId = getArtifactModel().readLatestVersionId(artifactId); return null == latestVersionId ? Versioning.START : latestVersionId + Versioning.INCREMENT; }
1,114,127
public void testGet() { try { Project project; for(Fixture datum : data) { project = datum.projectModel.get(datum.projectId); assertNotNull(project); assertEquals(datum.expectedProject, project); } } catch(Throwable t) { fail(getFailMessage(t)); } }
public void testGet() { try { Project project; for(Fixture datum : data) { project = datum.projectModel.get(datum.projectId); assertEquals(datum.expectedProject, project); } } catch(Throwable t) { fail(getFailMessage(t)); } }
1,114,128
private TxUtils() { super(); }
private TxUtils() { super(); this.logger = LoggerFactory.getLogger(getClass()); }
1,114,129
public Long create(final String artifactId, final String groupId, final String path, final Library.Type type, final String version) throws XMPPException { final XMPPSession session = openSession(); try { session.setRemoteMethod("library:create"); session.setParameter("artifactId", artifactId); session.setParameter("groupId", groupId); session.setParameter("path", path); session.setParameter("type", type); session.setParameter("version", version); session.execute(); if(session.containsResult()) { session.commit(); return session.getLong("id"); } else { throw new XMPPException( "[RMODEL] [LIBRARY] [XMPP IO] [UNABLE TO CREATE LIBRARY]"); } } catch(final Exception x) { session.rollback(); throw new XMPPException(x); } finally { session.close(); } }
public Long create(final String artifactId, final String groupId, final String path, final Library.Type type, final String version) throws XMPPException { final XMPPSession session = openAnonymousSession(); try { session.setRemoteMethod("library:create"); session.setParameter("artifactId", artifactId); session.setParameter("groupId", groupId); session.setParameter("path", path); session.setParameter("type", type); session.setParameter("version", version); session.execute(); if(session.containsResult()) { session.commit(); return session.getLong("id"); } else { throw new XMPPException( "[RMODEL] [LIBRARY] [XMPP IO] [UNABLE TO CREATE LIBRARY]"); } } catch(final Exception x) { session.rollback(); throw new XMPPException(x); } finally { session.close(); } }
1,114,130
public void createBytes(final Long libraryId, final byte[] bytes, final String checksum) throws XMPPException { final XMPPSession session = openSession(); try { session.setRemoteMethod("library:createbytes"); session.setParameter("id", libraryId); session.setParameter("bytes", bytes); session.setParameter("checksum", checksum); session.execute(); session.commit(); } catch(final Exception x) { session.rollback(); throw new XMPPException(x); } finally { session.close(); } }
public void createBytes(final Long libraryId, final byte[] bytes, final String checksum) throws XMPPException { final XMPPSession session = openAnonymousSession(); try { session.setRemoteMethod("library:createbytes"); session.setParameter("id", libraryId); session.setParameter("bytes", bytes); session.setParameter("checksum", checksum); session.execute(); session.commit(); } catch(final Exception x) { session.rollback(); throw new XMPPException(x); } finally { session.close(); } }
1,114,131
public void delete(final Long libraryId) throws XMPPException { final XMPPSession session = openSession(); try { session.setRemoteMethod("library:delete"); session.setParameter("id", libraryId); session.execute(); } catch(final Exception x) { session.rollback(); throw new XMPPException(x); } finally { session.close(); } }
public void delete(final Long libraryId) throws XMPPException { final XMPPSession session = openAnonymousSession(); try { session.setRemoteMethod("library:delete"); session.setParameter("id", libraryId); session.execute(); } catch(final Exception x) { session.rollback(); throw new XMPPException(x); } finally { session.close(); } }
1,114,132
public Library read(final Long libraryId) throws XMPPException { final XMPPSession session = openSession(); try { session.setRemoteMethod("library:read"); session.setParameter("id", libraryId); session.execute(); if(session.containsResult()) { return extractLibrary(session); } else { return null; } } finally { session.close(); } }
public Library read(final Long libraryId) throws XMPPException { final XMPPSession session = openAnonymousSession(); try { session.setRemoteMethod("library:read"); session.setParameter("id", libraryId); session.execute(); if(session.containsResult()) { return extractLibrary(session); } else { return null; } } finally { session.close(); } }
1,114,133
public LibraryBytes readBytes(final Long libraryId) throws XMPPException { final XMPPSession session = openSession(); try { session.setRemoteMethod("library:readbytes"); session.setParameter("id", libraryId); session.execute(); if(session.containsResult()) { return extractLibraryBytes(session); } else { return null; } } catch(final Exception x) { throw new XMPPException(x); } finally { session.close(); } }
public LibraryBytes readBytes(final Long libraryId) throws XMPPException { final XMPPSession session = openAnonymousSession(); try { session.setRemoteMethod("library:readbytes"); session.setParameter("id", libraryId); session.execute(); if(session.containsResult()) { return extractLibraryBytes(session); } else { return null; } } catch(final Exception x) { throw new XMPPException(x); } finally { session.close(); } }
1,114,134
public byte[] readSmallBytes(final Long libraryId) throws XMPPException { final XMPPSession session = openSession(); try { session.setRemoteMethod("library:readbytes"); session.setParameter("id", libraryId); session.execute(); if(session.containsResult()) { return extractSmallLibraryBytes(session); } else { return null; } } catch(final Exception x) { throw new XMPPException(x); } finally { session.close(); } }
public byte[] readSmallBytes(final Long libraryId) throws XMPPException { final XMPPSession session = openAnonymousSession(); try { session.setRemoteMethod("library:readbytes"); session.setParameter("id", libraryId); session.execute(); if(session.containsResult()) { return extractSmallLibraryBytes(session); } else { return null; } } catch(final Exception x) { throw new XMPPException(x); } finally { session.close(); } }
1,114,135
public void invoke(final Data data) { final Long artifactId = (Long) data.get(DataKey.ARTIFACT_ID); getArtifactModel().applyFlagSeen(artifactId); }
public void invoke(final Data data) { final Long artifactId = (Long) data.get(DataKey.ARTIFACT_ID); final ArtifactType artifactType = (ArtifactType) data.get(DataKey.ARTIFACT_TYPE); if (!getArtifactModel().hasBeenSeen(artifactId)) { getArtifactModel().applyFlagSeen(artifactId); browser.fireArtifactFlagSeen(artifactId, artifactType, Boolean.FALSE); } }
1,114,138
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; for(int i = 0; i < visibleDocuments.size(); i++) { li = ListItem.create(visibleDocuments.get(i)); if(!jListModel.contains(li)) { jListModel.add(i, li); } } final ListItem[] modelItems = new ListItem[jListModel.size()]; jListModel.copyInto(modelItems); for(final ListItem li2 : modelItems) { if(li2 instanceof DocumentListItem) { if(!visibleDocuments.contains(((DocumentListItem) li2).getDisplayDocument())) { jListModel.removeElement(li2); } } } if(1 > visibleDocuments.size()) { browser.disableHistory(); } else { browser.enableHistory(); } }
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; for(int i = 0; i < visibleDocuments.size(); i++) { li = ListItem.create(visibleDocuments.get(i)); if(!jListModel.contains(li)) { jListModel.add(i, li); } } final ListItem[] modelItems = new ListItem[jListModel.size()]; jListModel.copyInto(modelItems); for(final ListItem li2 : modelItems) { if(li2 instanceof DocumentListItem) { if(!visibleDocuments.contains(((DocumentListItem) li2).getDisplayDocument())) { jListModel.removeElement(li2); } } } if(1 > visibleDocuments.size()) { browser.disableHistory(); } else { browser.enableHistory(); } }
1,114,141
public void delete(final Long artifactId) throws HypersonicException { final Session session = openSession(); try { final Long[] auditIds = listAuditIds(session, artifactId); final Long[] metaDataIds = listMetaDataIds(session, auditIds); session.prepareStatement(SQL_DELETE_AUDIT_META_DATA); for(final Long metaDataId : metaDataIds) { session.setLong(1, metaDataId); if(1 != session.executeUpdate()) throw new HypersonicException("Could not delete audit meta data."); } for(final Long metaDataId : metaDataIds) getMetaDataIO().delete(session, metaDataId); session.prepareStatement(SQL_DELETE_AUDIT_VERSION); session.setLong(1, artifactId); int rowsDeleted = session.executeUpdate(); if(0 != rowsDeleted && 1 != rowsDeleted) throw new HypersonicException("Could not delete audit version."); session.prepareStatement(SQL_DELETE_AUDIT); session.setLong(1, artifactId); if(1 != session.executeUpdate()) throw new HypersonicException("Could not delete audit."); session.commit(); } catch(final HypersonicException hx) { session.rollback(); throw hx; } finally { session.close(); } }
public void delete(final Long artifactId) throws HypersonicException { final Session session = openSession(); try { final Long[] auditIds = listAuditIds(session, artifactId); final Long[] metaDataIds = listMetaDataIds(session, auditIds); session.prepareStatement(SQL_DELETE_AUDIT_META_DATA); for(final Long metaDataId : metaDataIds) { session.setLong(1, metaDataId); if(1 != session.executeUpdate()) throw new HypersonicException("Could not delete audit meta data."); } for(final Long metaDataId : metaDataIds) getMetaDataIO().delete(session, metaDataId); session.prepareStatement(SQL_DELETE_AUDIT_VERSION); session.setLong(1, artifactId); int rowsDeleted = session.executeUpdate(); if(0 != rowsDeleted && 1 != rowsDeleted) throw new HypersonicException("Could not delete audit version."); session.prepareStatement(SQL_DELETE_AUDIT); session.setLong(1, artifactId); if(1 != session.executeUpdate()) throw new HypersonicException("Could not delete audit."); session.commit(); } catch(final HypersonicException hx) { session.rollback(); throw hx; } finally { session.close(); } }
1,114,145
public void delete(final Long artifactId) throws HypersonicException { final Session session = openSession(); try { final Long[] auditIds = listAuditIds(session, artifactId); final Long[] metaDataIds = listMetaDataIds(session, auditIds); session.prepareStatement(SQL_DELETE_AUDIT_META_DATA); for(final Long metaDataId : metaDataIds) { session.setLong(1, metaDataId); if(1 != session.executeUpdate()) throw new HypersonicException("Could not delete audit meta data."); } for(final Long metaDataId : metaDataIds) getMetaDataIO().delete(session, metaDataId); session.prepareStatement(SQL_DELETE_AUDIT_VERSION); session.setLong(1, artifactId); int rowsDeleted = session.executeUpdate(); if(0 != rowsDeleted && 1 != rowsDeleted) throw new HypersonicException("Could not delete audit version."); session.prepareStatement(SQL_DELETE_AUDIT); session.setLong(1, artifactId); if(1 != session.executeUpdate()) throw new HypersonicException("Could not delete audit."); session.commit(); } catch(final HypersonicException hx) { session.rollback(); throw hx; } finally { session.close(); } }
public void delete(final Long artifactId) throws HypersonicException { final Session session = openSession(); try { final Long[] auditIds = listAuditIds(session, artifactId); final Long[] metaDataIds = listMetaDataIds(session, auditIds); session.prepareStatement(SQL_DELETE_AUDIT_META_DATA); for(final Long metaDataId : metaDataIds) { session.setLong(1, metaDataId); if(auditIds.length != session.executeUpdate()) throw new HypersonicException("Could not delete audit meta data."); } for(final Long metaDataId : metaDataIds) getMetaDataIO().delete(session, metaDataId); session.prepareStatement(SQL_DELETE_AUDIT_VERSION); session.setLong(1, artifactId); int rowsDeleted = session.executeUpdate(); if(0 != rowsDeleted && 1 != rowsDeleted) throw new HypersonicException("Could not delete audit version."); session.prepareStatement(SQL_DELETE_AUDIT); session.setLong(1, artifactId); if(auditIds.length != session.executeUpdate()) throw new HypersonicException("Could not delete audit."); session.commit(); } catch(final HypersonicException hx) { session.rollback(); throw hx; } finally { session.close(); } }
1,114,146
private ReceiveKeyEvent extractReceiveKey(final Session session) { final ReceiveKeyEvent receiveKeyEvent = new ReceiveKeyEvent(); receiveKeyEvent.setArtifactId(session.getLong("ARTIFACT_ID")); receiveKeyEvent.setArtifactVersionId(session.getLong("ARTIFACT_VERSION_ID")); receiveKeyEvent.setCreatedBy(session.getQualifiedUsername("CREATED_BY")); receiveKeyEvent.setCreatedOn(session.getCalendar("CREATED_ON")); receiveKeyEvent.setId(session.getLong("ARTIFACT_AUDIT_ID")); receiveKeyEvent.setType(session.getAuditEventTypeFromInteger("ARTIFACT_AUDIT_TYPE_ID")); final MetaData[] metaData = readMetaData(receiveKeyEvent.getId(), MetaDataKey.RECEIVED_FROM); receiveKeyEvent.setReceivedFrom((JabberId) metaData[0].getValue()); return receiveKeyEvent; }
private ReceiveKeyEvent extractReceiveKey(final Session session) { final ReceiveKeyEvent receiveKeyEvent = new ReceiveKeyEvent(); receiveKeyEvent.setArtifactId(session.getLong("ARTIFACT_ID")); receiveKeyEvent.setCreatedBy(session.getQualifiedUsername("CREATED_BY")); receiveKeyEvent.setCreatedOn(session.getCalendar("CREATED_ON")); receiveKeyEvent.setId(session.getLong("ARTIFACT_AUDIT_ID")); receiveKeyEvent.setType(session.getAuditEventTypeFromInteger("ARTIFACT_AUDIT_TYPE_ID")); final MetaData[] metaData = readMetaData(receiveKeyEvent.getId(), MetaDataKey.RECEIVED_FROM); receiveKeyEvent.setReceivedFrom((JabberId) metaData[0].getValue()); return receiveKeyEvent; }
1,114,147
private SendKeyEvent extractSendKey(final Session session) { final SendKeyEvent sendKeyEvent = new SendKeyEvent(); sendKeyEvent.setArtifactId(session.getLong("ARTIFACT_ID")); sendKeyEvent.setArtifactVersionId(session.getLong("ARTIFACT_VERSION_ID")); sendKeyEvent.setCreatedBy(session.getQualifiedUsername("CREATED_BY")); sendKeyEvent.setCreatedOn(session.getCalendar("CREATED_ON")); sendKeyEvent.setId(session.getLong("ARTIFACT_AUDIT_ID")); sendKeyEvent.setType(session.getAuditEventTypeFromInteger("ARTIFACT_AUDIT_ID")); final MetaData[] metaData = readMetaData(sendKeyEvent.getId(), MetaDataKey.SENT_TO); sendKeyEvent.setSentTo((JabberId) metaData[0].getValue()); return sendKeyEvent; }
private SendKeyEvent extractSendKey(final Session session) { final SendKeyEvent sendKeyEvent = new SendKeyEvent(); sendKeyEvent.setArtifactId(session.getLong("ARTIFACT_ID")); sendKeyEvent.setArtifactVersionId(session.getLong("ARTIFACT_VERSION_ID")); sendKeyEvent.setCreatedBy(session.getQualifiedUsername("CREATED_BY")); sendKeyEvent.setCreatedOn(session.getCalendar("CREATED_ON")); sendKeyEvent.setId(session.getLong("ARTIFACT_AUDIT_ID")); sendKeyEvent.setType(session.getAuditEventTypeFromInteger("ARTIFACT_AUDIT_TYPE_ID")); final MetaData[] metaData = readMetaData(sendKeyEvent.getId(), MetaDataKey.SENT_TO); sendKeyEvent.setSentTo((JabberId) metaData[0].getValue()); return sendKeyEvent; }
1,114,148
private JMenuItem getKeyRequestAcceptMenuItem(final ListItem listItem, final KeyRequest keyRequest) { return listItem.createJMenuItem("KeyRequestAccept", new ActionListener() { public void actionPerformed(final ActionEvent e) { runAcceptKeyRequest(listItem, document.getId(), keyRequest.getId()); } }); }
private JMenuItem getKeyRequestAcceptMenuItem(final ListItem listItem, final KeyRequest keyRequest) { final Object[] arguments = new Object[] { keyRequest.getRequestedByName() }; return listItem.createJMenuItem("KeyRequestAccept", arguments, new ActionListener() { public void actionPerformed(final ActionEvent e) { runAcceptKeyRequest(listItem, document.getId(), keyRequest.getId()); } }); }
1,114,149
protected Reader acquireReader(String url) throws IOException, Exception { if (!this.isAbsoluteUrl) { // for relative URLs, delegate to our peer return new StringReader(acquireString(url)); } else { // absolute URL try { // handle absolute URLs ourselves, using java.net.URL URL u = new URL(url); //URL u = new URL("http", "proxy.hi.is", 8080, target); URLConnection uc = u.openConnection(); InputStream i = uc.getInputStream(); // okay, we've got a stream; encode it appropriately Reader r = null; String charSet; // charSet extracted according to RFC 2045, section 5.1 String contentType = uc.getContentType(); if (contentType != null) { charSet = this.getContentTypeAttribute(contentType, "charset"); if (charSet == null) { charSet = DEFAULT_ENCODING; } } else { charSet = DEFAULT_ENCODING; } try { r = new InputStreamReader(i, charSet); } catch (Exception ex) { r = new InputStreamReader(i, DEFAULT_ENCODING); } // check response code for HTTP URLs before returning, per spec, // before returning if (uc instanceof HttpURLConnection) { int status = ((HttpURLConnection)uc).getResponseCode(); if (status < 200 || status > 299) { throw new Exception(status + " " + url); } } return r; } catch (IOException ex) { throw new Exception("Problem accessing the absolute URL \"" + url + "\". " + ex); } catch (RuntimeException ex) { // because the spec makes us throw new Exception("Problem accessing the absolute URL \"" + url + "\". " + ex); } } }
protected Reader acquireReader(String url) throws IOException, Exception { if (!this.isAbsoluteUrl) { // for relative URLs, delegate to our peer return new StringReader(acquireString(url)); } else { // absolute URL try { // handle absolute URLs ourselves, using java.net.URL URL u = new URL(url); //URL u = new URL("http", "proxy.hi.is", 8080, target); URLConnection uc = u.openConnection(); InputStream i = uc.getInputStream(); // okay, we've got a stream; encode it appropriately Reader r = null; String charSet; // charSet extracted according to RFC 2045, section 5.1 String contentType = uc.getContentType(); if (contentType != null) { charSet = ImportSupport.getContentTypeAttribute(contentType, "charset"); if (charSet == null) { charSet = DEFAULT_ENCODING; } } else { charSet = DEFAULT_ENCODING; } try { r = new InputStreamReader(i, charSet); } catch (Exception ex) { r = new InputStreamReader(i, DEFAULT_ENCODING); } // check response code for HTTP URLs before returning, per spec, // before returning if (uc instanceof HttpURLConnection) { int status = ((HttpURLConnection)uc).getResponseCode(); if (status < 200 || status > 299) { throw new Exception(status + " " + url); } } return r; } catch (IOException ex) { throw new Exception("Problem accessing the absolute URL \"" + url + "\". " + ex); } catch (RuntimeException ex) { // because the spec makes us throw new Exception("Problem accessing the absolute URL \"" + url + "\". " + ex); } } }
1,114,150
ArchiveTabAvatar(final TabPanelExtension extension) { super(extension, new ArchiveTabModel(extension)); model.setSession(getSession()); setPopupDelegate(model.getPopupDelegate()); }
ArchiveTabAvatar(final TabPanelExtension extension) { super(extension, new ArchiveTabModel(extension)); model.setSession(getSession()); setSortByDelegate(model); }
1,114,151
private void doToggleExpansion(final TabPanel tabPanel) { final ContactTabPanel contactTabPanel = (ContactTabPanel) tabPanel; final Boolean expanded; if (isExpanded(contactTabPanel)) { expanded = Boolean.FALSE; } else { // NOTE-BEGIN:multi-expand to allow multiple selection in the list; remove here for (final TabPanel visiblePanel : visiblePanels) { if (isExpanded(visiblePanel)) { doToggleExpansion(visiblePanel); } } // NOTE-END:multi-expand expanded = Boolean.TRUE; } contactTabPanel.setExpanded(expanded); expandedState.put(tabPanel, expanded); }
private void doToggleExpansion(final TabPanel tabPanel) { final ContactTabPanel contactTabPanel = (ContactTabPanel) tabPanel; final Boolean expanded; if (isExpanded(contactTabPanel)) { expanded = Boolean.FALSE; } else { // NOTE-BEGIN:multi-expand to allow multiple selection in the list; remove here for (final TabPanel visiblePanel : visiblePanels) { if (isExpanded(visiblePanel)) { doToggleExpansion(visiblePanel); } } // NOTE-END:multi-expand expanded = Boolean.TRUE; } expandedState.put(tabPanel, expanded); }
1,114,152
void handleArtifactPublished(final UUID uniqueId, final Long versionId, final String name, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final String artifactStreamId, final JabberId publishedBy, final Calendar publishedOn) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("name", name); logger.logVariable("artifactUniqueId", artifactUniqueId); logger.logVariable("artifactVersionId", artifactVersionId); logger.logVariable("artifactName", artifactName); logger.logVariable("artifactType", artifactType); logger.logVariable("artifactChecksum", artifactChecksum); logger.logVariable("artifactStreamId", artifactStreamId); logger.logVariable("publishedBy", publishedBy); logger.logVariable("publishedOn", publishedOn); try { assertIsNotLocalUserId(publishedBy); // determine the existance of the container and the version. final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Boolean doesExist = artifactModel.doesExist(uniqueId); final Boolean doesVersionExist; final Long containerId; final Container container; final ContainerVersion version; if (doesExist) { containerId = artifactModel.readId(uniqueId); container = read(containerId); doesVersionExist = artifactModel.doesVersionExist(containerId, versionId); if (doesVersionExist) { version = readVersion(container.getId(), versionId); } else { version = createVersion(container.getId(), versionId, publishedBy, publishedOn); } } else { doesVersionExist = Boolean.FALSE; // ensure the published by user exists locally getInternalUserModel().readLazyCreate(publishedBy); container = new Container(); container.setCreatedBy(publishedBy); container.setCreatedOn(publishedOn); container.setName(name); container.setState(ArtifactState.ACTIVE); container.setType(ArtifactType.CONTAINER); container.setUniqueId(uniqueId); container.setUpdatedBy(container.getCreatedBy()); container.setUpdatedOn(container.getCreatedOn()); // create containerIO.create(container); // create version version = createVersion(container.getId(), versionId, publishedBy, publishedOn); // create remote info artifactModel.createRemoteInfo(container.getId(), publishedBy, container.getCreatedOn()); // index getIndexModel().indexContainer(container.getId()); } // handle the artifact by specific type final ArtifactVersion artifactVersion; switch(artifactType) { case DOCUMENT: artifactVersion = handleDocumentPublished(artifactUniqueId, artifactVersionId, artifactName, artifactChecksum, artifactStreamId, publishedBy, publishedOn); break; case CONTAINER: default: throw Assert.createUnreachable("UNKNOWN ARTIFACT TYPE"); } containerIO.addVersion(version.getArtifactId(), version.getVersionId(), artifactVersion.getArtifactId(), artifactVersion.getVersionId(), artifactVersion.getArtifactType()); final Container postPublish = read(container.getId()); final ContainerVersion postPublishVersion = readVersion(version.getArtifactId(), version.getVersionId()); notifyContainerPublished(postPublish, null, postPublishVersion, remoteEventGenerator); } catch(final Throwable t) { throw translateError(t); } }
void handleArtifactPublished(final UUID uniqueId, final Long versionId, final String name, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final String artifactStreamId, final JabberId publishedBy, final Calendar publishedOn) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("name", name); logger.logVariable("artifactUniqueId", artifactUniqueId); logger.logVariable("artifactVersionId", artifactVersionId); logger.logVariable("artifactName", artifactName); logger.logVariable("artifactType", artifactType); logger.logVariable("artifactChecksum", artifactChecksum); logger.logVariable("artifactStreamId", artifactStreamId); logger.logVariable("publishedBy", publishedBy); logger.logVariable("publishedOn", publishedOn); try { assertIsNotLocalUserId(publishedBy); // determine the existance of the container and the version. final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Boolean doesExist = artifactModel.doesExist(uniqueId); final Long containerId; final Container container; final ContainerVersion version; if (doesExist) { containerId = artifactModel.readId(uniqueId); container = read(containerId); doesVersionExist = artifactModel.doesVersionExist(containerId, versionId); if (doesVersionExist) { version = readVersion(container.getId(), versionId); } else { version = createVersion(container.getId(), versionId, publishedBy, publishedOn); } } else { doesVersionExist = Boolean.FALSE; // ensure the published by user exists locally getInternalUserModel().readLazyCreate(publishedBy); container = new Container(); container.setCreatedBy(publishedBy); container.setCreatedOn(publishedOn); container.setName(name); container.setState(ArtifactState.ACTIVE); container.setType(ArtifactType.CONTAINER); container.setUniqueId(uniqueId); container.setUpdatedBy(container.getCreatedBy()); container.setUpdatedOn(container.getCreatedOn()); // create containerIO.create(container); // create version version = createVersion(container.getId(), versionId, publishedBy, publishedOn); // create remote info artifactModel.createRemoteInfo(container.getId(), publishedBy, container.getCreatedOn()); // index getIndexModel().indexContainer(container.getId()); } // handle the artifact by specific type final ArtifactVersion artifactVersion; switch(artifactType) { case DOCUMENT: artifactVersion = handleDocumentPublished(artifactUniqueId, artifactVersionId, artifactName, artifactChecksum, artifactStreamId, publishedBy, publishedOn); break; case CONTAINER: default: throw Assert.createUnreachable("UNKNOWN ARTIFACT TYPE"); } containerIO.addVersion(version.getArtifactId(), version.getVersionId(), artifactVersion.getArtifactId(), artifactVersion.getVersionId(), artifactVersion.getArtifactType()); final Container postPublish = read(container.getId()); final ContainerVersion postPublishVersion = readVersion(version.getArtifactId(), version.getVersionId()); notifyContainerPublished(postPublish, null, postPublishVersion, remoteEventGenerator); } catch(final Throwable t) { throw translateError(t); } }
1,114,153
void handleArtifactPublished(final UUID uniqueId, final Long versionId, final String name, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final String artifactStreamId, final JabberId publishedBy, final Calendar publishedOn) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("name", name); logger.logVariable("artifactUniqueId", artifactUniqueId); logger.logVariable("artifactVersionId", artifactVersionId); logger.logVariable("artifactName", artifactName); logger.logVariable("artifactType", artifactType); logger.logVariable("artifactChecksum", artifactChecksum); logger.logVariable("artifactStreamId", artifactStreamId); logger.logVariable("publishedBy", publishedBy); logger.logVariable("publishedOn", publishedOn); try { assertIsNotLocalUserId(publishedBy); // determine the existance of the container and the version. final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Boolean doesExist = artifactModel.doesExist(uniqueId); final Boolean doesVersionExist; final Long containerId; final Container container; final ContainerVersion version; if (doesExist) { containerId = artifactModel.readId(uniqueId); container = read(containerId); doesVersionExist = artifactModel.doesVersionExist(containerId, versionId); if (doesVersionExist) { version = readVersion(container.getId(), versionId); } else { version = createVersion(container.getId(), versionId, publishedBy, publishedOn); } } else { doesVersionExist = Boolean.FALSE; // ensure the published by user exists locally getInternalUserModel().readLazyCreate(publishedBy); container = new Container(); container.setCreatedBy(publishedBy); container.setCreatedOn(publishedOn); container.setName(name); container.setState(ArtifactState.ACTIVE); container.setType(ArtifactType.CONTAINER); container.setUniqueId(uniqueId); container.setUpdatedBy(container.getCreatedBy()); container.setUpdatedOn(container.getCreatedOn()); // create containerIO.create(container); // create version version = createVersion(container.getId(), versionId, publishedBy, publishedOn); // create remote info artifactModel.createRemoteInfo(container.getId(), publishedBy, container.getCreatedOn()); // index getIndexModel().indexContainer(container.getId()); } // handle the artifact by specific type final ArtifactVersion artifactVersion; switch(artifactType) { case DOCUMENT: artifactVersion = handleDocumentPublished(artifactUniqueId, artifactVersionId, artifactName, artifactChecksum, artifactStreamId, publishedBy, publishedOn); break; case CONTAINER: default: throw Assert.createUnreachable("UNKNOWN ARTIFACT TYPE"); } containerIO.addVersion(version.getArtifactId(), version.getVersionId(), artifactVersion.getArtifactId(), artifactVersion.getVersionId(), artifactVersion.getArtifactType()); final Container postPublish = read(container.getId()); final ContainerVersion postPublishVersion = readVersion(version.getArtifactId(), version.getVersionId()); notifyContainerPublished(postPublish, null, postPublishVersion, remoteEventGenerator); } catch(final Throwable t) { throw translateError(t); } }
void handleArtifactPublished(final UUID uniqueId, final Long versionId, final String name, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final String artifactStreamId, final JabberId publishedBy, final Calendar publishedOn) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("name", name); logger.logVariable("artifactUniqueId", artifactUniqueId); logger.logVariable("artifactVersionId", artifactVersionId); logger.logVariable("artifactName", artifactName); logger.logVariable("artifactType", artifactType); logger.logVariable("artifactChecksum", artifactChecksum); logger.logVariable("artifactStreamId", artifactStreamId); logger.logVariable("publishedBy", publishedBy); logger.logVariable("publishedOn", publishedOn); try { assertIsNotLocalUserId(publishedBy); // determine the existance of the container and the version. final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Boolean doesExist = artifactModel.doesExist(uniqueId); final Boolean doesVersionExist; final Long containerId; final Container container; final ContainerVersion version; if (doesExist) { containerId = artifactModel.readId(uniqueId); container = read(containerId); final Boolean doesVersionExist = artifactModel.doesVersionExist(containerId, versionId); if (doesVersionExist) { version = readVersion(container.getId(), versionId); } else { version = createVersion(container.getId(), versionId, publishedBy, publishedOn); } } else { doesVersionExist = Boolean.FALSE; // ensure the published by user exists locally getInternalUserModel().readLazyCreate(publishedBy); container = new Container(); container.setCreatedBy(publishedBy); container.setCreatedOn(publishedOn); container.setName(name); container.setState(ArtifactState.ACTIVE); container.setType(ArtifactType.CONTAINER); container.setUniqueId(uniqueId); container.setUpdatedBy(container.getCreatedBy()); container.setUpdatedOn(container.getCreatedOn()); // create containerIO.create(container); // create version version = createVersion(container.getId(), versionId, publishedBy, publishedOn); // create remote info artifactModel.createRemoteInfo(container.getId(), publishedBy, container.getCreatedOn()); // index getIndexModel().indexContainer(container.getId()); } // handle the artifact by specific type final ArtifactVersion artifactVersion; switch(artifactType) { case DOCUMENT: artifactVersion = handleDocumentPublished(artifactUniqueId, artifactVersionId, artifactName, artifactChecksum, artifactStreamId, publishedBy, publishedOn); break; case CONTAINER: default: throw Assert.createUnreachable("UNKNOWN ARTIFACT TYPE"); } containerIO.addVersion(version.getArtifactId(), version.getVersionId(), artifactVersion.getArtifactId(), artifactVersion.getVersionId(), artifactVersion.getArtifactType()); final Container postPublish = read(container.getId()); final ContainerVersion postPublishVersion = readVersion(version.getArtifactId(), version.getVersionId()); notifyContainerPublished(postPublish, null, postPublishVersion, remoteEventGenerator); } catch(final Throwable t) { throw translateError(t); } }
1,114,154
void handleArtifactPublished(final UUID uniqueId, final Long versionId, final String name, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final String artifactStreamId, final JabberId publishedBy, final Calendar publishedOn) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("name", name); logger.logVariable("artifactUniqueId", artifactUniqueId); logger.logVariable("artifactVersionId", artifactVersionId); logger.logVariable("artifactName", artifactName); logger.logVariable("artifactType", artifactType); logger.logVariable("artifactChecksum", artifactChecksum); logger.logVariable("artifactStreamId", artifactStreamId); logger.logVariable("publishedBy", publishedBy); logger.logVariable("publishedOn", publishedOn); try { assertIsNotLocalUserId(publishedBy); // determine the existance of the container and the version. final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Boolean doesExist = artifactModel.doesExist(uniqueId); final Boolean doesVersionExist; final Long containerId; final Container container; final ContainerVersion version; if (doesExist) { containerId = artifactModel.readId(uniqueId); container = read(containerId); doesVersionExist = artifactModel.doesVersionExist(containerId, versionId); if (doesVersionExist) { version = readVersion(container.getId(), versionId); } else { version = createVersion(container.getId(), versionId, publishedBy, publishedOn); } } else { doesVersionExist = Boolean.FALSE; // ensure the published by user exists locally getInternalUserModel().readLazyCreate(publishedBy); container = new Container(); container.setCreatedBy(publishedBy); container.setCreatedOn(publishedOn); container.setName(name); container.setState(ArtifactState.ACTIVE); container.setType(ArtifactType.CONTAINER); container.setUniqueId(uniqueId); container.setUpdatedBy(container.getCreatedBy()); container.setUpdatedOn(container.getCreatedOn()); // create containerIO.create(container); // create version version = createVersion(container.getId(), versionId, publishedBy, publishedOn); // create remote info artifactModel.createRemoteInfo(container.getId(), publishedBy, container.getCreatedOn()); // index getIndexModel().indexContainer(container.getId()); } // handle the artifact by specific type final ArtifactVersion artifactVersion; switch(artifactType) { case DOCUMENT: artifactVersion = handleDocumentPublished(artifactUniqueId, artifactVersionId, artifactName, artifactChecksum, artifactStreamId, publishedBy, publishedOn); break; case CONTAINER: default: throw Assert.createUnreachable("UNKNOWN ARTIFACT TYPE"); } containerIO.addVersion(version.getArtifactId(), version.getVersionId(), artifactVersion.getArtifactId(), artifactVersion.getVersionId(), artifactVersion.getArtifactType()); final Container postPublish = read(container.getId()); final ContainerVersion postPublishVersion = readVersion(version.getArtifactId(), version.getVersionId()); notifyContainerPublished(postPublish, null, postPublishVersion, remoteEventGenerator); } catch(final Throwable t) { throw translateError(t); } }
void handleArtifactPublished(final UUID uniqueId, final Long versionId, final String name, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final String artifactStreamId, final JabberId publishedBy, final Calendar publishedOn) { logger.logApiId(); logger.logVariable("uniqueId", uniqueId); logger.logVariable("versionId", versionId); logger.logVariable("name", name); logger.logVariable("artifactUniqueId", artifactUniqueId); logger.logVariable("artifactVersionId", artifactVersionId); logger.logVariable("artifactName", artifactName); logger.logVariable("artifactType", artifactType); logger.logVariable("artifactChecksum", artifactChecksum); logger.logVariable("artifactStreamId", artifactStreamId); logger.logVariable("publishedBy", publishedBy); logger.logVariable("publishedOn", publishedOn); try { assertIsNotLocalUserId(publishedBy); // determine the existance of the container and the version. final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Boolean doesExist = artifactModel.doesExist(uniqueId); final Boolean doesVersionExist; final Long containerId; final Container container; final ContainerVersion version; if (doesExist) { containerId = artifactModel.readId(uniqueId); container = read(containerId); doesVersionExist = artifactModel.doesVersionExist(containerId, versionId); if (doesVersionExist) { version = readVersion(container.getId(), versionId); } else { version = createVersion(container.getId(), versionId, publishedBy, publishedOn); } } else { // ensure the published by user exists locally getInternalUserModel().readLazyCreate(publishedBy); container = new Container(); container.setCreatedBy(publishedBy); container.setCreatedOn(publishedOn); container.setName(name); container.setState(ArtifactState.ACTIVE); container.setType(ArtifactType.CONTAINER); container.setUniqueId(uniqueId); container.setUpdatedBy(container.getCreatedBy()); container.setUpdatedOn(container.getCreatedOn()); // create containerIO.create(container); // create version version = createVersion(container.getId(), versionId, publishedBy, publishedOn); // create remote info artifactModel.createRemoteInfo(container.getId(), publishedBy, container.getCreatedOn()); // index getIndexModel().indexContainer(container.getId()); } // handle the artifact by specific type final ArtifactVersion artifactVersion; switch(artifactType) { case DOCUMENT: artifactVersion = handleDocumentPublished(artifactUniqueId, artifactVersionId, artifactName, artifactChecksum, artifactStreamId, publishedBy, publishedOn); break; case CONTAINER: default: throw Assert.createUnreachable("UNKNOWN ARTIFACT TYPE"); } containerIO.addVersion(version.getArtifactId(), version.getVersionId(), artifactVersion.getArtifactId(), artifactVersion.getVersionId(), artifactVersion.getArtifactType()); final Container postPublish = read(container.getId()); final ContainerVersion postPublishVersion = readVersion(version.getArtifactId(), version.getVersionId()); notifyContainerPublished(postPublish, null, postPublishVersion, remoteEventGenerator); } catch(final Throwable t) { throw translateError(t); } }
1,114,155
public DOMTestCase(DOMTestDocumentBuilderFactory factory) { super(factory); framework = null; }
public DOMTestCase(DOMTestDocumentBuilderFactory factory) { super(factory); framework = null; }
1,114,156
public Border getBorder() { if(isExpanded()) { return new Expanded(); } else { return new Default(); } }
public Border getBorder() { if(isExpanded()) { return new Expanded(); } else { return new Default(); } }
1,114,157
public ImageIcon getNodeIcon() { if(isExpanded()) { return imageCache.read(DocumentIcon.NODE_EXPANDED); } else { return imageCache.read(DocumentIcon.NODE_DEFAULT); } }
public ImageIcon getNodeIcon() { if(isExpanded()) { return imageCache.read(DocumentIcon.NODE_EXPANDED); } else { return imageCache.read(DocumentIcon.NODE_DEFAULT); } }
1,114,158
private void installDataListener() { final DefaultListModel listModel = model.getListModel(); listModel.addListDataListener(new ListDataListener() { public void contentsChanged(final ListDataEvent e) { debug(); // update from index 0 to index 1 for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { panelConstraints.gridy = i; tabJPanel.remove(i); final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); } public void intervalAdded(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Adding an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // refresh the element at index 0 and the elements after index 0 for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); } public void intervalRemoved(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Removing an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // remove index 0 tabJPanel.remove(e.getIndex0()); // refresh from index 0 forward for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); } }); }
private void installDataListener() { final DefaultListModel listModel = model.getListModel(); listModel.addListDataListener(new ListDataListener() { public void contentsChanged(final ListDataEvent e) { debug(); // update from index 0 to index 1 for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { panelConstraints.gridy = i; tabJPanel.remove(i); final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); } tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); }*/ debug(); } public void intervalAdded(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Adding an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // refresh the element at index 0 and the elements after index 0 for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); }*/ debug(); } public void intervalRemoved(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Removing an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // remove index 0 tabJPanel.remove(e.getIndex0()); // refresh from index 0 forward for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); }*/ debug(); } }); }
1,114,159
private void installDataListener() { final DefaultListModel listModel = model.getListModel(); listModel.addListDataListener(new ListDataListener() { public void contentsChanged(final ListDataEvent e) { debug(); // update from index 0 to index 1 for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { panelConstraints.gridy = i; tabJPanel.remove(i); final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); } public void intervalAdded(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Adding an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // refresh the element at index 0 and the elements after index 0 for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); } public void intervalRemoved(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Removing an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // remove index 0 tabJPanel.remove(e.getIndex0()); // refresh from index 0 forward for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); } }); }
private void installDataListener() { final DefaultListModel listModel = model.getListModel(); listModel.addListDataListener(new ListDataListener() { public void contentsChanged(final ListDataEvent e) { debug(); // update from index 0 to index 1 for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { panelConstraints.gridy = i; tabJPanel.remove(i); final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.validate(); for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } tabJPanel.repaint(); tabJScrollPane.validate(); for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } tabJScrollPane.repaint(); validate(); for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } repaint(); /* for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); } public void intervalAdded(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Adding an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // refresh the element at index 0 and the elements after index 0 for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.validate(); for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } tabJPanel.repaint(); tabJScrollPane.validate(); for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } tabJScrollPane.repaint(); validate(); for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); } public void intervalRemoved(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Removing an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // remove index 0 tabJPanel.remove(e.getIndex0()); // refresh from index 0 forward for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.validate(); for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } tabJPanel.repaint(); tabJScrollPane.validate(); for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } tabJScrollPane.repaint(); validate(); for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); } }); }
1,114,160
private void installDataListener() { final DefaultListModel listModel = model.getListModel(); listModel.addListDataListener(new ListDataListener() { public void contentsChanged(final ListDataEvent e) { debug(); // update from index 0 to index 1 for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { panelConstraints.gridy = i; tabJPanel.remove(i); final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); } public void intervalAdded(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Adding an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // refresh the element at index 0 and the elements after index 0 for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); } public void intervalRemoved(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Removing an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // remove index 0 tabJPanel.remove(e.getIndex0()); // refresh from index 0 forward for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); } }); }
private void installDataListener() { final DefaultListModel listModel = model.getListModel(); listModel.addListDataListener(new ListDataListener() { public void contentsChanged(final ListDataEvent e) { debug(); // update from index 0 to index 1 for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { panelConstraints.gridy = i; tabJPanel.remove(i); final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.validate(); for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } tabJPanel.repaint(); tabJScrollPane.validate(); for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } tabJScrollPane.repaint(); validate(); for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } repaint(); /* for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); } public void intervalAdded(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Adding an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // refresh the element at index 0 and the elements after index 0 for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.validate(); for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } tabJPanel.repaint(); tabJScrollPane.validate(); for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } tabJScrollPane.repaint(); validate(); for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); } public void intervalRemoved(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Removing an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // remove index 0 tabJPanel.remove(e.getIndex0()); // refresh from index 0 forward for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.validate(); for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } tabJPanel.repaint(); tabJScrollPane.validate(); for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } tabJScrollPane.repaint(); validate(); for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); } }); }
1,114,161
public void contentsChanged(final ListDataEvent e) { debug(); // update from index 0 to index 1 for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { panelConstraints.gridy = i; tabJPanel.remove(i); final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); }
public void contentsChanged(final ListDataEvent e) { debug(); // update from index 0 to index 1 for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { panelConstraints.gridy = i; tabJPanel.remove(i); final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); } tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); }*/ debug(); }
1,114,162
public void contentsChanged(final ListDataEvent e) { debug(); // update from index 0 to index 1 for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { panelConstraints.gridy = i; tabJPanel.remove(i); final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); }
public void contentsChanged(final ListDataEvent e) { debug(); // update from index 0 to index 1 for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { panelConstraints.gridy = i; tabJPanel.remove(i); final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.validate(); for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } tabJPanel.repaint(); tabJScrollPane.validate(); for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } tabJScrollPane.repaint(); validate(); for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } repaint(); /* for (int i = e.getIndex0(); i <= e.getIndex1(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); }
1,114,163
public void intervalAdded(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Adding an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // refresh the element at index 0 and the elements after index 0 for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); }
public void intervalAdded(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Adding an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // refresh the element at index 0 and the elements after index 0 for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); }*/ debug(); }
1,114,164
public void intervalAdded(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Adding an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // refresh the element at index 0 and the elements after index 0 for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); }
public void intervalAdded(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Adding an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // refresh the element at index 0 and the elements after index 0 for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.validate(); for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } tabJPanel.repaint(); tabJScrollPane.validate(); for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } tabJScrollPane.repaint(); validate(); for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); }
1,114,165
public void intervalRemoved(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Removing an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // remove index 0 tabJPanel.remove(e.getIndex0()); // refresh from index 0 forward for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); }
public void intervalRemoved(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Removing an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // remove index 0 tabJPanel.remove(e.getIndex0()); // refresh from index 0 forward for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); }*/ debug(); }
1,114,166
public void intervalRemoved(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Removing an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // remove index 0 tabJPanel.remove(e.getIndex0()); // refresh from index 0 forward for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.revalidate(); tabJPanel.repaint(); tabJScrollPane.revalidate(); tabJScrollPane.repaint(); revalidate(); repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); }
public void intervalRemoved(final ListDataEvent e) { debug(); tabJPanel.remove(fillJLabel); // Removing an interval can cause the border on the interval before it to change, // so adjust the start index to one before the interval added. int startIndex = e.getIndex0(); if (startIndex > 0) { startIndex--; } // remove index 0 tabJPanel.remove(e.getIndex0()); // refresh from index 0 forward for (int i = startIndex; i < listModel.size(); i++) { panelConstraints.gridy = i; final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.setPreferredSize(panel.getPreferredSize(i==(listModel.size()-1))); panel.prepareForRepaint(); panel.setBackground(panel.getBackgroundColor()); panel.setBorder(panel.getBorder(i==(listModel.size()-1))); tabJPanel.add(panel, panelConstraints.clone(), i); panel.afterRepaint(); } tabJPanel.add(fillJLabel, fillConstraints, listModel.size()); tabJPanel.validate(); for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } tabJPanel.repaint(); tabJScrollPane.validate(); for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } tabJScrollPane.repaint(); validate(); for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.prepareForRepaintAfterValidate(); } repaint(); /* for (int i = startIndex; i < listModel.size(); i++) { final DefaultTabPanel panel = (DefaultTabPanel) listModel.get(i); panel.afterRepaint(); }*/ debug(); }
1,114,167
void handleTeamMemberAdded(final UUID uniqueId, final JabberId jabberId) { logApiId(); logVariable("uniqueId", uniqueId); logVariable("jabberId", jabberId); try { final Long artifactId = readId(uniqueId); // if receiving your own team member added event you have just been // added to the team; so download the entire team. if (jabberId.equals(localUserId())) { final List<JabberId> remoteTeam = getInternalSessionModel().readArtifactTeam(uniqueId); for (final JabberId remoteUser : remoteTeam) { addTeamMember(artifactId, remoteUser); } } else { addTeamMember(artifactId, jabberId); } } catch(final Throwable t) { throw translateError(t); } }
void handleTeamMemberAdded(final UUID uniqueId, final JabberId jabberId) { logApiId(); logVariable("uniqueId", uniqueId); logVariable("jabberId", jabberId); try { final Long artifactId = readId(uniqueId); // if receiving your own team member added event you have just been // added to the team; so download the entire team. if (jabberId.equals(localUserId())) { final List<JabberId> remoteTeam = getInternalSessionModel().readArtifactTeam(uniqueId); for (final JabberId remoteUser : remoteTeam) { try { addTeamMember(artifactId, remoteUser); } catch (final TrueAssertion ta) { if ("TEAM MEMBER ALREADY ADDED".equals(ta.getMessage())) { logWarning(ta); } else { throw ta; } } } } else { addTeamMember(artifactId, jabberId); } } catch(final Throwable t) { throw translateError(t); } }
1,114,168
public DoubleTypeConverterImpl(ValueFactory factory) { super(factory); }
public DoubleTypeConverterImpl(ValueFactory factory) { super(factory); }
1,114,169
public void run() { LOGGER.logApiId(); LOGGER.logVariable("streamId", streamId); LOGGER.logVariable("streamId", streamOffset); LOGGER.logVariable("streamId", streamSize); try { final OutputStream output = streamServer.openOutputStream(streamSession, streamId, streamOffset); int len; long total = streamOffset.longValue(); final byte[] b = new byte[streamSession.getBufferSize()]; try { while((len = input.read(b)) > 0) { LOGGER.logDebug("Upstream recieved: {0}/{1}", total += len, streamSize); output.write(b, 0, len); output.flush(); } } finally { output.flush(); output.close(); } } catch (final IOException iox) { throw new StreamException(iox); } }
public void run() { LOGGER.logApiId(); LOGGER.logVariable("streamId", streamId); LOGGER.logVariable("streamId", streamOffset); LOGGER.logVariable("streamId", streamSize); try { final OutputStream output = streamServer.openOutputStream(streamSession, streamId, streamOffset); int len; long total = streamOffset.longValue(); final byte[] b = new byte[streamSession.getBufferSize()]; try { while((len = input.read(b)) > 0) { LOGGER.logDebug("Upstream recieved: {0}/{1}", total += len, streamSize); output.write(b, 0, len); output.flush(); } } finally { output.flush(); output.close(); } } catch (final IOException iox) { throw new StreamException(iox); } }
1,114,171
private JMenu getSendVersionMenu() { final Contact[] team = avatar.getTeam(historyItem.getDocumentId()); final JMenu jMenu = MenuFactory.create(getString("SendVersion")); for(final Contact teamMember : team) { jMenu.add(createJMenuItem( "SendVersion.TeamMember", new Object[] {teamMember.getFirstName(), teamMember.getLastName(), teamMember.getOrganization()}, new ActionListener() { public void actionPerformed(final ActionEvent e) { avatar.getController().runSendArtifactVersion(getDocumentId(), teamMember, getVersionId()); } })); } return jMenu; }
private JMenu getSendVersionMenu() { final Contact[] team = avatar.getTeam(historyItem.getDocumentId()); final JMenu jMenu = MenuFactory.create(getString("SendVersion")); for(final Contact teamMember : team) { jMenu.add(createJMenuItem( "SendVersion.TeamMember", new Object[] {teamMember.getFirstName(), teamMember.getLastName(), teamMember.getOrganization()}, new ActionListener() { public void actionPerformed(final ActionEvent e) { avatar.getController().runSendArtifactVersion(getDocumentId(), teamMember, getVersionId()); } })); } return jMenu; }
1,114,173
public void populatePopupMenu(final MouseEvent e, final JPopupMenu jPopupMenu) { if(isVersionAttached()) { jPopupMenu.add(getOpenVersionMenuItem()); jPopupMenu.add(getSendVersionMenu()); } }
public void populatePopupMenu(final MouseEvent e, final JPopupMenu jPopupMenu) { if(isVersionAttached()) { jPopupMenu.add(getOpenVersionMenuItem()); if(!isClosed()) { final Contact[] team = avatar.getTeam(historyItem.getDocumentId()); if(0 < team.length) { jPopupMenu.add(getSendVersionMenu(team)); } } } }
1,114,174
public Project get(final UUID id) throws FileNotFoundException, IOException { logger.info("get(UUID)"); logger.debug(id); final Index index = readIndex(getIndexXmlFile()); return readProject(index.lookupXmlFile(id)); }
public Project get(final UUID id) throws FileNotFoundException, IOException { logger.info("get(UUID)"); logger.debug(id); final Index index = readIndex(getIndexXmlFile()); final File xmlFile = index.lookupXmlFile(id); if(null == xmlFile) { return null; } else { return readProject(xmlFile); } }
1,114,175
private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel contactsJLabel; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JSeparator jSeparator_1; javax.swing.JLabel teamJLabel; javax.swing.JScrollPane teamJScrollPane; javax.swing.JLabel versionJLabel; documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); includeKeyJCheckBox = CheckBoxFactory.create(getString("IncludeKeyCheckBox")); jSeparator_1 = SeparatorFactory.create(); sendToJPanel = new javax.swing.JPanel(); teamJLabel = LabelFactory.create(getString("TeamLabel")); contactsJLabel = LabelFactory.create(getString("ContactsLabel")); teamJScrollPane = ScrollPaneFactory.create(); teamJList = ListFactory.create(); contactsJScrollPane = ScrollPaneFactory.create(); contactsJList = ListFactory.create(); sendJButton = ButtonFactory.create(getString("SendButton")); cancelJButton = ButtonFactory.create(getString("CancelButton")); vSpacerJLabel = LabelFactory.create(); setOpaque(false); versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); includeKeyJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); includeKeyJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); includeKeyJCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { includeKeyJCheckBoxStateChanged(e); } }); teamJList.setCellRenderer(new UserListCellRenderer()); teamJList.setModel(teamModel); teamJList.setSelectionModel(teamSelectionModel); teamJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } }); teamJScrollPane.setViewportView(teamJList); contactsJList.setCellRenderer(new UserListCellRenderer()); contactsJList.setModel(contactsModel); contactsJList.setSelectionModel(contactsSelectionModel); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); org.jdesktop.layout.GroupLayout sendToJPanelLayout = new org.jdesktop.layout.GroupLayout(sendToJPanel); sendToJPanel.setLayout(sendToJPanelLayout); sendToJPanelLayout.setHorizontalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJLabel) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(contactsJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))) ); sendToJPanelLayout.setVerticalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(teamJLabel) .add(contactsJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addContainerGap()) ); sendJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } }); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(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(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(documentJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(cancelJButton) .add(sendJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents
private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel contactsJLabel; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JSeparator jSeparator_1; javax.swing.JLabel teamJLabel; javax.swing.JScrollPane teamJScrollPane; javax.swing.JLabel versionJLabel; documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); includeKeyJCheckBox = CheckBoxFactory.create(getString("IncludeKeyCheckBox")); jSeparator_1 = SeparatorFactory.create(); sendToJPanel = new javax.swing.JPanel(); teamJLabel = LabelFactory.create(getString("TeamLabel")); contactsJLabel = LabelFactory.create(getString("ContactsLabel")); teamJScrollPane = ScrollPaneFactory.create(); teamJList = ListFactory.create(); contactsJScrollPane = ScrollPaneFactory.create(); contactsJList = ListFactory.create(); sendJButton = ButtonFactory.create(getString("SendButton")); cancelJButton = ButtonFactory.create(getString("CancelButton")); vSpacerJLabel = LabelFactory.create(); versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); includeKeyJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); includeKeyJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); includeKeyJCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { includeKeyJCheckBoxStateChanged(e); } }); teamJList.setCellRenderer(new UserListCellRenderer()); teamJList.setModel(teamModel); teamJList.setSelectionModel(teamSelectionModel); teamJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } }); teamJScrollPane.setViewportView(teamJList); contactsJList.setCellRenderer(new UserListCellRenderer()); contactsJList.setModel(contactsModel); contactsJList.setSelectionModel(contactsSelectionModel); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); org.jdesktop.layout.GroupLayout sendToJPanelLayout = new org.jdesktop.layout.GroupLayout(sendToJPanel); sendToJPanel.setLayout(sendToJPanelLayout); sendToJPanelLayout.setHorizontalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJLabel) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(contactsJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))) ); sendToJPanelLayout.setVerticalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(teamJLabel) .add(contactsJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addContainerGap()) ); sendJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } }); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(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(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(documentJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(cancelJButton) .add(sendJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents
1,114,176
protected void error(HttpServletRequest request, HttpServletResponse response, Exception cause) throws ServletException { try { StringBuffer html = new StringBuffer(); html.append("<html>"); html.append("<title>Error</title>"); html.append("<body bgcolor=\"#ffffff\">"); html.append("<h2>VelocityViewServlet : Error processing the template</h2>"); html.append("<pre>"); String why = cause.getMessage(); if (why != null && why.trim().length() > 0) { html.append(why); html.append("<br>"); } StringWriter sw = new StringWriter(); cause.printStackTrace(new PrintWriter(sw)); html.append(sw.toString()); html.append("</pre>"); html.append("</body>"); html.append("</html>"); response.getOutputStream().print(html.toString()); } catch (Exception e) { // clearly something is quite wrong. // let's log the new exception then give up and // throw a servlet exception that wraps the first one Velocity.error("Exception while printing error screen: "+e); throw new ServletException(cause); } }
protected void error(HttpServletRequest request, HttpServletResponse response, Exception cause) throws ServletException { try { StringBuffer html = new StringBuffer(); html.append("<html>"); html.append("<title>Error</title>"); html.append("<body bgcolor=\"#ffffff\">"); html.append("<h2>VelocityViewServlet : Error processing the template</h2>"); html.append("<pre>"); String why = cause.getMessage(); if (why != null && why.trim().length() > 0) { html.append(why); html.append("<br>"); } StringWriter sw = new StringWriter(); cause.printStackTrace(new PrintWriter(sw)); html.append(sw.toString()); html.append("</pre>"); html.append("</body>"); html.append("</html>"); response.getWriter().print(html.toString()); } catch (Exception e) { // clearly something is quite wrong. // let's log the new exception then give up and // throw a servlet exception that wraps the first one Velocity.error("Exception while printing error screen: "+e); throw new ServletException(cause); } }
1,114,179
protected void mergeTemplate(Template template, Context context, HttpServletResponse response) throws ResourceNotFoundException, ParseErrorException, MethodInvocationException, IOException, UnsupportedEncodingException, Exception { ServletOutputStream output = response.getOutputStream(); VelocityWriter vw = null; try { vw = (VelocityWriter)writerPool.get(); if (vw == null) { vw = new VelocityWriter(new OutputStreamWriter(output, encoding), 4*1024, true); } else { vw.recycle(new OutputStreamWriter(output, encoding)); } template.merge(context, vw); } finally { try { if (vw != null) { // flush and put back into the pool // don't close to allow us to play // nicely with others. vw.flush(); /* This hack sets the VelocityWriter's internal ref to the * OutputStreamWriter to null to keep memory free while * the writer is pooled. See bug report #18951 */ vw.recycle(null); writerPool.put(vw); } } catch (Exception e) { // do nothing } } }
protected void mergeTemplate(Template template, Context context, HttpServletResponse response) throws ResourceNotFoundException, ParseErrorException, MethodInvocationException, IOException, UnsupportedEncodingException, Exception { PrintWriter pw = response.getWriter(); VelocityWriter vw = null; try { vw = (VelocityWriter)writerPool.get(); if (vw == null) { vw = new VelocityWriter(new OutputStreamWriter(output, encoding), 4*1024, true); } else { vw.recycle(new OutputStreamWriter(output, encoding)); } template.merge(context, vw); } finally { try { if (vw != null) { // flush and put back into the pool // don't close to allow us to play // nicely with others. vw.flush(); /* This hack sets the VelocityWriter's internal ref to the * OutputStreamWriter to null to keep memory free while * the writer is pooled. See bug report #18951 */ vw.recycle(null); writerPool.put(vw); } } catch (Exception e) { // do nothing } } }
1,114,180
protected void mergeTemplate(Template template, Context context, HttpServletResponse response) throws ResourceNotFoundException, ParseErrorException, MethodInvocationException, IOException, UnsupportedEncodingException, Exception { ServletOutputStream output = response.getOutputStream(); VelocityWriter vw = null; try { vw = (VelocityWriter)writerPool.get(); if (vw == null) { vw = new VelocityWriter(new OutputStreamWriter(output, encoding), 4*1024, true); } else { vw.recycle(new OutputStreamWriter(output, encoding)); } template.merge(context, vw); } finally { try { if (vw != null) { // flush and put back into the pool // don't close to allow us to play // nicely with others. vw.flush(); /* This hack sets the VelocityWriter's internal ref to the * OutputStreamWriter to null to keep memory free while * the writer is pooled. See bug report #18951 */ vw.recycle(null); writerPool.put(vw); } } catch (Exception e) { // do nothing } } }
protected void mergeTemplate(Template template, Context context, HttpServletResponse response) throws ResourceNotFoundException, ParseErrorException, MethodInvocationException, IOException, UnsupportedEncodingException, Exception { ServletOutputStream output = response.getOutputStream(); VelocityWriter vw = null; try { vw = (VelocityWriter)writerPool.get(); if (vw == null) { vw = new VelocityWriter(pw, 4*1024, true); } else { vw.recycle(new OutputStreamWriter(output, encoding)); } template.merge(context, vw); } finally { try { if (vw != null) { // flush and put back into the pool // don't close to allow us to play // nicely with others. vw.flush(); /* This hack sets the VelocityWriter's internal ref to the * OutputStreamWriter to null to keep memory free while * the writer is pooled. See bug report #18951 */ vw.recycle(null); writerPool.put(vw); } } catch (Exception e) { // do nothing } } }
1,114,181
protected void mergeTemplate(Template template, Context context, HttpServletResponse response) throws ResourceNotFoundException, ParseErrorException, MethodInvocationException, IOException, UnsupportedEncodingException, Exception { ServletOutputStream output = response.getOutputStream(); VelocityWriter vw = null; try { vw = (VelocityWriter)writerPool.get(); if (vw == null) { vw = new VelocityWriter(new OutputStreamWriter(output, encoding), 4*1024, true); } else { vw.recycle(new OutputStreamWriter(output, encoding)); } template.merge(context, vw); } finally { try { if (vw != null) { // flush and put back into the pool // don't close to allow us to play // nicely with others. vw.flush(); /* This hack sets the VelocityWriter's internal ref to the * OutputStreamWriter to null to keep memory free while * the writer is pooled. See bug report #18951 */ vw.recycle(null); writerPool.put(vw); } } catch (Exception e) { // do nothing } } }
protected void mergeTemplate(Template template, Context context, HttpServletResponse response) throws ResourceNotFoundException, ParseErrorException, MethodInvocationException, IOException, UnsupportedEncodingException, Exception { ServletOutputStream output = response.getOutputStream(); VelocityWriter vw = null; try { vw = (VelocityWriter)writerPool.get(); if (vw == null) { vw = new VelocityWriter(new OutputStreamWriter(output, encoding), 4*1024, true); } else { vw.recycle(pw); } template.merge(context, vw); } finally { try { if (vw != null) { // flush and put back into the pool // don't close to allow us to play // nicely with others. vw.flush(); /* This hack sets the VelocityWriter's internal ref to the * OutputStreamWriter to null to keep memory free while * the writer is pooled. See bug report #18951 */ vw.recycle(null); writerPool.put(vw); } } catch (Exception e) { // do nothing } } }
1,114,182
protected void mergeTemplate(Template template, Context context, HttpServletResponse response) throws ResourceNotFoundException, ParseErrorException, MethodInvocationException, IOException, UnsupportedEncodingException, Exception { ServletOutputStream output = response.getOutputStream(); VelocityWriter vw = null; try { vw = (VelocityWriter)writerPool.get(); if (vw == null) { vw = new VelocityWriter(new OutputStreamWriter(output, encoding), 4*1024, true); } else { vw.recycle(new OutputStreamWriter(output, encoding)); } template.merge(context, vw); } finally { try { if (vw != null) { // flush and put back into the pool // don't close to allow us to play // nicely with others. vw.flush(); /* This hack sets the VelocityWriter's internal ref to the * OutputStreamWriter to null to keep memory free while * the writer is pooled. See bug report #18951 */ vw.recycle(null); writerPool.put(vw); } } catch (Exception e) { // do nothing } } }
protected void mergeTemplate(Template template, Context context, HttpServletResponse response) throws ResourceNotFoundException, ParseErrorException, MethodInvocationException, IOException, UnsupportedEncodingException, Exception { ServletOutputStream output = response.getOutputStream(); VelocityWriter vw = null; try { vw = (VelocityWriter)writerPool.get(); if (vw == null) { vw = new VelocityWriter(new OutputStreamWriter(output, encoding), 4*1024, true); } else { vw.recycle(new OutputStreamWriter(output, encoding)); } template.merge(context, vw); } finally { try { if (vw != null) { // flush and put back into the pool // don't close to allow us to play // nicely with others. vw.flush(); /* This hack sets the VelocityWriter's internal ref to the * PrintWriter to null to keep memory free while * the writer is pooled. See bug report #18951 */ vw.recycle(null); writerPool.put(vw); } } catch (Exception e) { // do nothing } } }
1,114,183
public Project(final Project parent, final String name, final Calendar createdOn, final String createdBy, final String keyHolder, final String description, final File directory, final UUID id) { super(parent, name, description, createdOn, createdBy, keyHolder, id); this.directory = directory; // sub-projects documents and contacts are set in the project // via the addXXX\setXXX apis. this.projects = new Vector<Project>(0); this.documents = new Vector<Document>(0); }
public Project(final Project parent, final String name, final Calendar createdOn, final String createdBy, final String keyHolder, final String description, final File directory, final UUID id) { super(parent, name, description, createdOn, createdBy, id); this.directory = directory; // sub-projects documents and contacts are set in the project // via the addXXX\setXXX apis. this.projects = new Vector<Project>(0); this.documents = new Vector<Document>(0); }
1,114,184
private JLabel getCloseButton() { javax.swing.JLabel closeJLabel = new JLabel(ImageIOUtil.readIcon("BrowserTitle_Close.png")); closeJLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { closeJLabelMouseClicked(evt); } public void mouseEntered(java.awt.event.MouseEvent evt) { closeJLabelMouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { closeJLabelMouseExited(evt); } }); return closeJLabel; }
private JLabel getCloseButton() { javax.swing.JLabel closeJLabel = new JLabel(CLOSE_ICON); closeJLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { closeJLabelMouseClicked(evt); } public void mouseEntered(java.awt.event.MouseEvent evt) { closeJLabelMouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { closeJLabelMouseExited(evt); } }); return closeJLabel; }
1,114,185
private JLabel getMaximizeButton() { javax.swing.JLabel maximizeJLabel = new JLabel(ImageIOUtil.readIcon("BrowserTitle_Maximize.png")); maximizeJLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { maximizeJLabelMouseClicked(evt); } public void mouseEntered(java.awt.event.MouseEvent evt) { maximizeJLabelMouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { maximizeJLabelMouseExited(evt); } }); return maximizeJLabel; }
private JLabel getMaximizeButton() { javax.swing.JLabel maximizeJLabel = new JLabel(ImageIOUtil.readIcon("BrowserTitle_Maximize.png")); maximizeJLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { maximizeJLabelMouseClicked(evt); } public void mouseEntered(java.awt.event.MouseEvent evt) { maximizeJLabelMouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { maximizeJLabelMouseExited(evt); } }); return maximizeJLabel; }
1,114,186
public void mouseClicked(java.awt.event.MouseEvent evt) { closeJLabelMouseClicked(evt); }
public void mouseClicked(java.awt.event.MouseEvent evt) { maximizeJLabelMouseClicked(evt); }
1,114,187
public void mouseEntered(java.awt.event.MouseEvent evt) { closeJLabelMouseEntered(evt); }
public void mouseEntered(java.awt.event.MouseEvent evt) { maximizeJLabelMouseEntered(evt); }
1,114,188
public void mouseExited(java.awt.event.MouseEvent evt) { closeJLabelMouseExited(evt); }
public void mouseExited(java.awt.event.MouseEvent evt) { maximizeJLabelMouseExited(evt); }
1,114,189
private JLabel getMinimizeButton() { javax.swing.JLabel minimizeJLabel = new JLabel(ImageIOUtil.readIcon("BrowserTitle_Minimize.png")); minimizeJLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { minimizeJLabelMouseClicked(evt); } public void mouseEntered(java.awt.event.MouseEvent evt) { minimizeJLabelMouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { minimizeJLabelMouseExited(evt); } }); return minimizeJLabel; }
private JLabel getMinimizeButton() { javax.swing.JLabel minimizeJLabel = new JLabel(MINIMIZE_ICON); minimizeJLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { minimizeJLabelMouseClicked(evt); } public void mouseEntered(java.awt.event.MouseEvent evt) { minimizeJLabelMouseEntered(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { minimizeJLabelMouseExited(evt); } }); return minimizeJLabel; }
1,114,190
public void mouseClicked(java.awt.event.MouseEvent evt) { maximizeJLabelMouseClicked(evt); }
public void mouseClicked(java.awt.event.MouseEvent evt) { minimizeJLabelMouseClicked(evt); }
1,114,191
public void mouseEntered(java.awt.event.MouseEvent evt) { maximizeJLabelMouseEntered(evt); }
public void mouseEntered(java.awt.event.MouseEvent evt) { minimizeJLabelMouseEntered(evt); }
1,114,192
public void mouseExited(java.awt.event.MouseEvent evt) { maximizeJLabelMouseExited(evt); }
public void mouseExited(java.awt.event.MouseEvent evt) { minimizeJLabelMouseExited(evt); }
1,114,193
public void mouseClicked(java.awt.event.MouseEvent evt) { minimizeJLabelMouseClicked(evt); }
public void mouseClicked(java.awt.event.MouseEvent evt) { minimizeJLabelMouseClicked(evt); }
1,114,194
public void mouseEntered(java.awt.event.MouseEvent evt) { minimizeJLabelMouseEntered(evt); }
public void mouseEntered(java.awt.event.MouseEvent evt) { minimizeJLabelMouseEntered(evt); }
1,114,195
public void mouseExited(java.awt.event.MouseEvent evt) { minimizeJLabelMouseExited(evt); }
public void mouseExited(java.awt.event.MouseEvent evt) { minimizeJLabelMouseExited(evt); }
1,114,196
private void maximizeJLabelMouseEntered(java.awt.event.MouseEvent evt) { ((JLabel) evt.getSource()).setIcon(MAX_ROLLOVER_ICON); }
private void maximizeJLabelMouseEntered(java.awt.event.MouseEvent evt) { if (browser.isBrowserWindowMaximized()) { ((JLabel) evt.getSource()).setIcon(UNMAXIMIZE_ROLLOVER_ICON); } else { ((JLabel) evt.getSource()).setIcon(MAXIMIZE_ROLLOVER_ICON); } }
1,114,197
private void maximizeJLabelMouseExited(java.awt.event.MouseEvent evt) { ((JLabel) evt.getSource()).setIcon(MAX_ICON); }
private void maximizeJLabelMouseExited(java.awt.event.MouseEvent evt) { if (browser.isBrowserWindowMaximized()) { ((JLabel) evt.getSource()).setIcon(UNMAXIMIZE_ICON); } else { ((JLabel) evt.getSource()).setIcon(MAXIMIZE_ICON); } }
1,114,198
private void minimizeJLabelMouseEntered(java.awt.event.MouseEvent evt) { ((JLabel) evt.getSource()).setIcon(MIN_ROLLOVER_ICON); }
private void minimizeJLabelMouseEntered(java.awt.event.MouseEvent evt) { ((JLabel) evt.getSource()).setIcon(MINIMIZE_ROLLOVER_ICON); }
1,114,199
private void minimizeJLabelMouseExited(java.awt.event.MouseEvent evt) { ((JLabel) evt.getSource()).setIcon(MIN_ICON); }
private void minimizeJLabelMouseExited(java.awt.event.MouseEvent evt) { ((JLabel) evt.getSource()).setIcon(MINIMIZE_ICON); }
1,114,200
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); // TIME This is a local timestamp. logVariable("preSendPacket", DateUtil.getInstance()); xmppConnection.sendPacket(this); // TIME This is a local timestamp. logVariable("postSendPacket", DateUtil.getInstance()); // this sleep has been inserted because when packets are sent within // x milliseconds of each other, they tend to get swallowed by the // smack library try { Thread.sleep(75); } catch(final InterruptedException ix) {} // the timeout is used because the timeout is not expected to be long; // and it helps debug non-implemented responses logVariable("preResponseCollected", DateUtil.getInstance()); try { final XMPPMethodResponse response =// (XMPPMethodResponse) idCollector.nextResult(7 * 1000); (XMPPMethodResponse) idCollector.nextResult(); return response; } catch (final Throwable t) { final String errorId = new ErrorHelper().getErrorId(t); logger.logError(t, errorId); logger.logError("name:{0}", name); logger.logError("xmppConnection:{0}", xmppConnection); throw new XMPPException(errorId); } finally { // re-set the parameters post execution logVariable("postResponseCollected", DateUtil.getInstance()); parameters.clear(); } }
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); // TIME This is a local timestamp. logger.logVariable("preSendPacket", DateUtil.getInstance()); xmppConnection.sendPacket(this); // TIME This is a local timestamp. logVariable("postSendPacket", DateUtil.getInstance()); // this sleep has been inserted because when packets are sent within // x milliseconds of each other, they tend to get swallowed by the // smack library try { Thread.sleep(75); } catch(final InterruptedException ix) {} // the timeout is used because the timeout is not expected to be long; // and it helps debug non-implemented responses logVariable("preResponseCollected", DateUtil.getInstance()); try { final XMPPMethodResponse response =// (XMPPMethodResponse) idCollector.nextResult(7 * 1000); (XMPPMethodResponse) idCollector.nextResult(); return response; } catch (final Throwable t) { final String errorId = new ErrorHelper().getErrorId(t); logger.logError(t, errorId); logger.logError("name:{0}", name); logger.logError("xmppConnection:{0}", xmppConnection); throw new XMPPException(errorId); } finally { // re-set the parameters post execution logVariable("postResponseCollected", DateUtil.getInstance()); parameters.clear(); } }
1,114,201
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); // TIME This is a local timestamp. logVariable("preSendPacket", DateUtil.getInstance()); xmppConnection.sendPacket(this); // TIME This is a local timestamp. logVariable("postSendPacket", DateUtil.getInstance()); // this sleep has been inserted because when packets are sent within // x milliseconds of each other, they tend to get swallowed by the // smack library try { Thread.sleep(75); } catch(final InterruptedException ix) {} // the timeout is used because the timeout is not expected to be long; // and it helps debug non-implemented responses logVariable("preResponseCollected", DateUtil.getInstance()); try { final XMPPMethodResponse response =// (XMPPMethodResponse) idCollector.nextResult(7 * 1000); (XMPPMethodResponse) idCollector.nextResult(); return response; } catch (final Throwable t) { final String errorId = new ErrorHelper().getErrorId(t); logger.logError(t, errorId); logger.logError("name:{0}", name); logger.logError("xmppConnection:{0}", xmppConnection); throw new XMPPException(errorId); } finally { // re-set the parameters post execution logVariable("postResponseCollected", DateUtil.getInstance()); parameters.clear(); } }
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); // TIME This is a local timestamp. logVariable("preSendPacket", DateUtil.getInstance()); xmppConnection.sendPacket(this); // TIME This is a local timestamp. logger.logVariable("postSendPacket", DateUtil.getInstance()); // this sleep has been inserted because when packets are sent within // x milliseconds of each other, they tend to get swallowed by the // smack library try { Thread.sleep(75); } catch(final InterruptedException ix) {} // the timeout is used because the timeout is not expected to be long; // and it helps debug non-implemented responses logVariable("preResponseCollected", DateUtil.getInstance()); try { final XMPPMethodResponse response =// (XMPPMethodResponse) idCollector.nextResult(7 * 1000); (XMPPMethodResponse) idCollector.nextResult(); return response; } catch (final Throwable t) { final String errorId = new ErrorHelper().getErrorId(t); logger.logError(t, errorId); logger.logError("name:{0}", name); logger.logError("xmppConnection:{0}", xmppConnection); throw new XMPPException(errorId); } finally { // re-set the parameters post execution logVariable("postResponseCollected", DateUtil.getInstance()); parameters.clear(); } }
1,114,202
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); // TIME This is a local timestamp. logVariable("preSendPacket", DateUtil.getInstance()); xmppConnection.sendPacket(this); // TIME This is a local timestamp. logVariable("postSendPacket", DateUtil.getInstance()); // this sleep has been inserted because when packets are sent within // x milliseconds of each other, they tend to get swallowed by the // smack library try { Thread.sleep(75); } catch(final InterruptedException ix) {} // the timeout is used because the timeout is not expected to be long; // and it helps debug non-implemented responses logVariable("preResponseCollected", DateUtil.getInstance()); try { final XMPPMethodResponse response =// (XMPPMethodResponse) idCollector.nextResult(7 * 1000); (XMPPMethodResponse) idCollector.nextResult(); return response; } catch (final Throwable t) { final String errorId = new ErrorHelper().getErrorId(t); logger.logError(t, errorId); logger.logError("name:{0}", name); logger.logError("xmppConnection:{0}", xmppConnection); throw new XMPPException(errorId); } finally { // re-set the parameters post execution logVariable("postResponseCollected", DateUtil.getInstance()); parameters.clear(); } }
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); // TIME This is a local timestamp. logVariable("preSendPacket", DateUtil.getInstance()); xmppConnection.sendPacket(this); // TIME This is a local timestamp. logVariable("postSendPacket", DateUtil.getInstance()); // this sleep has been inserted because when packets are sent within // x milliseconds of each other, they tend to get swallowed by the // smack library try { Thread.sleep(75); } catch(final InterruptedException ix) {} // the timeout is used because the timeout is not expected to be long; // and it helps debug non-implemented responses logger.logVariable("preResponseCollected", DateUtil.getInstance()); try { final XMPPMethodResponse response =// (XMPPMethodResponse) idCollector.nextResult(7 * 1000); (XMPPMethodResponse) idCollector.nextResult(); return response; } catch (final Throwable t) { final String errorId = new ErrorHelper().getErrorId(t); logger.logError(t, errorId); logger.logError("name:{0}", name); logger.logError("xmppConnection:{0}", xmppConnection); throw new XMPPException(errorId); } finally { // re-set the parameters post execution logVariable("postResponseCollected", DateUtil.getInstance()); parameters.clear(); } }
1,114,203
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); // TIME This is a local timestamp. logVariable("preSendPacket", DateUtil.getInstance()); xmppConnection.sendPacket(this); // TIME This is a local timestamp. logVariable("postSendPacket", DateUtil.getInstance()); // this sleep has been inserted because when packets are sent within // x milliseconds of each other, they tend to get swallowed by the // smack library try { Thread.sleep(75); } catch(final InterruptedException ix) {} // the timeout is used because the timeout is not expected to be long; // and it helps debug non-implemented responses logVariable("preResponseCollected", DateUtil.getInstance()); try { final XMPPMethodResponse response =// (XMPPMethodResponse) idCollector.nextResult(7 * 1000); (XMPPMethodResponse) idCollector.nextResult(); return response; } catch (final Throwable t) { final String errorId = new ErrorHelper().getErrorId(t); logger.logError(t, errorId); logger.logError("name:{0}", name); logger.logError("xmppConnection:{0}", xmppConnection); throw new XMPPException(errorId); } finally { // re-set the parameters post execution logVariable("postResponseCollected", DateUtil.getInstance()); parameters.clear(); } }
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); // TIME This is a local timestamp. logVariable("preSendPacket", DateUtil.getInstance()); xmppConnection.sendPacket(this); // TIME This is a local timestamp. logVariable("postSendPacket", DateUtil.getInstance()); // this sleep has been inserted because when packets are sent within // x milliseconds of each other, they tend to get swallowed by the // smack library try { Thread.sleep(75); } catch(final InterruptedException ix) {} // the timeout is used because the timeout is not expected to be long; // and it helps debug non-implemented responses logVariable("preResponseCollected", DateUtil.getInstance()); try { final XMPPMethodResponse response =// (XMPPMethodResponse) idCollector.nextResult(7 * 1000); (XMPPMethodResponse) idCollector.nextResult(); return response; } catch (final Throwable t) { final String errorId = new ErrorHelper().getErrorId(t); logger.logError(t, errorId); logger.logError("name:{0}", name); logger.logError("xmppConnection:{0}", xmppConnection); throw new XMPPException(errorId); } finally { // re-set the parameters post execution logger.logVariable("postResponseCollected", DateUtil.getInstance()); parameters.clear(); } }
1,114,204
public String getChildElementXML() { final StringBuffer childElementXML = new StringBuffer() .append("<query xmlns=\"jabber:iq:parity:") .append(name) .append("\">") .append(getParametersXML()) .append("</query>"); logVariable("childElementXML.length():", childElementXML.length()); return childElementXML.toString(); }
public String getChildElementXML() { final StringBuffer childElementXML = new StringBuffer() .append("<query xmlns=\"jabber:iq:parity:") .append(name) .append("\">") .append(getParametersXML()) .append("</query>"); logger.logVariable("childElementXML.length()", childElementXML.length()); logger.logVariable("childElementXML", childElementXML); return childElementXML.toString(); }
1,114,205
public String getPublicationDate() { return getProperty(keyPublicationDate); }
public String getPublicationDate() { return getProperty(keyPublicationDate); }
1,114,207
public String getTitle() { return getProperty(keyTitle); }
public String getTitle() { return (String) getProperty(keyTitle); }
1,114,208
public AmberMessage() { storage = new Properties(); }
public AmberMessage() { storage = new Hashtable<String, Object>(); }
1,114,209
public void setProperty(String key, String value) { storage.setProperty(key, value); }
public void setProperty(String key, String value) { storage.setProperty(key, value); }
1,114,210
public void fromYAML(String in) { storage = (Properties) YAML.load(in); }
public void fromYAML(String in) { storage = (Hashtable<String, Object>) YAML.load(in); }
1,114,211
public String getProperty(String key) { return storage.getProperty(key); }
public String getProperty(String key) { return storage.getProperty(key); }
1,114,212
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(".") .append(version.getVersion()) .append(IXmlIOConstants.FILE_EXTENSION_DOCUMENT_VERSION) .toString()); }
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(".") .append(version.getVersion()) .append(IXmlIOConstants.FILE_EXTENSION_DOCUMENT_VERSION) .toString()); }
1,114,213
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()); } }
private void writeIndexXml(final Document document) throws FileNotFoundException, IOException { synchronized(indexLock) { final IndexXmlIO indexXmlIO = new IndexXmlIO(workspace); final Index index = indexXmlIO.get(); index.addXmlFileLookup(document.getId(), getXmlFile(document)); write(index, getIndexXmlFile()); } }
1,114,214
private void formMouseEntered(final java.awt.event.MouseEvent evt, final Component component) { if ((!resizeDragging) && (!moveDragging) && (resizeEdges!=ResizeEdges.NO_EDGE)) { initResize(evt, component); } }
private void formMouseEntered(final java.awt.event.MouseEvent evt, final Component component) { if (enabled &&(!resizeDragging) && (!moveDragging) && (resizeEdges!=ResizeEdges.NO_EDGE)) { initResize(evt, component); } }
1,114,215
private void formMouseMoved(final java.awt.event.MouseEvent evt, final Component component) { if ((!resizeDragging) && (!moveDragging) && (resizeEdges!=ResizeEdges.NO_EDGE)) { initResize(evt, component); } }
private void formMouseMoved(final java.awt.event.MouseEvent evt, final Component component) { if (enabled && (!resizeDragging) && (!moveDragging) && (resizeEdges!=ResizeEdges.NO_EDGE)) { initResize(evt, component); } }
1,114,216