public static PropertySpec newPropertySpec(String type, boolean all, String... pathSets) { PropertySpec pSpec = new PropertySpec(); pSpec.setAll(all); if (type != null) { pSpec.setType(type); } pSpec.getPathSet().addAll(Arrays.asList(pathSets)); return pSpec; }
public static PropertySpec createPropertySpec(String type, boolean allProp, String[] pathSet) { PropertySpec pSpec = new PropertySpec(); pSpec.setType(type); pSpec.setAll(allProp); //whether or not all properties of the object are read. If this property is set to true, the pathSet property is ignored. pSpec.setPathSet(pathSet); return pSpec; }
private PropertyFilterSpec createEventFilterSpec() { // Set up a PropertySpec to use the latestPage attribute // of the EventHistoryCollector PropertySpec propSpec = new PropertySpec(); propSpec.setAll(new Boolean(false)); propSpec.setPathSet(new String[] { "latestPage" }); propSpec.setType(_eventHistoryCollector.getMOR().getType()); // PropertySpecs are wrapped in a PropertySpec array PropertySpec[] propSpecAry = new PropertySpec[] { propSpec }; // Set up an ObjectSpec with the above PropertySpec for the // EventHistoryCollector we just created // as the Root or Starting Object to get Attributes for. ObjectSpec objSpec = new ObjectSpec(); objSpec.setObj(_eventHistoryCollector.getMOR()); objSpec.setSkip(new Boolean(false)); // Get Event objects in "latestPage" from "EventHistoryCollector" // and no "traversl" further, so, no SelectionSpec is specified objSpec.setSelectSet(new SelectionSpec[] {}); // ObjectSpecs are wrapped in an ObjectSpec array ObjectSpec[] objSpecAry = new ObjectSpec[] { objSpec }; PropertyFilterSpec spec = new PropertyFilterSpec(); spec.setPropSet(propSpecAry); spec.setObjectSet(objSpecAry); return spec; }
private PropertyFilterSpec createEventFilterSpec() { // Set up a PropertySpec to use the latestPage attribute // of the EventHistoryCollector PropertySpec propSpec = new PropertySpec(); propSpec.setAll(new Boolean(false)); propSpec.setPathSet(new String[] { "latestPage" }); propSpec.setType(_eventHistoryCollector.getMOR().getType()); // PropertySpecs are wrapped in a PropertySpec array PropertySpec[] propSpecAry = new PropertySpec[] { propSpec }; // Set up an ObjectSpec with the above PropertySpec for the // EventHistoryCollector we just created // as the Root or Starting Object to get Attributes for. ObjectSpec objSpec = new ObjectSpec(); objSpec.setObj(_eventHistoryCollector.getMOR()); objSpec.setSkip(new Boolean(false)); // Get Event objects in "latestPage" from "EventHistoryCollector" // and no "traversl" further, so, no SelectionSpec is specified objSpec.setSelectSet(new SelectionSpec[] {}); // ObjectSpecs are wrapped in an ObjectSpec array ObjectSpec[] objSpecAry = new ObjectSpec[] { objSpec }; PropertyFilterSpec spec = new PropertyFilterSpec(); spec.setPropSet(propSpecAry); spec.setObjectSet(objSpecAry); return spec; }