Project

General

Profile

« Previous | Next » 

Revision efc9727a

Added by Patrick Plitzner over 7 years ago

Trim code

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AbstractBulkEditorInput.java
41 41
import eu.etaxonomy.taxeditor.store.CdmStore;
42 42

  
43 43
/**
44
 * <p>Abstract AbstractBulkEditorInput class.</p>
45
 *
46 44
 * @author p.ciardelli
47 45
 * @created 25.06.2009
48 46
 * @version 1.0
......
63 61
	    this.conversation = CdmStore.createConversation();
64 62
	}
65 63

  
66
	/**
67
	 * <p>NewInstance</p>
68
	 *
69
	 * @param inputType a {@link eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInputTypeValues.BulkEditorInputType} object.
70
	 * @return a {@link eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput} object.
71
	 */
72 64
	static public AbstractBulkEditorInput NewInstance(BulkEditorInputType inputType) {
73 65

  
74 66
		return BulkEditorInputType.getInput(inputType);
75 67
	}
76 68

  
77
	/**
78
	 * <p>NewInstance</p>
79
	 *
80
	 * @param entity a {@link eu.etaxonomy.cdm.model.common.IdentifiableEntity} object.
81
	 * @return a {@link eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput} object.
82
	 */
83 69
	public static AbstractBulkEditorInput NewInstance(IdentifiableEntity entity) {
84 70

  
85

  
86 71
		BulkEditorInputType inputType = BulkEditorInputType.getByType(entity.getClass());
87 72

  
88 73
		AbstractBulkEditorInput editorInput = NewInstance(inputType);
......
92 77
		return editorInput;
93 78
	}
94 79

  
95
	/**
96
	 * <p>listEntities</p>
97
	 *
98
	 * @param configurator a {@link eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator} object.
99
	 * @return a {@link java.util.List} object.
100
	 */
101 80
	protected abstract List<T> listEntities(IIdentifiableEntityServiceConfigurator configurator);
102 81

  
103 82
	protected abstract T loadEntity(UUID entityUuid);
......
106 85
		this.entityUuid = entityUuid;
107 86
	}
108 87

  
109
	/**
110
	 * <p>Getter for the field <code>entityUuid</code>.</p>
111
	 *
112
	 * @return a {@link java.util.UUID} object.
113
	 */
114 88
	public UUID getEntityUuid() {
115 89
		return entityUuid;
116 90
	}
117 91

  
118

  
119
	/* (non-Javadoc)
120
	 * @see org.eclipse.ui.IEditorInput#exists()
121
	 */
122
	/**
123
	 * <p>exists</p>
124
	 *
125
	 * @return a boolean.
126
	 */
127 92
	@Override
128 93
    public boolean exists() {
129 94
		// TODO Auto-generated method stub
130 95
		return false;
131 96
	}
132 97

  
133
	/* (non-Javadoc)
134
	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
135
	 */
136
	/**
137
	 * <p>getImageDescriptor</p>
138
	 *
139
	 * @return a {@link org.eclipse.jface.resource.ImageDescriptor} object.
140
	 */
141 98
	@Override
142 99
    public ImageDescriptor getImageDescriptor() {
143 100
		// TODO Auto-generated method stub
144 101
		return null;
145 102
	}
146 103

  
147
	/* (non-Javadoc)
148
	 * @see org.eclipse.ui.IEditorInput#getPersistable()
149
	 */
150
	/**
151
	 * <p>getPersistable</p>
152
	 *
153
	 * @return a {@link org.eclipse.ui.IPersistableElement} object.
154
	 */
155 104
	@Override
156 105
    public IPersistableElement getPersistable() {
157 106
		return null;
158 107
	}
159 108

  
160
	/* (non-Javadoc)
161
	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
162
	 */
163 109
	/** {@inheritDoc} */
164 110
	@Override
165 111
    @SuppressWarnings("unchecked")
......
167 113
		return null;
168 114
	}
169 115

  
170
	/**
171
	 * <p>Setter for the field <code>query</code>.</p>
172
	 *
173
	 * @param bulkEditorQuery a {@link eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorQuery} object.
174
	 */
175 116
	public void performSearch(final BulkEditorQuery bulkEditorQuery) {
176 117

  
177 118
		List<T> entityList = new ArrayList<T>();
......
197 138
		model = entityList;
198 139
	}
199 140

  
200
	/**
201
	 * <p>isMergingEnabled</p>
202
	 *
203
	 * @return a boolean.
204
	 */
205 141
	public boolean isMergingEnabled() {
206 142
		return false;
207 143
	}
208 144

  
209
	/**
210
	 * <p>isMergingEnabled</p>
211
	 *
212
	 * @return a boolean.
213
	 */
214 145
	public boolean isConvertingEnabled() {
215 146
		return false;
216 147
	}
217
	/**
218
	 * <p>isMarkerTypeEditingEnabled</p>
219
	 *
220
	 * @param markerType a {@link eu.etaxonomy.cdm.model.common.MarkerType} object.
221
	 * @return a boolean.
222
	 */
148

  
223 149
	public boolean isMarkerTypeEditingEnabled(MarkerType markerType) {
224 150
		return false;
225 151
	}
......
257 183
		return entityCreator;
258 184
	}
259 185

  
260
	/**
261
	 * @return
262
	 */
263 186
	protected abstract IEntityCreator<T> createEntityCreator();
264 187

  
265 188
	/**
......
286 209
		return entity.getClass().getSimpleName();
287 210
	}
288 211

  
289
	/**
290
	 * @param entity
291
	 * @return
292
	 */
293 212
	public String getText(T entity) {
294 213
		if(entity instanceof IdentifiableEntity){
295 214
			IdentifiableEntity identifiableEntity = (IdentifiableEntity) HibernateProxyHelper.deproxy(entity);
......
300 219
		return "No text. Implement in subclass";
301 220
	}
302 221

  
303
	/**
304
	 * @return
305
	 */
306 222
	public List<T> getModel() {
307 223
		return model;
308 224
	}
......
317 233
	    }
318 234
	}
319 235

  
320
    /* (non-Javadoc)
321
     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
322
     */
323 236
    @Override
324 237
    public   List<T> getRootEntities() {
325 238
        return getModel();
326 239
    }
327 240

  
328 241

  
329
    /* (non-Javadoc)
330
     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
331
     */
332 242
    @Override
333 243
    public Map<Object, List<String>> getPropertyPathsMap() {
334 244
        // TODO Auto-generated method stub

Also available in: Unified diff