@Test public void testExtractUuid() { try { assertEquals( "abc", DeploymentIdGenerator.extractUuid( "kie#abc#" ) ); } catch ( Exception e ) { fail( e.getMessage() ); } }
public static String extractUuid( final String deploymentId ) throws Exception { if ( deploymentId != null && isKieGenerated( deploymentId ) ) { Matcher matcher = KIE_ID.matcher( deploymentId ); if ( matcher.find() ) { String[] parts = matcher.group().split( SEPARATOR ); if ( parts.length > 1 ) { return parts[1]; } } } throw new Exception( "Unknown deployment identifier." + deploymentId ); }
DeploymentIdGenerator { public static String extractUuid( final String deploymentId ) throws Exception { if ( deploymentId != null && isKieGenerated( deploymentId ) ) { Matcher matcher = KIE_ID.matcher( deploymentId ); if ( matcher.find() ) { String[] parts = matcher.group().split( SEPARATOR ); if ( parts.length > 1 ) { return parts[1]; } } } throw new Exception( "Unknown deployment identifier." + deploymentId ); } }
DeploymentIdGenerator { public static String extractUuid( final String deploymentId ) throws Exception { if ( deploymentId != null && isKieGenerated( deploymentId ) ) { Matcher matcher = KIE_ID.matcher( deploymentId ); if ( matcher.find() ) { String[] parts = matcher.group().split( SEPARATOR ); if ( parts.length > 1 ) { return parts[1]; } } } throw new Exception( "Unknown deployment identifier." + deploymentId ); }  }
DeploymentIdGenerator { public static String extractUuid( final String deploymentId ) throws Exception { if ( deploymentId != null && isKieGenerated( deploymentId ) ) { Matcher matcher = KIE_ID.matcher( deploymentId ); if ( matcher.find() ) { String[] parts = matcher.group().split( SEPARATOR ); if ( parts.length > 1 ) { return parts[1]; } } } throw new Exception( "Unknown deployment identifier." + deploymentId ); }  static String extractUuid( final String deploymentId ); static String generateDeploymentId( final DriverDef driverDef ); static String generateDeploymentId( final DataSourceDef dataSourceDef ); static String generateDeploymentId( final String uuid ); }
DeploymentIdGenerator { public static String extractUuid( final String deploymentId ) throws Exception { if ( deploymentId != null && isKieGenerated( deploymentId ) ) { Matcher matcher = KIE_ID.matcher( deploymentId ); if ( matcher.find() ) { String[] parts = matcher.group().split( SEPARATOR ); if ( parts.length > 1 ) { return parts[1]; } } } throw new Exception( "Unknown deployment identifier." + deploymentId ); }  static String extractUuid( final String deploymentId ); static String generateDeploymentId( final DriverDef driverDef ); static String generateDeploymentId( final DataSourceDef dataSourceDef ); static String generateDeploymentId( final String uuid );  }