protected CDOView openView(CDOSession session, ResourceSet resourceSet) { return session.openTransaction(resourceSet); } }
@Override protected Object eval(CDOSession session) { return session.getRepositoryInfo().getUUID(); } });
public CDOSessionInvalidationEventQueue(CDOSession session) { this.session = session; session.addListener(sessionListener); }
public void dispose() { project = null; if (view != null) { view.removeListener(this); view.getSession().removeListener(this); view.getSession().close(); view = null; } }
@Override public Object put(String key, Object value) { super.put(key, value); for (CDOView view : viewSet.getViews()) { view.getSession().getPackageRegistry().put(key, value); } return null; }
private static CDORevision getRevisionByVersion(CDOObject object, CDOBranch branch, int version, CDORevision revision) { if (revision.getVersion() != version) { CDOSession session = object.cdoView().getSession(); if (!session.getRepositoryInfo().isSupportingAudits()) { throw new IllegalStateException(Messages.getString("CDOUtil.0")); //$NON-NLS-1$ } revision = session.getRevisionManager().getRevisionByVersion(object.cdoID(), branch.getVersion(version), 0, true); } return revision; }
public CDOPushTransaction(CDOTransaction delegate, File file, boolean reconstructSavepoints) throws IOException { this.delegate = delegate; this.file = file; boolean delegateWasDirty = delegate.isDirty(); delegate.addTransactionHandler(delegateHandler); if (file.isDirectory()) { throw new IllegalArgumentException("Not a file: " + file.getAbsolutePath()); } OM.LOG.info("Using " + file.getAbsolutePath() + " for push transaction " + delegate.getSession().getRepositoryInfo().getName() + ":" + // delegate.getSession().getSessionID() + ":" + // delegate.getViewID()); if (file.exists()) { InputStream in = null; try { in = new FileInputStream(file); delegate.importChanges(in, reconstructSavepoints); } finally { IOUtil.close(in); } } dirty = delegateWasDirty; }
public synchronized BranchCheckoutSource[] getElements() { if (subBranches == null) { subBranches = new ArrayList<BranchCheckoutSource>(); CDOSessionConfiguration config = getRepositoryLocation().createSessionConfiguration(); CDOSession session = config.openSession(); if (session.getRepositoryInfo().isSupportingBranches()) { try { CDOBranch branch = session.getBranchManager().getBranch(getBranchPath()); CDOBranch[] branches = branch.getBranches(); for (CDOBranch subBranch : branches) { subBranches.add(new BranchCheckoutSource(this, subBranch.getName())); } } finally { IOUtil.close(session); } } } return subBranches.toArray(new BranchCheckoutSource[subBranches.size()]); }
public void dispose() { reset(); session.removeListener(sessionListener); session = null; }
public synchronized CDOChangeSetData compareRevisions(CDOBranchPoint source) { CDOSession session = getSession(); return session.compareRevisions(source, this); }
@Override protected Object eval(CDOSession session) { return CDOCommonUtil.formatTimeStamp(session.getLastUpdateTime()); } });
/** * Returns <code>true</code> if the given {@link CDOSession session} contains a dirty {@link CDOTransaction * transaction}, <code>false</code> otherwise. * * @since 2.0 * @see CDOTransaction */ public static boolean isSessionDirty(CDOSession session) { for (CDOView view : session.getElements()) { if (view.isDirty()) { return true; } } return false; }
@Override public Object put(String key, Object value) { super.put(key, value); for (CDOView view : viewSet.getViews()) { view.getSession().getPackageRegistry().put(key, value); } return null; }
private static CDORevision getRevisionByVersion(CDOObject object, CDOBranch branch, int version, CDORevision revision) { if (revision.getVersion() != version) { CDOSession session = object.cdoView().getSession(); if (!session.getRepositoryInfo().isSupportingAudits()) { throw new IllegalStateException(Messages.getString("CDOUtil.0")); //$NON-NLS-1$ } revision = session.getRevisionManager().getRevisionByVersion(object.cdoID(), branch.getVersion(version), 0, true); } return revision; }
public CDOPushTransaction(CDOTransaction delegate, File file, boolean reconstructSavepoints) throws IOException { this.delegate = delegate; this.file = file; boolean delegateWasDirty = delegate.isDirty(); delegate.addTransactionHandler(delegateHandler); if (file.isDirectory()) { throw new IllegalArgumentException("Not a file: " + file.getAbsolutePath()); } OM.LOG.info("Using " + file.getAbsolutePath() + " for push transaction " + delegate.getSession().getRepositoryInfo().getName() + ":" + // delegate.getSession().getSessionID() + ":" + // delegate.getViewID()); if (file.exists()) { InputStream in = null; try { in = new FileInputStream(file); delegate.importChanges(in, reconstructSavepoints); } finally { IOUtil.close(in); } } dirty = delegateWasDirty; }
public void dispose() { reset(); session.removeListener(sessionListener); session = null; }
/** * @since Snow Owl 2.6 */ public synchronized CDOChangeSetData compareRevisions(CDOBranchPoint source, final String... nsURIs) { CDOSession session = getSession(); return session.compareRevisions(source, this, nsURIs); }
@Override protected Object eval(CDOSession session) { return CDOCommonUtil.formatTimeStamp(session.getLastUpdateTime()); } });
/** * Returns <code>true</code> if the given {@link CDOSession session} contains a dirty {@link CDOTransaction * transaction}, <code>false</code> otherwise. * * @since 2.0 * @see CDOTransaction */ public static boolean isSessionDirty(CDOSession session) { for (CDOView view : session.getElements()) { if (view.isDirty()) { return true; } } return false; }
@Override protected Object eval(CDOSession session) { return session.getRepositoryInfo().isSupportingAudits(); } });