@Override
public ListScmResult executeListCommand( ScmProviderRepository repository, ScmFileSet fileSet, boolean recursive,
ScmVersion scmVersion )
throws ScmException
{
ListScmResult result;
IntegrityScmProviderRepository iRepo = (IntegrityScmProviderRepository) repository;
getLogger().info( "Listing all files in project " + iRepo.getConfigruationPath() );
try
{
// Get a listing for all the members in the project...
List<Member> projectMembers = iRepo.getProject().listFiles( fileSet.getBasedir().getAbsolutePath() );
// Initialize the list of ScmFile objects for the ListScmResult
List<ScmFile> scmFileList = new ArrayList<ScmFile>();
for ( Iterator<Member> it = projectMembers.iterator(); it.hasNext(); )
{
Member siMember = it.next();
scmFileList.add( new ScmFile( siMember.getTargetFilePath(), ScmFileStatus.UNKNOWN ) );
}
result = new ListScmResult( scmFileList, new ScmResult( "si viewproject", "", "", true ) );
}
catch ( APIException aex )
{
ExceptionHandler eh = new ExceptionHandler( aex );
getLogger().error( "MKS API Exception: " + eh.getMessage() );
getLogger().debug( eh.getCommand() + " exited with return code " + eh.getExitCode() );
result = new ListScmResult( eh.getCommand(), eh.getMessage(), "Exit Code: " + eh.getExitCode(), false );
}
return result;
}