/** * This is the bean class for Role in deployment yaml. */ public class Roles { @Element(description = "list of dashboard creator roles") private List<String> creators = Collections.emptyList(); public List<String> getCreators() { return creators; } }
/** * Bean class for dashboard SQl queries configurations. * * @since 4.0.0 */ public class QueryConfiguration { @Element(description = "database type") private String type; @Element(description = "DBMS version") private String version; @Element(description = "SQL queries mappings") private Map<String, String> mappings = Collections.emptyMap(); public String getType() { return type; } public String getVersion() { return version; } public Optional<String> getQuery(String key) { return Optional.ofNullable(mappings.get(key)); } }
/** * Manager node accessing credentials. */ public class ManagerAccessCredentials { @Element(description = "Username across cluster", required = true) private String username; @Element(description = "Password across cluster") private String password; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } }
/** * User manager Element. */ @Configuration(description = "User Manager Element") public class UserManagerElement { @Element(description = "Admin Role - Display name of the role defined in the user store", required = true) private String adminRole = "admin"; @Element(description = "User Store") private UserStoreElement userStore = new UserStoreElement(); public String getAdminRole() { return adminRole; } public UserStoreElement getUserStore() { return userStore; } }
/** * Configuration for Authentication Interceptor */ @Configuration(namespace = "wso2.carbon.authenticator", description = "Security Configuration Parameters") public class SecurityConfiguration { @Element(description = "list of web clients (eg: 127.0.0.1:9443) to allow make requests to allow any web client)") private List<String> allowedHosts = Collections.singletonList("*"); @Element(description = "Mapping of authenticator") private Map<String, Map<String, String>> authenticator = new HashMap<>(); public List<String> getAllowedHosts() { return allowedHosts; } public Map<String, Map<String, String>> getAuthenticator() { return authenticator; } }
/** * User store Element. */ @Configuration(description = "User Store Element") public class UserStoreElement { @Element(description = "Groups", required = true) private List<RoleElement> roles = Collections.singletonList(new RoleElement()); @Element(description = "Users", required = true) private List<UserElement> users = Collections.singletonList(new UserElement()); public List<UserElement> getUsers() { return users; } public List<RoleElement> getRoles() { return roles; } }
public class UserChildElement { @Element(description = "Username", required = true) private String username = "admin"; @Element(description = "Encrypted Password", required = true) private String password = "YWRtaW4="; @Element(description = "Properties associated with the user") private Map<String, String> properties = new HashMap<>(); @Element(description = "List of comma separated role ids", required = true) private String roles = "1";
/** * REST API Authentication config Element. */ @Configuration(description = "REST API Auth configurations") public class RESTAPIConfigurationElement { @Element(description = "Enable authentication for REST API", required = true) private String authEnable = "true"; @Element(description = "APIs to be excluded when auth is enabled", required = true) private List<String> exclude = new ArrayList<>(); public String getAuthEnable() { return authEnable; } public List<String> getExclude() { return exclude; } }
/** * Role Child Element. */ @Configuration(description = "Role Child Element configuration") public class RoleChildElement { @Element(description = "Role Id", required = true) private String id = "1"; @Element(description = "Role Display Name", required = true) private String displayName = "admin"; public String getId() { return id; } public String getDisplayName() { return displayName; } }
/** * Config bean for pendingCapabilityTimer. */ @Configuration(description = "Configuration for the timer task which checks " + "for pending Capabilities") public class PendingCapabilityTimer { @Element(description = "delay in milliseconds before task is to be executed") private long delay = 60000; @Element(description = "time in milliseconds between successive task executions") private long period = 30000; public long getDelay() { return delay; } public long getPeriod() { return period; } }
/** * Config bean for pendingCapabilityTimer. */ @Configuration(description = "Configuration for the timer task which checks " + "for satisfiable RequiredCapabilityListeners periodically") public class CapabilityListenerTimer { @Element(description = "delay in milliseconds before task is to be executed") private long delay = 20; @Element(description = "time in milliseconds between successive task executions") private long period = 20; public long getDelay() { return delay; } public long getPeriod() { return period; } }
/** * Configuration class MSF4J. */ @Configuration(namespace = "wso2.msf4j.configuration", description = "MSF4J configuration") public class MSF4JConfig { @Element(description = "No of worker pool threads to handle MSF4J requests") private int threadCount = 100; @Element(description = "MSF4J thread pool name ") private String threadPoolName = "msf4j.executor.workerpool"; public int getThreadCount() { return threadCount; } public void setThreadCount(int threadCount) { this.threadCount = threadCount; } public String getThreadPoolName() { return threadPoolName; } public void setThreadPoolName(String threadPoolName) { this.threadPoolName = threadPoolName; } }
/** * Configuration for Life cycles. */ @Configuration (namespace = "wso2.lifecycle", description = "Life cycle Configuration") public class LifecycleConfig { @Element (description = "Enable or disable life cycle history") private boolean enableHistory = true; @Element (description = "Provide the jndi name of the lifecycle datasource") private String dataSourceName = Constants.LIFECYCLE_DATASOURCE; public boolean isEnableHistory() { return enableHistory; } public void setEnableHistory(boolean enableHistory) { this.enableHistory = enableHistory; } public String getDataSourceName() { return dataSourceName; } public void setDataSourceName(String dataSourceName) { this.dataSourceName = dataSourceName; } }
/** * Class to hold PolicyDeployer configurations */ @Configuration(description = "Policy Deployer connection configurations") public class PolicyDeployerConfiguration { @Element(description = "DAS execution plan REST API") private String serverURL = "http://localhost:9091"; @Element(description = "Policy deployer credentials") private CredentialConfigurations policyDeployerCredentials = new CredentialConfigurations(); public String getServerURL() { return serverURL; } public void setServerURL(String serverURL) { this.serverURL = serverURL; } public CredentialConfigurations getPolicyDeployerCredentials() { return policyDeployerCredentials; } public void setPolicyDeployerCredentials(CredentialConfigurations policyDeployerCredentials) { this.policyDeployerCredentials = policyDeployerCredentials; } }
/** * Class to hold Google Analytics Tracking configurations. */ @Configuration(description = "Analytics configurations") public class GoogleAnalyticsConfigurations { @Element(description = "Enable Google Analytics") private boolean enabled = false; @Element(description = "Google Analytics Tracking ID") private String trackingID = "UA-XXXXXXXX-X"; public boolean isEnabled() { return enabled; } public void setEnabled(boolean enabled) { this.enabled = enabled; } public String getTrackingID() { return trackingID; } public void setTrackingID(String trackingID) { this.trackingID = trackingID; } }
/** * Class to hold DataPublisher configurations */ @Configuration(description = "Data Publisher connection configurations") public class DataPublisherConfigurations { @Element(description = "Reciever URL") private String receiverURL = "tcp://localhost:9612"; @Element(description = "Data publisher credentials") private CredentialConfigurations dataPublisherCredentials = new CredentialConfigurations(); public String getReceiverURL() { return receiverURL; } public void setReceiverURL(String receiverURL) { this.receiverURL = receiverURL; } public CredentialConfigurations getDataPublisherCredentials() { return dataPublisherCredentials; } public void setDataPublisherCredentials(CredentialConfigurations dataPublisherCredentials) { this.dataPublisherCredentials = dataPublisherCredentials; } }
/** * Configuration for HTTP Monitoring */ @Configuration(namespace = "wso2.msf4j.analytics.configuration", description = "MSF4J Analytics configuration") public class HTTPMonitoringConfig { @Element(description = "Whether HTTP Monitoring is enables or not") private boolean enabled = false; @Element(description = "Configuration for DAS") private DasConfig das = new DasConfig(); public boolean isEnabled() { return enabled; } public void setEnabled(boolean enabled) { this.enabled = enabled; } public DasConfig getDas() { return das; } public void setDas(DasConfig das) { this.das = das; } }
/** * Configuration class MSF4J. */ @Configuration(namespace = "wso2.msf4j.configuration", description = "MSF4J configuration") public class MSF4JConfig { @Element(description = "No of worker pool threads to handle MSF4J requests") private int threadCount = 100; @Element(description = "MSF4J thread pool name ") private String threadPoolName = "msf4j.executor.workerpool"; public int getThreadCount() { return threadCount; } public void setThreadCount(int threadCount) { this.threadCount = threadCount; } public String getThreadPoolName() { return threadPoolName; } public void setThreadPoolName(String threadPoolName) { this.threadPoolName = threadPoolName; } }
/** * Class to hold any user credentials */ @Configuration(description = "User Credentials") public class CredentialConfigurations { @Element(description = "Username") private String username = "admin"; @Element(description = "Password") private String password = "admin"; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } }