public boolean shouldExpand(Expandable expandable) { return parameters.containsKey(WILDCARD) || parameters.containsKey(Preconditions.checkNotNull(expandable).value()); }
/** * Bean for the top level of a createmeta issue request. * * @since v5.0 */ public class CreateMetaBean { @XmlAttribute private String expand; @XmlElement @Expandable private List<CreateMetaProjectBean> projects; public CreateMetaBean(final List<CreateMetaProjectBean> projects) { this.projects = (projects != null) ? projects : Collections.<CreateMetaProjectBean>emptyList(); } }
@Expandable private List<TransitionBean> transitions;
@Expandable("plugin") private final Collection<PluginDetails> plugins;
public Indexes getIndexes(Expandable expandable) { final ExpandInformation expandInformation = parameters.get(Preconditions.checkNotNull(expandable).value()); return expandInformation != null ? expandInformation.getIndexes() : IndexParser.EMPTY; }
@Expandable private List<CreateMetaIssueTypeBean> issuetypes;
public ExpandParameter getExpandParameter(Expandable expandable) { final ExpandInformation wildcardExpandInformation = parameters.get(WILDCARD); final ExpandInformation valueExpandInformation = parameters.get(Preconditions.checkNotNull(expandable).value()); return new ChainingExpandParameter( wildcardExpandInformation != null ? wildcardExpandInformation.getExpandParameter() : EMPTY_EXPAND_PARAMETER, valueExpandInformation != null ? valueExpandInformation.getExpandParameter() : EMPTY_EXPAND_PARAMETER); }
@Expandable ("fields") private SelfExpanding fieldsExpander = new SelfExpanding()
/** * Returns the expandable annotation with the properly set value. The value is defined as the first valid point in the following list: * <ol> * <li>the value of the {@link Expandable} annotation if it is set</li> * <li>the name of an {@link XmlElement} if the annotation is present on the field and its name is not {@code ##default}</li> * <li>the name of the field</li> * <ol> * * @param field the field to look up the Expandable for * @return {@code null} if the field is null, {@code null} if the field doesn't have an expandable annotation, * an expandable annotation with a properly set value. */ Expandable getExpandable(final Field field) { if (field == null) { return null; } final Expandable expandable = field.getAnnotation(Expandable.class); if (expandable == null) { return null; } if (StringUtils.isNotEmpty(expandable.value())) { return expandable; } final XmlElement xmlElement = field.getAnnotation(XmlElement.class); if (xmlElement != null && StringUtils.isNotEmpty(xmlElement.name()) && !StringUtils.equals("##default", xmlElement.name())) { return new ExpandableWithValue(xmlElement.name()); } return new ExpandableWithValue(field.getName()); }
@Expandable("service") private List<OsgiService> services;
@Expandable("bundle") private final List<OsgiBundleDetails> bundles;
@Expandable("usedByBundles") private OsgiBundles usedByBundles;
@Expandable @JsonProperty @JsonDeserialize(as = UserJsonBeanListWrapper.class)
@Expandable private final Collection<T> items = Lists.newArrayList();
@Expandable ("fields") private SelfExpanding fieldsExpander = new SelfExpanding()
private Collection<FilterPermissionBean> sharePermissions; @Expandable("sharedUsers") @JsonProperty("sharedUsers") private UserBeanListWrapper sharedUserWrapper; @Expandable("subscriptions") @XmlElement(name = "subscriptions") private FilterSubscriptionBeanListWrapper subscriptionsWrapper;
@Expandable("registeredServices") private OsgiServices registeredServices; @Expandable("usedServices") private OsgiServices usedServices;
private String locale; @Expandable @XmlElement private SimpleListWrapper<GroupJsonBean> groups; @Expandable @XmlElement private SimpleListWrapper<ApplicationRoleBean> applicationRoles;
@Expandable ("renderedFields") private SelfExpanding renderedFieldExpander = new SelfExpanding() @Expandable ("names") private SelfExpanding namesExpander = new SelfExpanding() @Expandable ("schema") private SelfExpanding schemaExpander = new SelfExpanding() @Expandable ("transitions") private SelfExpanding transitionExpander = new SelfExpanding() @Expandable ("operations") private SelfExpanding operationsExpander = new SelfExpanding() @Expandable ("editmeta") private SelfExpanding editmetaExpander = new SelfExpanding() @Expandable ("changelog") private SelfExpanding changelogExpander = new SelfExpanding() @Expandable ("versionedRepresentations") private SelfExpanding versionedRepresentationsExpander = new SelfExpanding()
@Expandable ("description") private SelfExpanding descriptionExpander = new SelfExpanding() @Expandable ("lead") private SelfExpanding leadUserExpander = new SelfExpanding() @Expandable ("url") private SelfExpanding urlExpander = new SelfExpanding() @Expandable ("projectKeys") private SelfExpanding projectKeysExpander = new SelfExpanding()