Examples of UpdateDescription


Examples of de.idos.updates.UpdateDescription

    this.baseUrl = baseUrl;
  }

  public Update findLatestUpdate() throws IOException {
    Version latestVersion = findLatestVersion();
    return new UpdateDescription(latestVersion);
  }
View Full Code Here

Examples of de.idos.updates.UpdateDescription

    this.availableVersions = availableVersions;
  }

  @Override
  public Update findLatestUpdate() throws IOException {
    return new UpdateDescription(findLatestVersion());
  }
View Full Code Here

Examples of de.idos.updates.UpdateDescription

    }

    @Test
    public void reportsLatestVersion() throws Exception {
        NumericVersion value = new NumericVersion(3, 2, 1);
        when(strategy.findLatestUpdate()).thenReturn(new UpdateDescription(value));
        versionLookup.lookUpLatestVersion();
        verify(report).latestAvailableVersionIs(value);
    }
View Full Code Here

Examples of org.apache.wookie.w3c.updates.UpdateDescription

        fAuthor.fromXML(child);
     
     
      // UDPATE DESCRIPTION IS OPTONAL - can only be one, ignore subsequent repetitions
      if(tag.equals(IW3CXMLConfiguration.UPDATE_ELEMENT) && fUpdate == null && child.getNamespace().getURI().equals(IW3CXMLConfiguration.MANIFEST_NAMESPACE)) {
        UpdateDescription update = new UpdateDescription();
        update.fromXML(child);
        // It must have a valid HREF attribute, or it is ignored
        if (update.getHref() != null) fUpdate = update.getHref();
     
   
      // LICENSE IS OPTIONAL - can be many
      if(tag.equals(IW3CXMLConfiguration.LICENSE_ELEMENT)) {       
        ILicenseEntity aLicense = new LicenseEntity();
View Full Code Here

Examples of org.apache.wookie.w3c.updates.UpdateDescription

    // Author
    if (getAuthor() != null) widgetElem.addContent(getAuthor().toXml());
   
    // Update
    if (getUpdate()!= null){
      widgetElem.addContent(new UpdateDescription(getUpdate()).toXML());
    }
   
   
    // Licenses
    for (ILicenseEntity license: getLicensesList()){
View Full Code Here

Examples of org.apache.wookie.w3c.updates.UpdateDescription

*/
public class UpdateDescriptionTest {
 
  @Test
  public void create(){
    UpdateDescription desc = new UpdateDescription();
    Element update = new Element("update-description", Namespace.getNamespace(IW3CXMLConfiguration.MANIFEST_NAMESPACE));
    update.setAttribute("href", "http://localhost");
    try {
      desc.fromXML(update);
    } catch (BadManifestException e) {
      fail();
    }
    assertEquals("http://localhost", desc.getHref());
  }
View Full Code Here

Examples of org.apache.wookie.w3c.updates.UpdateDescription

    assertEquals("http://localhost", desc.getHref());
  }
 
  @Test
  public void createInvalidURL(){
    UpdateDescription desc = new UpdateDescription();
    Element update = new Element("update-description", Namespace.getNamespace(IW3CXMLConfiguration.MANIFEST_NAMESPACE));
    update.setAttribute("href", "notavalidurl!");
    try {
      desc.fromXML(update);
    } catch (BadManifestException e) {
      fail();
    }
    assertNull(desc.getHref());
  }
View Full Code Here

Examples of org.apache.wookie.w3c.updates.UpdateDescription

        ((IElement) fAuthor).fromXML(child);
     
     
      // UDPATE DESCRIPTION IS OPTONAL - can only be one, ignore subsequent repetitions
      if(tag.equals(IW3CXMLConfiguration.UPDATE_ELEMENT) && fUpdate == null && child.getNamespace().getURI().equals(IW3CXMLConfiguration.MANIFEST_NAMESPACE)) {
        UpdateDescription update = new UpdateDescription();
        update.fromXML(child);
        // It must have a valid HREF attribute, or it is ignored
        if (update.getHref() != null) fUpdate = update.getHref();
     
   
      // LICENSE IS OPTIONAL - can be many
      if(tag.equals(IW3CXMLConfiguration.LICENSE_ELEMENT)) {       
        LicenseEntity aLicense = new LicenseEntity();
View Full Code Here

Examples of org.apache.wookie.w3c.updates.UpdateDescription

    // Author
    if (getAuthor() != null) widgetElem.addContent(((IElement) getAuthor()).toXml());
   
    // Update
    if (getUpdateLocation()!= null){
      widgetElem.addContent(new UpdateDescription(getUpdateLocation()).toXML());
    }
   
   
    // Licenses
    for (ILicense license: getLicenses()){
View Full Code Here

Examples of org.apache.wookie.w3c.updates.UpdateDescription

*/
public class UpdateDescriptionTest {
 
  @Test
  public void create(){
    UpdateDescription desc = new UpdateDescription();
    Element update = new Element(IW3CXMLConfiguration.UPDATE_ELEMENT, Namespace.getNamespace(IW3CXMLConfiguration.MANIFEST_NAMESPACE));
    update.setAttribute(IW3CXMLConfiguration.HREF_ATTRIBUTE, "http://localhost");
    try {
      desc.fromXML(update);
    } catch (BadManifestException e) {
      fail();
    }
    assertEquals("http://localhost", desc.getHref());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.