Revision 0c40f20e
Added by Andreas Müller over 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/GrantedAuthoritySelectionDialog.java | ||
---|---|---|
27 | 27 |
/** |
28 | 28 |
* @author a.kohlbecker |
29 | 29 |
* @created Sept 12, 2011 |
30 |
* @version 1.0 |
|
31 | 30 |
*/ |
32 | 31 |
public class GrantedAuthoritySelectionDialog extends AbstractFilteredCdmResourceSelectionDialog<GrantedAuthorityImpl> { |
33 | 32 |
|
... | ... | |
55 | 54 |
title, multi, settings, cdmObject); |
56 | 55 |
} |
57 | 56 |
|
58 |
/* (non-Javadoc) |
|
59 |
* @see eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#search |
|
60 |
*/ |
|
61 | 57 |
@Override |
62 | 58 |
protected void callService(String pattern) { |
63 | 59 |
List<GrantedAuthorityImpl> authorities = CdmStore.getService(IGrantedAuthorityService.class).list(GrantedAuthorityImpl.class, null, null, null, null); |
64 | 60 |
|
65 |
model = new ArrayList<UuidAndTitleCache<GrantedAuthorityImpl>>();
|
|
61 |
model = new ArrayList<>(); |
|
66 | 62 |
|
67 | 63 |
for(GrantedAuthorityImpl authority : authorities){ |
68 | 64 |
if ( pattern == null || authority.getAuthority().matches(pattern +".*")){ |
69 |
model.add(new UuidAndTitleCache<GrantedAuthorityImpl>(GrantedAuthorityImpl.class, authority.getUuid(), authority.getId(), String.format("%s", GrantedAuthorityLabelTextProvider.getText(authority))));
|
|
65 |
model.add(new UuidAndTitleCache<>(GrantedAuthorityImpl.class, authority.getUuid(), authority.getId(), String.format("%s", GrantedAuthorityLabelTextProvider.getText(authority)))); |
|
70 | 66 |
} |
71 | 67 |
} |
72 | 68 |
|
73 | 69 |
} |
74 | 70 |
|
75 |
/* (non-Javadoc) |
|
76 |
* @see eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewWizardLinkText() |
|
77 |
*/ |
|
78 | 71 |
@Override |
79 | 72 |
protected String[] getNewWizardText() { |
80 | 73 |
return new String[]{"New GrantedAuthority"}; |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractCdmEntityWizardPage.java | ||
---|---|---|
31 | 31 |
* |
32 | 32 |
* @author n.hoffmann |
33 | 33 |
* @created Jun 1, 2010 |
34 |
* @version 1.0 |
|
35 | 34 |
*/ |
36 | 35 |
public abstract class AbstractCdmEntityWizardPage<T> extends WizardPage |
37 | 36 |
implements IConversationEnabled, IPropertyChangeListener { |
... | ... | |
80 | 79 |
return ""; |
81 | 80 |
} |
82 | 81 |
|
83 |
/* |
|
84 |
* (non-Javadoc) |
|
85 |
* |
|
86 |
* @see |
|
87 |
* org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets |
|
88 |
* .Composite) |
|
89 |
*/ |
|
90 | 82 |
/** {@inheritDoc} */ |
91 | 83 |
@Override |
92 | 84 |
public void createControl(Composite parent) { |
Also available in: Unified diff
cleanup