1 package org.telscenter.pas.otrunk.skeleton.controllers;
2
3 import net.sf.sail.core.entity.Rim;
4
5 import org.concord.framework.otrunk.OTObject;
6 import org.doomdark.uuid.UUID;
7
8 public class OTrunkRim<T> extends Rim<T> {
9 UUID containerId;
10
11 public OTrunkRim(String name, Class<T> shape, OTObject container) {
12 super();
13 setName(name);
14 setShape(shape);
15 String extId = container.otExternalId();
16 try {
17 UUID id = new UUID(extId);
18 setContainerId(id);
19 } catch (Throwable t){
20 System.err.println("OTrunkRim only works when its container has a UUID ID");
21 System.err.println(" instead it had: " + extId);
22
23
24 }
25 }
26
27 @Override
28 public UUID getContainerId() {
29 return containerId;
30 }
31
32 public void setContainerId(UUID id){
33 containerId = id;
34 }
35 }