Revision 699de23b
Added by Andreas Kohlbecker about 6 years ago
src/main/java/eu/etaxonomy/cdm/service/RegistrationWorkingSetService.java | ||
---|---|---|
53 | 53 |
public class RegistrationWorkingSetService implements IRegistrationWorkingSetService { |
54 | 54 |
|
55 | 55 |
public static final List<String> REGISTRATION_INIT_STRATEGY = Arrays.asList(new String []{ |
56 |
"blockedBy.typeDesignations",
|
|
56 |
"blockedBy", |
|
57 | 57 |
// typeDesignation |
58 | 58 |
"typeDesignations.typeStatus", |
59 | 59 |
"typeDesignations.typifiedNames.typeDesignations", // important !! |
... | ... | |
98 | 98 |
"derivationEvents.derivatives" // important, otherwise the DerivedUnits are not included into the graph of initialized entities!!! |
99 | 99 |
}); |
100 | 100 |
|
101 |
public static final List<String> BLOCKING_REGISTRATION_INIT_STRATEGY = Arrays.asList(new String []{ |
|
102 |
|
|
103 |
"blockedBy.blockedBy", |
|
104 |
// typeDesignation |
|
105 |
"blockedBy.typeDesignations.typeStatus", |
|
106 |
// "typeDesignations.typifiedNames.typeDesignations", // important !! |
|
107 |
// "typeDesignations.typeSpecimen", |
|
108 |
// "typeDesignations.typeName.$", |
|
109 |
// "typeDesignations.citation", |
|
110 |
// "typeDesignations.citation.authorship.$", |
|
111 |
// name |
|
112 |
// "blockedBy.name.$", |
|
113 |
"blockedBy.name.nomenclaturalReference.authorship", |
|
114 |
"blockedBy.name.nomenclaturalReference.inReference", |
|
115 |
"blockedBy.name.rank", |
|
116 |
// "name.homotypicalGroup.typifiedNames", |
|
117 |
// "name.status.type", |
|
118 |
// "name.typeDesignations", |
|
119 |
// institution |
|
120 |
"blockedBy.institution", |
|
121 |
} |
|
122 |
); |
|
123 |
|
|
101 | 124 |
/** |
102 | 125 |
* |
103 | 126 |
*/ |
... | ... | |
167 | 190 |
return new RegistrationWorkingSet(makeDTOs(pager.getRecords())); |
168 | 191 |
} |
169 | 192 |
|
193 |
@Override |
|
194 |
public Set<RegistrationDTO> loadBlockingRegistrations(Integer blockedRegistrationId){ |
|
195 |
|
|
196 |
Registration registration = repo.getRegistrationService().load(blockedRegistrationId, BLOCKING_REGISTRATION_INIT_STRATEGY); |
|
197 |
Set<Registration> registrations = registration.getBlockedBy(); |
|
198 |
|
|
199 |
Set<RegistrationDTO> blockingSet = new HashSet<>(); |
|
200 |
for(Registration reg : registrations){ |
|
201 |
blockingSet.add(new RegistrationDTO(reg)); |
|
202 |
} |
|
203 |
return blockingSet; |
|
204 |
} |
|
205 |
|
|
170 | 206 |
/** |
171 | 207 |
* @param regs |
172 | 208 |
* @return |
... | ... | |
179 | 215 |
} |
180 | 216 |
|
181 | 217 |
|
218 |
|
|
182 | 219 |
/** |
183 | 220 |
* @param regs |
184 | 221 |
*/ |
Also available in: Unified diff
ref #7195 consistently displaying blocking registrations in list view and registration working set editor: