]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.issues.common/src/org/simantics/issues/common/IssueSource.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.issues.common / src / org / simantics / issues / common / IssueSource.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.issues.common;
13
14 import java.util.List;
15
16 import org.simantics.db.ReadGraph;
17 import org.simantics.db.Resource;
18 import org.simantics.db.WriteGraph;
19 import org.simantics.db.exception.DatabaseException;
20 import org.simantics.scl.runtime.function.Function2;
21
22 public interface IssueSource {
23
24         /*
25          * Updates the issue data model managed by this source
26          */
27         void update(WriteGraph graph, List<Resource> resources) throws DatabaseException;
28         boolean needUpdate(ReadGraph graph, List<Resource> resources) throws DatabaseException;
29         /*
30          * Dirty listener is fired when a source detects potential changes. False alarms are acceptable.
31          */
32         void addDirtyListener(Function2<ReadGraph, List<Resource>, Boolean> runnable);
33         void removeDirtyListener(Function2<ReadGraph, List<Resource>, Boolean> runnable);
34         
35 }