Skip to content

Commit

Permalink
Merge pull request #5804 from joana-fb/PDI-20262
Browse files Browse the repository at this point in the history
[PDI-20262] - Uploaded PDI Job/Transformation in PDI and save in Repository has file size of 0 on the Properties screen
  • Loading branch information
smmribeiro authored Dec 10, 2024
2 parents a07e457 + 2b48ee9 commit ba550c7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public NodeRepositoryFileDataDto() {
}

private DataNodeDto node;
private long dataSize = 0;

public DataNodeDto getNode() {
return node;
Expand All @@ -32,6 +33,14 @@ public void setNode( DataNodeDto node ) {
this.node = node;
}

public long getDataSize() {
return dataSize;
}

public void setDataSize( long dataSize ) {
this.dataSize = dataSize;
}

@SuppressWarnings( "nls" )
@Override
public String toString() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,22 @@
*/
public class NodeRepositoryFileDataDtoTest {
@Test
public void testDto() {
public void testDtoNode() {

NodeRepositoryFileDataDto dto = new NodeRepositoryFileDataDto();
DataNodeDto nodeMock = new DataNodeDto();
dto.setNode( nodeMock );
assertEquals( dto.getNode(), nodeMock );
assertEquals( nodeMock, dto.getNode() );

}

@Test
public void testDtoDataSize() {

NodeRepositoryFileDataDto dto = new NodeRepositoryFileDataDto();
int dataSize = 100;
dto.setDataSize( dataSize );
assertEquals( dataSize, dto.getDataSize() );

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public NodeRepositoryFileDataDto marshal( final NodeRepositoryFileData v ) {
NodeRepositoryFileDataDto d = new NodeRepositoryFileDataDto();
DataNodeDto node = new DataNodeDto();
d.setNode( node );
d.setDataSize( v.getDataSize() );
toDataNodeDto( node, v.getNode() );
return d;
}
Expand Down Expand Up @@ -73,8 +74,7 @@ protected void toDataNodeDto( final DataNodeDto nodeDto, final DataNode node ) {
@Override
public NodeRepositoryFileData unmarshal( final NodeRepositoryFileDataDto v ) {
DataNode node = toDataNode( v.getNode() );
NodeRepositoryFileData data = new NodeRepositoryFileData( node );
return data;
return new NodeRepositoryFileData( node, v.getDataSize() );
}

protected DataNode toDataNode( final DataNodeDto nodeDto ) {
Expand Down

0 comments on commit ba550c7

Please sign in to comment.