/** Adds group attribute. */ public void addGroupAttribute(String groupName, Group group) { addAttribute(ConversionUtil.createAttribute(groupName, group)); }
/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#TAX}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param tax attribute value */ public void addTaxAttribute(String name, Tax tax) { addAttribute(ConversionUtil.createAttribute(name, tax)); }
/** Adds group attribute. */ public void addGroupAttribute(String groupName, Group group) { addAttribute(ConversionUtil.createAttribute(groupName, group)); }
/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#SHIPPING}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param shipping attribute value */ public void addShippingAttribute(String name, Shipping shipping) { addAttribute(ConversionUtil.createAttribute(name, shipping)); }
/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#TAX}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param tax attribute value */ public void addTaxAttribute(String name, Tax tax) { addAttribute(ConversionUtil.createAttribute(name, tax)); }
/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#SHIPPING}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param shipping attribute value */ public void addShippingAttribute(String name, Shipping shipping) { addAttribute(ConversionUtil.createAttribute(name, shipping)); }
/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#LOCATION}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param location attribute value * @return the attribute object that has been created and added to the item */ public GoogleBaseAttribute addLocationAttribute(String name, Location location) { return addAttribute(ConversionUtil.createAttribute(name, location)); }
/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#LOCATION}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param location attribute value * @return the attribute object that has been created and added to the item */ public GoogleBaseAttribute addLocationAttribute(String name, Location location) { return addAttribute(ConversionUtil.createAttribute(name, location)); }
/** * Adds an attribute of type * {@link GoogleBaseAttributeType#DATE_TIME_RANGE}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param dateTimeRange attribute value * @return the attribute object that has been created and added to the item * @exception IllegalArgumentException if the DateTimeRange is an empty * range, in which case {@link #addDateTimeAttribute(String, * com.google.gdata.data.DateTime)} should be used instead. */ public GoogleBaseAttribute addDateTimeRangeAttribute(String name, DateTimeRange dateTimeRange) { if (dateTimeRange.isDateTimeOnly()) { // The server would reject such a range throw new IllegalArgumentException("Empty DateTimeRange. Add " + "it as a single DateTime using addDateTimeAttribute() instead."); } return addAttribute(ConversionUtil.createAttribute(name, dateTimeRange)); }
/** * Adds an attribute of type * {@link GoogleBaseAttributeType#DATE_TIME_RANGE}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param dateTimeRange attribute value * @return the attribute object that has been created and added to the item * @exception IllegalArgumentException if the DateTimeRange is an empty * range, in which case {@link #addDateTimeAttribute(String, * com.google.gdata.data.DateTime)} should be used instead. */ public GoogleBaseAttribute addDateTimeRangeAttribute(String name, DateTimeRange dateTimeRange) { if (dateTimeRange.isDateTimeOnly()) { // The server would reject such a range throw new IllegalArgumentException("Empty DateTimeRange. Add " + "it as a single DateTime using addDateTimeAttribute() instead."); } return addAttribute(ConversionUtil.createAttribute(name, dateTimeRange)); }