}
public static boolean isPrivate(String label) {
+ return parseVisibility(label).isPrivate();
+ }
+
+ public static Visibility parseVisibility(String label) {
return stream(values())
.filter(v -> v.label.equals(label))
- .map(Visibility::isPrivate)
.findAny()
.orElseThrow(() -> new IllegalStateException("Invalid visibility label '" + label + "'"));
}
}
export function getApplicationLeak(application: string): Promise<Array<ApplicationLeak>> {
- return getJSON('/api/views/show_leak', { application }).then(r => r.leaks, throwGlobalError);
+ return getJSON('/api/applications/show_leak', { application }).then(r => r.leaks, throwGlobalError);
}
}
/**
- * @deprecated since 5.2 please use the forPageIndex(...) builder method
+ * @deprecated since 5.2 please use the #forPgeIndex(...) builder method
*/
@Deprecated
public static Paging create(int pageSize, int pageIndex, int totalItems) {