@ -1,10 +1,13 @@
package com.fr.design.extra.exe ;
package com.fr.design.extra.exe ;
import com.fr.design.DesignerEnvManager ;
import com.fr.design.extra.PluginConstants ;
import com.fr.design.extra.PluginConstants ;
import com.fr.design.extra.Process ;
import com.fr.design.extra.Process ;
import com.fr.general.CloudCenter ;
import com.fr.general.CloudCenter ;
import com.fr.general.http.HttpClient ;
import com.fr.general.http.HttpToolbox ;
import com.fr.log.FineLoggerFactory ;
import com.fr.stable.StringUtils ;
import com.fr.stable.StringUtils ;
import java.util.Locale ;
/ * *
/ * *
* Created by vito on 16 / 5 / 16 .
* Created by vito on 16 / 5 / 16 .
@ -28,14 +31,17 @@ public class GetPluginCategoriesExecutor implements Executor {
@Override
@Override
public void run ( Process < String > process ) {
public void run ( Process < String > process ) {
String url = CloudCenter . getInstance ( ) . acquireUrlByKind ( "shop.plugin.category" ) ;
Locale locale = DesignerEnvManager . getEnvManager ( ) . getLanguage ( ) ;
String url = CloudCenter . getInstance ( ) . acquireUrlByKind ( "shop.plugin.category" ) + "&locale=" + locale . toString ( ) ;
if ( StringUtils . isNotEmpty ( url ) ) {
if ( StringUtils . isNotEmpty ( url ) ) {
HttpClient httpClient = new HttpClient ( url ) ;
try {
result = httpClient . getResponseText ( ) ;
result = HttpToolbox . get ( url ) ;
} else {
return ;
result = PluginConstants . CONNECTION_404 ;
} catch ( Exception e ) {
FineLoggerFactory . getLogger ( ) . error ( e . getMessage ( ) , e ) ;
}
}
}
result = PluginConstants . CONNECTION_404 ;
}
}
}
}
} ;
} ;