X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.document.server%2Fsrc%2Forg%2Fsimantics%2Fdocument%2Fserver%2Frequest%2FHandleEventRequest.java;fp=bundles%2Forg.simantics.document.server%2Fsrc%2Forg%2Fsimantics%2Fdocument%2Fserver%2Frequest%2FHandleEventRequest.java;h=4c611a9aab043d749f0be7c4158b0fce95a0da76;hp=606b361b62729ef2f5b74cdb8ad7f379a974049c;hb=d96e94b9ad3de7da56fda39883aa8f0c84e38a50;hpb=e460fd6f0af60314e2ca28391ef7ff2043016d97 diff --git a/bundles/org.simantics.document.server/src/org/simantics/document/server/request/HandleEventRequest.java b/bundles/org.simantics.document.server/src/org/simantics/document/server/request/HandleEventRequest.java index 606b361b6..4c611a9aa 100644 --- a/bundles/org.simantics.document.server/src/org/simantics/document/server/request/HandleEventRequest.java +++ b/bundles/org.simantics.document.server/src/org/simantics/document/server/request/HandleEventRequest.java @@ -1,19 +1,17 @@ package org.simantics.document.server.request; import org.simantics.db.ReadGraph; +import org.simantics.db.common.request.UnaryRead; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.variable.Variable; import org.simantics.db.layer0.variable.Variables; -import org.simantics.db.request.Read; import org.simantics.document.server.handler.AbstractEventHandler; import org.simantics.structural.stubs.StructuralResource2; -public class HandleEventRequest implements Read { - - final String id; +public class HandleEventRequest extends UnaryRead { public HandleEventRequest(String id) { - this.id = id; + super(id); } @Override @@ -21,7 +19,7 @@ public class HandleEventRequest implements Read { StructuralResource2.getInstance(graph); - Variable variable = Variables.getPossibleVariable(graph, id); + Variable variable = Variables.getPossibleVariable(graph, parameter); if(variable == null) return null; // System.err.println("EVENT " + variable.getURI(graph)); @@ -29,7 +27,7 @@ public class HandleEventRequest implements Read { if(handler instanceof AbstractEventHandler) return (AbstractEventHandler) handler; else - throw new DatabaseException("Handler for " + id + " is not instance of AbstractEventHandler (it is instance of " + (handler != null ? handler.getClass() : null) + ")"); + throw new DatabaseException("Handler for " + parameter + " is not instance of AbstractEventHandler (it is instance of " + (handler != null ? handler.getClass() : null) + ")"); } } \ No newline at end of file