new RepositoryFile.Builder( id, name ).createdDate( created ).creatorId( creatorId ).lastModificationDate( lastModified ).folder( folder ).versioned( versioned ).path( path ).versionId( versionId ).fileSize( fileSize ).locked( locked ).lockDate( lockDate ).hidden( hidden ).schedulable( schedulable )
return builder.path( v.getPath() ).createdDate( unmarshalDate( v.getCreatedDate() ) ).creatorId( v.getCreatorId() ).description( v.getDescription() ) .folder( v.isFolder() ).fileSize( v.getFileSize() ).lastModificationDate( unmarshalDate( v.getLastModifiedDate() ) ).locale( v.getLocale() ) .lockDate( unmarshalDate( v.getLockDate() ) ).locked( v.isLocked() ).lockMessage( v.getLockMessage() ).lockOwner( v.getLockOwner() )
public Builder( final RepositoryFile other ) { this( other.getName() ); synchronized ( other ) { this.id( other.getId() ).path( other.getPath() ).createdDate( other.getCreatedDate() ).creatorId( other.getCreatorId() ).fileSize( other.getFileSize() ).folder( other.isFolder() ).lastModificationDate( other.getLastModifiedDate() ).versioned( other.isVersioned() ).hidden( other.isHidden() ).schedulable( other.isSchedulable() ).versionId( other.getVersionId() ).locked( other.isLocked() ).lockDate( other.getLockDate() ).lockOwner( other.getLockOwner() ).lockMessage( other.getLockMessage() ).title( other.getTitle() ).description( other.getDescription() ).locale( other.getLocale() ).originalParentFolderPath( other.getOriginalParentFolderPath() ).deletedDate( other.getDeletedDate() ).localePropertiesMap( other.getLocalePropertiesMap() ).aclNode( other.isAclNode() ); } }
private RepositoryFile nodeToDeletedFile( final Session session, final PentahoJcrConstants pentahoJcrConstants, final Node trashFileNode, String owner ) throws RepositoryException { // each fileId node has at most one child that is the deleted file RepositoryFile deletedFile = JcrRepositoryFileUtils.nodeToFile( session, pentahoJcrConstants, pathConversionHelper, lockHelper, trashFileNode ); Date deletedDate = getDeletedDate( trashFileNode, pentahoJcrConstants ); String originalParentFolderPath = getOriginalParentFolderPath( session, pentahoJcrConstants, trashFileNode, true ); return new RepositoryFile.Builder( deletedFile ).deletedDate( deletedDate ).originalParentFolderPath( originalParentFolderPath ).creatorId( owner ).build(); }