@ -73,15 +73,13 @@ class FormApp extends AbstractAppProvider {
@Override
@Override
public JTemplate < ? , ? > call ( ) throws Exception {
public JTemplate < ? , ? > call ( ) throws Exception {
OpenResult < Form , Parameter [ ] > result = worker . getResult ( ) ;
OpenResult < Form , Parameter [ ] > result = worker . getResult ( ) ;
return ( JTemplate < Form , ? > ) StableFactory . getMarkedInstanceObjectFromClass ( BaseJForm . XML_TAG ,
return getJForm ( result . getBaseBook ( ) , tplFile , result . getRef ( ) ) ;
new Object [ ] { result . getBaseBook ( ) , tplFile , result . getRef ( ) } , classType , BaseJForm . class ) ;
}
}
} ) ;
} ) ;
worker . start ( tplFile . getPath ( ) ) ;
worker . start ( tplFile . getPath ( ) ) ;
OpenResult < Form , Parameter [ ] > result = worker . getResult ( ) ;
OpenResult < Form , Parameter [ ] > result = worker . getResult ( ) ;
if ( result ! = null ) {
if ( result ! = null ) {
return ( JTemplate < Form , ? > ) StableFactory . getMarkedInstanceObjectFromClass ( BaseJForm . XML_TAG ,
return getJForm ( result . getBaseBook ( ) , tplFile , result . getRef ( ) ) ;
new Object [ ] { result . getBaseBook ( ) , tplFile , new Parameter [ 0 ] } , classType , BaseJForm . class ) ;
}
}
return emptyForm ;
return emptyForm ;
} else {
} else {
@ -90,6 +88,16 @@ class FormApp extends AbstractAppProvider {
}
}
}
}
@Nullable
private JForm getJForm ( Form form , FILE file , Parameter [ ] parameters ) {
try {
return new JForm ( form , file , parameters ) ;
} catch ( Exception e ) {
FineLoggerFactory . getLogger ( ) . error ( e , e . getMessage ( ) ) ;
return null ;
}
}
@Nullable
@Nullable
private Form getForm ( FILE tplFile ) {
private Form getForm ( FILE tplFile ) {
ReadXmlTypeLocalManager . setReadXmlType ( ReadXmlType . DESIGN ) ;
ReadXmlTypeLocalManager . setReadXmlType ( ReadXmlType . DESIGN ) ;