Skip to content

Commit

Permalink
spotless::apply
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent ARNAL <[email protected]>
  • Loading branch information
lo92fr committed Dec 6, 2024
1 parent 00ed746 commit 4549915
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
import org.osgi.framework.BundleContext;
import org.osgi.service.component.ComponentContext;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Deactivate;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.event.Event;
import org.osgi.service.event.EventAdmin;
Expand Down Expand Up @@ -64,7 +62,7 @@ public SmartthingsServlet(HttpService httpService) {
this.httpService = httpService;
}

@Activate
@Activate
public void activate() {
if (httpService == null) {
logger.info("SmartthingsServlet.activate: httpService is unexpectedly null");
Expand Down Expand Up @@ -97,7 +95,6 @@ public void init(@Nullable ServletConfig servletConfig) throws ServletException
logger.info("SmartthingsServlet:init");
ServletContext context = servletConfig.getServletContext();
BundleContext bundleContext = (BundleContext) context.getAttribute("osgi-bundlecontext");

}

@Reference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public JsonArray GetAllDevices() {
JsonElement res1 = ((JsonObject) result).get("items");
JsonArray devices = res1.getAsJsonArray();
return devices;

}

public void SendCommand(String deviceId, String jsonMsg) {
Expand All @@ -82,7 +81,6 @@ public void SendCommand(String deviceId, String jsonMsg) {
} catch (OAuthException | OAuthResponseException e) {
throw new RuntimeException(e.getMessage(), e);
}

}

public @Nullable JsonObject SendStatus(String deviceId, String jsonMsg) {
Expand All @@ -105,7 +103,6 @@ public void SendCommand(String deviceId, String jsonMsg) {
} catch (OAuthException | OAuthResponseException e) {
throw new RuntimeException(e.getMessage(), e);
}

}

private @Nullable JsonElement DoRequest(String uri) {
Expand All @@ -126,7 +123,6 @@ public void SendCommand(String deviceId, String jsonMsg) {
} catch (OAuthException | OAuthResponseException e) {
throw new RuntimeException(e.getMessage(), e);
}

}

/**
Expand Down Expand Up @@ -162,5 +158,4 @@ public void SendCommand(String deviceId, String jsonMsg) {
* }
* }
*/

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ public interface SmartthingsNetworkConnector {
public void onComplete(Request request);

public void onError(Request request, SmartthingsNetworkCallback cb) throws Exception;

}
Original file line number Diff line number Diff line change
Expand Up @@ -309,5 +309,4 @@ public static Gson getGson() {
* return gsonWithAdpter;
* }
*/

}
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ public void startScan() {
enabled = true;
}

//if (!enabled) {
// continue;
//}
// if (!enabled) {
// continue;
// }

JsonArray componentsArray = (JsonArray) components;

Expand Down Expand Up @@ -383,5 +383,4 @@ public void handleEvent(@Nullable Event event) {
createDevice(Objects.requireNonNull(deviceData));
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ public void initialize() {

@Override
public void onAccessTokenResponse(AccessTokenResponse tokenResponse) {

}

public SmartthingsApi getSmartthingsApi() {
Expand Down Expand Up @@ -156,7 +155,6 @@ public boolean isAuthorized() {

return accessTokenResponse != null && accessTokenResponse.getAccessToken() != null
&& accessTokenResponse.getRefreshToken() != null;

}

private @Nullable AccessTokenResponse getAccessTokenResponse() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,4 @@ public Collection<ConfigStatusMessage> getConfigStatus() {

return configStatusMessages;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ public SmartthingsJSonSchema getSchema() {
public void setSchema(SmartthingsJSonSchema value) {
schema = value;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,4 @@ public List<SmartthingsJSonCommands> getCommands() {
public void setCommands(List<SmartthingsJSonCommands> value) {
commands = value;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ public void setTitle(String value) {
public String getTitle() {
return title;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,4 @@ public String getTitle() {
public void setTitle(String value) {
title = value;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,4 @@ public Collection<ThingType> getThingTypes(@Nullable Locale locale) {
public @Nullable ThingType getThingType(ThingTypeUID thingTypeUID, @Nullable Locale locale) {
return thingTypesByUID.get(thingTypeUID);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ public SmartthingsTypeRegistryImpl() {

loadCapabilitiesDefs();
logger.info("pa");

}

class SmartthingsAttributesDeserializer implements JsonDeserializer<List<SmartthingsJSonAttributes>> {
Expand Down Expand Up @@ -251,7 +250,6 @@ public void loadCapabilityDef(String path) {
logger.info("error loading capa:" + path + " <> " + ex);
logger.info("");
}

}

public Gson getGson() {
Expand All @@ -261,7 +259,6 @@ public Gson getGson() {
@Override
public void initialize() {
// TODO Auto-generated method stub

}

@Reference
Expand Down Expand Up @@ -324,7 +321,6 @@ private String readTemplate(String templateName) throws IOException {
@Override
public void Register(SmartthingsDeviceData deviceData, JsonObject devObj) {
generateThingsType(deviceData.id, deviceData.label, deviceData.deviceType, deviceData.description, devObj);

}

private void generateThingsType(String deviceId, String deviceLabel, String deviceType, String deviceDescription,
Expand Down Expand Up @@ -440,7 +436,6 @@ private ChannelType createChannelType(String itemType, ChannelTypeUID channelTyp
.build();

return channelType;

}

/**
Expand Down Expand Up @@ -492,5 +487,4 @@ private void generateConfigDescription(String device, List<ChannelGroupType> gro
.withParameters(parms).withParameterGroups(groups).build());
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">

<!-- The Bridge Type -->
<bridge-type id="smartthingscloud">
<label>Smartthings Cloud Hub</label>
<description>Smartthings Cloud Hub</description>
<bridge-type id="smartthingscloud">
<label>Smartthings Cloud Hub</label>
<description>Smartthings Cloud Hub</description>

<config-description>
<parameter name="clientId" type="text" required="true">
<label>Client ID</label>
<description>The apps oauth client Id</description>
</parameter>
<parameter name="clientSecret" type="text" required="true">
<label>Client Secret</label>
<description>The apps oauth client Secret</description>
</parameter>
</config-description>
</bridge-type>
<config-description>
<parameter name="clientId" type="text" required="true">
<label>Client ID</label>
<description>The apps oauth client Id</description>
</parameter>
<parameter name="clientSecret" type="text" required="true">
<label>Client Secret</label>
<description>The apps oauth client Secret</description>
</parameter>
</config-description>
</bridge-type>
<bridge-type id="smartthings">
<label>Smartthings Hub</label>
<description>Smartthings Hub V2 that is attached to the same network</description>
Expand All @@ -38,6 +38,6 @@
</config-description>
</bridge-type>



</thing:thing-descriptions>

0 comments on commit 4549915

Please sign in to comment.