BrightSide Workbench Full Report + Source Code
EmptyController.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2017 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 package org.turro.entities;
20 
21 import java.io.File;
22 import java.util.Collection;
23 import java.util.Collections;
24 import java.util.HashMap;
25 import java.util.List;
26 import org.turro.action.IElephantSendable;
27 import org.turro.action.LinkType;
28 import org.turro.collections.KeyValueMap;
29 import org.turro.elephant.context.IConstructor;
30 import org.turro.file.Folder;
31 import org.turro.participation.ParticipationReason;
32 import org.turro.path.Path;
33 import org.turro.plugin.contacts.IContact;
34 import org.turro.script.Script;
35 import org.turro.security.ConceptPermission;
36 
41 public class EmptyController implements IElephantEntity {
42 
43  @Override
44  public IElephantEntity getController(String entityPath) {
45  return new EmptyController();
46  }
47 
48  @Override
49  public IElephantEntity getController(Object entity) {
50  return new EmptyController();
51  }
52 
53  @Override
54  public boolean isEmpty() {
55  return true;
56  }
57 
58  @Override
59  public String getTreeLabel() {
60  return null;
61  }
62 
63  @Override
64  public String getStringId() {
65  return EMPTY_ID;
66  }
67 
68  @Override
69  public Object getEntity() {
70  return null;
71  }
72 
73  @Override
74  public String getName() {
75  return null;
76  }
77 
78  @Override
79  public String getLabel() {
80  return null;
81  }
82 
83  @Override
84  public String getNameOrLabel() {
85  return null;
86  }
87 
88  @Override
89  public String getDescription() {
90  return null;
91  }
92 
93  @Override
94  public Object getLabelCtrl() {
95  return null;
96  }
97 
98  @Override
99  public String getImage() {
100  return null;
101  }
102 
103  @Override
104  public String getRoot() {
105  return null;
106  }
107 
108  @Override
109  public String getPath() {
110  return null;
111  }
112 
113  @Override
114  public String getHierarchicalPath() {
115  return null;
116  }
117 
118  @Override
120  return null;
121  }
122 
123  @Override
124  public List<IElephantEntity> getChildren() {
125  return Collections.EMPTY_LIST;
126  }
127 
128  @Override
129  public String getExtendedPath() {
130  return null;
131  }
132 
133  @Override
134  public File getFile() {
135  return null;
136  }
137 
138  @Override
139  public boolean showPath() {
140  return false;
141  }
142 
143  @Override
144  public boolean showEntity() {
145  return false;
146  }
147 
148  @Override
149  public boolean canEdit(IContact contact) {
150  return false;
151  }
152 
153  @Override
154  public boolean canPublish(IContact contact) {
155  return false;
156  }
157 
158  @Override
159  public Collection<String> getAllowedRoots() {
160  return Collections.EMPTY_LIST;
161  }
162 
163  @Override
165  return null;
166  }
167 
168  @Override
169  public Collection getEntitites(String search, int maxResults) {
170  return getEntitites(search, maxResults, new KeyValueMap(new HashMap()));
171  }
172 
173  @Override
174  public Collection getEntitites(String root, String search, int maxResults) {
175  return getEntitites(root, search, maxResults, new KeyValueMap(new HashMap()));
176  }
177 
178  @Override
179  public Collection getEntitites(String search, int maxResults, KeyValueMap kvm) {
180  return Collections.EMPTY_LIST;
181  }
182 
183  @Override
184  public Collection getEntitites(String root, String search, int maxResults, KeyValueMap kvm) {
185  return Collections.EMPTY_LIST;
186  }
187 
188  @Override
189  public Object configureCtrl(Object ctrl, IContact contact) {
190  return ctrl;
191  }
192 
193  @Override
194  public boolean canShowInContext(IContact contact, Object relatedEntity) {
195  return true;
196  }
197 
198  @Override
199  public Collection<Object> getRelatedByRole(EntityRole role, IContact contact) {
200  return null;
201  }
202 
203  @Override
204  public boolean hasRelatedRole(EntityRole role, IContact contact) {
205  return false;
206  }
207 
208  @Override
209  public String getExtendedWebPath() {
210  return null;
211  }
212 
213  @Override
214  public String getEntityUrl() {
215  return null;
216  }
217 
218  @Override
219  public String getMemberUrl() {
220  return null;
221  }
222 
223  @Override
224  public String getAppUrl() {
225  return null;
226  }
227 
228  @Override
229  public String getEntityUrl(LinkType type, String contextPath) {
230  return null;
231  }
232 
233  @Override
234  public String getReadAllUrl(LinkType type, String contextPath) {
235  return null;
236  }
237 
238  @Override
239  public String getLinkRoot() {
240  return null;
241  }
242 
243  @Override
244  public String getUserContext() {
245  return "/user";
246  }
247 
248  @Override
249  public Object getControl(String name, IContact contact) {
250  return null;
251  }
252 
253  @Override
254  public Object getControl(String name, IConstructor constructor, IContact contact) {
255  return null;
256  }
257 
258  @Override
259  public Object getControl(String name, String entityPath, IContact contact) {
260  return null;
261  }
262 
263  @Override
264  public Object getParticipationControl(IConstructor constructor, ParticipationReason reason) {
265  return null;
266  }
267 
268  @Override
269  public Object getParticipationControl(IConstructor constructor, IContact contact, ParticipationReason reason) {
270  return null;
271  }
272 
273  @Override
274  public String parseSpamCtrl(IConstructor constructor) {
275  return null;
276  }
277 
278  @Override
279  public String parseFollowCtrl(IConstructor constructor) {
280  return null;
281  }
282 
283  @Override
285  return (EntitySet) Collections.EMPTY_SET;
286  }
287 
288  @Override
289  public Script getActorScript() {
290  return null;
291  }
292 
293  @Override
294  public boolean isActor(String actor) {
295  return false;
296  }
297 
298  @Override
299  public boolean isActor(IContact contact, String actor) {
300  return false;
301  }
302 
303  @Override
305  return null;
306  }
307 
308  @Override
309  public Folder getDeliverables() {
310  return null;
311  }
312 
313  @Override
314  public Object getObject(Path entityPath) {
315  return null;
316  }
317 
318  @Override
319  public IElephantEntity getMain(Object entity) {
320  return null;
321  }
322 
323 }
boolean canShowInContext(IContact contact, Object relatedEntity)
Collection< String > getAllowedRoots()
Collection getEntitites(String root, String search, int maxResults, KeyValueMap kvm)
boolean canEdit(IContact contact)
boolean isActor(IContact contact, String actor)
String getEntityUrl(LinkType type, String contextPath)
Object getControl(String name, IConstructor constructor, IContact contact)
Collection getEntitites(String search, int maxResults, KeyValueMap kvm)
Collection getEntitites(String root, String search, int maxResults)
Object getParticipationControl(IConstructor constructor, IContact contact, ParticipationReason reason)
String parseFollowCtrl(IConstructor constructor)
boolean hasRelatedRole(EntityRole role, IContact contact)
boolean canPublish(IContact contact)
List< IElephantEntity > getChildren()
String parseSpamCtrl(IConstructor constructor)
Collection getEntitites(String search, int maxResults)
IElephantEntity getMain(Object entity)
Object configureCtrl(Object ctrl, IContact contact)
String getReadAllUrl(LinkType type, String contextPath)
Collection< Object > getRelatedByRole(EntityRole role, IContact contact)
ConceptPermission getConceptPermission(String name)
Object getControl(String name, IContact contact)
Object getControl(String name, String entityPath, IContact contact)
IElephantEntity getController(Object entity)
IElephantEntity getController(String entityPath)
Object getParticipationControl(IConstructor constructor, ParticipationReason reason)