/** * @see npanday.vendor.VendorInfoRepository#exists() */ public boolean exists() { return ( repositoryRegistry.find( "npanday-settings" ) != null ); }
/** * Returns an instance of the repository registry. * * @return an instance of the repository registry * @throws IOException */ public synchronized RepositoryRegistry createRepositoryRegistry() throws IOException, NPandayRepositoryException { if ( repositoryRegistry.isEmpty() ) { repositoryRegistry.loadFromResource( "/META-INF/npanday/registry-config.xml", this.getClass() ); } return repositoryRegistry; } }
return Collections.unmodifiableSet( daos ); for ( String name : repositoryRegistry.getRepositoryNames() ) Repository repository = repositoryRegistry.find( name ); if ( repository instanceof ConnectionsRepository )
try settingsRepository = ( SettingsRepository) repositoryRegistry.find( "npanday-settings" ); repositoryRegistry.removeRepository( "npanday-settings" ); SettingsRepository.class.getName(), new Hashtable() ); repositoryRegistry.addRepository( "npanday-settings", settingsRepository ); assert settingsRepository != null;
return Collections.unmodifiableSet( daoIds ); for ( String name : repositoryRegistry.getRepositoryNames() ) Repository repository = repositoryRegistry.find( name ); if ( repository instanceof ConnectionsRepository )
public Repository find( String repositoryName ) throws RepositoryNotFoundException { Repository repository = repositoryRegistry.find( repositoryName ); if ( repository == null ) { throw new RepositoryNotFoundException( "NPANDAY-064-000: Could not find repository: Name = " + repositoryName ); } return repository; }
return null; for ( String name : repositoryRegistry.getRepositoryNames() ) Repository repository = repositoryRegistry.find( name ); if ( repository instanceof ConnectionsRepository )
public Repository find( String repositoryName ) throws RepositoryNotFoundException { Repository repository = repositoryRegistry.find( repositoryName ); if ( repository == null ) { throw new RepositoryNotFoundException( "NPANDAY-064-000: Could not find repository: Name = " + repositoryName ); } return repository; }
public Repository find( String repositoryName ) throws RepositoryNotFoundException { Repository repository = repositoryRegistry.find( repositoryName ); if ( repository == null ) { throw new RepositoryNotFoundException( "NPANDAY-061-002: Could not find repository: Name = " + repositoryName ); } return repository; }
/** * @see AssemblerContext#init(org.apache.maven.project.MavenProject) */ public void init( MavenProject mavenProject ) throws InitializationException { this.mavenProject = mavenProject; repository = (AssemblyPluginsRepository) repositoryRegistry.find( "assembly-plugins" ); if ( repository == null ) { throw new InitializationException( "NPANDAY-020-005: Unable to find the assembly-plugins.xml file" ); } } }
/** * Return the registered settings, or creates them from the given path or file. * @param repositoryRegistry The registry. * @param settingsPathOrFile If a path, 'npanday-settings.xml' is added. * @return The current, or just created SettingsRepository * @throws SettingsException If anything goes wrong reading or registering the settings */ public static SettingsRepository getOrPopulateSettingsRepository( RepositoryRegistry repositoryRegistry, String settingsPathOrFile ) throws SettingsException { SettingsRepository settingsRepository = (SettingsRepository) repositoryRegistry.find( "npanday-settings" ); if (settingsRepository == null){ return populateSettingsRepository( repositoryRegistry, settingsPathOrFile); } return settingsRepository; }
/** * @see ArtifactContext#getArtifactByID(String) */ public Artifact getArtifactByID( String id ) { NetDependenciesRepositoryImpl repository = (NetDependenciesRepositoryImpl) repositoryRegistry.find( "net-dependencies" ); repository.init( artifactFactory ); return repository.getArtifactByID( id ); }
/** * Returns all platform capabilities (as defined in the compiler-plugins.xml file). This is more than the platform * capabilities for the invoking platform. * * @return all platform capabilities (as defined in the compiler-plugins.xml file). */ private List<ExecutableCapability> getExecutableCapabilities() throws PlatformUnsupportedException { ExecutablePluginsRepository pluginsRepository = (ExecutablePluginsRepository) repositoryRegistry.find( "executable-plugins" ); ExecutablePluginsRepository pluginsRepositoryExt = (ExecutablePluginsRepository) repositoryRegistry.find( "executable-plugins-ext" ); List<ExecutableCapability> primary = new ArrayList<ExecutableCapability>(); if ( pluginsRepository != null ) { primary = pluginsRepository.getCapabilities(); } if ( pluginsRepositoryExt != null ) { primary.addAll( pluginsRepositoryExt.getCapabilities() ); } if ( primary.isEmpty() ) { throw new PlatformUnsupportedException( "NPANDAY-065-004: No executable capabilities configured" ); } return primary; }
/** * Returns all platform capabilities (as defined in the compiler-plugins.xml file). This is more than the platform * capabilities for the invoking platform. * * @return all platform capabilities (as defined in the compiler-plugins.xml file). */ private List<ExecutableCapability> getCompilerCapabilities() throws PlatformUnsupportedException { CompilerPluginsRepository pluginsRepository = (CompilerPluginsRepository) repositoryRegistry.find( "compiler-plugins" ); CompilerPluginsRepository pluginsRepositoryExt = (CompilerPluginsRepository) repositoryRegistry.find( "compiler-plugins-ext" ); List<ExecutableCapability> primary = new ArrayList<ExecutableCapability>(); if ( pluginsRepository != null ) { primary = pluginsRepository.getCompilerCapabilities(); } if ( pluginsRepositoryExt != null ) { primary.addAll( pluginsRepositoryExt.getCompilerCapabilities() ); } if ( primary.isEmpty() ) { throw new PlatformUnsupportedException( "NPANDAY-065-003: No compiler capabilities configured" ); } return primary; }
public ConfigurationAppender getConfigurationAppenderFor( Field field ) (ConfigurationAppendersRepository) repositoryRegistry.find( "configuration-appenders" ); Set<Class> appenderClasses = repository.getAppenderClasses(); for ( Class c : appenderClasses )
public void postExecute() throws MojoExecutionException, MojoFailureException { try { RepositoryRegistry repositoryRegistry = (RepositoryRegistry) container.lookup( RepositoryRegistry.ROLE ); SettingsRepository settingsRepository = (SettingsRepository) repositoryRegistry.find( "npanday-settings" ); if ( settingsRepository != null ) { settingsRepository.reload(); } } catch ( ComponentLookupException e ) { e.printStackTrace(); } catch ( IOException e ) { e.printStackTrace(); } catch( NPandayRepositoryException e ) { e.printStackTrace(); } } }
private File getSdkInstallRootFor( VendorInfo vendorInfo ) throws PlatformUnsupportedException { SettingsRepository settingsRepository = (SettingsRepository) repositoryRegistry.find( "npanday-settings" ); return settingsRepository.getSdkInstallRootFor( vendorInfo.getVendor().getVendorName(), vendorInfo.getVendorVersion(), vendorInfo.getFrameworkVersion() ); }
private File getInstallRootFor( VendorInfo vendorInfo ) throws PlatformUnsupportedException { SettingsRepository settingsRepository = (SettingsRepository) repositoryRegistry.find( "npanday-settings" ); return settingsRepository.getInstallRootFor( vendorInfo.getVendor().getVendorName(), vendorInfo.getVendorVersion(), vendorInfo.getFrameworkVersion() ); }
(NetDependenciesRepository) repositoryRegistry.find( "net-dependencies" ); getLog().info( "NPANDAY-1600-001: Found net dependencies: Number = " + dependencies.size() );
NetDependenciesRepository netRepository = (NetDependenciesRepository) repositoryRegistry.find( "net-dependencies" );