Merge pull request #1222 from rasika/master

Adding an extension point into the PaginationRequest class
4.x.x
Ruwan 7 years ago committed by GitHub
commit af4f3302ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -19,6 +19,8 @@
package org.wso2.carbon.device.mgt.common;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
* This class holds required parameters for a querying a paginated device response.
@ -35,6 +37,7 @@ public class PaginationRequest {
private String deviceName;
private String ownership;
private String ownerRole;
private Map<String, Object> property = new HashMap<>();
private Date since;
public PaginationRequest(int start, int rowCount) {
@ -130,6 +133,24 @@ public class PaginationRequest {
this.ownerPattern = ownerPattern;
}
public void setProperty(String key, Object value) {
this.property.put(key, value);
}
public void setProperties(Map<String, Object> parameters) {
this.property.putAll(parameters);
}
public void getProperty(String key) {
this.property.get(key);
}
public Map<String, Object> getProperties() {
Map<String, Object> temp = new HashMap<>();
temp.putAll(property);
return temp;
}
@Override
public String toString() {
return "Device type '" + this.deviceType + "' Device Name '" + this.deviceName + "' row count: " + this.rowCount

Loading…
Cancel
Save