@Test public void testIsGroupIdSuffixedWithArtifactId() { DefaultModelImpl dm = new DefaultModelImpl(); String groupId = "se.callista.soitoolkit.test"; String artifactId = "test"; String version = null; String service = null; MuleVersionEnum muleVersion = MuleVersionEnum.MAIN_MULE_VERSION; DeploymentModelEnum dependencyModel = null; List<TransportEnum> transports = null; TransportEnum inboundTransport = null; TransportEnum outboundTransport = null; TransformerEnum transformerType = null; String serviceDescriptor = null; List<String> operations = null; dm.initModel(groupId, artifactId, version, service, muleVersion, dependencyModel, transports, inboundTransport, outboundTransport, transformerType, serviceDescriptor, operations); assertTrue(dm.isGroupIdSuffixedWithArtifactId()); groupId = "test"; artifactId = "test"; dm.initModel(groupId, artifactId, version, service, muleVersion, dependencyModel, transports, inboundTransport, outboundTransport, transformerType, serviceDescriptor, operations); assertTrue(dm.isGroupIdSuffixedWithArtifactId()); groupId = "se.callista.soitoolkit.test"; artifactId = null; dm.initModel(groupId, artifactId, version, service, muleVersion, dependencyModel, transports, inboundTransport, outboundTransport, transformerType, serviceDescriptor, operations); assertFalse(dm.isGroupIdSuffixedWithArtifactId()); groupId = null; artifactId = "test"; dm.initModel(groupId, artifactId, version, service, muleVersion, dependencyModel, transports, inboundTransport, outboundTransport, transformerType, serviceDescriptor, operations); assertFalse(dm.isGroupIdSuffixedWithArtifactId()); groupId = "se.callista.soitoolkit.test"; artifactId = "notFound"; dm.initModel(groupId, artifactId, version, service, muleVersion, dependencyModel, transports, inboundTransport, outboundTransport, transformerType, serviceDescriptor, operations); assertFalse(dm.isGroupIdSuffixedWithArtifactId()); groupId = "se.callista.soitoolkit.test"; artifactId = "te"; dm.initModel(groupId, artifactId, version, service, muleVersion, dependencyModel, transports, inboundTransport, outboundTransport, transformerType, serviceDescriptor, operations); assertFalse(dm.isGroupIdSuffixedWithArtifactId()); groupId = "short"; artifactId = "loooooong"; dm.initModel(groupId, artifactId, version, service, muleVersion, dependencyModel, transports, inboundTransport, outboundTransport, transformerType, serviceDescriptor, operations); assertFalse(dm.isGroupIdSuffixedWithArtifactId()); }
boolean isGroupIdSuffixedWithArtifactId() { String grpId = getJavaGroupId(); String artId = getJavaArtifactId(); if (grpId == null || artId == null) { return false; } int grpIdLen = grpId.length(); int artIdLen = artId.length(); if (artIdLen > grpIdLen) { return false; } grpId = grpId.toLowerCase(); artId = artId.toLowerCase(); int artIdInGrpIdLastPosition = grpId.lastIndexOf(artId); if (artIdInGrpIdLastPosition == -1) { return false; } if (grpIdLen != artIdInGrpIdLastPosition + artIdLen) { return false; } return true; }
DefaultModelImpl implements IModel { boolean isGroupIdSuffixedWithArtifactId() { String grpId = getJavaGroupId(); String artId = getJavaArtifactId(); if (grpId == null || artId == null) { return false; } int grpIdLen = grpId.length(); int artIdLen = artId.length(); if (artIdLen > grpIdLen) { return false; } grpId = grpId.toLowerCase(); artId = artId.toLowerCase(); int artIdInGrpIdLastPosition = grpId.lastIndexOf(artId); if (artIdInGrpIdLastPosition == -1) { return false; } if (grpIdLen != artIdInGrpIdLastPosition + artIdLen) { return false; } return true; } }
DefaultModelImpl implements IModel { boolean isGroupIdSuffixedWithArtifactId() { String grpId = getJavaGroupId(); String artId = getJavaArtifactId(); if (grpId == null || artId == null) { return false; } int grpIdLen = grpId.length(); int artIdLen = artId.length(); if (artIdLen > grpIdLen) { return false; } grpId = grpId.toLowerCase(); artId = artId.toLowerCase(); int artIdInGrpIdLastPosition = grpId.lastIndexOf(artId); if (artIdInGrpIdLastPosition == -1) { return false; } if (grpIdLen != artIdInGrpIdLastPosition + artIdLen) { return false; } return true; }  }
DefaultModelImpl implements IModel { boolean isGroupIdSuffixedWithArtifactId() { String grpId = getJavaGroupId(); String artId = getJavaArtifactId(); if (grpId == null || artId == null) { return false; } int grpIdLen = grpId.length(); int artIdLen = artId.length(); if (artIdLen > grpIdLen) { return false; } grpId = grpId.toLowerCase(); artId = artId.toLowerCase(); int artIdInGrpIdLastPosition = grpId.lastIndexOf(artId); if (artIdInGrpIdLastPosition == -1) { return false; } if (grpIdLen != artIdInGrpIdLastPosition + artIdLen) { return false; } return true; }  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 { boolean isGroupIdSuffixedWithArtifactId() { String grpId = getJavaGroupId(); String artId = getJavaArtifactId(); if (grpId == null || artId == null) { return false; } int grpIdLen = grpId.length(); int artIdLen = artId.length(); if (artIdLen > grpIdLen) { return false; } grpId = grpId.toLowerCase(); artId = artId.toLowerCase(); int artIdInGrpIdLastPosition = grpId.lastIndexOf(artId); if (artIdInGrpIdLastPosition == -1) { return false; } if (grpIdLen != artIdInGrpIdLastPosition + artIdLen) { return false; } return true; }  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();  }