*/
public void handleUpdateRepository(ActionEvent event)
throws AbortProcessingException {
// start execution phase
RequestContext context = onExecutionPhaseStarted();
try {
getEditor().setTimeCodes(_timeCodes);
_timeCodes = "";
// copy ownership
Publisher owner = getSelectablePublishers().selectedAsPublisher(context, true);
if (owner != null) {
getEditor().getRepository().setOwnerId(owner.getLocalID());
}
getEditor().prepareForUpdate();
if (getEditor().validate(extractMessageBroker())) {
HrCompleteUpdateRequest req = new HrCompleteUpdateRequest(context, getEditor().getRepository());
boolean creating = req.execute();
extractMessageBroker().addSuccessMessage(
creating ? "catalog.harvest.manage.message.create.2" : "catalog.harvest.manage.message.update.2");
}
} catch (ValidationException e) {
String sKey = e.getKey();
if (sKey.length() > 0) {
String sMsg = sKey;
Schema schema = context.getCatalogConfiguration().getConfiguredSchemas().get(sKey);
if (schema != null) {
if (schema.getLabel() != null) {
String sResKey = schema.getLabel().getResourceKey();
if (sResKey.length() > 0) {
sMsg = extractMessageBroker().retrieveMessage(sResKey) + " (" + sKey + ")";