Hide internal-use references from some objects emitted by API

This commit is contained in:
catbref 2019-01-16 15:46:35 +00:00
parent c81a3838fc
commit 6a10df85ab
14 changed files with 36 additions and 0 deletions

View File

@ -2,6 +2,9 @@ package org.qora.data.asset;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlTransient;
import io.swagger.v3.oas.annotations.media.Schema;
// All properties to be converted to JSON via JAX-RS
@XmlAccessorType(XmlAccessType.FIELD)
@ -14,6 +17,9 @@ public class AssetData {
private String description;
private long quantity;
private boolean isDivisible;
// No need to expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] reference;
// Constructors

View File

@ -4,6 +4,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlTransient;
import io.swagger.v3.oas.annotations.media.Schema;
// All properties to be converted to JSON via JAX-RS
@XmlAccessorType(XmlAccessType.FIELD)
public class GroupAdminData {
@ -14,6 +16,7 @@ public class GroupAdminData {
/** Reference to transaction that triggered adminship. Could be JOIN_GROUP, GROUP_INVITE, CREATE_GROUP or others... */
// No need to ever expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] reference;
// Constructors

View File

@ -4,6 +4,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlTransient;
import io.swagger.v3.oas.annotations.media.Schema;
// All properties to be converted to JSON via JAX-RS
@XmlAccessorType(XmlAccessType.FIELD)
public class GroupBanData {
@ -18,6 +20,7 @@ public class GroupBanData {
/** Reference to GROUP_BAN transaction, used to rebuild this ban during orphaning. */
// No need to ever expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] reference;
// Constructors

View File

@ -4,6 +4,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlTransient;
import io.swagger.v3.oas.annotations.media.Schema;
// All properties to be converted to JSON via JAX-RS
@XmlAccessorType(XmlAccessType.FIELD)
public class GroupData {
@ -19,6 +21,7 @@ public class GroupData {
/** Reference to CREATE_GROUP or UPDATE_GROUP transaction, used to rebuild group during orphaning. */
// No need to ever expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] reference;
// Constructors

View File

@ -4,6 +4,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlTransient;
import io.swagger.v3.oas.annotations.media.Schema;
// All properties to be converted to JSON via JAX-RS
@XmlAccessorType(XmlAccessType.FIELD)
public class GroupInviteData {
@ -16,6 +18,7 @@ public class GroupInviteData {
/** Reference to GROUP_INVITE transaction, used to rebuild this invite during orphaning. */
// No need to ever expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] reference;
// Constructors

View File

@ -4,6 +4,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlTransient;
import io.swagger.v3.oas.annotations.media.Schema;
// All properties to be converted to JSON via JAX-RS
@XmlAccessorType(XmlAccessType.FIELD)
public class GroupJoinRequestData {
@ -14,6 +16,7 @@ public class GroupJoinRequestData {
/** Reference to JOIN_GROUP transaction, used to rebuild this join request during orphaning. */
// No need to ever expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] reference;
// Constructors

View File

@ -4,6 +4,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlTransient;
import io.swagger.v3.oas.annotations.media.Schema;
// All properties to be converted to JSON via JAX-RS
@XmlAccessorType(XmlAccessType.FIELD)
public class GroupMemberData {
@ -15,6 +17,7 @@ public class GroupMemberData {
/** Reference to transaction that triggered membership. Could be JOIN_GROUP, GROUP_INVITE, CREATE_GROUP or others... */
// No need to ever expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] reference;
// Constructors

View File

@ -26,6 +26,7 @@ public class CancelGroupBanTransactionData extends TransactionData {
/** Reference to GROUP_BAN transaction, used to rebuild ban during orphaning. */
// No need to ever expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] banReference;
// Constructors

View File

@ -26,6 +26,7 @@ public class CancelGroupInviteTransactionData extends TransactionData {
/** Reference to GROUP_INVITE transaction, used to rebuild invite during orphaning. */
// No need to ever expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] inviteReference;
// Constructors

View File

@ -46,14 +46,17 @@ public class GroupBanTransactionData extends TransactionData {
/** Reference to transaction that triggered membership. Could be JOIN_GROUP, GROUP_INVITE or UPDATE_GROUP transaction. */
// No need to ever expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] memberReference;
/** Reference to transaction that triggered adminship. */
// No need to ever expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] adminReference;
/** Reference to pending join-request or invite transaction that was deleted by this so it (invite/join-request) can be rebuilt during orphaning. */
// No need to ever expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] joinInviteReference;
// Constructors

View File

@ -28,6 +28,7 @@ public class GroupInviteTransactionData extends TransactionData {
/** Reference to JOIN_GROUP transaction, used to rebuild this join request during orphaning. */
// No need to ever expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] joinReference;
// Constructors

View File

@ -43,14 +43,17 @@ public class GroupKickTransactionData extends TransactionData {
/** Reference to transaction that triggered membership. */
// No need to ever expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] memberReference;
/** Reference to transaction that triggered adminship. */
// No need to ever expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] adminReference;
/** Reference to JOIN_GROUP transaction, used to rebuild this join request during orphaning. */
// No need to ever expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] joinReference;
// Constructors

View File

@ -24,6 +24,7 @@ public class JoinGroupTransactionData extends TransactionData {
/** Reference to GROUP_INVITE transaction, used to rebuild invite during orphaning. */
// No need to ever expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] inviteReference;
// Constructors

View File

@ -24,10 +24,12 @@ public class LeaveGroupTransactionData extends TransactionData {
/** Reference to transaction that triggered membership. */
// No need to ever expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] memberReference;
/** Reference to transaction that triggered adminship. */
// No need to ever expose this via API
@XmlTransient
@Schema(hidden = true)
private byte[] adminReference;
// Constructors