public class GetFileHistoryFolderResponse extends FolderResponse { @Element(required = true) private String root; @ElementList(required = true, entry="file") private ArrayList<FileVersion> files; public GetFileHistoryFolderResponse(int requestId, String root, List<FileVersion> files) { super(200, requestId, null); this.root = root; this.files = new ArrayList<FileVersion>(files); } public List<FileVersion> getFiles() { return files; } }
public class LsFolderRequest extends FolderRequest { @Element(required = false) private LsOperationOptions options; public LsOperationOptions getOptions() { return options; } public void setOptions(OperationOptions options) { this.options = (LsOperationOptions)options; } }
/** * A message is either a request or a response sent to * or from the daemon. All messages must inherit from this * class. Messages can be serialized/deserialized using the * {@link MessageFactory}. * * @author Philipp C. Heckel <philipp.heckel@gmail.com> */ @Root(strict = false) public abstract class Message { // Nothing here. }
public class LogOperationResult implements OperationResult { @ElementList(name = "databaseVersions", entry = "databaseVersion", required = true) private ArrayList<LightweightDatabaseVersion> databaseVersions; public LogOperationResult() { // Nothing } public LogOperationResult(ArrayList<LightweightDatabaseVersion> databaseVersions) { this.databaseVersions = databaseVersions; } public List<LightweightDatabaseVersion> getDatabaseVersions() { return databaseVersions; } }
@Override public T convert(ResponseBody value) throws IOException { try { T read = serializer.read(cls, value.charStream(), strict); if (read == null) { throw new IllegalStateException("Could not deserialize body as " + cls); } return read; } catch (RuntimeException | IOException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } finally { value.close(); } } }
public class RestoreFolderRequest extends FolderRequest { @Element(required = true) private RestoreOperationOptions options; public RestoreOperationOptions getOptions() { return options; } public void setOptions(OperationOptions options) { this.options = (RestoreOperationOptions) options; } }
/** * Internal events are {@link Event}s meant for JVM-local consumers. * * <p>In particular, they are not to be broadcasted to external subscribers, * such as GUIs connected via WS, but only to the local event bus. * * @author Philipp C. Heckel <philipp.heckel@gmail.com> */ @Root public abstract class InternalEvent extends Event { // Marker }
public class ApplicationLinkShortenerResponse { @Element(name = "shortLinkId", required = true) private String shortLinkId; public String getShortLinkId() { return shortLinkId; } }
public class LogFolderRequest extends FolderRequest { @Element(required = false) private LogOperationOptions options; public LogOperationOptions getOptions() { return options; } public void setOptions(OperationOptions options) { this.options = (LogOperationOptions)options; } }
public class GenlinkFolderRequest extends FolderRequest { @Element(required = false) private GenlinkOperationOptions options; public GenlinkOperationOptions getOptions() { return options; } public void setOptions(OperationOptions options) { this.options = (GenlinkOperationOptions) options; } }
public class StatusFolderRequest extends FolderRequest { @Element(required = false) private StatusOperationOptions options; public StatusOperationOptions getOptions() { return options; } public void setOptions(OperationOptions options) { this.options = (StatusOperationOptions)options; } }
public class GetFileHistoryFolderRequest extends FolderRequest { @Element(required = true) private String fileHistoryId; public String getFileHistoryId() { return fileHistoryId; } public void setFileHistoryId(String fileHistoryId) { this.fileHistoryId = fileHistoryId; } }
public class ConnectManagementRequest extends ManagementRequest { @Element(name = "options", required = true) private ConnectOperationOptions options; public ConnectManagementRequest() { // Nothing } public ConnectManagementRequest(ConnectOperationOptions options) { this.options = options; } public ConnectOperationOptions getOptions() { return options; } }
public class PluginManagementRequest extends ManagementRequest { @Element(name = "options", required = true) private PluginOperationOptions options; public PluginManagementRequest() { // Nothing } public PluginManagementRequest(PluginOperationOptions options) { this.options = options; } public PluginOperationOptions getOptions() { return options; } }
public class InitManagementRequest extends ManagementRequest { @Element(name = "options", required = true) private InitOperationOptions options; public InitManagementRequest() { // Nothing } public InitManagementRequest(InitOperationOptions options) { this.options = options; } public InitOperationOptions getOptions() { return options; } }