@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public <T extends QueryOptionsListReadHandle> T optionsList(T optionsHandle) throws ForbiddenUserException, FailedRequestException { HandleImplementation optionsBase = HandleAccessor.checkHandle(optionsHandle, "optionslist"); Format optionsFormat = optionsBase.getFormat(); switch(optionsFormat) { case UNKNOWN: optionsFormat = Format.XML; break; case JSON: case XML: break; default: throw new UnsupportedOperationException("Only XML and JSON options list results are possible."); } String mimetype = optionsFormat.getDefaultMimetype(); optionsBase.receiveContent(services.optionsList(optionsBase.receiveAs(), mimetype, null)); return optionsHandle; } }
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public <T extends QueryOptionsListReadHandle> T optionsList(T optionsHandle) throws ForbiddenUserException, FailedRequestException { HandleImplementation optionsBase = HandleAccessor.checkHandle(optionsHandle, "optionslist"); Format optionsFormat = optionsBase.getFormat(); switch(optionsFormat) { case UNKNOWN: optionsFormat = Format.XML; break; case JSON: case XML: break; default: throw new UnsupportedOperationException("Only XML and JSON options list results are possible."); } String mimetype = optionsFormat.getDefaultMimetype(); optionsBase.receiveContent(services.optionsList(optionsBase.receiveAs(), mimetype, null)); return optionsHandle; } }
@SuppressWarnings("unchecked") @Override public <T extends QueryOptionsListReadHandle> T optionsList(T optionsHandle, Transaction transaction) { @SuppressWarnings("rawtypes") HandleImplementation optionsBase = HandleAccessor.checkHandle(optionsHandle, "optionslist"); Format optionsFormat = optionsBase.getFormat(); switch(optionsFormat) { case UNKNOWN: optionsFormat = Format.XML; break; case JSON: case XML: break; default: throw new UnsupportedOperationException("Only XML and JSON options list results are possible."); } String mimetype = optionsFormat.getDefaultMimetype(); String tid = transaction == null ? null : transaction.getTransactionId(); optionsBase.receiveContent(services.optionsList(optionsBase.receiveAs(), mimetype, tid)); return optionsHandle; }
@SuppressWarnings("unchecked") @Override public <T extends QueryOptionsListReadHandle> T optionsList(T optionsHandle, Transaction transaction) { @SuppressWarnings("rawtypes") HandleImplementation optionsBase = HandleAccessor.checkHandle(optionsHandle, "optionslist"); Format optionsFormat = optionsBase.getFormat(); switch(optionsFormat) { case UNKNOWN: optionsFormat = Format.XML; break; case JSON: case XML: break; default: throw new UnsupportedOperationException("Only XML and JSON options list results are possible."); } String mimetype = optionsFormat.getDefaultMimetype(); String tid = transaction == null ? null : transaction.getTransactionId(); optionsBase.receiveContent(services.optionsList(optionsBase.receiveAs(), mimetype, transaction)); return optionsHandle; }