// If we know the most recent deployment of the directory, act on that
// deployment by default
final ArrayList<ShinyAppsDeploymentRecord> recordList =
new ArrayList<ShinyAppsDeploymentRecord>();
ShinyAppsDeploymentRecord lastRecord = dirState_.getLastDeployment(dir);
if (lastRecord != null)
{
recordList.add(lastRecord);
}
for (int i = 0; i < records.length(); i++)
{
ShinyAppsDeploymentRecord record = records.get(i);
if (lastRecord == null)
{
recordList.add(record);
}
else
{
if (record.getUrl().equals(lastRecord.getUrl()))
recordList.set(0, record);
}
}
// We need to further filter the list by deployments that are