diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/IManagedWidgetDescription.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/IManagedWidgetDescription.java new file mode 100644 index 0000000000000000000000000000000000000000..f983a1380c1fab02f2423fb5e4888d2fe6ca37cd --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/IManagedWidgetDescription.java @@ -0,0 +1,29 @@ +/* + * Copyright 2011 ETH Zuerich, CISD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ch.systemsx.cisd.openbis.generic.shared.basic.dto; + +import ch.systemsx.cisd.openbis.generic.shared.basic.ISerializable; + +/** + * Interface implemented by objects describing a UI element (label, field, table) + * + * @author Piotr Buczek + */ +public interface IManagedWidgetDescription extends ISerializable +{ + ManagedWidgetType getManagedWidgetType(); +} diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedTableWidgetDescription.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedTableWidgetDescription.java new file mode 100644 index 0000000000000000000000000000000000000000..8f30de23df01ed70fb60632382319b42f15abfc2 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedTableWidgetDescription.java @@ -0,0 +1,53 @@ +/* + * Copyright 2011 ETH Zuerich, CISD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ch.systemsx.cisd.openbis.generic.shared.basic.dto; + +/** + * {@link IManagedWidgetDescription} implementation for tables + * + * @author Piotr Buczek + */ +public class ManagedTableWidgetDescription implements IManagedWidgetDescription +{ + private static final long serialVersionUID = ServiceVersionHolder.VERSION; + + private TypedTableModel<?> tableModel; + + public ManagedTableWidgetDescription() + { + } + + public void setTableModel(TypedTableModel<?> tableModel) + { + this.tableModel = tableModel; + } + + public TypedTableModel<?> getTableModel() + { + return tableModel; + } + + // + // IManagedWidgetDescription + // + + public ManagedWidgetType getManagedWidgetType() + { + return ManagedWidgetType.TABLE; + } + +} diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiDescription.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiDescription.java new file mode 100644 index 0000000000000000000000000000000000000000..817248e08b533dc2bfb4211950e532c5b8a91218 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiDescription.java @@ -0,0 +1,52 @@ +/* + * Copyright 2011 ETH Zuerich, CISD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ch.systemsx.cisd.openbis.generic.shared.basic.dto; + +import java.util.List; + +import ch.systemsx.cisd.openbis.generic.shared.basic.ISerializable; + +/** + * Object that declaratively describes a UI (labels, fields, their ordering, table content). + * + * @author Piotr Buczek + */ +public class ManagedUiDescription implements ISerializable +{ + private static final long serialVersionUID = ServiceVersionHolder.VERSION; + + private List<IManagedWidgetDescription> widgetDescriptions; + + public ManagedUiDescription() + { + } + + public List<IManagedWidgetDescription> getWidgetDescriptions() + { + return widgetDescriptions; + } + + public void setWidgetDescriptions(List<IManagedWidgetDescription> widgetDescriptions) + { + this.widgetDescriptions = widgetDescriptions; + } + + public void addWidgetDescription(IManagedWidgetDescription widgetDescription) + { + widgetDescriptions.add(widgetDescription); + } +} diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedWidgetType.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedWidgetType.java new file mode 100644 index 0000000000000000000000000000000000000000..b5c46623d4768950755bed1f80729d25910f975b --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedWidgetType.java @@ -0,0 +1,27 @@ +/* + * Copyright 2011 ETH Zuerich, CISD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ch.systemsx.cisd.openbis.generic.shared.basic.dto; + +import ch.systemsx.cisd.openbis.generic.shared.basic.ISerializable; + +/** + * @author Piotr Buczek + */ +public enum ManagedWidgetType implements ISerializable +{ + TABLE, LABEL, INPUT; +}