CreateTagsRequest createTagsRequest = new CreateTagsRequest(); .withTags(new Tag("Name", "travel-ecommerce-" + idx)); ec2.createTags(createTagsRequest);
@Test @DatabaseSetup(value = "/TagDAOTest.xml") @ExpectedDatabase(assertionMode=DatabaseAssertionMode.NON_STRICT, value= "/expectedData.xml") public void testInsert() throws Exception { Tag tagToInsert = new Tag(4, "insertedTag"); tagDAO.insert(tagToInsert); }
... // Tag in a transient state Tag tag = new Tag(); tag.setName("A"); // Tag in a persistent state Long id = (Long) session.save(tag); // Tag in a detached state session.close(); ...
public void addTag(String tagName) { Tag tag = new Tag(); tag.setUniqueName(tagName); tag.getPhrases().add(this); this.tagObjects.add(tag); }
private Tag convertElementToInputTag(Tag tag, TagAttributes modifiedAttributes) { TagAttribute[] attributes = modifiedAttributes.getAll(); TagAttribute[] lessAttributes = Arrays.copyOf(attributes, attributes.length - 1); TagAttributes less = new AFTagAttributes(lessAttributes); Tag t = new Tag(tag.getLocation(), BOOTSFACES_NAMESPACE, "inputText", "b:inputText", less); return t; }
private Tag convertElementToSelectOneMenuTag(Tag tag, TagAttributes modifiedAttributes) { TagAttribute[] attributes = modifiedAttributes.getAll(); TagAttribute[] lessAttributes = Arrays.copyOf(attributes, attributes.length - 1); TagAttributes less = new AFTagAttributes(lessAttributes); Tag t = new Tag(tag.getLocation(), BOOTSFACES_NAMESPACE, "selectOneMenu", "b:selectOneMenu", less); return t; }
private Tag convertElementToSelectOneMenuTag(Tag tag, TagAttributes modifiedAttributes) { TagAttribute[] attributes = modifiedAttributes.getAll(); TagAttribute[] lessAttributes = Arrays.copyOf(attributes, attributes.length - 1); TagAttributes less = new AFTagAttributes(lessAttributes); Tag t = new Tag(tag.getLocation(), BOOTSFACES_NAMESPACE, "selectOneMenu", "b:selectOneMenu", less); return t; }
private Tag convertDivElementToPanelGroup(Tag tag, TagAttributes modifiedAttributes, boolean isDiv) { TagAttribute[] attributes = modifiedAttributes.getAll(); TagAttributes more = addBlockAttributeIfNeeded(tag, isDiv, attributes); Tag t = new Tag(tag.getLocation(), JSF_NAMESPACE, "panelGroup", "h:panelGroup", more); return t; }
private Tag convertToSelectOneMenuTag(Tag tag, TagAttributes attributeList) { TagAttribute[] attributes = attributeList.getAll(); TagAttributes more = new AFTagAttributes(attributes); Tag t = new Tag(tag.getLocation(), BOOTSFACES_NAMESPACE, "selectOneMenu", "b:selectOneMenu", more); return t; }
private Tag convertToPuiMessagesTag(Tag tag, TagAttributes attributeList) { if (tag.getNamespace().equals(PRIMEFACES_NAMESPACE)) { AFTagAttributes modifiedAttributes = new AFTagAttributes(attributeList.getAll()); modifiedAttributes.addAttribute(tag.getLocation(), PASS_THROUGH_NAMESPACE, "primefaces", "primefaces", "true"); Tag t = new Tag(tag.getLocation(), HTML_NAMESPACE, "puimessages", "puimessages", modifiedAttributes); return t; } else { Tag t = new Tag(tag.getLocation(), HTML_NAMESPACE, "puimessages", "puimessages", attributeList); return t; } }
private Tag convertToInputTag(Tag tag, TagAttributes attributeList) { TagAttribute[] attributes = attributeList.getAll(); TagAttributes more = new AFTagAttributes(attributes); Tag t = new Tag(tag.getLocation(), BOOTSFACES_NAMESPACE, "inputText", "b:inputText", more); return t; }
private Tag convertToInputText(Tag tag, TagAttributes attributeList) { TagAttribute[] attributes = attributeList.getAll(); TagAttributes more = new AFTagAttributes(attributes); Tag t = new Tag(tag.getLocation(), JSF_NAMESPACE, "inputText", "inputText", more); return t; }
private Tag convertDivTagToPanelGroup(Tag tag, TagAttributes attributeList, boolean isDiv) { TagAttribute[] attributes = attributeList.getAll(); TagAttributes more = addBlockAttributeIfNeeded(tag, isDiv, attributes); Tag t = new Tag(tag.getLocation(), JSF_NAMESPACE, "panelGroup", "panelGroup", more); return t; }
private Tag convertToSelectOneMenuTag(Tag tag, TagAttributes attributeList) { TagAttribute[] attributes = attributeList.getAll(); TagAttributes more = new AFTagAttributes(attributes); Tag t = new Tag(tag.getLocation(), BOOTSFACES_NAMESPACE, "selectOneMenu", "b:selectOneMenu", more); return t; }
private Tag generateTagIfNecessary(Tag tag, TagAttributes modifiedAttributes) { if (modifiedAttributes != tag.getAttributes()) { if (tag.getLocalName().equals("div") && modifiedAttributes instanceof AFTagAttributes) { return generatePuiHtmlTag(tag, modifiedAttributes, "puiDiv"); } else if (tag.getLocalName().equals("span") && modifiedAttributes instanceof AFTagAttributes) { return generatePuiHtmlTag(tag, modifiedAttributes, "puiSpan"); } else return new Tag(tag.getLocation(), tag.getNamespace(), tag.getLocalName(), tag.getQName(), modifiedAttributes); } return null; }
/** * Converts <option>firstComboboxItem</option> to <f:selectItem itemValue="firstComboxItem">. */ private Tag convertTofSelectItemText(Tag tag, TagAttributes attributeList) { TagAttribute[] attributes = attributeList.getAll(); AFTagAttributes more = new AFTagAttributes(attributes); more.replaceAttribute("value", "itemValue"); more.replaceAttribute("label", "itemLabel"); Tag t = new Tag(tag.getLocation(), JSF_CORE_NAMESPACE, "selectItem", "selectItem", more); return t; }
protected Tag convertTag(Tag tag, Namespace namespace, String localName) { Location location = tag.getLocation(); String ns = namespace.uri; String qName = namespace.name() + ":" + localName; TagAttributes attributes = convertAttributes(tag.getAttributes()); Tag converted = new Tag(location, ns, localName, qName, attributes); for (TagAttribute tagAttribute : attributes.getAll()) { // set the correct tag tagAttribute.setTag(converted); } return converted; }
private Tag convertToTranslateTag(Tag tag, TagAttributes modifiedAttributes) { TagAttribute[] attributes = modifiedAttributes.getAll(); AFTagAttributes more = new AFTagAttributes(attributes); if (null == more.get(JSF_NAMESPACE, "value")) { more.addAttribute(tag.getLocation(), "http://beyondjava.net/angularFacesCore", "puitranslate", "ac:puitranslate", "true"); } Tag t = new Tag(tag.getLocation(), JSF_NAMESPACE, "outputText", "h:outputText", more); return t; }
protected Tag convertTag(Tag tag, Namespace namespace, String localName) { Location location = tag.getLocation(); String ns = namespace.uri; String qName = namespace.name() + ":" + localName; TagAttributes attributes = convertAttributes(tag.getAttributes()); Tag converted = new Tag(location, ns, localName, qName, attributes); for (TagAttribute tagAttribute : attributes.getAll()) { // set the correct tag tagAttribute.setTag(converted); } return converted; }
protected Tag convertTag(Tag tag, Namespace namespace, String localName) { Location location = tag.getLocation(); String ns = namespace.uri; String qName = namespace.name() + ":" + localName; TagAttributes attributes = convertAttributes(tag.getAttributes(), tag); Tag converted = new Tag(location, ns, localName, qName, attributes); for (TagAttribute tagAttribute : attributes.getAll()) { // set the correct tag tagAttribute.setTag(converted); } return converted; }