@ -21,19 +21,26 @@ public class GetPluginFromStoreExecutor implements Executor {
private String seller ;
private String fee ;
private String scope ;
private String language ;
public GetPluginFromStoreExecutor ( JSONObject info ) {
this . category = info . optString ( "categories" ) ;
this . fee = info . optString ( "fee" ) ;
this . seller = info . optString ( "seller" ) ;
this . scope = info . optString ( "scope" ) ;
this . language = info . optString ( "language" ) ;
}
public GetPluginFromStoreExecutor ( String category , String seller , String fee , String scope ) {
this ( category , seller , fee , scope , StringUtils . EMPTY ) ;
}
public GetPluginFromStoreExecutor ( String category , String seller , String fee , String scope , String language ) {
this . category = category ;
this . seller = seller ;
this . fee = fee ;
this . scope = scope ;
this . language = language ;
}
@Override
@ -53,7 +60,7 @@ public class GetPluginFromStoreExecutor implements Executor {
@Override
public void run ( Process < String > process ) {
String plistUrl = CloudCenter . getInstance ( ) . acquireUrlByKind ( "shop.plugin.plist" ) ;
boolean getRecommend = StringUtils . isEmpty ( category ) & & StringUtils . isEmpty ( seller ) & & StringUtils . isEmpty ( fee ) & & StringUtils . isEmpty ( scope ) ;
boolean getRecommend = StringUtils . isEmpty ( category ) & & StringUtils . isEmpty ( seller ) & & StringUtils . isEmpty ( fee ) & & StringUtils . isEmpty ( scope ) & StringUtils . isEmpty ( language ) ;
if ( getRecommend ) {
result = PluginOperateUtils . getRecommendPlugins ( ) ;
return ;
@ -62,7 +69,7 @@ public class GetPluginFromStoreExecutor implements Executor {
if ( StringUtils . isNotBlank ( plistUrl ) ) {
StringBuilder url = new StringBuilder ( ) ;
url . append ( plistUrl ) . append ( "?" ) ;
PluginOperateUtils . dealParams ( url , category , seller , fee , scope ) ;
PluginOperateUtils . dealParams ( url , category , seller , fee , scope , language ) ;
try {
HttpClient httpClient = new HttpClient ( url . toString ( ) ) ;
httpClient . asGet ( ) ;