org.sonar.server.ui
Class JRubyFacade

java.lang.Object
  extended by org.sonar.server.ui.JRubyFacade

public final class JRubyFacade
extends Object


Constructor Summary
JRubyFacade()
           
 
Method Summary
 String backupProfile(int profileId)
           
 void cancelPluginDownloads()
           
 void cancelPluginUninstalls()
           
 ValidationMessages changeParentProfile(int profileId, String parentName, String userName)
           
 String colorizeCode(String code, String language)
           
 void copyProfile(long profileId, String newProfileName)
           
 boolean createDatabase()
           
 void deleteProfile(long profileId)
           
 void deleteResourceTree(long rootProjectId)
           
 void downloadPlugin(String pluginKey, String pluginVersion)
           
 String encrypt(String clearText)
           
 FilterResult executeFilter(Filter filter)
           
 String exportProfile(int profileId, String exporterKey)
           
 String generateRandomSecretKey()
           
 String generateServerId(String organisation, String ipAddress)
           
 Backup getBackup()
           
 Object getComponentByClassname(String pluginKey, String className)
           
 String getConfigurationValue(String key)
           
 Connection getConnection()
           
 ComponentContainer getContainer()
           
 Object getCoreComponentByClassname(String className)
           
 Database getDatabase()
           
static JRubyFacade getInstance()
           
 String getJsL10nDictionnary(String rubyLocale)
           
 Collection<Language> getLanguages()
           
 String getMessage(String rubyLocale, String key, String defaultValue, Object... parameters)
           
 ViewProxy<Page> getPage(String id)
           
 List<ViewProxy<Page>> getPages(String section, String resourceScope, String resourceQualifier, String resourceLanguage, Object[] availableMeasures)
           
 List<String> getPluginDownloads()
           
 Collection<PluginMetadata> getPluginsMetadata()
           
 List<String> getPluginUninstalls()
           
 String getProfileExporterMimeType(String exporterKey)
           
 List<ProfileExporter> getProfileExportersForLanguage(String language)
           
 List<ProfileImporter> getProfileImportersForLanguage(String language)
           
 PropertyDefinitions getPropertyDefinitions()
           
 List<String> getQualifiersWithProperty(String propertyKey)
           
 Collection<String> getResourceChildrenQualifiers(String qualifier)
           
 Collection<String> getResourceLeavesQualifiers(String qualifier)
           
 List<ViewProxy<Page>> getResourceTabs()
           
 List<ViewProxy<Page>> getResourceTabs(String scope, String qualifier, String language, Object[] availableMeasures)
           
 List<ViewProxy<Page>> getResourceTabsForMetric(String scope, String qualifier, String language, Object[] availableMeasures, String metric)
           
 ResourceType getResourceType(String qualifier)
           
 Boolean getResourceTypeBooleanProperty(String resourceTypeQualifier, String resourceTypeProperty)
           
 Collection<ResourceType> getResourceTypes()
           
 Collection<ResourceType> getResourceTypesForFilter()
           
 String getResourceTypeStringProperty(String resourceTypeQualifier, String resourceTypeProperty)
           
 ReviewsNotificationManager getReviewsNotificationManager()
           
 Collection<RubyRailsWebservice> getRubyRailsWebservices()
           
 String getRuleDescription(String rubyLocale, String repositoryKey, String key)
           
 String getRuleName(String rubyLocale, String repositoryKey, String key)
           
 String getRuleParamDescription(String rubyLocale, String repositoryKey, String key, String paramKey)
           
 List<RuleRepository> getRuleRepositories()
           
 Set<RuleRepository> getRuleRepositoriesByLanguage(String languageKey)
           
 RuleRepository getRuleRepository(String repositoryKey)
           
 String getServerHome()
           
 Settings getSettings()
           
 UpdateCenterMatrix getUpdateCenterMatrix(boolean forceReload)
           
 List<InetAddress> getValidInetAddressesForServerId()
           
 List<Footer> getWebFooters()
           
 ViewProxy<Widget> getWidget(String id)
           
 List<ViewProxy<Widget>> getWidgets()
           
 List<ViewProxy<Widget>> getWidgets(String resourceScope, String resourceQualifier, String resourceLanguage, Object[] availableMeasures)
           
 boolean hasPlugin(String key)
           
 boolean hasSecretKey()
           
 ValidationMessages importProfile(String profileName, String language, String importerKey, String fileContent)
           
 void indexProjects()
           
 void indexResource(long resourceId)
           
 void logError(String message)
           
static String markdownToHtml(String input)
           
 License parseLicense(String base64)
           
 void renameProfile(int profileId, String newProfileName)
           
 ValidationMessages restoreProfile(String xmlBackup)
           
 void revertRule(int profileId, int activeRuleId, String userName)
           
 void ruleActivated(int parentProfileId, int activeRuleId, String userName)
           
 void ruleDeactivated(int parentProfileId, int deactivatedRuleId, String userName)
           
 void ruleParamChanged(int parentProfileId, int activeRuleId, String paramKey, String oldValue, String newValue, String userName)
           
 void ruleSeverityChanged(int parentProfileId, int activeRuleId, int oldSeverityId, int newSeverityId, String userName)
           
 List<RuleI18nManager.RuleKey> searchRuleName(String rubyLocale, String searchText)
           
 void setGlobalProperty(String key, String value)
           
 void uninstallPlugin(String pluginKey)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JRubyFacade

public JRubyFacade()
Method Detail

getInstance

public static JRubyFacade getInstance()

executeFilter

public FilterResult executeFilter(Filter filter)

getResourceTypesForFilter

public Collection<ResourceType> getResourceTypesForFilter()

getResourceTypes

public Collection<ResourceType> getResourceTypes()

getResourceType

public ResourceType getResourceType(String qualifier)

getResourceTypeStringProperty

public String getResourceTypeStringProperty(String resourceTypeQualifier,
                                            String resourceTypeProperty)

getQualifiersWithProperty

public List<String> getQualifiersWithProperty(String propertyKey)

getResourceTypeBooleanProperty

public Boolean getResourceTypeBooleanProperty(String resourceTypeQualifier,
                                              String resourceTypeProperty)

getResourceLeavesQualifiers

public Collection<String> getResourceLeavesQualifiers(String qualifier)

getResourceChildrenQualifiers

public Collection<String> getResourceChildrenQualifiers(String qualifier)

downloadPlugin

public void downloadPlugin(String pluginKey,
                           String pluginVersion)

cancelPluginDownloads

public void cancelPluginDownloads()

getPluginDownloads

public List<String> getPluginDownloads()

uninstallPlugin

public void uninstallPlugin(String pluginKey)

cancelPluginUninstalls

public void cancelPluginUninstalls()

getPluginUninstalls

public List<String> getPluginUninstalls()

getUpdateCenterMatrix

public UpdateCenterMatrix getUpdateCenterMatrix(boolean forceReload)

getPropertyDefinitions

public PropertyDefinitions getPropertyDefinitions()

hasPlugin

public boolean hasPlugin(String key)

getPluginsMetadata

public Collection<PluginMetadata> getPluginsMetadata()

colorizeCode

public String colorizeCode(String code,
                           String language)

markdownToHtml

public static String markdownToHtml(String input)

getWidgets

public List<ViewProxy<Widget>> getWidgets(String resourceScope,
                                          String resourceQualifier,
                                          String resourceLanguage,
                                          Object[] availableMeasures)

getWidgets

public List<ViewProxy<Widget>> getWidgets()

getWidget

public ViewProxy<Widget> getWidget(String id)

getPages

public List<ViewProxy<Page>> getPages(String section,
                                      String resourceScope,
                                      String resourceQualifier,
                                      String resourceLanguage,
                                      Object[] availableMeasures)

getResourceTabs

public List<ViewProxy<Page>> getResourceTabs()

getResourceTabs

public List<ViewProxy<Page>> getResourceTabs(String scope,
                                             String qualifier,
                                             String language,
                                             Object[] availableMeasures)

getResourceTabsForMetric

public List<ViewProxy<Page>> getResourceTabsForMetric(String scope,
                                                      String qualifier,
                                                      String language,
                                                      Object[] availableMeasures,
                                                      String metric)

getPage

public ViewProxy<Page> getPage(String id)

getRubyRailsWebservices

public Collection<RubyRailsWebservice> getRubyRailsWebservices()

getLanguages

public Collection<Language> getLanguages()

getDatabase

public Database getDatabase()

createDatabase

public boolean createDatabase()

getRuleRepositories

public List<RuleRepository> getRuleRepositories()

getRuleRepository

public RuleRepository getRuleRepository(String repositoryKey)

getRuleRepositoriesByLanguage

public Set<RuleRepository> getRuleRepositoriesByLanguage(String languageKey)

backupProfile

public String backupProfile(int profileId)

restoreProfile

public ValidationMessages restoreProfile(String xmlBackup)

getProfileExportersForLanguage

public List<ProfileExporter> getProfileExportersForLanguage(String language)

getProfileImportersForLanguage

public List<ProfileImporter> getProfileImportersForLanguage(String language)

exportProfile

public String exportProfile(int profileId,
                            String exporterKey)
Throws:
IllegalArgumentException - if no such exporter

importProfile

public ValidationMessages importProfile(String profileName,
                                        String language,
                                        String importerKey,
                                        String fileContent)

getProfileExporterMimeType

public String getProfileExporterMimeType(String exporterKey)

renameProfile

public void renameProfile(int profileId,
                          String newProfileName)

copyProfile

public void copyProfile(long profileId,
                        String newProfileName)

deleteProfile

public void deleteProfile(long profileId)

changeParentProfile

public ValidationMessages changeParentProfile(int profileId,
                                              String parentName,
                                              String userName)

ruleActivated

public void ruleActivated(int parentProfileId,
                          int activeRuleId,
                          String userName)

ruleParamChanged

public void ruleParamChanged(int parentProfileId,
                             int activeRuleId,
                             String paramKey,
                             String oldValue,
                             String newValue,
                             String userName)

ruleSeverityChanged

public void ruleSeverityChanged(int parentProfileId,
                                int activeRuleId,
                                int oldSeverityId,
                                int newSeverityId,
                                String userName)

ruleDeactivated

public void ruleDeactivated(int parentProfileId,
                            int deactivatedRuleId,
                            String userName)

revertRule

public void revertRule(int profileId,
                       int activeRuleId,
                       String userName)

getWebFooters

public List<Footer> getWebFooters()

getBackup

public Backup getBackup()

setGlobalProperty

public void setGlobalProperty(String key,
                              @Nullable
                              String value)

getSettings

public Settings getSettings()

getConfigurationValue

public String getConfigurationValue(String key)

getValidInetAddressesForServerId

public List<InetAddress> getValidInetAddressesForServerId()

generateServerId

public String generateServerId(String organisation,
                               String ipAddress)

getConnection

public Connection getConnection()

getCoreComponentByClassname

public Object getCoreComponentByClassname(String className)

getComponentByClassname

public Object getComponentByClassname(String pluginKey,
                                      String className)

getMessage

public String getMessage(String rubyLocale,
                         String key,
                         String defaultValue,
                         Object... parameters)

getRuleName

public String getRuleName(String rubyLocale,
                          String repositoryKey,
                          String key)

getRuleDescription

public String getRuleDescription(String rubyLocale,
                                 String repositoryKey,
                                 String key)

getRuleParamDescription

public String getRuleParamDescription(String rubyLocale,
                                      String repositoryKey,
                                      String key,
                                      String paramKey)

searchRuleName

public List<RuleI18nManager.RuleKey> searchRuleName(String rubyLocale,
                                                    String searchText)

getJsL10nDictionnary

public String getJsL10nDictionnary(String rubyLocale)

indexProjects

public void indexProjects()

indexResource

public void indexResource(long resourceId)

deleteResourceTree

public void deleteResourceTree(long rootProjectId)

logError

public void logError(String message)

hasSecretKey

public boolean hasSecretKey()

encrypt

public String encrypt(String clearText)

generateRandomSecretKey

public String generateRandomSecretKey()

parseLicense

public License parseLicense(String base64)

getServerHome

public String getServerHome()

getReviewsNotificationManager

public ReviewsNotificationManager getReviewsNotificationManager()

getContainer

public ComponentContainer getContainer()


Copyright © 2009-2012 SonarSource. All Rights Reserved.