Project

General

Profile

« Previous | Next » 

Revision 860512a5

Added by Andreas Müller over 15 years ago

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/ImportWrapper.java
93 93
	public boolean invoke(Object source, ICdmDataSource destination, UUID secUUID){
94 94
		try {
95 95
			Method methodInvoke = importClass.getDeclaredMethod("invoke", IImportConfigurator.class);
96
			Method methodSetSource = configuration.getClass().getDeclaredMethod("setSource", Object.class);
96
			Method methodSetSource = configuration.getClass().getMethod("setSource", String.class);
97 97
			methodSetSource.setAccessible(true);
98 98
			
99 99
			this.configuration.setDestination(destination);
......
102 102
			if (this.importClass == null){
103 103
				return false;
104 104
			}else{
105
				return (Boolean)methodInvoke.invoke(importClass, configuration);
105
				return (Boolean)methodInvoke.invoke(importClass.newInstance(), configuration);
106 106
			}
107 107
		} catch (SecurityException e) {
108 108
			e.printStackTrace();
......
114 114
			e.printStackTrace();
115 115
		} catch (InvocationTargetException e) {
116 116
			e.printStackTrace();
117
		} catch (InstantiationException e) {
118
			e.printStackTrace();
117 119
		}
118 120
		return false;
119 121
	}
120 122
	
123
	
124
	
125
	
121 126
// ***************  GETTER / SETTER *******************************************/	
122 127
	
123 128
	/**

Also available in: Unified diff