Пример #1
0
 private Set<String> getCombinedIdSet(Request request) {
   Set<String> ids = new HashSet<>();
   if (request != null) {
     if (request.getStoreIds() != null) {
       ids.addAll(request.getStoreIds());
     }
     if (request instanceof QueryRequest && ((QueryRequest) request).getSourceIds() != null) {
       ids.addAll(((QueryRequest) request).getSourceIds());
     }
   }
   return ids;
 }
Пример #2
0
 private Subject getSubject(Request input) throws StopProcessingException {
   Object securityAssertion = input.getProperties().get(SecurityConstants.SECURITY_SUBJECT);
   Subject subject;
   if (securityAssertion instanceof Subject) {
     subject = (Subject) securityAssertion;
     LOGGER.debug("Filter plugin found Subject for query response.");
   } else {
     throw new StopProcessingException(
         "Unable to filter contents of current message, no user Subject available.");
   }
   return subject;
 }