]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ResourceCopyRepresentation.java
Sync git svn branch with SVN repository r33158.
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / util / ResourceCopyRepresentation.java
1 package org.simantics.db.layer0.util;\r
2 \r
3 import java.util.Collection;\r
4 import java.util.Map;\r
5 \r
6 import org.simantics.db.RequestProcessor;\r
7 import org.simantics.db.Resource;\r
8 import org.simantics.db.layer0.util.SimanticsClipboard.Representation;\r
9 import org.simantics.utils.datastructures.hints.IHintContext.Key;\r
10 \r
11 class ResourceCopyRepresentation implements Representation {\r
12 \r
13     private Collection<Resource> resources;\r
14 \r
15     public ResourceCopyRepresentation(Collection<Resource> resources) {\r
16         this.resources = resources;\r
17     }\r
18 \r
19     @Override\r
20     public Key getKey() {\r
21         return SimanticsKeys.KEY_COPY_RESOURCES;\r
22     }\r
23 \r
24     @SuppressWarnings("unchecked")\r
25     @Override\r
26     public <T> T getValue(RequestProcessor processor, Map<String,Object> hints) {\r
27         return (T) resources;\r
28     }\r
29 \r
30 }