bigbluebutton-web: Updated state when recording is published/unpublished

This commit is contained in:
jfederico 2016-01-19 15:39:10 -05:00
parent 91b0e54600
commit 2abb0acbc1
2 changed files with 13 additions and 4 deletions

View File

@ -184,6 +184,7 @@ public class RecordingService {
if (moved) {
log.debug("Recording successfully moved!");
r.setPublished(publish);
r.setState(publish? Recording.STATE_PUBLISHED: Recording.STATE_UNPUBLISHED);
recordingServiceHelper.writeRecordingInfo(dest.getAbsolutePath() + File.separatorChar + recordings[f].getName(), r);
}
}
@ -191,7 +192,7 @@ public class RecordingService {
}
}
}
public void delete(String recordingId) {
deleteRecording(recordingId, publishedDir);
deleteRecording(recordingId, unpublishedDir);

View File

@ -43,8 +43,16 @@ public class Recording {
private String playbackFormat;
private String playbackDuration;
private GPathResult playbackExtensions;
public static final String STATE_PROCESSING = "processing";
public static final String STATE_PROCESSED = "processed";
public static final String STATE_PUBLISING = "publishing";
public static final String STATE_PUBLISHED = "published";
public static final String STATE_UNPUBLISING = "unpublishing";
public static final String STATE_UNPUBLISHED = "unpublished";
public static final String STATE_DELETING = "deleting";
public static final String STATE_DELETED = "deleted";
public String getId() {
return id;
}
@ -56,7 +64,7 @@ public class Recording {
public String getState() {
String state = this.state;
if ( state.equals("available") ) {
state = isPublished()? "published": "unpublished";
state = isPublished()? STATE_PUBLISHED: STATE_UNPUBLISHED;
}
return state;
}