/** * Invoked by XStream when this object is read into memory. */ protected Object readResolve() { if(nodeProperties==null) nodeProperties = new DescribableList<>(this); return this; }
protected void initJobFilters() { if (jobFilters == null) jobFilters = new DescribableList<ViewJobFilter, Descriptor<ViewJobFilter>>(this); }
public DescribableList<Publisher,Descriptor<Publisher>> getPublishersList() { if (publishers == null) { publishersSetter.compareAndSet(this,null,new DescribableList<Publisher,Descriptor<Publisher>>(this)); } return publishers; }
public DescribableList<BuildWrapper, Descriptor<BuildWrapper>> getBuildWrappersList() { if (buildWrappers == null) { buildWrappersSetter.compareAndSet(this,null,new DescribableList<BuildWrapper,Descriptor<BuildWrapper>>(this)); } return buildWrappers; }
public DescribableList<Builder,Descriptor<Builder>> getBuildersList() { if (builders == null) { buildersSetter.compareAndSet(this,null,new DescribableList<Builder,Descriptor<Builder>>(this)); } return builders; }
/** * Invoked by XStream when this object is read into memory. */ protected Object readResolve() { if(properties==null) properties = new DescribableList<ToolProperty<?>,ToolPropertyDescriptor>(Saveable.NOOP); for (ToolProperty<?> p : properties) _setTool(p, this); return this; }
protected void initColumns() { if (columns == null) columns = new DescribableList<ListViewColumn, Descriptor<ListViewColumn>>(this, ListViewColumn.createDefaultInitialColumnList(getClass()) ); }
@WithBridgeMethods(List.class) protected DescribableList<Trigger<?>,TriggerDescriptor> triggers() { if (triggers == null) { triggersUpdater.compareAndSet(this,null,new DescribableList<Trigger<?>,TriggerDescriptor>(this)); } return triggers; }
/** * Default value for {@link ToolInstallation#getProperties()} used in the form binding. * @since 1.305 */ public DescribableList<ToolProperty<?>,ToolPropertyDescriptor> getDefaultProperties() throws IOException { DescribableList<ToolProperty<?>,ToolPropertyDescriptor> r = new DescribableList<ToolProperty<?>, ToolPropertyDescriptor>(NOOP); List<? extends ToolInstaller> installers = getDefaultInstallers(); if(!installers.isEmpty()) r.add(new InstallSourceProperty(installers)); return r; }
@Override public Object onConvert(Type targetType, Class targetTypeErasure, Object jsonSource) { if (jsonForProperties != jsonSource) { return old.get().onConvert(targetType, targetTypeErasure, jsonSource); } try { DescribableList<NodeProperty<?>, NodePropertyDescriptor> tmp = new DescribableList<NodeProperty<?>, NodePropertyDescriptor>(Saveable.NOOP,getNodeProperties().toList()); tmp.rebuild(req, jsonForProperties, NodeProperty.all()); return tmp.toList(); } catch (FormException e) { throw new IllegalArgumentException(e); } catch (IOException e) { throw new IllegalArgumentException(e); } } }));
columns = new DescribableList<ListViewColumn,Descriptor<ListViewColumn>>(this); jobFilters = new DescribableList<ViewJobFilter,Descriptor<ViewJobFilter>>(this);
DescribableList<JobProperty<?>, JobPropertyDescriptor> t = new DescribableList<JobProperty<?>, JobPropertyDescriptor>(NOOP,getAllProperties()); JSONObject jsonProperties = json.optJSONObject("properties"); if (jsonProperties != null) {
public DescribableList<GhprbExtension, GhprbExtensionDescriptor> getExtensions() { if (extensions == null) { extensions = new DescribableList<GhprbExtension, GhprbExtensionDescriptor>(Saveable.NOOP); } return extensions; }
public DescribableList<Publisher,Descriptor<Publisher>> getPublishersList() { if (publishers == null) { publishersSetter.compareAndSet(this,null,new DescribableList<Publisher,Descriptor<Publisher>>(this)); } return publishers; }
private static DescribableList<GhprbExtension, GhprbExtensionDescriptor> copyExtensions( DescribableList<GhprbExtension, GhprbExtensionDescriptor>... extensionsList ) { DescribableList<GhprbExtension, GhprbExtensionDescriptor> copiedList = new DescribableList<>(Saveable.NOOP); for (DescribableList<GhprbExtension, GhprbExtensionDescriptor> extensions : extensionsList) { copiedList.addAll(extensions); } return copiedList; }
/** * Invoked by XStream when this object is read into memory. */ protected Object readResolve() { if(properties==null) properties = new DescribableList<ToolProperty<?>,ToolPropertyDescriptor>(Saveable.NOOP); for (ToolProperty<?> p : properties) _setTool(p, this); return this; }
@Override public Object decode(Class targetClass, Object fromDBObject, MappedField optionalExtraInfo) { if (fromDBObject == null) return null; BasicDBList rawList = (BasicDBList) fromDBObject; List list = new ArrayList(); for (Object obj : rawList) { DBObject dbObj = (DBObject) obj; list.add(getMapper().fromDBObject(optionalExtraInfo.getSubClass(), dbObj, getMapper().createEntityCache())); } Saveable owner = null; // TODO figure out how to associate the deserialized project here return new DescribableList(owner, list); }
public DescribableList<GhprbExtension, GhprbExtensionDescriptor> getExtensions() { if (extensions == null) { extensions = new DescribableList<GhprbExtension, GhprbExtensionDescriptor>(Saveable.NOOP, Util.fixNull(extensions)); extensions.add(new GhprbSimpleStatus()); } return extensions; }
public static DescribableList<GhprbExtension, GhprbExtensionDescriptor> matchesSome( DescribableList<GhprbExtension, GhprbExtensionDescriptor> extensions, Class<?>... types ) { Predicate predicate = PredicateUtils.anyPredicate(createPredicate(types)); DescribableList<GhprbExtension, GhprbExtensionDescriptor> copyExtensions = new DescribableList<>(Saveable.NOOP); copyExtensions.addAll(extensions); filterList(copyExtensions, predicate); return copyExtensions; }
public static <T extends GhprbExtension> T getGlobal(Class<T> clazz) { DescribableList<GhprbExtension, GhprbExtensionDescriptor> copyExtensions = new DescribableList<>(Saveable.NOOP); copyExtensions.addAll(GhprbTrigger.DESCRIPTOR.getExtensions()); filterList(copyExtensions, InstanceofPredicate.getInstance(clazz)); return copyExtensions.get(clazz); }