1 package org.weda.model.impl;
2
3 import java.util.List;
4 import java.util.Set;
5 import org.weda.action.ActionContainer;
6 import org.weda.action.ActionExecutionContext;
7 import org.weda.action.ActionRegistry;
8 import org.weda.action.ActionRegistryException;
9 import org.weda.action.ActionState;
10 import org.weda.action.ExecutedActionInfo;
11 import org.weda.model.ColumnDescriptor;
12 import org.weda.model.TableModel;
13 import org.weda.property.impl.PropertyDescriptorImpl;
14
15 /**Цель: хранение информации о свойстве связанного с псевдонимом объекта.
16 * @see {@link IndexedObjectAlias}
17 *
18 * @author tim
19 */
20 public class ColumnDescriptorImpl
21 extends PropertyDescriptorImpl
22 implements ColumnDescriptor
23 {
24 private String objectAlias;
25 private TableModel tableModel;
26 private ActionRegistry actionRegistry;
27
28 public String getObjectAlias() {
29 return objectAlias;
30 }
31
32 public void setObjectAlias(String objectAlias) {
33 this.objectAlias = objectAlias;
34 }
35
36 public TableModel getTableModel() {
37 return tableModel;
38 }
39
40 public void setTableModel(TableModel tableModel) {
41 this.tableModel = tableModel;
42 }
43
44 public ExecutedActionInfo executeAction(ActionExecutionContext context)
45 throws ActionRegistryException
46 {
47 return actionRegistry.executeAction(context);
48 }
49
50 public boolean hasRegisteredActions() {
51 return actionRegistry.hasRegisteredActions(this.getClass(), this);
52 }
53
54 public Set<Class> getDisabledActions() {
55 return null;
56 }
57
58 public List<ActionState> getActionsStates() throws ActionRegistryException {
59 return actionRegistry.getActionsStates(this, this.getClass());
60 }
61
62 public void setActionRegistry(ActionRegistry actionRegistry) {
63 this.actionRegistry = actionRegistry;
64 }
65
66 public String getActionContainerName() {
67 return getTableModel().getName()+"."+getName();
68 }
69
70 }