public PEXSubject(String identifier, PEXSubjectCollection collection) throws ExecutionException, PermissionsLoadingException { this.identifier = identifier; this.collection = collection; this.baked = collection.getCalculatedSubject(identifier); this.data = new PEXSubjectData(baked.data(), collection.getPlugin()); this.transientData = new PEXSubjectData(baked.transientData(), collection.getPlugin()); }
@Override public List<Subject> getParents(final Set<Context> contexts) { time().onGetParents().startTimingIfSync(); try { Preconditions.checkNotNull(contexts, "contexts"); return Lists.transform( baked.getParents(parSet(contexts)), input -> collection.getPlugin().getSubjects(input.getKey()).get(input.getValue())); } finally { time().onGetParents().stopTimingIfSync(); } }
private Timings time() { return collection.getPlugin().getTimings(); }