Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.smatechnologies.opcon.restapiclient.WsFactory;
import com.smatechnologies.opcon.restapiclient.WsResult;
import com.smatechnologies.opcon.restapiclient.api.dailyschedules.dates.WsDates;
import com.smatechnologies.opcon.restapiclient.api.dailyschedules.properties.WsDailySchedulesProperties;
import com.smatechnologies.opcon.restapiclient.model.DailySchedule;
import com.smatechnologies.opcon.restapiclient.model.ScheduleDailyStatusCount;

Expand Down Expand Up @@ -59,4 +60,9 @@ public DailySchedule get(String dailyScheduleId) throws WsException {
public ScheduleDailyStatusCount countByStatus(DailySchedulesCriteria criteria) throws WsException {
return wsFactory.create(Ws.Type.GET).path("count_by_status").criteria(criteria).run(ScheduleDailyStatusCount.class);
}

public WsDailySchedulesProperties properties(String dailyScheduleId) {
return new WsDailySchedulesProperties(wsFactory.path(dailyScheduleId));
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.smatechnologies.opcon.restapiclient.api.dailyschedules.properties;

import com.smatechnologies.opcon.commons.util.HtmlUtil;
import com.smatechnologies.opcon.restapiclient.Ws;
import com.smatechnologies.opcon.restapiclient.WsException;
import com.smatechnologies.opcon.restapiclient.WsFactory;
import com.smatechnologies.opcon.restapiclient.model.Property;

import javax.ws.rs.core.GenericType;
import java.util.List;

public class WsDailySchedulesProperties {

private final WsFactory wsFactory;

public WsDailySchedulesProperties(WsFactory wsFactory) {
this.wsFactory = wsFactory.path("properties");
}

public List<Property> get() throws WsException {
return wsFactory.create(Ws.Type.GET).run(new GenericType<List<Property>>() {

});
}

public Property get(String name) throws WsException {
return wsFactory.create(Ws.Type.GET).path(HtmlUtil.doubleUrlEncodeSlash(name)).run(Property.class);
}

}