Skip to content

Commit 27e429e

Browse files
authored
Merge pull request #49 from SMATechnologies/develop
Release 1.0.5 Version
2 parents f198283 + a131d50 commit 27e429e

File tree

6 files changed

+116
-38
lines changed

6 files changed

+116
-38
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.smatechnologies</groupId>
66
<artifactId>opcon-rest-api-client</artifactId>
7-
<version>1.0.4</version>
7+
<version>1.0.5</version>
88

99
<name>SMA OpCon Library Rest Api Client</name>
1010
<description>SMA OpCon Library Rest Api Client</description>
@@ -186,7 +186,7 @@
186186
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
187187
<nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>
188188

189-
<junit.version>4.12</junit.version>
189+
<junit.version>4.13.1</junit.version>
190190
<mockito.version>1.10.19</mockito.version>
191191
<powermock.version>1.6.6</powermock.version>
192192

src/main/java/com/smatechnologies/opcon/restapiclient/api/dailyschedules/WsDailySchedules.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.smatechnologies.opcon.restapiclient.WsFactory;
66
import com.smatechnologies.opcon.restapiclient.WsResult;
77
import com.smatechnologies.opcon.restapiclient.api.dailyschedules.dates.WsDates;
8+
import com.smatechnologies.opcon.restapiclient.api.dailyschedules.properties.WsDailySchedulesProperties;
89
import com.smatechnologies.opcon.restapiclient.model.DailySchedule;
910
import com.smatechnologies.opcon.restapiclient.model.ScheduleDailyStatusCount;
1011

@@ -59,4 +60,9 @@ public DailySchedule get(String dailyScheduleId) throws WsException {
5960
public ScheduleDailyStatusCount countByStatus(DailySchedulesCriteria criteria) throws WsException {
6061
return wsFactory.create(Ws.Type.GET).path("count_by_status").criteria(criteria).run(ScheduleDailyStatusCount.class);
6162
}
63+
64+
public WsDailySchedulesProperties properties(String dailyScheduleId) {
65+
return new WsDailySchedulesProperties(wsFactory.path(dailyScheduleId));
66+
}
67+
6268
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.smatechnologies.opcon.restapiclient.api.dailyschedules.properties;
2+
3+
import com.smatechnologies.opcon.commons.util.HtmlUtil;
4+
import com.smatechnologies.opcon.restapiclient.Ws;
5+
import com.smatechnologies.opcon.restapiclient.WsException;
6+
import com.smatechnologies.opcon.restapiclient.WsFactory;
7+
import com.smatechnologies.opcon.restapiclient.model.Property;
8+
9+
import javax.ws.rs.core.GenericType;
10+
import java.util.List;
11+
12+
public class WsDailySchedulesProperties {
13+
14+
private final WsFactory wsFactory;
15+
16+
public WsDailySchedulesProperties(WsFactory wsFactory) {
17+
this.wsFactory = wsFactory.path("properties");
18+
}
19+
20+
public List<Property> get() throws WsException {
21+
return wsFactory.create(Ws.Type.GET).run(new GenericType<List<Property>>() {
22+
23+
});
24+
}
25+
26+
public Property get(String name) throws WsException {
27+
return wsFactory.create(Ws.Type.GET).path(HtmlUtil.doubleUrlEncodeSlash(name)).run(Property.class);
28+
}
29+
30+
}

src/main/java/com/smatechnologies/opcon/restapiclient/model/MasterVisionCard.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public abstract class MasterVisionCard {
2828
public static final String PROPERTY_QOS_CRITICAL_THRESHOLD = "qosCriticalThreshold";
2929
public static final String PROPERTY_SLA_TOLERABLE_THRESHOLD = "slaTolerableThreshold";
3030
public static final String PROPERTY_SLA_CRITICAL_THRESHOLD = "slaCriticalThreshold";
31+
public static final String PROPERTY_VERSION = "version";
3132

3233
protected static final String PROPERTY_PARENT_MASTER_VISION_CARD = "parentMasterVisionCard";
3334

@@ -44,6 +45,7 @@ public abstract class MasterVisionCard {
4445
private Integer qosCriticalThreshold;
4546
private Integer slaTolerableThreshold;
4647
private Integer slaCriticalThreshold;
48+
private Integer version;
4749

4850
public Integer getId() {
4951
return id;
@@ -133,6 +135,14 @@ public void setSlaCriticalThreshold(Integer slaCriticalThreshold) {
133135
this.slaCriticalThreshold = slaCriticalThreshold;
134136
}
135137

138+
public Integer getVersion() {
139+
return version;
140+
}
141+
142+
public void setVersion(Integer version) {
143+
this.version = version;
144+
}
145+
136146
@JsonIgnore
137147
public abstract Type getType();
138148

@@ -153,12 +163,13 @@ public boolean equals(Object o) {
153163
Objects.equals(qosTolerableThreshold, that.qosTolerableThreshold) &&
154164
Objects.equals(qosCriticalThreshold, that.qosCriticalThreshold) &&
155165
Objects.equals(slaTolerableThreshold, that.slaTolerableThreshold) &&
156-
Objects.equals(slaCriticalThreshold, that.slaCriticalThreshold);
166+
Objects.equals(slaCriticalThreshold, that.slaCriticalThreshold)&&
167+
Objects.equals(version, that.version);
157168
}
158169

159170
@Override
160171
public int hashCode() {
161-
return Objects.hash(id, trackId, name, description, offset, associatedFrequencies, associatedRoles, qosTolerableThreshold, qosCriticalThreshold, slaTolerableThreshold, slaCriticalThreshold);
172+
return Objects.hash(id, trackId, name, description, offset, associatedFrequencies, associatedRoles, qosTolerableThreshold, qosCriticalThreshold, slaTolerableThreshold, slaCriticalThreshold, version);
162173
}
163174

164175
public enum Type {

src/main/java/com/smatechnologies/opcon/restapiclient/model/ScheduleAction.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ public static class Job {
279279
public static final String RESOURCE = "job";
280280

281281
public static final String PROPERTY_ID = "id";
282+
public static final String PROPERTY_UID = "uid";
282283
public static final String PROPERTY_FREQUENCY = "frequency";
283284
public static final String PROPERTY_RESULT = "result";
284285
public static final String PROPERTY_MESSAGE = "message";
@@ -287,6 +288,7 @@ public static class Job {
287288
public static final String PROPERTY_APPLY_EXCEPTIONS = "applyExceptions";
288289

289290
private String id;
291+
private Integer uid;
290292
private String frequency;
291293
private String result;
292294
private String message;
@@ -302,6 +304,14 @@ public void setId(String id) {
302304
this.id = id;
303305
}
304306

307+
public Integer getUid() {
308+
return uid;
309+
}
310+
311+
public void setUid(Integer uid) {
312+
this.uid = uid;
313+
}
314+
305315
public String getFrequency() {
306316
return frequency;
307317
}
@@ -358,6 +368,7 @@ public boolean equals(Object o) {
358368
return false;
359369
Job job = (Job) o;
360370
return Objects.equals(id, job.id) &&
371+
Objects.equals(uid, job.uid) &&
361372
Objects.equals(frequency, job.frequency) &&
362373
Objects.equals(result, job.result) &&
363374
Objects.equals(message, job.message) &&
@@ -368,7 +379,7 @@ public boolean equals(Object o) {
368379

369380
@Override
370381
public int hashCode() {
371-
return Objects.hash(id, frequency, result, message, rebuildOnRestartIfContainer, instanceProperties, applyExceptions);
382+
return Objects.hash(id, uid, frequency, result, message, rebuildOnRestartIfContainer, instanceProperties, applyExceptions);
372383
}
373384

374385
public static class InstanceProperty {

src/main/java/com/smatechnologies/opcon/restapiclient/model/ServerOptions.java

Lines changed: 53 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public class ServerOptions {
2525
private String loginSecureMessage;
2626
private String ticketingSystemName;
2727
private Integer numberOfDaysToKeepServiceRequestExecutions;
28+
private Boolean enableWindowsAuthentication;
2829

2930
public HtmlDocumentation getHtmlDocumentation() {
3031
return htmlDocumentation;
@@ -74,6 +75,14 @@ public void setNumberOfDaysToKeepServiceRequestExecutions(Integer numberOfDaysTo
7475
this.numberOfDaysToKeepServiceRequestExecutions = numberOfDaysToKeepServiceRequestExecutions;
7576
}
7677

78+
public Boolean getEnableWindowsAuthentication() {
79+
return enableWindowsAuthentication;
80+
}
81+
82+
public void setEnableWindowsAuthentication(Boolean enableWindowsAuthentication) {
83+
this.enableWindowsAuthentication = enableWindowsAuthentication;
84+
}
85+
7786
@Override
7887
public boolean equals(Object o) {
7988
if (this == o)
@@ -86,12 +95,13 @@ public boolean equals(Object o) {
8695
Objects.equals(visionSettings, that.visionSettings) &&
8796
Objects.equals(loginSecureMessage, that.loginSecureMessage) &&
8897
Objects.equals(ticketingSystemName, that.ticketingSystemName) &&
89-
Objects.equals(numberOfDaysToKeepServiceRequestExecutions, that.numberOfDaysToKeepServiceRequestExecutions);
98+
Objects.equals(numberOfDaysToKeepServiceRequestExecutions, that.numberOfDaysToKeepServiceRequestExecutions) &&
99+
Objects.equals(enableWindowsAuthentication, that.enableWindowsAuthentication);
90100
}
91101

92102
@Override
93103
public int hashCode() {
94-
return Objects.hash(htmlDocumentation, passwordPolicy, visionSettings, loginSecureMessage, ticketingSystemName, numberOfDaysToKeepServiceRequestExecutions);
104+
return Objects.hash(htmlDocumentation, passwordPolicy, visionSettings, loginSecureMessage, ticketingSystemName, numberOfDaysToKeepServiceRequestExecutions, enableWindowsAuthentication);
95105
}
96106

97107
public static class HtmlDocumentation {
@@ -175,6 +185,9 @@ public static class PasswordPolicy {
175185
private Integer daysBeforeExpirationToWarn;
176186
private Integer numberOfPasswordsToRetain;
177187
private Integer attemptsBeforeAccountLock;
188+
private Integer minimumNumberOfLowerCaseCharacters;
189+
private Integer minimumNumberOfUpperCaseCharacters;
190+
private Integer minimumNumberOfDaysToChangePassword;
178191

179192
public Integer getMinimumCharacters() {
180193
return minimumCharacters;
@@ -248,47 +261,54 @@ public void setAttemptsBeforeAccountLock(Integer attemptsBeforeAccountLock) {
248261
this.attemptsBeforeAccountLock = attemptsBeforeAccountLock;
249262
}
250263

264+
public Integer getMinimumNumberOfLowerCaseCharacters() {
265+
return minimumNumberOfLowerCaseCharacters;
266+
}
267+
268+
public void setMinimumNumberOfLowerCaseCharacters(Integer minimumNumberOfLowerCaseCharacters) {
269+
this.minimumNumberOfLowerCaseCharacters = minimumNumberOfLowerCaseCharacters;
270+
}
271+
272+
public Integer getMinimumNumberOfUpperCaseCharacters() {
273+
return minimumNumberOfUpperCaseCharacters;
274+
}
275+
276+
public void setMinimumNumberOfUpperCaseCharacters(Integer minimumNumberOfUpperCaseCharacters) {
277+
this.minimumNumberOfUpperCaseCharacters = minimumNumberOfUpperCaseCharacters;
278+
}
279+
280+
public Integer getMinimumNumberOfDaysToChangePassword() {
281+
return minimumNumberOfDaysToChangePassword;
282+
}
283+
284+
public void setMinimumNumberOfDaysToChangePassword(Integer minimumNumberOfDaysToChangePassword) {
285+
this.minimumNumberOfDaysToChangePassword = minimumNumberOfDaysToChangePassword;
286+
}
287+
251288
@Override
252289
public boolean equals(Object o) {
253290
if (this == o)
254291
return true;
255292
if (o == null || getClass() != o.getClass())
256293
return false;
257-
258294
PasswordPolicy that = (PasswordPolicy) o;
259-
260-
if (minimumCharacters != null ? !minimumCharacters.equals(that.minimumCharacters) : that.minimumCharacters != null)
261-
return false;
262-
if (numericRequired != null ? !numericRequired.equals(that.numericRequired) : that.numericRequired != null)
263-
return false;
264-
if (alphaRequired != null ? !alphaRequired.equals(that.alphaRequired) : that.alphaRequired != null)
265-
return false;
266-
if (specialCharacterRequired != null ? !specialCharacterRequired.equals(that.specialCharacterRequired) : that.specialCharacterRequired != null)
267-
return false;
268-
if (repeatedCharacterOccurrencesAllowed != null ? !repeatedCharacterOccurrencesAllowed.equals(that.repeatedCharacterOccurrencesAllowed) : that.repeatedCharacterOccurrencesAllowed != null)
269-
return false;
270-
if (daysValid != null ? !daysValid.equals(that.daysValid) : that.daysValid != null)
271-
return false;
272-
if (daysBeforeExpirationToWarn != null ? !daysBeforeExpirationToWarn.equals(that.daysBeforeExpirationToWarn) : that.daysBeforeExpirationToWarn != null)
273-
return false;
274-
if (numberOfPasswordsToRetain != null ? !numberOfPasswordsToRetain.equals(that.numberOfPasswordsToRetain) : that.numberOfPasswordsToRetain != null)
275-
return false;
276-
return attemptsBeforeAccountLock != null ? attemptsBeforeAccountLock.equals(that.attemptsBeforeAccountLock) : that.attemptsBeforeAccountLock == null;
277-
295+
return Objects.equals(minimumCharacters, that.minimumCharacters) &&
296+
Objects.equals(numericRequired, that.numericRequired) &&
297+
Objects.equals(alphaRequired, that.alphaRequired) &&
298+
Objects.equals(specialCharacterRequired, that.specialCharacterRequired) &&
299+
Objects.equals(repeatedCharacterOccurrencesAllowed, that.repeatedCharacterOccurrencesAllowed) &&
300+
Objects.equals(daysValid, that.daysValid) &&
301+
Objects.equals(daysBeforeExpirationToWarn, that.daysBeforeExpirationToWarn) &&
302+
Objects.equals(numberOfPasswordsToRetain, that.numberOfPasswordsToRetain) &&
303+
Objects.equals(attemptsBeforeAccountLock, that.attemptsBeforeAccountLock) &&
304+
Objects.equals(minimumNumberOfLowerCaseCharacters, that.minimumNumberOfLowerCaseCharacters) &&
305+
Objects.equals(minimumNumberOfUpperCaseCharacters, that.minimumNumberOfUpperCaseCharacters) &&
306+
Objects.equals(minimumNumberOfDaysToChangePassword, that.minimumNumberOfDaysToChangePassword);
278307
}
279308

280309
@Override
281310
public int hashCode() {
282-
int result = minimumCharacters != null ? minimumCharacters.hashCode() : 0;
283-
result = 31 * result + (numericRequired != null ? numericRequired.hashCode() : 0);
284-
result = 31 * result + (alphaRequired != null ? alphaRequired.hashCode() : 0);
285-
result = 31 * result + (specialCharacterRequired != null ? specialCharacterRequired.hashCode() : 0);
286-
result = 31 * result + (repeatedCharacterOccurrencesAllowed != null ? repeatedCharacterOccurrencesAllowed.hashCode() : 0);
287-
result = 31 * result + (daysValid != null ? daysValid.hashCode() : 0);
288-
result = 31 * result + (daysBeforeExpirationToWarn != null ? daysBeforeExpirationToWarn.hashCode() : 0);
289-
result = 31 * result + (numberOfPasswordsToRetain != null ? numberOfPasswordsToRetain.hashCode() : 0);
290-
result = 31 * result + (attemptsBeforeAccountLock != null ? attemptsBeforeAccountLock.hashCode() : 0);
291-
return result;
311+
return Objects.hash(minimumCharacters, numericRequired, alphaRequired, specialCharacterRequired, repeatedCharacterOccurrencesAllowed, daysValid, daysBeforeExpirationToWarn, numberOfPasswordsToRetain, attemptsBeforeAccountLock, minimumNumberOfLowerCaseCharacters, minimumNumberOfUpperCaseCharacters, minimumNumberOfDaysToChangePassword);
292312
}
293313
}
294314

@@ -345,4 +365,4 @@ public int hashCode() {
345365
return Objects.hash(getVisionPastProcessingDays(), getVisionFutureProcessingDays(), getVisionHistoryDaysToKeep());
346366
}
347367
}
348-
}
368+
}

0 commit comments

Comments
 (0)