public String toString() { StringBuffer sb = new StringBuffer(); sb.append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append("<").append(ResourceDescription.ROOT_ELEMENT_NAME).append(">").append(AbstractBaseDescriptionDocument.NEW_LINE); sb.append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append("<shortname>").append(this.getShortName()).append("</shortname>").append(AbstractBaseDescriptionDocument.NEW_LINE); sb.append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append("<description>").append(this.getDescription()).append("</description>").append(AbstractBaseDescriptionDocument.NEW_LINE); sb.append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append("<").append(WEBSCRIPTS_ELEMENT_NAME).append(">").append(this.getScriptIdsAsString()).append("</").append(WEBSCRIPTS_ELEMENT_NAME).append(">").append(AbstractBaseDescriptionDocument.NEW_LINE); sb.append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append("</").append(ResourceDescription.ROOT_ELEMENT_NAME).append(">"); return sb.toString(); }
public String toString() { StringBuffer sb = new StringBuffer(); sb.append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append("<").append(ResourceDescription.ROOT_ELEMENT_NAME).append(">").append(AbstractBaseDescriptionDocument.NEW_LINE); sb.append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append("<shortname>").append(this.getShortName()).append("</shortname>").append(AbstractBaseDescriptionDocument.NEW_LINE); sb.append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append("<description>").append(this.getDescription()).append("</description>").append(AbstractBaseDescriptionDocument.NEW_LINE); sb.append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append("<").append(WEBSCRIPTS_ELEMENT_NAME).append(">").append(this.getScriptIdsAsString()).append("</").append(WEBSCRIPTS_ELEMENT_NAME).append(">").append(AbstractBaseDescriptionDocument.NEW_LINE); sb.append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append("</").append(ResourceDescription.ROOT_ELEMENT_NAME).append(">"); return sb.toString(); }
public String toString() { StringBuffer sb = new StringBuffer(); sb.append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append("<").append(ResourceDescription.ROOT_ELEMENT_NAME).append(">").append(AbstractBaseDescriptionDocument.NEW_LINE); sb.append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append("<shortname>").append(this.getShortName()).append("</shortname>").append(AbstractBaseDescriptionDocument.NEW_LINE); sb.append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append("<description>").append(this.getDescription()).append("</description>").append(AbstractBaseDescriptionDocument.NEW_LINE); sb.append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append("<").append(WEBSCRIPTS_ELEMENT_NAME).append(">").append(this.getScriptIdsAsString()).append("</").append(WEBSCRIPTS_ELEMENT_NAME).append(">").append(AbstractBaseDescriptionDocument.NEW_LINE); sb.append(AbstractBaseDescriptionDocument.TAB).append(AbstractBaseDescriptionDocument.TAB).append("</").append(ResourceDescription.ROOT_ELEMENT_NAME).append(">"); return sb.toString(); }
/** * Utility for comparint this instance with another ResourceDsecription * * @param newResourceDescription instance to be compared to * @return true if they are different */ public boolean compare(ResourceDescription newResourceDescription) { if (compareField(newResourceDescription.getShortName(),this.getShortName()) &&compareField(newResourceDescription.getDescription(),this.getDescription()) &&compareField(newResourceDescription.getScriptIdsAsString(),this.getScriptIdsAsString())) { return false; } else { return true; } }
/** * Utility for comparint this instance with another ResourceDsecription * * @param newResourceDescription instance to be compared to * @return true if they are different */ public boolean compare(ResourceDescription newResourceDescription) { if (compareField(newResourceDescription.getShortName(),this.getShortName()) &&compareField(newResourceDescription.getDescription(),this.getDescription()) &&compareField(newResourceDescription.getScriptIdsAsString(),this.getScriptIdsAsString())) { return false; } else { return true; } }
/** * Utility for comparint this instance with another ResourceDsecription * * @param newResourceDescription instance to be compared to * @return true if they are different */ public boolean compare(ResourceDescription newResourceDescription) { if (compareField(newResourceDescription.getShortName(),this.getShortName()) &&compareField(newResourceDescription.getDescription(),this.getDescription()) &&compareField(newResourceDescription.getScriptIdsAsString(),this.getScriptIdsAsString())) { return false; } else { return true; } }
/** * @throws Exception */ @Test public void testPackageDescriptionDocumentResources() throws Exception { PackageDescriptionDocument doc = getWebscriptRegistry().getPackageDescriptionDocument("/documents/samples"); assertNotNull(doc); ResourceDescription [] resources = doc.getResourceDescriptions(); assertNotNull(resources); assertEquals(2,resources.length); String shortName = resources[0].getShortName(); assertEquals("Alfresco sample1",shortName); String description = resources[0].getDescription(); assertEquals("Alfresco sample1 webscript",description); String[] scriptIds = resources[0].getScriptIds(); assertEquals(4,scriptIds.length); assertEquals("documents/samples/sample1.get",scriptIds[0]); }