1 17 package org.alfresco.repo.policy; 18 19 import java.util.ArrayList ; 20 import java.util.Collection ; 21 import java.util.List ; 22 23 import junit.framework.TestCase; 24 25 import org.alfresco.repo.dictionary.DictionaryBootstrap; 26 import org.alfresco.repo.dictionary.DictionaryComponent; 27 import org.alfresco.repo.dictionary.DictionaryDAOImpl; 28 import org.alfresco.repo.dictionary.NamespaceDAO; 29 import org.alfresco.repo.dictionary.NamespaceDAOImpl; 30 import org.alfresco.service.namespace.QName; 31 32 33 public class PolicyComponentTest extends TestCase 34 { 35 private static final String TEST_MODEL = "org/alfresco/repo/policy/policycomponenttest_model.xml"; 36 private static final String TEST_NAMESPACE = "http://www.alfresco.org/test/policycomponenttest/1.0"; 37 private static QName BASE_TYPE = QName.createQName(TEST_NAMESPACE, "base"); 38 private static QName BASE_PROP_A = QName.createQName(TEST_NAMESPACE, "base_a"); 39 private static QName BASE_ASSOC_A = QName.createQName(TEST_NAMESPACE, "base_assoc_a"); 40 private static QName FILE_TYPE = QName.createQName(TEST_NAMESPACE, "file"); 41 private static QName FILE_PROP_B = QName.createQName(TEST_NAMESPACE, "file_b"); 42 private static QName FOLDER_TYPE = QName.createQName(TEST_NAMESPACE, "folder"); 43 private static QName FOLDER_PROP_D = QName.createQName(TEST_NAMESPACE, "folder_d"); 44 private static QName TEST_ASPECT = QName.createQName(TEST_NAMESPACE, "aspect"); 45 private static QName ASPECT_PROP_A = QName.createQName(TEST_NAMESPACE, "aspect_a"); 46 private static QName INVALID_TYPE = QName.createQName(TEST_NAMESPACE, "classdoesnotexist"); 47 48 private PolicyComponent policyComponent = null; 49 50 51 @Override 52 protected void setUp() throws Exception 53 { 54 NamespaceDAO namespaceDAO = new NamespaceDAOImpl(); 56 DictionaryDAOImpl dictionaryDAO = new DictionaryDAOImpl(namespaceDAO); 57 58 DictionaryBootstrap bootstrap = new DictionaryBootstrap(); 59 List <String > bootstrapModels = new ArrayList <String >(); 60 bootstrapModels.add("alfresco/model/dictionaryModel.xml"); 61 bootstrapModels.add("org/alfresco/repo/policy/policycomponenttest_model.xml"); 62 bootstrapModels.add(TEST_MODEL); 63 bootstrap.setModels(bootstrapModels); 64 bootstrap.setDictionaryDAO(dictionaryDAO); 65 bootstrap.bootstrap(); 66 67 DictionaryComponent dictionary = new DictionaryComponent(); 68 dictionary.setDictionaryDAO(dictionaryDAO); 69 70 policyComponent = new PolicyComponentImpl(dictionary); 72 } 73 74 75 public void testJavaBehaviour() 76 { 77 Behaviour validBehaviour = new JavaBehaviour(this, "validTest"); 78 TestClassPolicy policy = validBehaviour.getInterface(TestClassPolicy.class); 79 assertNotNull(policy); 80 String result = policy.test("argument"); 81 assertEquals("ValidTest: argument", result); 82 } 83 84 85 @SuppressWarnings ("unchecked") 86 public void testRegisterDefinitions() 87 { 88 try 89 { 90 @SuppressWarnings ("unused") ClassPolicyDelegate<InvalidMetaDataPolicy> delegate = policyComponent.registerClassPolicy(InvalidMetaDataPolicy.class); 91 fail("Failed to catch hidden metadata"); 92 } 93 catch(PolicyException e) 94 { 95 } 96 97 try 98 { 99 @SuppressWarnings ("unused") ClassPolicyDelegate<NoMethodPolicy> delegate = policyComponent.registerClassPolicy(NoMethodPolicy.class); 100 fail("Failed to catch no methods defined in policy"); 101 } 102 catch(PolicyException e) 103 { 104 } 105 106 try 107 { 108 @SuppressWarnings ("unused") ClassPolicyDelegate<MultiMethodPolicy> delegate = policyComponent.registerClassPolicy(MultiMethodPolicy.class); 109 fail("Failed to catch multiple methods defined in policy"); 110 } 111 catch(PolicyException e) 112 { 113 } 114 115 QName policyName = QName.createQName(TEST_NAMESPACE, "test"); 116 boolean isRegistered = policyComponent.isRegisteredPolicy(PolicyType.Class, policyName); 117 assertFalse(isRegistered); 118 ClassPolicyDelegate<TestClassPolicy> delegate = policyComponent.registerClassPolicy(TestClassPolicy.class); 119 assertNotNull(delegate); 120 isRegistered = policyComponent.isRegisteredPolicy(PolicyType.Class, policyName); 121 assertTrue(isRegistered); 122 PolicyDefinition definition = policyComponent.getRegisteredPolicy(PolicyType.Class, policyName); 123 assertNotNull(definition); 124 assertEquals(policyName, definition.getName()); 125 assertEquals(PolicyType.Class, definition.getType()); 126 assertEquals(TestClassPolicy.class, definition.getPolicyInterface()); 127 } 128 129 130 public void testBindBehaviour() 131 { 132 QName policyName = QName.createQName(TEST_NAMESPACE, "test"); 133 Behaviour validBehaviour = new JavaBehaviour(this, "validTest"); 134 135 try 137 { 138 policyComponent.bindClassBehaviour(null, FILE_TYPE, validBehaviour); 139 fail("Failed to catch null policy whilst binding behaviour"); 140 } 141 catch(IllegalArgumentException e) {} 142 143 try 145 { 146 policyComponent.bindClassBehaviour(policyName, null, validBehaviour); 147 fail("Failed to catch null class reference whilst binding behaviour"); 148 } 149 catch(IllegalArgumentException e) {} 150 151 try 153 { 154 policyComponent.bindClassBehaviour(policyName, INVALID_TYPE, validBehaviour); 155 fail("Failed to catch invalid class reference whilst binding behaviour"); 156 } 157 catch(IllegalArgumentException e) {} 158 159 try 161 { 162 policyComponent.bindClassBehaviour(policyName, FILE_TYPE, null); 163 fail("Failed to catch null behaviour whilst binding behaviour"); 164 } 165 catch(IllegalArgumentException e) {} 166 167 Behaviour invalidBehaviour = new JavaBehaviour(this, "methoddoesnotexist"); 169 policyComponent.registerClassPolicy(TestClassPolicy.class); 170 try 171 { 172 policyComponent.bindClassBehaviour(policyName, FILE_TYPE, invalidBehaviour); 173 fail("Failed to catch invalid behaviour whilst binding behaviour"); 174 } 175 catch(PolicyException e) {} 176 177 try 179 { 180 BehaviourDefinition<ClassBehaviourBinding> definition = policyComponent.bindClassBehaviour(policyName, FILE_TYPE, validBehaviour); 181 assertNotNull(definition); 182 assertEquals(policyName, definition.getPolicy()); 183 assertEquals(FILE_TYPE, definition.getBinding().getClassQName()); 184 } 185 catch(PolicyException e) 186 { 187 fail("Policy exception thrown for valid behaviour"); 188 } 189 } 190 191 192 public void testClassDelegate() 193 { 194 ClassPolicyDelegate<TestClassPolicy> delegate = policyComponent.registerClassPolicy(TestClassPolicy.class); 196 197 QName policyName = QName.createQName(TEST_NAMESPACE, "test"); 199 Behaviour fileBehaviour = new JavaBehaviour(this, "fileTest"); 200 policyComponent.bindClassBehaviour(policyName, FILE_TYPE, fileBehaviour); 201 202 Collection <TestClassPolicy> basePolicies = delegate.getList(BASE_TYPE); 204 assertNotNull(basePolicies); 205 assertTrue(basePolicies.size() == 0); 206 TestClassPolicy basePolicy = delegate.get(BASE_TYPE); 207 assertNotNull(basePolicy); 208 209 Collection <TestClassPolicy> filePolicies = delegate.getList(FILE_TYPE); 211 assertNotNull(filePolicies); 212 assertTrue(filePolicies.size() == 1); 213 TestClassPolicy filePolicy = delegate.get(FILE_TYPE); 214 assertNotNull(filePolicy); 215 assertEquals(filePolicies.iterator().next(), filePolicy); 216 217 Behaviour serviceBehaviour = new JavaBehaviour(this, "serviceTest"); 219 policyComponent.bindClassBehaviour(policyName, this, serviceBehaviour); 220 221 Collection <TestClassPolicy> file2Policies = delegate.getList(FILE_TYPE); 223 assertNotNull(file2Policies); 224 assertTrue(file2Policies.size() == 2); 225 TestClassPolicy filePolicy2 = delegate.get(FILE_TYPE); 226 assertNotNull(filePolicy2); 227 } 228 229 230 public void testClassOverride() 231 { 232 ClassPolicyDelegate<TestClassPolicy> delegate = policyComponent.registerClassPolicy(TestClassPolicy.class); 234 235 QName policyName = QName.createQName(TEST_NAMESPACE, "test"); 237 Behaviour baseBehaviour = new JavaBehaviour(this, "baseTest"); 238 policyComponent.bindClassBehaviour(policyName, BASE_TYPE, baseBehaviour); 239 Behaviour folderBehaviour = new JavaBehaviour(this, "folderTest"); 240 policyComponent.bindClassBehaviour(policyName, FOLDER_TYPE, folderBehaviour); 241 242 TestClassPolicy basePolicy = delegate.get(BASE_TYPE); 244 String baseResult = basePolicy.test("base"); 245 assertEquals("Base: base", baseResult); 246 TestClassPolicy filePolicy = delegate.get(FILE_TYPE); 247 String fileResult = filePolicy.test("file"); 248 assertEquals("Base: file", fileResult); 249 TestClassPolicy folderPolicy = delegate.get(FOLDER_TYPE); 250 String folderResult = folderPolicy.test("folder"); 251 assertEquals("Folder: folder", folderResult); 252 } 253 254 255 public void testClassCache() 256 { 257 ClassPolicyDelegate<TestClassPolicy> delegate = policyComponent.registerClassPolicy(TestClassPolicy.class); 259 260 QName policyName = QName.createQName(TEST_NAMESPACE, "test"); 262 Behaviour baseBehaviour = new JavaBehaviour(this, "baseTest"); 263 policyComponent.bindClassBehaviour(policyName, BASE_TYPE, baseBehaviour); 264 Behaviour folderBehaviour = new JavaBehaviour(this, "folderTest"); 265 policyComponent.bindClassBehaviour(policyName, FOLDER_TYPE, folderBehaviour); 266 267 TestClassPolicy basePolicy = delegate.get(BASE_TYPE); 269 String baseResult = basePolicy.test("base"); 270 assertEquals("Base: base", baseResult); 271 TestClassPolicy filePolicy = delegate.get(FILE_TYPE); 272 String fileResult = filePolicy.test("file"); 273 assertEquals("Base: file", fileResult); 274 TestClassPolicy folderPolicy = delegate.get(FOLDER_TYPE); 275 String folderResult = folderPolicy.test("folder"); 276 assertEquals("Folder: folder", folderResult); 277 278 TestClassPolicy basePolicy2 = delegate.get(BASE_TYPE); 280 assertTrue(basePolicy == basePolicy2); 281 TestClassPolicy filePolicy2 = delegate.get(FILE_TYPE); 282 assertTrue(filePolicy == filePolicy2); 283 TestClassPolicy folderPolicy2 = delegate.get(FOLDER_TYPE); 284 assertTrue(folderPolicy == folderPolicy2); 285 286 Behaviour newBaseBehaviour = new JavaBehaviour(this, "newBaseTest"); 288 policyComponent.bindClassBehaviour(policyName, BASE_TYPE, newBaseBehaviour); 289 290 TestClassPolicy basePolicy3 = delegate.get(BASE_TYPE); 292 assertTrue(basePolicy3 != basePolicy2); 293 String baseResult3 = basePolicy3.test("base"); 294 assertEquals("NewBase: base", baseResult3); 295 TestClassPolicy filePolicy3 = delegate.get(FILE_TYPE); 296 assertTrue(filePolicy3 != filePolicy2); 297 String fileResult3 = filePolicy3.test("file"); 298 assertEquals("NewBase: file", fileResult3); 299 TestClassPolicy folderPolicy3 = delegate.get(FOLDER_TYPE); 300 assertTrue(folderPolicy3 == folderPolicy2); 301 String folderResult3 = folderPolicy3.test("folder"); 302 assertEquals("Folder: folder", folderResult3); 303 304 Behaviour fileBehaviour = new JavaBehaviour(this, "fileTest"); 306 policyComponent.bindClassBehaviour(policyName, FILE_TYPE, fileBehaviour); 307 308 TestClassPolicy basePolicy4 = delegate.get(BASE_TYPE); 310 assertTrue(basePolicy4 == basePolicy3); 311 String baseResult4 = basePolicy4.test("base"); 312 assertEquals("NewBase: base", baseResult4); 313 TestClassPolicy filePolicy4 = delegate.get(FILE_TYPE); 314 assertTrue(filePolicy4 != filePolicy3); 315 String fileResult4 = filePolicy4.test("file"); 316 assertEquals("File: file", fileResult4); 317 TestClassPolicy folderPolicy4 = delegate.get(FOLDER_TYPE); 318 assertTrue(folderPolicy4 == folderPolicy4); 319 String folderResult4 = folderPolicy4.test("folder"); 320 assertEquals("Folder: folder", folderResult4); 321 } 322 323 324 public void testPropertyDelegate() 325 { 326 PropertyPolicyDelegate<TestPropertyPolicy> delegate = policyComponent.registerPropertyPolicy(TestPropertyPolicy.class); 328 329 QName policyName = QName.createQName(TEST_NAMESPACE, "test"); 331 Behaviour fileBehaviour = new JavaBehaviour(this, "fileTest"); 332 policyComponent.bindPropertyBehaviour(policyName, FILE_TYPE, FILE_PROP_B, fileBehaviour); 333 334 Collection <TestPropertyPolicy> basePolicies = delegate.getList(BASE_TYPE, BASE_PROP_A); 336 assertNotNull(basePolicies); 337 assertTrue(basePolicies.size() == 0); 338 TestPropertyPolicy basePolicy = delegate.get(BASE_TYPE, BASE_PROP_A); 339 assertNotNull(basePolicy); 340 341 Collection <TestPropertyPolicy> filePolicies = delegate.getList(FILE_TYPE, FILE_PROP_B); 343 assertNotNull(filePolicies); 344 assertTrue(filePolicies.size() == 1); 345 TestPropertyPolicy filePolicy = delegate.get(FILE_TYPE, FILE_PROP_B); 346 assertNotNull(filePolicy); 347 assertEquals(filePolicies.iterator().next(), filePolicy); 348 349 Behaviour serviceBehaviour = new JavaBehaviour(this, "serviceTest"); 351 policyComponent.bindPropertyBehaviour(policyName, this, serviceBehaviour); 352 353 Collection <TestPropertyPolicy> file2Policies = delegate.getList(FILE_TYPE, FILE_PROP_B); 355 assertNotNull(file2Policies); 356 assertTrue(file2Policies.size() == 2); 357 TestPropertyPolicy filePolicy2 = delegate.get(FILE_TYPE, FILE_PROP_B); 358 assertNotNull(filePolicy2); 359 } 360 361 362 public void testPropertyOverride() 363 { 364 PropertyPolicyDelegate<TestPropertyPolicy> delegate = policyComponent.registerPropertyPolicy(TestPropertyPolicy.class); 366 367 QName policyName = QName.createQName(TEST_NAMESPACE, "test"); 369 Behaviour baseBehaviour = new JavaBehaviour(this, "baseTest"); 370 policyComponent.bindPropertyBehaviour(policyName, BASE_TYPE, BASE_PROP_A, baseBehaviour); 371 Behaviour folderBehaviour = new JavaBehaviour(this, "folderTest"); 372 policyComponent.bindPropertyBehaviour(policyName, FOLDER_TYPE, BASE_PROP_A, folderBehaviour); 373 Behaviour folderBehaviourD = new JavaBehaviour(this, "folderTest"); 374 policyComponent.bindPropertyBehaviour(policyName, FOLDER_TYPE, FOLDER_PROP_D, folderBehaviourD); 375 376 TestPropertyPolicy basePolicy = delegate.get(BASE_TYPE, BASE_PROP_A); 378 String baseResult = basePolicy.test("base"); 379 assertEquals("Base: base", baseResult); 380 TestPropertyPolicy filePolicy = delegate.get(FILE_TYPE, BASE_PROP_A); 381 String fileResult = filePolicy.test("file"); 382 assertEquals("Base: file", fileResult); 383 TestPropertyPolicy folderPolicy = delegate.get(FOLDER_TYPE, BASE_PROP_A); 384 String folderResult = folderPolicy.test("folder"); 385 assertEquals("Folder: folder", folderResult); 386 TestPropertyPolicy folderPolicy2 = delegate.get(FOLDER_TYPE, FOLDER_PROP_D); 387 String folderResult2 = folderPolicy2.test("folder"); 388 assertEquals("Folder: folder", folderResult2); 389 } 390 391 392 public void testPropertyWildcard() 393 { 394 PropertyPolicyDelegate<TestPropertyPolicy> delegate = policyComponent.registerPropertyPolicy(TestPropertyPolicy.class); 396 397 QName policyName = QName.createQName(TEST_NAMESPACE, "test"); 399 Behaviour baseBehaviour = new JavaBehaviour(this, "baseTest"); 400 policyComponent.bindPropertyBehaviour(policyName, BASE_TYPE, baseBehaviour); 401 Behaviour folderBehaviour = new JavaBehaviour(this, "folderTest"); 402 policyComponent.bindPropertyBehaviour(policyName, FOLDER_TYPE, folderBehaviour); 403 Behaviour aspectBehaviour = new JavaBehaviour(this, "aspectTest"); 404 policyComponent.bindPropertyBehaviour(policyName, TEST_ASPECT, aspectBehaviour); 405 406 TestPropertyPolicy basePolicy = delegate.get(BASE_TYPE, BASE_PROP_A); 408 String baseResult = basePolicy.test("base"); 409 assertEquals("Base: base", baseResult); 410 TestPropertyPolicy filePolicy = delegate.get(FILE_TYPE, BASE_PROP_A); 411 String fileResult = filePolicy.test("file"); 412 assertEquals("Base: file", fileResult); 413 TestPropertyPolicy folderPolicy = delegate.get(FOLDER_TYPE, BASE_PROP_A); 414 String folderResult = folderPolicy.test("folder"); 415 assertEquals("Folder: folder", folderResult); 416 TestPropertyPolicy folderPolicy2 = delegate.get(FOLDER_TYPE, FOLDER_PROP_D); 417 String folderResult2 = folderPolicy2.test("folder"); 418 assertEquals("Folder: folder", folderResult2); 419 TestPropertyPolicy aspectPolicy = delegate.get(TEST_ASPECT, ASPECT_PROP_A); 420 String aspectResult = aspectPolicy.test("aspect_prop_a"); 421 assertEquals("Aspect: aspect_prop_a", aspectResult); 422 TestPropertyPolicy aspectPolicy2 = delegate.get(TEST_ASPECT, FOLDER_PROP_D); 423 String aspectResult2 = aspectPolicy2.test("aspect_folder_d"); 424 assertEquals("Aspect: aspect_folder_d", aspectResult2); 425 426 Behaviour folderDBehaviour = new JavaBehaviour(this, "folderDTest"); 428 policyComponent.bindPropertyBehaviour(policyName, FOLDER_TYPE, FOLDER_PROP_D, folderDBehaviour); 429 TestPropertyPolicy folderPolicy3 = delegate.get(FOLDER_TYPE, FOLDER_PROP_D); 430 String folderResult3 = folderPolicy3.test("folder"); 431 assertEquals("FolderD: folder", folderResult3); 432 } 433 434 435 public void testPropertyCache() 436 { 437 PropertyPolicyDelegate<TestPropertyPolicy> delegate = policyComponent.registerPropertyPolicy(TestPropertyPolicy.class); 439 440 QName policyName = QName.createQName(TEST_NAMESPACE, "test"); 442 Behaviour baseBehaviour = new JavaBehaviour(this, "baseTest"); 443 policyComponent.bindPropertyBehaviour(policyName, BASE_TYPE, baseBehaviour); 444 Behaviour folderBehaviour = new JavaBehaviour(this, "folderTest"); 445 policyComponent.bindPropertyBehaviour(policyName, FOLDER_TYPE, folderBehaviour); 446 Behaviour folderDBehaviour = new JavaBehaviour(this, "folderDTest"); 447 policyComponent.bindPropertyBehaviour(policyName, FOLDER_TYPE, FOLDER_PROP_D, folderDBehaviour); 448 Behaviour aspectBehaviour = new JavaBehaviour(this, "aspectTest"); 449 policyComponent.bindPropertyBehaviour(policyName, TEST_ASPECT, aspectBehaviour); 450 451 TestPropertyPolicy filePolicy = delegate.get(FILE_TYPE, BASE_PROP_A); 453 String fileResult = filePolicy.test("file"); 454 assertEquals("Base: file", fileResult); 455 TestPropertyPolicy folderPolicy = delegate.get(FOLDER_TYPE, FOLDER_PROP_D); 456 String folderResult = folderPolicy.test("folder"); 457 assertEquals("FolderD: folder", folderResult); 458 459 Behaviour newBaseBehaviour = new JavaBehaviour(this, "newBaseTest"); 461 policyComponent.bindPropertyBehaviour(policyName, BASE_TYPE, newBaseBehaviour); 462 463 TestPropertyPolicy filePolicy2 = delegate.get(FILE_TYPE, BASE_PROP_A); 465 String fileResult2 = filePolicy2.test("file"); 466 assertEquals("NewBase: file", fileResult2); 467 TestPropertyPolicy folderPolicy2 = delegate.get(FOLDER_TYPE, FOLDER_PROP_D); 468 String folderResult2 = folderPolicy2.test("folder"); 469 assertEquals("FolderD: folder", folderResult2); 470 } 471 472 473 public void testAssociationDelegate() 474 { 475 AssociationPolicyDelegate<TestAssociationPolicy> delegate = policyComponent.registerAssociationPolicy(TestAssociationPolicy.class); 477 478 QName policyName = QName.createQName(TEST_NAMESPACE, "test"); 480 Behaviour baseBehaviour = new JavaBehaviour(this, "baseTest"); 481 policyComponent.bindAssociationBehaviour(policyName, BASE_TYPE, BASE_ASSOC_A, baseBehaviour); 482 483 Collection <TestAssociationPolicy> filePolicies = delegate.getList(FILE_TYPE, BASE_ASSOC_A); 485 assertNotNull(filePolicies); 486 assertTrue(filePolicies.size() == 1); 487 TestAssociationPolicy filePolicy = delegate.get(FILE_TYPE, BASE_ASSOC_A); 488 assertNotNull(filePolicy); 489 String fileResult = filePolicy.test("file"); 490 assertEquals("Base: file", fileResult); 491 492 Behaviour serviceBehaviour = new JavaBehaviour(this, "serviceTest"); 494 policyComponent.bindAssociationBehaviour(policyName, this, serviceBehaviour); 495 496 Collection <TestAssociationPolicy> file2Policies = delegate.getList(FILE_TYPE, BASE_ASSOC_A); 498 assertNotNull(file2Policies); 499 assertTrue(file2Policies.size() == 2); 500 TestAssociationPolicy filePolicy2 = delegate.get(FILE_TYPE, BASE_ASSOC_A); 501 assertNotNull(filePolicy2); 502 } 503 504 505 509 public interface TestClassPolicy extends ClassPolicy 510 { 511 static String NAMESPACE = TEST_NAMESPACE; 512 public String test(String argument); 513 } 514 515 public interface TestPropertyPolicy extends PropertyPolicy 516 { 517 static String NAMESPACE = TEST_NAMESPACE; 518 public String test(String argument); 519 } 520 521 public interface TestAssociationPolicy extends AssociationPolicy 522 { 523 static String NAMESPACE = TEST_NAMESPACE; 524 public String test(String argument); 525 } 526 527 public interface InvalidMetaDataPolicy extends ClassPolicy 528 { 529 static int NAMESPACE = 0; 530 public String test(String nodeRef); 531 } 532 533 public interface NoMethodPolicy extends ClassPolicy 534 { 535 } 536 537 public interface MultiMethodPolicy extends ClassPolicy 538 { 539 public void a(); 540 public void b(); 541 } 542 543 544 548 public String validTest(String argument) 549 { 550 return "ValidTest: " + argument; 551 } 552 553 public String baseTest(String argument) 554 { 555 return "Base: " + argument; 556 } 557 558 public String newBaseTest(String argument) 559 { 560 return "NewBase: " + argument; 561 } 562 563 public String fileTest(String argument) 564 { 565 return "File: " + argument; 566 } 567 568 public String folderTest(String argument) 569 { 570 return "Folder: " + argument; 571 } 572 573 public String aspectTest(String argument) 574 { 575 return "Aspect: " + argument; 576 } 577 578 public String folderDTest(String argument) 579 { 580 return "FolderD: " + argument; 581 } 582 583 public String serviceTest(String argument) 584 { 585 return "Service: " + argument; 586 } 587 588 } 589 | Popular Tags |