-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add session information to the output Json
Add session information to the output Json when running the tool with --published-session-uid. The option will be supported only for customers with specific HF installed
- Loading branch information
1 parent
501a6cd
commit dde68aa
Showing
2 changed files
with
72 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
src/main/java/com/checkpoint/mgmt_api/objects/Session.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package com.checkpoint.mgmt_api.objects; | ||
|
||
import org.json.simple.JSONObject; | ||
|
||
public class Session | ||
{ | ||
private String uid; | ||
private String name; | ||
private String publishTime; | ||
private Boolean lastPublishedSession; | ||
|
||
public String getUid() | ||
{ | ||
return uid; | ||
} | ||
|
||
public void setUid(String uid) | ||
{ | ||
this.uid = uid; | ||
} | ||
|
||
public String getName() | ||
{ | ||
return name; | ||
} | ||
|
||
public void setName(String name) | ||
{ | ||
this.name = name; | ||
} | ||
|
||
public String getPublishTime() | ||
{ | ||
return publishTime; | ||
} | ||
|
||
public void setPublishTime(String publishTime) | ||
{ | ||
this.publishTime = publishTime; | ||
} | ||
|
||
public Boolean getLastPublishedSession() | ||
{ | ||
return lastPublishedSession; | ||
} | ||
|
||
public void setLastPublishedSession(Boolean lastPublishedSession) | ||
{ | ||
this.lastPublishedSession = lastPublishedSession; | ||
} | ||
|
||
public JSONObject toJson(){ | ||
|
||
JSONObject jsonObject = new JSONObject(); | ||
jsonObject.put("uid",getUid()); | ||
jsonObject.put("name",getName()); | ||
jsonObject.put("publish-time",getPublishTime()); | ||
jsonObject.put("last-published-session", getLastPublishedSession()); | ||
|
||
return jsonObject; | ||
} | ||
|
||
|
||
} |