/** * Constructs an instance representing the search for text {@code target}. * * @param blip the blip to find {@code target} in. * @param target the target to search. * @param maxResult the maximum number of results. * @return an instance of blip references. */ public static BlipContentRefs all(Blip blip, String target, int maxResult) { return new BlipContentRefs(blip, new BlipIterator.TextIterator(blip, target, maxResult), Parameter.of(ParamsProperty.MODIFY_QUERY, new DocumentModifyQuery(target, maxResult))); }
view, query.getElementMatch(), query.getRestrictions(), query.getMaxRes()); } else {
/** * Constructs an instance representing the search for element * {@code ElementType}, that has the properties specified in * {@code restrictions}. * * @param blip the blip to find {@code target} in. * @param target the element type to search. * @param maxResult the maximum number of results. * @param restrictions the additional properties filter that need to be * matched. * @return an instance of blip references. */ public static BlipContentRefs all(Blip blip, ElementType target, int maxResult, Restriction... restrictions) { Map<String, String> restrictionsAsMap = new HashMap<String, String>(restrictions.length); for (Restriction restriction : restrictions) { restrictionsAsMap.put(restriction.getKey(), restriction.getValue()); } return new BlipContentRefs(blip, new BlipIterator.ElementIterator(blip, target, restrictionsAsMap, maxResult), Parameter.of(ParamsProperty.MODIFY_QUERY, new DocumentModifyQuery(target, restrictionsAsMap, maxResult))); }
new DocumentModifyAction(ModifyHow.UPDATE_ELEMENT, NO_VALUES, NO_ANNOTATION_KEY, updatedElementsIn, NO_BUNDLED_ANNOTATIONS, false)), Parameter.of(ParamsProperty.MODIFY_QUERY, new DocumentModifyQuery(ElementType.GADGET, ImmutableMap.of("url", gadgetUrl), 1)));
new DocumentModifyAction(ModifyHow.UPDATE_ELEMENT, NO_VALUES, NO_ANNOTATION_KEY, updatedElementsIn, NO_BUNDLED_ANNOTATIONS, false)), Parameter.of(ParamsProperty.MODIFY_QUERY, new DocumentModifyQuery(ElementType.GADGET, ImmutableMap.of("url", gadgetUrl), 1)));