added pojo support
This commit is contained in:
parent
a48c8818cd
commit
b72f890acc
@ -54,52 +54,104 @@ public class ApsClientConfiguration implements ClientCxfConfiguration, ClientJer
|
|||||||
return this.baseUrl;
|
return this.baseUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setBaseUrl(String baseUrl) {
|
||||||
|
this.baseUrl = baseUrl;
|
||||||
|
}
|
||||||
|
|
||||||
public String getBasicAuthUsername() {
|
public String getBasicAuthUsername() {
|
||||||
return this.basicAuthUsername;
|
return this.basicAuthUsername;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setBasicAuthUsername(String basicAuthUsername) {
|
||||||
|
this.basicAuthUsername = basicAuthUsername;
|
||||||
|
}
|
||||||
|
|
||||||
public String getBasicAuthPassword() {
|
public String getBasicAuthPassword() {
|
||||||
return this.basicAuthPassword;
|
return this.basicAuthPassword;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setBasicAuthPassword(String basicAuthPassword) {
|
||||||
|
this.basicAuthPassword = basicAuthPassword;
|
||||||
|
}
|
||||||
|
|
||||||
public String getBearerToken() {
|
public String getBearerToken() {
|
||||||
return this.bearerToken;
|
return this.bearerToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setBearerToken(String bearerToken) {
|
||||||
|
this.bearerToken = bearerToken;
|
||||||
|
}
|
||||||
|
|
||||||
public String getOAuthTokenUrl() {
|
public String getOAuthTokenUrl() {
|
||||||
return this.oAuthTokenUrl;
|
return this.oAuthTokenUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setOAuthTokenUrl(String oAuthTokenUrl) {
|
||||||
|
this.oAuthTokenUrl = oAuthTokenUrl;
|
||||||
|
}
|
||||||
|
|
||||||
public String getOAuthClientId() {
|
public String getOAuthClientId() {
|
||||||
return this.oAuthClientId;
|
return this.oAuthClientId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setOAuthClientId(String oAuthClientId) {
|
||||||
|
this.oAuthClientId = oAuthClientId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getOAuthClientSecret() {
|
public String getOAuthClientSecret() {
|
||||||
return this.oAuthClientSecret;
|
return this.oAuthClientSecret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setOAuthClientSecret(String oAuthClientSecret) {
|
||||||
|
this.oAuthClientSecret = oAuthClientSecret;
|
||||||
|
}
|
||||||
|
|
||||||
public String getOAuthAuthCode() {
|
public String getOAuthAuthCode() {
|
||||||
return this.oAuthAuthCode;
|
return this.oAuthAuthCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setOAuthAuthCode(String oAuthAuthCode) {
|
||||||
|
this.oAuthAuthCode = oAuthAuthCode;
|
||||||
|
}
|
||||||
|
|
||||||
public String getOAuthAuthRedirectUri() {
|
public String getOAuthAuthRedirectUri() {
|
||||||
return this.oAuthAuthRedirectUri;
|
return this.oAuthAuthRedirectUri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setOAuthAuthRedirectUri(String oAuthAuthRedirectUri) {
|
||||||
|
this.oAuthAuthRedirectUri = oAuthAuthRedirectUri;
|
||||||
|
}
|
||||||
|
|
||||||
public String getOAuthUsername() {
|
public String getOAuthUsername() {
|
||||||
return this.oAuthUsername;
|
return this.oAuthUsername;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setOAuthUsername(String oAuthUsername) {
|
||||||
|
this.oAuthUsername = oAuthUsername;
|
||||||
|
}
|
||||||
|
|
||||||
public String getOAuthPassword() {
|
public String getOAuthPassword() {
|
||||||
return this.oAuthPassword;
|
return this.oAuthPassword;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setOAuthPassword(String oAuthPassword) {
|
||||||
|
this.oAuthPassword = oAuthPassword;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isDefaultBusEnabled() {
|
public boolean isDefaultBusEnabled() {
|
||||||
return this.defaultBusEnabled;
|
return this.defaultBusEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setDefaultBusEnabled(boolean defaultBusEnabled) {
|
||||||
|
this.defaultBusEnabled = defaultBusEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isPutBodyRequired() {
|
public boolean isPutBodyRequired() {
|
||||||
return this.putBodyRequired;
|
return this.putBodyRequired;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setPutBodyRequired(boolean putBodyRequired) {
|
||||||
|
this.putBodyRequired = putBodyRequired;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,19 @@ public class ApsClientCxfImpl extends ClientCxfImpl {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ApsClientConfiguration config;
|
private ApsClientConfiguration config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This constructor is for Spring use
|
||||||
|
*/
|
||||||
|
ApsClientCxfImpl() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This constructor is for POJO use
|
||||||
|
*/
|
||||||
|
public ApsClientCxfImpl(ApsClientConfiguration config) {
|
||||||
|
this.config = config;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ClientCxfConfiguration getConfig() {
|
protected ClientCxfConfiguration getConfig() {
|
||||||
return this.config;
|
return this.config;
|
||||||
|
@ -17,6 +17,19 @@ public class ApsClientJerseyImpl extends ClientJerseyImpl {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ApsClientConfiguration config;
|
private ApsClientConfiguration config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This constructor is for Spring use
|
||||||
|
*/
|
||||||
|
ApsClientJerseyImpl() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This constructor is for POJO use
|
||||||
|
*/
|
||||||
|
public ApsClientJerseyImpl(ApsClientConfiguration config) {
|
||||||
|
this.config = config;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ClientJerseyConfiguration getConfig() {
|
protected ClientJerseyConfiguration getConfig() {
|
||||||
return this.config;
|
return this.config;
|
||||||
|
@ -5,6 +5,7 @@ import com.inteligr8.alfresco.activiti.api.AppVersionApi;
|
|||||||
import com.inteligr8.alfresco.activiti.api.ProcessInstancesApi;
|
import com.inteligr8.alfresco.activiti.api.ProcessInstancesApi;
|
||||||
import com.inteligr8.alfresco.activiti.api.ProfileApi;
|
import com.inteligr8.alfresco.activiti.api.ProfileApi;
|
||||||
import com.inteligr8.alfresco.activiti.api.TasksApi;
|
import com.inteligr8.alfresco.activiti.api.TasksApi;
|
||||||
|
import com.inteligr8.rs.Client;
|
||||||
import com.inteligr8.rs.ClientConfiguration;
|
import com.inteligr8.rs.ClientConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -14,7 +15,11 @@ public abstract class ApsPublicRestApi {
|
|||||||
|
|
||||||
protected abstract ClientConfiguration getConfig();
|
protected abstract ClientConfiguration getConfig();
|
||||||
|
|
||||||
protected abstract <T> T getApi(Class<T> apiClass);
|
protected abstract Client getClient();
|
||||||
|
|
||||||
|
protected <T> T getApi(Class<T> apiClass) {
|
||||||
|
return this.getClient().getApi(apiClass);
|
||||||
|
}
|
||||||
|
|
||||||
public AdminApi getAdminApi() {
|
public AdminApi getAdminApi() {
|
||||||
return this.getApi(AdminApi.class);
|
return this.getApi(AdminApi.class);
|
||||||
|
@ -4,6 +4,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import com.inteligr8.rs.Client;
|
||||||
import com.inteligr8.rs.ClientConfiguration;
|
import com.inteligr8.rs.ClientConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -16,14 +17,27 @@ public class ApsPublicRestApiCxfImpl extends ApsPublicRestApi {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ApsClientCxfImpl client;
|
private ApsClientCxfImpl client;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This constructor is for Spring use
|
||||||
|
*/
|
||||||
|
ApsPublicRestApiCxfImpl() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This constructor is for POJO use
|
||||||
|
*/
|
||||||
|
public ApsPublicRestApiCxfImpl(ApsClientCxfImpl client) {
|
||||||
|
this.client = client;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ClientConfiguration getConfig() {
|
protected ClientConfiguration getConfig() {
|
||||||
return this.client.getConfig();
|
return this.client.getConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected <T> T getApi(Class<T> apiClass) {
|
protected Client getClient() {
|
||||||
return this.client.getApi(apiClass);
|
return this.client;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import com.inteligr8.rs.Client;
|
||||||
import com.inteligr8.rs.ClientConfiguration;
|
import com.inteligr8.rs.ClientConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -16,14 +17,27 @@ public class ApsPublicRestApiJerseyImpl extends ApsPublicRestApi {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ApsClientJerseyImpl client;
|
private ApsClientJerseyImpl client;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This constructor is for Spring use
|
||||||
|
*/
|
||||||
|
ApsPublicRestApiJerseyImpl() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This constructor is for POJO use
|
||||||
|
*/
|
||||||
|
public ApsPublicRestApiJerseyImpl(ApsClientJerseyImpl client) {
|
||||||
|
this.client = client;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ClientConfiguration getConfig() {
|
protected ClientConfiguration getConfig() {
|
||||||
return this.client.getConfig();
|
return this.client.getConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected <T> T getApi(Class<T> apiClass) {
|
protected Client getClient() {
|
||||||
return this.client.getApi(apiClass);
|
return this.client;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user