@Override public void run() { ManagedObjectLoaderUtil.validateManagedObjectType(builder.moTypeBuilder, HttpSecurityManagedObjectAdapterSource.class, propertyNameValues); } });
@Override public void run() { ManagedObjectLoaderUtil.validateManagedObjectType( builder.moTypeBuilder, HttpSecurityManagedObjectAdapterSource.class, propertyNameValues); } });
/** * Validate the type. */ public void testType_Default() { // Create the expected type ManagedObjectTypeBuilder type = ManagedObjectLoaderUtil.createManagedObjectTypeBuilder(); type.setObjectClass(EntityManager.class); type.addExtensionInterface(EntityManager.class); // Load the properties List<String> properties = new LinkedList<>(); this.loadJpaProperties((name, value) -> { properties.add(name); properties.add(value); }); // Validate type ManagedObjectLoaderUtil.validateManagedObjectType(type, this.getJpaManagedObjectSourceClass(), properties.toArray(new String[properties.size()])); }
/** * Validate the type. */ public void testType_Managed() { // Create the expected type ManagedObjectTypeBuilder type = ManagedObjectLoaderUtil.createManagedObjectTypeBuilder(); type.setObjectClass(EntityManager.class); type.addExtensionInterface(EntityManager.class); // Load the properties List<String> properties = new LinkedList<>(); this.loadJpaProperties((name, value) -> { properties.add(name); properties.add(value); }); // Indicate connection properties.add(JpaManagedObjectSource.PROPERTY_DEPENDENCY_TYPE); properties.add(DependencyType.managed.name()); // Validate type ManagedObjectLoaderUtil.validateManagedObjectType(type, this.getJpaManagedObjectSourceClass(), properties.toArray(new String[properties.size()])); }
ManagedObjectLoaderUtil.validateManagedObjectType(type, managedObjectSourceClass, properties.toArray(new String[properties.size()]));
/** * Validate the type. */ public void testType_Connection() { // Create the expected type ManagedObjectTypeBuilder type = ManagedObjectLoaderUtil.createManagedObjectTypeBuilder(); type.setObjectClass(EntityManager.class); type.addDependency("Connection", Connection.class, null, 0, null); type.addExtensionInterface(EntityManager.class); // Load the properties List<String> properties = new LinkedList<>(); this.loadJpaProperties((name, value) -> { properties.add(name); properties.add(value); }); // Indicate connection properties.add(JpaManagedObjectSource.PROPERTY_DEPENDENCY_TYPE); properties.add(DependencyType.connection.name()); // Validate type ManagedObjectLoaderUtil.validateManagedObjectType(type, this.getJpaManagedObjectSourceClass(), properties.toArray(new String[properties.size()])); }
/** * Validate the type. */ public void testType_DataSource() { // Create the expected type ManagedObjectTypeBuilder type = ManagedObjectLoaderUtil.createManagedObjectTypeBuilder(); type.setObjectClass(EntityManager.class); type.addDependency("DataSource", DataSource.class, null, 0, null); type.addExtensionInterface(EntityManager.class); // Load the properties List<String> properties = new LinkedList<>(); this.loadJpaProperties((name, value) -> { properties.add(name); properties.add(value); }); // Indicate connection properties.add(JpaManagedObjectSource.PROPERTY_DEPENDENCY_TYPE); properties.add(DependencyType.datasource.name()); // Validate type ManagedObjectLoaderUtil.validateManagedObjectType(type, this.getJpaManagedObjectSourceClass(), properties.toArray(new String[properties.size()])); }