@@ -0,0 +1,1358 @@
+package be.iminds.iot.things.repository.simple.provider;%0A%0Aimport java.util.UUID;%0A%0Aimport org.osgi.service.component.annotations.Component;%0Aimport org.osgi.service.component.annotations.Reference;%0A%0Aimport be.iminds.iot.things.repository.api.Repository;%0Aimport be.iminds.iot.things.repository.api.ThingDTO;%0A%0A@Component(%0A%09%09service=Object.class,%0A%09%09property=%7B%22osgi.command.scope=thing%22,%0A%09%09%09%09  %22osgi.command.function=things%22,%0A%09%09%09%09  %22osgi.command.function=thing%22%7D,%0A%09%09immediate=true)%0Apublic class ThingsCommands %7B%0A%0A%09private Repository repository;%0A%09%0A%09public void things()%7B%0A%09%09for(ThingDTO t : repository.getThings())%7B%0A%09%09%09System.out.println(%22 * %22+t.id+%22%5Ct%22+t.name+%22 %22+t.type);%0A%09%09%7D%0A%09%7D%0A%09%0A%09public void thing(String id)%7B%0A%09%09UUID uuid = UUID.fromString(id);%0A%09%09ThingDTO t = repository.getThing(uuid);%0A%09%09if(t!=null)%7B%0A%09%09%09System.out.println(t.name);%0A%09%09%09System.out.println(%22---------%22);%0A%09%09%09System.out.println(%22 id: %22+t.id);%0A%09%09%09System.out.println(%22 gateway: %22+t.gateway);%0A%09%09%09System.out.println(%22 type: %22+t.type);%0A%09%09%09System.out.println(%22 device: %22+t.device);%0A%09%09%09System.out.println(%22 service: %22+t.service);%0A%09%09%09System.out.println(%22 location: %22+t.location);%0A%09%09%09System.out.println(%22 state variables:%22);%0A%09%09%09for(String s : t.state.keySet())%7B%0A%09%09%09%09System.out.println(%22   %22+s+%22: %22+t.state.get(s));%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%09%0A%09@Reference()%0A%09void setRepository(Repository r)%7B%0A%09%09this.repository = r;%0A%09%7D%0A%09%0A%7D%0A

add basic things commands to inspect things repository from CLI