rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
session.processOfflineQueue(userId);
session.processQueue(userId);
private void processOfflineQueue() { assertIsReachable(environment); XMPPSession session = null; try { session = new XMPPSessionImpl(); session.login(environment, credentials); final JabberId userId = JabberIdBuilder.build( credentials.getUser...
public void login(final LoginMonitor monitor, final Credentials credentials) { synchronized(getImplLock()) { getImpl().login(monitor, credentials); } }
public void login(final LoginMonitor monitor) { synchronized(getImplLock()) { getImpl().login(monitor); } }
public void login(final LoginMonitor monitor, final Credentials credentials) { synchronized(getImplLock()) { getImpl().login(monitor, credentials); } }
public Group(Group group) { this(group.getFieldTag(), group.getDelimeter(), group.getFieldOrder()); setFields(group); setGroups(group);
public Group(int field, int delim) { this(field, delim, null);
public Group(Group group) { this(group.getFieldTag(), group.getDelimeter(), group.getFieldOrder()); setFields(group); setGroups(group); }
final Comparator<User> comparator) {
final Comparator<? super User> comparator) {
public static void sortTeamMembers(final List<TeamMember> list, final Comparator<User> comparator) { Collections.sort(list, comparator); }
displayDocumentHistoryListAvatar();
displayDocumentHistoryAvatar();
public void openMainWindow() { Assert.assertIsNull("Cannot reopen main window.", mainWindow); // Schedule a job for the event-dispatching thread: creating and // showing this application's GUI. javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { mainWindow = Br...
displayDocumentHistoryListAvatar();
displayDocumentHistoryAvatar();
public void run() { mainWindow = BrowserWindow.open(); displayTitleAvatar(); displayLogoAvatar(); displayMainBrowserAvatar(); displayDocumentHistoryListAvatar(); }
AvatarFactory.create(AvatarId.DOCUMENT_HISTORY_LIST).reload();
AvatarFactory.create(AvatarId.DOCUMENT_HISTORY).reload();
public void reloadMainBrowserAvatar() { // NOTE Wierd AvatarFactory.create(AvatarId.BROWSER_MAIN).reload(); // NOTE Super wierd AvatarFactory.create(AvatarId.DOCUMENT_HISTORY_LIST).reload(); }
setInput(AvatarId.DOCUMENT_HISTORY_LIST, documentId);
setInput(AvatarId.DOCUMENT_HISTORY, documentId);
public void selectDocument(final Long documentId) { setInput(AvatarId.DOCUMENT_HISTORY_LIST, documentId); setInput(AvatarId.SESSION_SEND_FORM, documentId); setInput(AvatarId.SESSION_SEND_KEY_FORM, documentId); }
final Connection connection = getInputConnection(); if (null != connection) { final String connectionText; switch(getInputConnection()) { case ONLINE: connectionJLabel.setForeground(Colors.Browser.MainStatus.CONNECTION_FOREGROUND_ONLINE); if (null != profile) { connectionText = profile.getName(); } else { connectionTex...
final String connectionText; switch(getInputConnection()) { case ONLINE: connectionJLabel.setForeground(Colors.Browser.MainStatus.CONNECTION_FOREGROUND_ONLINE); connectionText = profile.getName(); break; case OFFLINE: connectionJLabel.setForeground(Colors.Browser.MainStatus.CONNECTION_FOREGROUND_OFFLINE); connectionTex...
private void reloadConnection() { connectionJLabel.setText(""); final Connection connection = getInputConnection(); if (null != connection) { final String connectionText; switch(getInputConnection()) { case ONLINE: connectionJLabel.setForeground(C...
connectionJLabel.setText(connectionText);
private void reloadConnection() { connectionJLabel.setText(""); final Connection connection = getInputConnection(); if (null != connection) { final String connectionText; switch(getInputConnection()) { case ONLINE: connectionJLabel.setForeground(C...
if (isRoundCorners()) {
if (nativeSkin.isRounded()) {
protected void paintComponent(final Graphics g) { super.paintComponent(g); if (isRoundCorners()) { final Graphics g2 = g.create(); try { // These images help to make the rounded corners look good. g2.drawImage(Images.BrowserTitle.DIALOG_TO...
public void setUtcTimeOnly(int field, Date value, boolean includeMillseconds) { String s = FieldValueConverter.UtcTimeOnlyConverter.convert(value, includeMillseconds); setField(new StringField(field, s));
public void setUtcTimeOnly(int field, Date value) { setUtcTimeOnly(field, value, false);
public void setUtcTimeOnly(int field, Date value, boolean includeMillseconds) { String s = FieldValueConverter.UtcTimeOnlyConverter.convert(value, includeMillseconds); setField(new StringField(field, s)); }
logVariable("team", team);
void handleDraftCreated(final Long containerId, final JabberId createdBy, final Calendar createdOn) { logApiId(); logVariable("containerId", containerId); logVariable("createdBy", createdBy); logVariable("createdOn", createdOn); final ContainerDraft draft = new Containe...
logVariable("user", user);
logger.logVariable("user", user);
public void service() { logApiId(); final User user = read(readJabberId("userId")); logVariable("user", user); if (null != user) { writeJabberId("id", user.getId()); writeString("name", user.getName()); if (user.isSetOrganization()) writeSt...
static void notifyArtifactClosed(final UUID artifactUniqueId) { try { DocumentModel.getInternalModel(sContext).close(artifactUniqueId); }
static void notifyArtifactClosed(final UUID artifactUniqueId, final JabberId artifactClosedBy) { try { final InternalDocumentModel iDModel = DocumentModel.getInternalModel(sContext); iDModel.close(artifactUniqueId, artifactClosedBy); }
static void notifyArtifactClosed(final UUID artifactUniqueId) { try { DocumentModel.getInternalModel(sContext).close(artifactUniqueId); } catch(final ParityException px) { sLogger.fatal("Could not close artifact.", px); return; } }
sLogger.error("Could not create system message for key request.", px);
sLogger.error("Could not process key request: " + artifactUniqueId, px);
static void notifyKeyRequested(final UUID artifactUniqueId, final JabberId requestedBy) { try { final Document document = DocumentModel.getInternalModel(sContext).get(artifactUniqueId); SystemMessageModel.getInternalModel(sContext).createKeyRequest(document.getId(), requestedBy); } catch(final ParityException...
final User loggedInUser = xmppHelper.getUser(); final User keyHolder = getArtifactKeyHolder(artifactId); auditor.requestKey(artifactId, loggedInUser.getId(), currentDateTime(), loggedInUser.getId(), keyHolder.getId());
void sendKeyRequest(final Long artifactId) throws ParityException { logger.info("sendKeyRequest(Long)"); logger.debug(artifactId); synchronized(SessionModelImpl.xmppHelperLock) { assertIsLoggedIn("Cannot request key while offline.", xmppHelper); try { final UUID artifactUniqueId = getArtifactUniqueId(artifac...
public void documentReactivated(final JabberId reactivatedBy, final List<JabberId> team, final UUID uniqueId, final Long versionId, final String name, final byte[] content) { handleDocumentReactivated(reactivatedBy, team, uniqueId, versionId, name, content); }
SessionModelXMPPHelper() { super(); this.xmppSession = XMPPSessionFactory.createSession(); this.xmppArtifactListener = new XMPPArtifactListener() { public void confirmReceipt(final UUID uniqueId, final Long versionId, final JabberId receivedFrom) { handleConfirmationReceipt(uniqu...
public User(final JabberId id) { super(); this.id = id; }
public User() { super(); }
public User(final JabberId id) { super(); this.id = id; }
session.prepareStatement(SQL_CREATE_PUBLISHED_TO); session.setLong(1, containerId); session.setLong(2, versionId);
public void createPublishedTo(final Long containerId, final Long versionId, final List<User> publishedTo) { final Session session = openSession(); try { session.prepareStatement(SQL_CREATE_PUBLISHED_TO); session.setLong(1, containerId); session.setLong(2, ve...
session.setLong(3, publishedToUser.getLocalId()); if (1 != session.executeUpdate()) throw new HypersonicException("Could not create published to entry.");
createPublishedTo(session, containerId, versionId, publishedToUser);
public void createPublishedTo(final Long containerId, final Long versionId, final List<User> publishedTo) { final Session session = openSession(); try { session.prepareStatement(SQL_CREATE_PUBLISHED_TO); session.setLong(1, containerId); session.setLong(2, ve...
assertOpen("prepareStatement(String)"); logger.logVariable("sql", sql);
assertConnectionIsOpen(); logStatement(sql);
public PreparedStatement prepareStatement(final String sql) { assertOpen("prepareStatement(String)"); logger.logVariable("sql", sql); try { preparedStatement = connection.prepareStatement(sql); return preparedStatement; } catch(final SQLException sqlx) { throw new HypersonicException(sqlx); } }
catch(final SQLException sqlx) { throw new HypersonicException(sqlx); }
public PreparedStatement prepareStatement(final String sql) { assertOpen("prepareStatement(String)"); logger.logVariable("sql", sql); try { preparedStatement = connection.prepareStatement(sql); return preparedStatement; } catch(final SQLException sqlx) { throw new HypersonicException(sqlx); } }
assertOpen("setLong(Integer,Long)"); assertPreparedStatement("setLong(Integer,Long)"); logIndexAndValue(index, value); try { preparedStatement.setLong(index, value); } catch(final SQLException sqlx) { throw new HypersonicException(sqlx); }
assertConnectionIsOpen(); assertPreparedStatementIsSet(); logColumnInjection(index, value); try { preparedStatement.setLong(index, value); } catch (final SQLException sqlx) { throw new HypersonicException(sqlx); }
public void setLong(final Integer index, final Long value) { assertOpen("setLong(Integer,Long)"); assertPreparedStatement("setLong(Integer,Long)"); logIndexAndValue(index, value); try { preparedStatement.setLong(index, value); } catch(final SQLException sqlx) { throw new HypersonicException(sqlx); } }
assertOpen("Cannot execute query if the session is not open."); assertPreparedStatement("Cannot execute query if the statement is not prepared."); try { resultSet = preparedStatement.executeQuery(); } catch(final SQLException sqlx) { throw new HypersonicException(sqlx); } }
assertConnectionIsOpen(); assertPreparedStatementIsSet(); try { resultSet = preparedStatement.executeQuery(); } catch (final SQLException sqlx) { throw panic(sqlx); } }
public void executeQuery() { assertOpen("Cannot execute query if the session is not open."); assertPreparedStatement("Cannot execute query if the statement is not prepared."); try { resultSet = preparedStatement.executeQuery(); } catch(final SQLException sqlx) { throw new HypersonicException(sqlx); } }
assertOpen("nextResult()"); assertOpenResult("nextResult()"); try { return resultSet.next(); } catch(final SQLException sqlx) { throw new HypersonicException(sqlx); }
assertConnectionIsOpen(); assertResultSetIsSet(); try { return resultSet.next(); } catch (final SQLException sqlx) { throw new HypersonicException(sqlx); }
public boolean nextResult() { assertOpen("nextResult()"); assertOpenResult("nextResult()"); try { return resultSet.next(); } catch(final SQLException sqlx) { throw new HypersonicException(sqlx); } }
assertOpen("getStateFromString(String)"); assertOpenResult("getStateFromString(String)"); logger.logVariable("columnName", columnName);
assertConnectionIsOpen(); assertResultSetIsSet();
public ContainerDraft.ArtifactState getContainerStateFromString( final String columnName) { assertOpen("getStateFromString(String)"); assertOpenResult("getStateFromString(String)"); logger.logVariable("columnName", columnName); try { final String value = resultSet.g...
logColumnExtraction(columnName, value);
public ContainerDraft.ArtifactState getContainerStateFromString( final String columnName) { assertOpen("getStateFromString(String)"); assertOpenResult("getStateFromString(String)"); logger.logVariable("columnName", columnName); try { final String value = resultSet.g...
assertOpen("Cannot close a closed session."); try { close(preparedStatement, resultSet); connection.close(); } catch(final SQLException sqlx) { throw new HypersonicException(sqlx); } sessionManager.close(this); }
assertConnectionIsOpen(); try { close(preparedStatement, resultSet); } finally { try { connection.close(); } catch (final SQLException sqlx) { throw panic(sqlx); } finally { sessionManager.close(this); } } }
public void close() { assertOpen("Cannot close a closed session."); try { close(preparedStatement, resultSet); connection.close(); } catch(final SQLException sqlx) { throw new HypersonicException(sqlx); } sessionManager.close(this); }
assertOpen("executeUpdate()"); assertPreparedStatement("executeUpdate()"); try { return preparedStatement.executeUpdate(); } catch(final SQLException sqlx) { throw new HypersonicException(sqlx); } }
assertConnectionIsOpen(); assertPreparedStatementIsSet(); try { return preparedStatement.executeUpdate(); } catch (final SQLException sqlx) { throw panic(sqlx); } }
public int executeUpdate() { assertOpen("executeUpdate()"); assertPreparedStatement("executeUpdate()"); try { return preparedStatement.executeUpdate(); } catch(final SQLException sqlx) { throw new HypersonicException(sqlx); } }
assertOpen("commit()"); try { connection.commit(); } catch(final SQLException sqlx) { throw new HypersonicException(sqlx); } }
assertConnectionIsOpen(); try { connection.commit(); } catch (final SQLException sqlx) { throw panic(sqlx); } }
public void commit() { assertOpen("commit()"); try { connection.commit(); } catch(final SQLException sqlx) { throw new HypersonicException(sqlx); } }
assertOpen("rollbackSession()");
assertConnectionIsOpen();
public void rollback() { assertOpen("rollbackSession()"); try { connection.commit(); } catch(final SQLException sqlx) { throw new HypersonicException(sqlx); } }
ResultSet resultSet = null; try { resultSet = list("CALL IDENTITY()"); resultSet.next(); return resultSet.getLong(1); } catch (final SQLException sqlx) { throw new HypersonicException(sqlx); } finally { close(resultSet); } }
assertConnectionIsOpen(); final String sql = "CALL IDENTITY()"; logStatement(sql); ResultSet resultSet = null; Statement statement = null; try { statement = connection.createStatement(); resultSet = statement.executeQuery(sql); if (resultSet.next()) { return resultSet.getLong(1); } else { return null; } } catch (final ...
public Long getIdentity() { ResultSet resultSet = null; try { resultSet = list("CALL IDENTITY()"); resultSet.next(); return resultSet.getLong(1); } catch (final SQLException sqlx) { throw new HypersonicException(sqlx); } finally { close(resultSet); } }
assertOpen("setEnumAsString(Integer,Enum<?>)"); assertPreparedStatement("setEnumAsString(Integer,Enum<?>)"); logIndexAndValue(index, value); try { preparedStatement.setString(index, value.toString()); } catch(final SQLException sqlx) { throw new HypersonicException(sqlx); }
assertConnectionIsOpen(); assertPreparedStatementIsSet(); logColumnInjection(index, value); try { preparedStatement.setString(index, value.toString()); } catch (final SQLException sqlx) { throw new HypersonicException(sqlx); }
public void setEnumTypeAsString(final Integer index, final Enum<?> value) { assertOpen("setEnumAsString(Integer,Enum<?>)"); assertPreparedStatement("setEnumAsString(Integer,Enum<?>)"); logIndexAndValue(index, value); try { preparedStatement.setString(index, value.toString()); } catch...
session.setLong(6, readLocalId(version.getCreatedBy())); session.setCalendar(7, version.getCreatedOn()); session.setLong(8, readLocalId(version.getUpdatedBy())); session.setCalendar(9, version.getUpdatedOn());
session.setString(6, version.getComment()); session.setLong(7, readLocalId(version.getCreatedBy())); session.setCalendar(8, version.getCreatedOn()); session.setLong(9, readLocalId(version.getUpdatedBy())); session.setCalendar(10, version.getUpdatedOn());
void createVersion(final Session session, final ArtifactVersion version) { session.prepareStatement(INSERT_ARTIFACT_VERSION); session.setLong(1, version.getArtifactId()); session.setLong(2, version.getVersionId()); session.setString(3, version.getName()); session.setTypeAsString(4, version.getArtifactType()); se...
assertOpen("getLong(String)"); assertOpenResult("getLong(String)"); logger.logVariable("columnName", columnName);
assertConnectionIsOpen(); assertResultSetIsSet();
public Long getLong(final String columnName) { assertOpen("getLong(String)"); assertOpenResult("getLong(String)"); logger.logVariable("columnName", columnName); try { final Long value = resultSet.getLong(columnName); return resultSet.wasNull() ? null : value; } catch (final SQLExcep...
logColumnExtraction(columnName, value);
public Long getLong(final String columnName) { assertOpen("getLong(String)"); assertOpenResult("getLong(String)"); logger.logVariable("columnName", columnName); try { final Long value = resultSet.getLong(columnName); return resultSet.wasNull() ? null : value; } catch (final SQLExcep...
assertOpen("getString(String)"); assertOpenResult("getString(String)"); logger.logVariable("columnName", columnName);
assertConnectionIsOpen(); assertResultSetIsSet();
public String getString(final String columnName) { assertOpen("getString(String)"); assertOpenResult("getString(String)"); logger.logVariable("columnName", columnName); try { final String value = resultSet.getString(columnName); return resultSet.wasNull() ? null : value; } catch (final SQLEx...
logColumnExtraction(columnName, value);
public String getString(final String columnName) { assertOpen("getString(String)"); assertOpenResult("getString(String)"); logger.logVariable("columnName", columnName); try { final String value = resultSet.getString(columnName); return resultSet.wasNull() ? null : value; } catch (final SQLEx...
assertOpen("Cannot get values if the session is not open."); assertOpenResult("Cannot get values if the result is not open."); logger.logVariable("columnName", columnName);
assertConnectionIsOpen(); assertResultSetIsSet();
public JabberId getQualifiedUsername(final String columnName) { assertOpen("Cannot get values if the session is not open."); assertOpenResult("Cannot get values if the result is not open."); logger.logVariable("columnName", columnName); try { final String value = resultSet.getString(columnName); if (resultSet....
logColumnExtraction(columnName, value);
public JabberId getQualifiedUsername(final String columnName) { assertOpen("Cannot get values if the session is not open."); assertOpenResult("Cannot get values if the result is not open."); logger.logVariable("columnName", columnName); try { final String value = resultSet.getString(columnName); if (resultSet....
assertOpen("getCalendar(String)"); assertOpenResult("getCalendar(String)");
assertConnectionIsOpen(); assertResultSetIsSet();
public Calendar getCalendar(final String columnName) { assertOpen("getCalendar(String)"); assertOpenResult("getCalendar(String)"); try { final Calendar calendar = DateUtil.getInstance(); final Timestamp timestamp = resultSet.getTimestamp(columnName, calendar); if (resultSet.wasNull()) { return null; } el...
final Calendar calendar = DateUtil.getInstance(); final Timestamp timestamp = resultSet.getTimestamp(columnName, calendar); if (resultSet.wasNull()) { return null; }
final Calendar value = DateUtil.getInstance(); final Timestamp timestamp = resultSet.getTimestamp(columnName, value); if (resultSet.wasNull()) { logColumnExtraction(columnName, null); return null; }
public Calendar getCalendar(final String columnName) { assertOpen("getCalendar(String)"); assertOpenResult("getCalendar(String)"); try { final Calendar calendar = DateUtil.getInstance(); final Timestamp timestamp = resultSet.getTimestamp(columnName, calendar); if (resultSet.wasNull()) { return null; } el...
calendar.setTime(timestamp); return calendar;
value.setTime(timestamp); logColumnExtraction(columnName, value); return value;
public Calendar getCalendar(final String columnName) { assertOpen("getCalendar(String)"); assertOpenResult("getCalendar(String)"); try { final Calendar calendar = DateUtil.getInstance(); final Timestamp timestamp = resultSet.getTimestamp(columnName, calendar); if (resultSet.wasNull()) { return null; } el...
assertOpen("getStateFromInteger(String)"); assertOpenResult("getStateFromInteger(String)"); logger.logVariable("columnName", columnName);
assertConnectionIsOpen(); assertResultSetIsSet();
public ArtifactState getStateFromInteger(final String columnName) { assertOpen("getStateFromInteger(String)"); assertOpenResult("getStateFromInteger(String)"); logger.logVariable("columnName", columnName); try { final Integer value = resultSet.getInt(columnName); return resultSet.wasNull() ? ...
logColumnExtraction(columnName, value);
public ArtifactState getStateFromInteger(final String columnName) { assertOpen("getStateFromInteger(String)"); assertOpenResult("getStateFromInteger(String)"); logger.logVariable("columnName", columnName); try { final Integer value = resultSet.getInt(columnName); return resultSet.wasNull() ? ...
assertOpen("getTypeFromInteger(String)"); assertOpenResult("getTypeFromInteger(String)"); logger.logVariable("columnName", columnName);
assertConnectionIsOpen(); assertResultSetIsSet();
public ArtifactType getTypeFromInteger(final String columnName) { assertOpen("getTypeFromInteger(String)"); assertOpenResult("getTypeFromInteger(String)"); logger.logVariable("columnName", columnName); try { final Integer value = resultSet.getInt(columnName); return resultSet.wasNull() ? null...
logColumnExtraction(columnName, value);
public ArtifactType getTypeFromInteger(final String columnName) { assertOpen("getTypeFromInteger(String)"); assertOpenResult("getTypeFromInteger(String)"); logger.logVariable("columnName", columnName); try { final Integer value = resultSet.getInt(columnName); return resultSet.wasNull() ? null...
assertOpen("getString(String)"); assertOpenResult("getString(String)"); final String value = getString(columnName); return null == value ? null : UUID.fromString(value); }
assertConnectionIsOpen(); assertResultSetIsSet(); try { final String value = resultSet.getString(columnName); logColumnExtraction(columnName, value); return resultSet.wasNull() ? null : UUID.fromString(value); } catch (final SQLException sqlx) { throw panic(sqlx); } }
public UUID getUniqueId(final String columnName) { assertOpen("getString(String)"); assertOpenResult("getString(String)"); final String value = getString(columnName); return null == value ? null : UUID.fromString(value); }
assertOpen("[LMODEL] [IO] [HSQL] [GET INTEGER]"); assertOpenResult("[LMODEL] [IO] [HSQL] [GET INTEGER]"); logger.logVariable("columnName", columnName);
assertConnectionIsOpen(); assertResultSetIsSet();
public Integer getInteger(final String columnName) { assertOpen("[LMODEL] [IO] [HSQL] [GET INTEGER]"); assertOpenResult("[LMODEL] [IO] [HSQL] [GET INTEGER]"); logger.logVariable("columnName", columnName); try { final Integer value = resultSet.getInt(columnName); ret...
logColumnExtraction(columnName, value);
public Integer getInteger(final String columnName) { assertOpen("[LMODEL] [IO] [HSQL] [GET INTEGER]"); assertOpenResult("[LMODEL] [IO] [HSQL] [GET INTEGER]"); logger.logVariable("columnName", columnName); try { final Integer value = resultSet.getInt(columnName); ret...
assertOpen("setString(Integer,String)"); assertPreparedStatement("setString(Integer,String)"); logIndexAndValue(index, value); try { preparedStatement.setString(index, value); } catch(final SQLException sqlx) { throw new HypersonicException(sqlx); }
assertConnectionIsOpen(); assertPreparedStatementIsSet(); logColumnInjection(index, value); try { if (null == value) { preparedStatement.setNull(index, Types.VARCHAR); } else { preparedStatement.setString(index, value); } } catch (final SQLException sqlx) { throw new HypersonicException(sqlx); }
public void setString(final Integer index, final String value) { assertOpen("setString(Integer,String)"); assertPreparedStatement("setString(Integer,String)"); logIndexAndValue(index, value); try { preparedStatement.setString(index, value); } catch(final SQLException sqlx) { throw new HypersonicException...
assertOpen("setCalendar(Integer,Calendar)"); assertPreparedStatement("setCalendar(Integer,Calendar)"); logIndexAndValue(index, value);
assertConnectionIsOpen(); assertPreparedStatementIsSet(); logColumnInjection(index, value);
public void setCalendar(final Integer index, final Calendar value) { assertOpen("setCalendar(Integer,Calendar)"); assertPreparedStatement("setCalendar(Integer,Calendar)"); logIndexAndValue(index, value); try { preparedStatement.setTimestamp(index, new Timestamp(value.getTimeInMillis()), value); } ...
catch(final SQLException sqlx) { throw new HypersonicException(sqlx); }
public void setCalendar(final Integer index, final Calendar value) { assertOpen("setCalendar(Integer,Calendar)"); assertPreparedStatement("setCalendar(Integer,Calendar)"); logIndexAndValue(index, value); try { preparedStatement.setTimestamp(index, new Timestamp(value.getTimeInMillis()), value); } ...
System.setProperty("swing.aatext", "true"); try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) {}
System.out.println("Starting...");
public static void notmain(String[] args) throws Exception { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) {} if(DEBUG) verbose = true; parseArgs(args); printlnVerbose("P...
byte[] tmp = new byte[0x40000]; byte[] otmp = new byte[0x40000];
byte[] inBuffer = new byte[0x40000]; byte[] outBuffer = new byte[0x40000];
public static void notmain(String[] args) throws Exception { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) {} if(DEBUG) verbose = true; parseArgs(args); printlnVerbose("P...
long previousPercentage = -1;
public static void notmain(String[] args) throws Exception { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) {} if(DEBUG) verbose = true; parseArgs(args); printlnVerbose("P...
blocks.add(new DMGBlock(blockType, skipped, outOffset, outSize, inOffset, inSize));
DMGBlock currentBlock = new DMGBlock(blockType, skipped, outOffset, outSize, inOffset, inSize); blocks.add(currentBlock);
public static void notmain(String[] args) throws Exception { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) {} if(DEBUG) verbose = true; parseArgs(args); printlnVerbose("P...
dmgRaf.seek(inOffset); if(tmp.length < inSize) tmp = new byte[(int)inSize]; long totalBytesRead = 0; while(totalBytesRead < inSize) { totalBytesRead += dmgRaf.read(tmp, (int)totalBytesRead, Math.min((int)(inSize-totalBytesRead), tmp.length)); } long progressPercentage = dmgRaf.getFilePointer()*100/dmgRaf.length(); if...
if(true) {
public static void notmain(String[] args) throws Exception { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) {} if(DEBUG) verbose = true; parseArgs(args); printlnVerbose("P...
int counter = 0; while(bytesInflated < outSize && counter++ < 10) { int old = bytesInflated; bytesInflated += inflater.inflate(otmp, bytesInflated, (int)(outSize-bytesInflated)); if(old == bytesInflated) println("Nothing new! finished()=" + inflater.finished() + " needsInput()=" + inflater.needsInput() + " needsDiction...
DMGBlockHandlers.processZlibBlock(currentBlock, dmgRaf, isoRaf, testOnly, dummyMonitor); } catch(DataFormatException dfe) {
public static void notmain(String[] args) throws Exception { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) {} if(DEBUG) verbose = true; parseArgs(args); printlnVerbose("P...
inflater.end(); if(!testOnly) isoRaf.write(otmp, 0, (int)outSize);
public static void notmain(String[] args) throws Exception { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) {} if(DEBUG) verbose = true; parseArgs(args); printlnVerbose("P...
int bytesRead = dmgRaf.read(tmp, 0, Math.min((int)inSize, tmp.length));
int bytesRead = dmgRaf.read(inBuffer, 0, Math.min((int)inSize, inBuffer.length));
public static void notmain(String[] args) throws Exception { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) {} if(DEBUG) verbose = true; parseArgs(args); printlnVerbose("P...
long progressPercentage = dmgRaf.getFilePointer()*100/dmgRaf.length(); if(progressPercentage != previousPercentage) { reportProgress(progressPercentage); previousPercentage = progressPercentage; }
reportFilePointerProgress(dmgRaf);
public static void notmain(String[] args) throws Exception { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) {} if(DEBUG) verbose = true; parseArgs(args); printlnVerbose("P...
isoRaf.write(tmp, 0, bytesRead);
isoRaf.write(inBuffer, 0, bytesRead);
public static void notmain(String[] args) throws Exception { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) {} if(DEBUG) verbose = true; parseArgs(args); printlnVerbose("P...
bytesRead = dmgRaf.read(tmp, 0, Math.min((int)(inSize-totalBytesRead), tmp.length));
bytesRead = dmgRaf.read(inBuffer, 0, Math.min((int)(inSize-totalBytesRead), inBuffer.length));
public static void notmain(String[] args) throws Exception { System.setProperty("swing.aatext", "true"); //Antialiased text try { javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) {} if(DEBUG) verbose = true; parseArgs(args); printlnVerbose("P...
public static void reportProgress(long progressPercentage) { if(!graphical) { printCurrentLine("--->Progress: " + progressPercentage + "%"); } else { if(progmon == null) { progmon = new ProgressMonitor(null, "Extracting dmg to iso...", "0%", 0, 100); progmon.setProgress(0); progmon.setMillisToPopup(0);
public static void reportProgress(int progressPercentage) { if(progressPercentage != previousPercentage) { previousPercentage = progressPercentage; if(!graphical) { printCurrentLine("--->Progress: " + progressPercentage + "%");
public static void reportProgress(long progressPercentage) { if(!graphical) { printCurrentLine("--->Progress: " + progressPercentage + "%"); } else { if(progmon == null) { progmon = new ProgressMonitor(null, "Extracting dmg to iso...", "0%", 0, 100); progmon.setProgress(0); progmon.setMillisToPopup(0); ...
progmon.setProgress((int)progressPercentage); progmon.setNote(progressPercentage + "%");
else { if(progmon == null) { progmon = new ProgressMonitor(null, "Extracting dmg to iso...", "0%", 0, 100); progmon.setProgress(0); progmon.setMillisToPopup(0); } progmon.setProgress((int)progressPercentage); progmon.setNote(progressPercentage + "%"); }
public static void reportProgress(long progressPercentage) { if(!graphical) { printCurrentLine("--->Progress: " + progressPercentage + "%"); } else { if(progmon == null) { progmon = new ProgressMonitor(null, "Extracting dmg to iso...", "0%", 0, 100); progmon.setProgress(0); progmon.setMillisToPopup(0); ...
login(OpheliaTestUser.JUNIT_X);
protected void setUp() throws Exception { super.setUp(); login(OpheliaTestUser.JUNIT); login(OpheliaTestUser.JUNIT_X); final ContainerModel containerModel = getContainerModel(OpheliaTestUser.JUNIT); final Container container = createContainer(OpheliaTestUser.JUNIT, NAME); a...
logout(OpheliaTestUser.JUNIT_X);
logger.logTraceId();
protected void tearDown() throws Exception { datum.containerModel.removeListener(datum); datum = null; logout(OpheliaTestUser.JUNIT); logout(OpheliaTestUser.JUNIT_X); super.tearDown(); }
logger.logTraceId();
protected void tearDown() throws Exception { datum.containerModel.removeListener(datum); datum = null; logout(OpheliaTestUser.JUNIT); logout(OpheliaTestUser.JUNIT_X); super.tearDown(); }
logger.logTraceId();
public void testPublish() { datum.containerModel.publish( datum.container.getId(), datum.contacts, datum.teamMembers); assertTrue("The draft published event was not fired.", datum.didNotify); // ensure the system is the key holder again final JabberId keyHolder = ...
logger.logTraceId();
protected void logout(final OpheliaTestUser testUser) { getSessionModel(testUser).logout(); }
cellNameJLabel.setFont(listItem.getNameFont());
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { if(0 == index) { setBorder(BorderFactory.createEmptyBorder()); } else { setBorder(CELL_BORDER); } if(isSelected) { setBackground(listItemBackgroundSelect);...
c.insets.right = 15;
private void initBrowserMainCellComponents() { final GridBagConstraints c = new GridBagConstraints(); c.anchor = GridBagConstraints.WEST; c.fill = GridBagConstraints.BOTH; c.weighty = 1; cellIconJLabel = LabelFactory.create(); c.insets.bottom = 1; c.insets.left = 13; add(cellIconJLabel, c.clone()); cellNameJL...
setText((HistoryItem) value);
setText((DisplayHistoryItem) value);
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) { setBackground(isSelected ? BG_SEL : BG); setText((HistoryItem) value); return this; }
protected void setText(final HistoryItem historyItem) { setDateText(historyItem); setEventText(historyItem); setVersionText(historyItem);
protected void setText(final DisplayHistoryItem displayHistoryItem) { itemJLabel.setText(displayHistoryItem.getDisplay());
protected void setText(final HistoryItem historyItem) { setDateText(historyItem); setEventText(historyItem); setVersionText(historyItem); }
setName(new StringBuffer(document.getName()).append(" - ").append(document.getId()).toString());
setName(document.getName());
DocumentListItem(final Document document, final Boolean isKeyHolder) { super("DocumentListItem"); this.isKeyHolder = isKeyHolder; setDocumentId(document.getId()); if(isClosed(document.getId())) { setMenuIcon(MENU_ICON_CLOSED); setNameForeground(NAME_FOREGROUND_CLOSED); } else { setMenuIcon(MENU_ICON); se...
getMnemonic("CloseMnemonic"),
getMnemonic("Close"),
private JMenuItem getCloseMenuItem() { if(null == closeMenuItem) { closeMenuItem = createJMenuItem(getString("Close"), getMnemonic("CloseMnemonic"), getCloseMenuItemActionListener()); } return closeMenuItem; }
getMnemonic("DeleteMnemonic"),
getMnemonic("Delete"),
private JMenuItem getDeleteMenuItem() { if(null == deleteMenuItem) { deleteMenuItem = createJMenuItem(getString("Delete"), getMnemonic("DeleteMnemonic"), getDeleteMenuItemActionListener()); } return deleteMenuItem; }
getMnemonic("OpenMnemonic"),
getMnemonic("Open"),
private JMenuItem getOpenMenuItem() { if(null == openMenuItem) { openMenuItem = createJMenuItem(getString("Open"), getMnemonic("OpenMnemonic"), getOpenMenuItemActionListener()); } return openMenuItem; }
getMnemonic("RequestKeyMnemonic"),
getMnemonic("RequestKey"),
private JMenuItem getRequestKeyMenuItem() { if(null == requestKeyMenuItem) { requestKeyMenuItem = createJMenuItem(getString("RequestKey"), getMnemonic("RequestKeyMnemonic"), getRequestKeyMenuItemActionListener()); } return requestKeyMenuItem; }
getMnemonic("SendKeyMnemonic"),
getMnemonic("SendKey"),
private JMenuItem getSendKeyMenuItem() { if(null == sendKeyMenuItem) { sendKeyMenuItem = createJMenuItem(getString("SendKey"), getMnemonic("SendKeyMnemonic"), getSendKeyMenuItemActionListener()); } return sendKeyMenuItem; }
getMnemonic("SendMnemonic"), getSendMenuItemActionListener());
getMnemonic("Send"), getSendMenuItemActionListener());
private JMenuItem getSendMenuItem() { if(null == sendMenuItem) { sendMenuItem = createJMenuItem(getString("Send"), getMnemonic("SendMnemonic"), getSendMenuItemActionListener()); } return sendMenuItem; }
this.logger = LoggerFactory.getLogger(getClass());
protected ListItem(final String l18nContext) { super(); this.localization = new ListItemLocalization(l18nContext); this.propertyMap = new Hashtable<Object,Object>(7, 0.75F); }
logger.debug("ListItem.MnemonicString:" + mnemonicString + "]");
protected Integer getMnemonic(final String localKey) { final String mnemonicString = getString(localKey + "Mnemonic"); return new Integer(mnemonicString.charAt(0)); }
super(workspace, L18nContext.SYSTEM_MESSAGE);
super(workspace);
SystemMessageModelImpl(final Workspace workspace) { super(workspace, L18nContext.SYSTEM_MESSAGE); this.defaultComparator = new ComparatorBuilder().createSystemMessageDefault(); this.systemMessageIO = IOFactory.getDefault().createSystemMessageHandler(); }
protected String getString(final String localKey, final Object[] arguments) { return l18n.getString(localKey, arguments);
protected String getString(final String localKey) { return l18n.getString(localKey);
protected String getString(final String localKey, final Object[] arguments) { return l18n.getString(localKey, arguments); }
this.logger = new Log4JWrapper();
Session(final SessionManager sessionManager, final Connection connection) { super(); this.connection = connection; this.logger = new Log4JWrapper(); this.id = JVMUniqueId.nextId(); this.sessionManager = sessionManager; }
assertOpen("execute(String)"); logger.logVariable("sql", sql); try { final Statement s = connection.createStatement(); s.execute(sql); commit(); } catch(final SQLException sqlx) { rollback(); throw new HypersonicException(sqlx); } }
assertConnectionIsOpen(); logStatement(sql); try { final Statement s = connection.createStatement(); s.execute(sql); commit(); } catch (final SQLException sqlx) { rollback(); throw panic(sqlx); } }
public void execute(final String sql) { assertOpen("execute(String)"); logger.logVariable("sql", sql); try { final Statement s = connection.createStatement(); s.execute(sql); commit(); } catch(final SQLException sqlx) { rollback(); throw new HypersonicException(sqlx); } }
assertOpen("getAuditEventTypeFromInteger(String)"); assertOpenResult("getAuditEventTypeFromInteger(String)"); logger.logVariable("columnName", columnName);
assertConnectionIsOpen(); assertResultSetIsSet();
public AuditEventType getAuditEventTypeFromInteger(final String columnName) { assertOpen("getAuditEventTypeFromInteger(String)"); assertOpenResult("getAuditEventTypeFromInteger(String)"); logger.logVariable("columnName", columnName); try { final Integer value = resultSet.getInt(columnName); r...
logColumnExtraction(columnName, value);
public AuditEventType getAuditEventTypeFromInteger(final String columnName) { assertOpen("getAuditEventTypeFromInteger(String)"); assertOpenResult("getAuditEventTypeFromInteger(String)"); logger.logVariable("columnName", columnName); try { final Integer value = resultSet.getInt(columnName); r...
assertOpen("[GET BOOLEAN]"); assertOpenResult("[GET BOOLEAN]"); logger.logVariable("columnName", columnName);
assertConnectionIsOpen(); assertResultSetIsSet();
public Boolean getBoolean(final String columnName) { assertOpen("[GET BOOLEAN]"); assertOpenResult("[GET BOOLEAN]"); logger.logVariable("columnName", columnName); try { final Boolean value = resultSet.getBoolean(columnName); return resultSet.wasNull() ? null : value...
logColumnExtraction(columnName, value);
public Boolean getBoolean(final String columnName) { assertOpen("[GET BOOLEAN]"); assertOpenResult("[GET BOOLEAN]"); logger.logVariable("columnName", columnName); try { final Boolean value = resultSet.getBoolean(columnName); return resultSet.wasNull() ? null : value...
assertOpen("getBytes(String)"); assertOpenResult("getBytes(String)");
assertConnectionIsOpen(); assertResultSetIsSet();
public byte[] getBytes(final String columnName) { assertOpen("getBytes(String)"); assertOpenResult("getBytes(String)"); try { final byte[] value = resultSet.getBytes(columnName); return resultSet.wasNull() ? null : value; } catch (final SQLException sqlx) { throw new HypersonicE...
logColumnExtraction(columnName, value);
public byte[] getBytes(final String columnName) { assertOpen("getBytes(String)"); assertOpenResult("getBytes(String)"); try { final byte[] value = resultSet.getBytes(columnName); return resultSet.wasNull() ? null : value; } catch (final SQLException sqlx) { throw new HypersonicE...
assertOpen("getCalendar(String)"); assertOpenResult("getCalendar(String)");
assertConnectionIsOpen(); assertResultSetIsSet();
public EMail getEMail(final String columnName) { assertOpen("getCalendar(String)"); assertOpenResult("getCalendar(String)"); try { final String value = resultSet.getString(columnName); if (resultSet.wasNull()) { return null; } else { return EMailB...
if (resultSet.wasNull()) { return null; } else {
if (resultSet.wasNull()) { logColumnExtraction(columnName, null); return null; } else { logColumnExtraction(columnName, value);
public EMail getEMail(final String columnName) { assertOpen("getCalendar(String)"); assertOpenResult("getCalendar(String)"); try { final String value = resultSet.getString(columnName); if (resultSet.wasNull()) { return null; } else { return EMailB...
assertOpen("getFlagFromInteger(String)"); assertOpenResult("getFlagFromInteger(String)"); logger.logVariable("columnName", columnName);
assertConnectionIsOpen(); assertResultSetIsSet();
public ArtifactFlag getFlagFromInteger(final String columnName) { assertOpen("getFlagFromInteger(String)"); assertOpenResult("getFlagFromInteger(String)"); logger.logVariable("columnName", columnName); try { final Integer value = resultSet.getInt(columnName); return resultSet.wasNull() ? null...
logColumnExtraction(columnName, value);
public ArtifactFlag getFlagFromInteger(final String columnName) { assertOpen("getFlagFromInteger(String)"); assertOpenResult("getFlagFromInteger(String)"); logger.logVariable("columnName", columnName); try { final Integer value = resultSet.getInt(columnName); return resultSet.wasNull() ? null...
assertOpen("getFlagFromString(String)"); assertOpenResult("getFlagFromString(String)"); logger.logVariable("columnName", columnName);
assertConnectionIsOpen(); assertResultSetIsSet();
public ArtifactFlag getFlagFromString(final String columnName) { assertOpen("getFlagFromString(String)"); assertOpenResult("getFlagFromString(String)"); logger.logVariable("columnName", columnName); try { final String value = resultSet.getString(columnName); return resultSet.wasNull() ? null ...