View Javadoc
1   package org.argeo.connect.ui;
2   
3   import javax.jcr.Node;
4   
5   import org.argeo.eclipse.ui.specific.OpenFile;
6   
7   /** Provide interface to manage a Connect App in a RCP/RAP Workbench */
8   public interface AppWorkbenchService extends AppUiService {
9   
10  	/**
11  	 * @return the relevant OpenEntityEditor command ID in the current context
12  	 */
13  	default public String getOpenEntityEditorCmdId() {
14  		// return OpenEntityEditor.ID;
15  		return "org.argeo.connect.ui.workbench.openEntityEditor";
16  	}
17  
18  	/**
19  	 * @return the relevant OpenSearchEntityEditor command ID in the current context
20  	 */
21  	default public String getOpenSearchEntityEditorCmdId() {
22  		// return OpenSearchEntityEditor.ID;
23  		return "org.argeo.connect.ui.workbench.openSearchEntityEditor";
24  	}
25  
26  	public void openEntityEditor(Node entity);
27  
28  //	public void openEntityEditor(String entityId);
29  
30  	public void openSearchEntityView(String nodeType, String label);
31  
32  	/**
33  	 * @return the ID of the relevant editor for this node within the current
34  	 *         context
35  	 */
36  	public String getEntityEditorId(Node entity);
37  
38  	/**
39  	 * @return the ID of the relevant editor to search among nodes with this
40  	 *         NodeType
41  	 */
42  	public String getSearchEntityEditorId(String nodeType);
43  
44  	/**
45  	 * @return the ID of the relevant OpenFile command ID for current context
46  	 */
47  	default public String getOpenFileCmdId() {
48  		return OpenFile.ID;
49  	}
50  
51  	/**
52  	 * @return the ID of the default Editor for current context
53  	 */
54  	default public String getDefaultEditorId() {
55  		return null;
56  	}
57  }