@JsonIgnore public String getDescription() { return activeStructureDto != null ? activeStructureDto.getDescription() : inactiveStructureDto.getDescription(); }
@JsonIgnore public boolean hasDeprecated() { return activeStructureDto != null && activeStructureDto.getStatus() == UpdateStatus.DEPRECATED; }
@JsonIgnore public long getEndpointCount() { return activeStructureDto != null ? activeStructureDto.getEndpointCount() : 0; }
/** * Create new instace of <code>AbstractStructure</code>. * @param dto data transfer object contain data that * assign on fields of new instance */ public AbstractStructure(AbstractStructureDto dto) { if (dto != null) { this.id = getLongId(dto); this.sequenceNumber = dto.getSequenceNumber(); this.description = dto.getDescription(); this.createdTime = dto.getCreatedTime(); this.lastModifyTime = dto.getLastModifyTime(); this.activatedTime = dto.getActivatedTime(); this.deactivatedTime = dto.getDeactivatedTime(); this.createdUsername = dto.getCreatedUsername(); this.modifiedUsername = dto.getModifiedUsername(); this.activatedUsername = dto.getActivatedUsername(); this.deactivatedUsername = dto.getDeactivatedUsername(); this.status = dto.getStatus(); this.endpointCount = dto.getEndpointCount(); Long appId = getLongId(dto.getApplicationId()); this.application = appId != null ? new Application(appId) : null; Long groupId = getLongId(dto.getEndpointGroupId()); this.endpointGroup = groupId != null ? new EndpointGroup(groupId) : null; this.version = dto.getVersion(); } }
this.active = struct.getStatus() != UpdateStatus.INACTIVE; if (!isEmpty(struct.getCreatedUsername())) { dateTimeCreatedLabel.setVisible(true); createdDateTime.setVisible(true); authorLabel.setVisible(true); createdUsername.setVisible(true); createdDateTime.setValue(millisecondsToDateTimeString(struct.getCreatedTime())); createdUsername.setValue(struct.getCreatedUsername()); if (!isEmpty(struct.getModifiedUsername())) { dateTimeModifiedLabel.setVisible(true); modifiedDateTime.setVisible(true); modifiedByLabel.setVisible(true); modifiedUsername.setVisible(true); modifiedDateTime.setValue(millisecondsToDateTimeString(struct.getLastModifyTime())); modifiedUsername.setValue(struct.getModifiedUsername()); if (!isEmpty(struct.getActivatedUsername())) { dateTimeActivatedLabel.setVisible(true); activatedDateTime.setVisible(true); activatedByLabel.setVisible(true); activatedUsername.setVisible(true); activatedDateTime.setValue(millisecondsToDateTimeString(struct.getActivatedTime())); activatedUsername.setValue(struct.getActivatedUsername()); if (!isEmpty(struct.getDeactivatedUsername())) { dateTimeDeactivatedLabel.setVisible(true); deactivatedDateTime.setVisible(true); deactivatedByLabel.setVisible(true);
@JsonIgnore public String getEndpointGroupId() { return activeStructureDto != null ? activeStructureDto.getEndpointGroupId() : inactiveStructureDto.getEndpointGroupId(); }