@Test public void testGetSchemaJavaPackage() { String expectedPackageName = "riv.crm.scheduling.getalltimetypesresponder.v1_1"; String namespace = "urn:riv:crm:scheduling:GetAllTimeTypesResponder:1.1"; String actualPackageName = impl.getSchemaJavaPackage(namespace); assertEquals(expectedPackageName, actualPackageName); }
public String getSchemaJavaPackage(String schema) { String replace = ""; schema = schema.replace("urn:", replace); schema = schema.toLowerCase().replace(".", "_"); schema = schema.toLowerCase().replace(":", "."); Pattern pattern = Pattern.compile("\\.(\\d)"); Matcher matcher = pattern.matcher(schema); boolean matchFound = matcher.find(); if (matchFound) { if (matcher.groupCount() > 0) { String version = matcher.group(1); schema = schema.replaceFirst(version, "v" + version); } } String javaPackage = schema; return javaPackage.toLowerCase(); }
DefaultModelImpl implements IModel { public String getSchemaJavaPackage(String schema) { String replace = ""; schema = schema.replace("urn:", replace); schema = schema.toLowerCase().replace(".", "_"); schema = schema.toLowerCase().replace(":", "."); Pattern pattern = Pattern.compile("\\.(\\d)"); Matcher matcher = pattern.matcher(schema); boolean matchFound = matcher.find(); if (matchFound) { if (matcher.groupCount() > 0) { String version = matcher.group(1); schema = schema.replaceFirst(version, "v" + version); } } String javaPackage = schema; return javaPackage.toLowerCase(); } }
DefaultModelImpl implements IModel { public String getSchemaJavaPackage(String schema) { String replace = ""; schema = schema.replace("urn:", replace); schema = schema.toLowerCase().replace(".", "_"); schema = schema.toLowerCase().replace(":", "."); Pattern pattern = Pattern.compile("\\.(\\d)"); Matcher matcher = pattern.matcher(schema); boolean matchFound = matcher.find(); if (matchFound) { if (matcher.groupCount() > 0) { String version = matcher.group(1); schema = schema.replaceFirst(version, "v" + version); } } String javaPackage = schema; return javaPackage.toLowerCase(); }  }
DefaultModelImpl implements IModel { public String getSchemaJavaPackage(String schema) { String replace = ""; schema = schema.replace("urn:", replace); schema = schema.toLowerCase().replace(".", "_"); schema = schema.toLowerCase().replace(":", "."); Pattern pattern = Pattern.compile("\\.(\\d)"); Matcher matcher = pattern.matcher(schema); boolean matchFound = matcher.find(); if (matchFound) { if (matcher.groupCount() > 0) { String version = matcher.group(1); schema = schema.replaceFirst(version, "v" + version); } } String javaPackage = schema; return javaPackage.toLowerCase(); }  void initModel(String groupId, String artifactId, String version, String service, MuleVersionEnum muleVersion, DeploymentModelEnum deploymentModel, List<TransportEnum> transports, TransportEnum inboundTransport, TransportEnum outboundTransport, TransformerEnum transformerType, String serviceDescriptor, List<String> operations); Object resolveParameter(String parameterName); Object resolveParameter(String parameterName, Object defaultValue); List<ServiceDescriptorModel> getSds(); XmlNamespaceModel getXmlNamespace(); Map<String, Object> getExt(); String getDollarSymbol(); String getXmlTimestamp(); String getGroupId(); String getArtifactId(); String getCapitalizedArtifactId(); String getLowercaseArtifactId(); String getCapitalizedJavaArtifactId(); String getVersion(); String getService(); String getCapitalizedService(); String getLowercaseService(); String getInitialLowercaseService(); String getUppercaseService(); String getCapitalizedJavaService(); String getLowercaseJavaService(); String getInitialLowercaseJavaService(); String getSoitoolkitVersion(); String getSuperpomGroupId(); String getSuperpomArtifactId(); String getSuperpomVersion(); String getParentPom(); String getIntegrationComponentProject(); String getServiceProject(); String getServiceProjectFilepath(); String getSchemaProject(); String getSchemaProjectFilepath(); String getSchemaJavaPackage(String schema); String getStandaloneProject(); String getStandaloneProjectFilepath(); String getTeststubStandaloneProject(); String getTeststubStandaloneProjectFilepath(); String getCapitalizedJavaTeststubArtifactId(); String getWebProject(); String getWebProjectFilepath(); String getTeststubWebProject(); String getTeststubWebProjectFilepath(); String getJavaPackage(); String getJavaPackageFilepath(); String getDefaultFtpUsername(); String getDefaultFtpPassword(); String getDefaultSftpUsername(); String getDefaultSftpIdentityFile(); String getDefaultSftpIdentityPassphrase(); String getJmsInboundConnector(); String getJmsOutboundConnector(); String getJmsDefaultConnector(); String getJmsInQueue(); String getJmsOutQueue(); String getJmsDLQueue(); String getJmsRequestQueue(); String getJmsResponseQueue(); String getJmsLogInfoQueue(); String getJmsLogErrorQueue(); String getJdbcInboundConnector(); String getJdbcOutboundConnector(); String getJdbcDefaultConnector(); String getServletPort(); String getHttpPort(); String getHttpTeststubPort(); MuleVersionEnum getMuleVersion(); boolean isStandaloneDeployModel(); boolean isWarDeployModel(); boolean isFtp(); boolean isSftp(); boolean isJms(); boolean isJdbc(); boolean isServlet(); boolean isPop3(); boolean isImap(); boolean isSmtp(); String getInboundTransport(); String getOutboundTransport(); boolean isServiceTransactional(); boolean isServiceXaTransactional(); boolean isInboundEndpointFilebased(); boolean isOutboundEndpointFilebased(); String getTransformerType(); String getConfigPropertyFile(); }
DefaultModelImpl implements IModel { public String getSchemaJavaPackage(String schema) { String replace = ""; schema = schema.replace("urn:", replace); schema = schema.toLowerCase().replace(".", "_"); schema = schema.toLowerCase().replace(":", "."); Pattern pattern = Pattern.compile("\\.(\\d)"); Matcher matcher = pattern.matcher(schema); boolean matchFound = matcher.find(); if (matchFound) { if (matcher.groupCount() > 0) { String version = matcher.group(1); schema = schema.replaceFirst(version, "v" + version); } } String javaPackage = schema; return javaPackage.toLowerCase(); }  void initModel(String groupId, String artifactId, String version, String service, MuleVersionEnum muleVersion, DeploymentModelEnum deploymentModel, List<TransportEnum> transports, TransportEnum inboundTransport, TransportEnum outboundTransport, TransformerEnum transformerType, String serviceDescriptor, List<String> operations); Object resolveParameter(String parameterName); Object resolveParameter(String parameterName, Object defaultValue); List<ServiceDescriptorModel> getSds(); XmlNamespaceModel getXmlNamespace(); Map<String, Object> getExt(); String getDollarSymbol(); String getXmlTimestamp(); String getGroupId(); String getArtifactId(); String getCapitalizedArtifactId(); String getLowercaseArtifactId(); String getCapitalizedJavaArtifactId(); String getVersion(); String getService(); String getCapitalizedService(); String getLowercaseService(); String getInitialLowercaseService(); String getUppercaseService(); String getCapitalizedJavaService(); String getLowercaseJavaService(); String getInitialLowercaseJavaService(); String getSoitoolkitVersion(); String getSuperpomGroupId(); String getSuperpomArtifactId(); String getSuperpomVersion(); String getParentPom(); String getIntegrationComponentProject(); String getServiceProject(); String getServiceProjectFilepath(); String getSchemaProject(); String getSchemaProjectFilepath(); String getSchemaJavaPackage(String schema); String getStandaloneProject(); String getStandaloneProjectFilepath(); String getTeststubStandaloneProject(); String getTeststubStandaloneProjectFilepath(); String getCapitalizedJavaTeststubArtifactId(); String getWebProject(); String getWebProjectFilepath(); String getTeststubWebProject(); String getTeststubWebProjectFilepath(); String getJavaPackage(); String getJavaPackageFilepath(); String getDefaultFtpUsername(); String getDefaultFtpPassword(); String getDefaultSftpUsername(); String getDefaultSftpIdentityFile(); String getDefaultSftpIdentityPassphrase(); String getJmsInboundConnector(); String getJmsOutboundConnector(); String getJmsDefaultConnector(); String getJmsInQueue(); String getJmsOutQueue(); String getJmsDLQueue(); String getJmsRequestQueue(); String getJmsResponseQueue(); String getJmsLogInfoQueue(); String getJmsLogErrorQueue(); String getJdbcInboundConnector(); String getJdbcOutboundConnector(); String getJdbcDefaultConnector(); String getServletPort(); String getHttpPort(); String getHttpTeststubPort(); MuleVersionEnum getMuleVersion(); boolean isStandaloneDeployModel(); boolean isWarDeployModel(); boolean isFtp(); boolean isSftp(); boolean isJms(); boolean isJdbc(); boolean isServlet(); boolean isPop3(); boolean isImap(); boolean isSmtp(); String getInboundTransport(); String getOutboundTransport(); boolean isServiceTransactional(); boolean isServiceXaTransactional(); boolean isInboundEndpointFilebased(); boolean isOutboundEndpointFilebased(); String getTransformerType(); String getConfigPropertyFile();  }