@Test void testCreateDecoratedRepository() { EntityType entityType = mock(EntityType.class); Repository<Package> repository = when(mock(Repository.class).getEntityType()).thenReturn(entityType).getMock(); Repository<Package> decoratedRepository = packageRepositoryDecoratorFactory.createDecoratedRepository(repository); assertEquals(entityType, decoratedRepository.getEntityType()); }
@Override public Repository<Package> createDecoratedRepository(Repository<Package> repository) { repository = new PackageRepositoryDecorator(repository, dataService); repository = new GroupPackageRepositoryDecorator(repository, groupPackageService); repository = new PackageRepositorySecurityDecorator( repository, mutableAclService, userPermissionEvaluator); return new PackageRepositoryValidationDecorator(repository, packageValidator); }
PackageRepositoryDecoratorFactory extends AbstractSystemRepositoryDecoratorFactory<Package, PackageMetadata> { @Override public Repository<Package> createDecoratedRepository(Repository<Package> repository) { repository = new PackageRepositoryDecorator(repository, dataService); repository = new GroupPackageRepositoryDecorator(repository, groupPackageService); repository = new PackageRepositorySecurityDecorator( repository, mutableAclService, userPermissionEvaluator); return new PackageRepositoryValidationDecorator(repository, packageValidator); } }
PackageRepositoryDecoratorFactory extends AbstractSystemRepositoryDecoratorFactory<Package, PackageMetadata> { @Override public Repository<Package> createDecoratedRepository(Repository<Package> repository) { repository = new PackageRepositoryDecorator(repository, dataService); repository = new GroupPackageRepositoryDecorator(repository, groupPackageService); repository = new PackageRepositorySecurityDecorator( repository, mutableAclService, userPermissionEvaluator); return new PackageRepositoryValidationDecorator(repository, packageValidator); } PackageRepositoryDecoratorFactory(
      PackageMetadata packageMetadata,
      DataService dataService,
      PackageValidator packageValidator,
      MutableAclService mutableAclService,
      UserPermissionEvaluator userPermissionEvaluator,
      GroupPackageService groupPackageService); }
PackageRepositoryDecoratorFactory extends AbstractSystemRepositoryDecoratorFactory<Package, PackageMetadata> { @Override public Repository<Package> createDecoratedRepository(Repository<Package> repository) { repository = new PackageRepositoryDecorator(repository, dataService); repository = new GroupPackageRepositoryDecorator(repository, groupPackageService); repository = new PackageRepositorySecurityDecorator( repository, mutableAclService, userPermissionEvaluator); return new PackageRepositoryValidationDecorator(repository, packageValidator); } PackageRepositoryDecoratorFactory(
      PackageMetadata packageMetadata,
      DataService dataService,
      PackageValidator packageValidator,
      MutableAclService mutableAclService,
      UserPermissionEvaluator userPermissionEvaluator,
      GroupPackageService groupPackageService); @Override Repository<Package> createDecoratedRepository(Repository<Package> repository); }
PackageRepositoryDecoratorFactory extends AbstractSystemRepositoryDecoratorFactory<Package, PackageMetadata> { @Override public Repository<Package> createDecoratedRepository(Repository<Package> repository) { repository = new PackageRepositoryDecorator(repository, dataService); repository = new GroupPackageRepositoryDecorator(repository, groupPackageService); repository = new PackageRepositorySecurityDecorator( repository, mutableAclService, userPermissionEvaluator); return new PackageRepositoryValidationDecorator(repository, packageValidator); } PackageRepositoryDecoratorFactory(
      PackageMetadata packageMetadata,
      DataService dataService,
      PackageValidator packageValidator,
      MutableAclService mutableAclService,
      UserPermissionEvaluator userPermissionEvaluator,
      GroupPackageService groupPackageService); @Override Repository<Package> createDecoratedRepository(Repository<Package> repository);  }