private static List<ModelError> validateScriptComponent( File applicationFilesDirectory, Component component ) {
		List<ModelError> result = new ArrayList<> ();

		// There must be a "scripts" directory
		File directory = ResourceUtils.findInstanceResourcesDirectory( applicationFilesDirectory, component );
		List<File> subDirs = Utils.listAllFiles( directory );

		if( !subDirs.isEmpty()) {
			File scriptsDir = new File( directory, SCRIPTS_DIR_NAME );
			if( ! scriptsDir.exists())
				result.add( new ModelError( ErrorCode.REC_SCRIPT_NO_SCRIPTS_DIR, component, component( component )));
		}

		return result;
	}
private static List < ModelError > validateScriptComponent ( File applicationFilesDirectory , Component component ) { List < ModelError > result = new ArrayList < > ( ) ; File directory = ResourceUtils . findInstanceResourcesDirectory ( applicationFilesDirectory , component ) ; List < File > subDirs = Utils . listAllFiles ( directory ) ; if ( ! subDirs . isEmpty ( ) ) { File scriptsDir = new File ( directory , SCRIPTS_DIR_NAME ) ; if ( ! scriptsDir . exists ( ) ) result . add ( new ModelError ( ErrorCode . REC_SCRIPT_NO_SCRIPTS_DIR , component , component ( component ) ) ) ; } return result ; }
Validates a component associated with the Puppet installer.
@param applicationFilesDirectory the application's directory
@param component the component
@return a non-null list of errors