diff --git a/gui/src/main/java/org/jboss/as/console/client/core/NameTokens.java b/gui/src/main/java/org/jboss/as/console/client/core/NameTokens.java index 3c7498f66..efd16f4df 100644 --- a/gui/src/main/java/org/jboss/as/console/client/core/NameTokens.java +++ b/gui/src/main/java/org/jboss/as/console/client/core/NameTokens.java @@ -43,6 +43,7 @@ public class NameTokens { public static final String ElytronFactoryPresenter = "elytron-factory-presenter"; public static final String ElytronMapperPresenter = "elytron-mapper-presenter"; public static final String ElytronSecurityRealmPresenter = "elytron-security-realm-presenter"; + public static final String ElytronSettingsPresenter = "elytron-settings-presenter"; public static final String ElytronSSLPresenter = "elytron-ssl-presenter"; public static final String HostInterfacesPresenter = "host-interfaces"; public static final String HostJVMPresenter = "host-jvms"; diff --git a/gui/src/main/java/org/jboss/as/console/client/core/gin/CoreUI.java b/gui/src/main/java/org/jboss/as/console/client/core/gin/CoreUI.java index 5b9df6f8b..693256b90 100644 --- a/gui/src/main/java/org/jboss/as/console/client/core/gin/CoreUI.java +++ b/gui/src/main/java/org/jboss/as/console/client/core/gin/CoreUI.java @@ -113,6 +113,7 @@ import org.jboss.as.console.client.shared.subsys.elytron.ElytronMapperPresenter; import org.jboss.as.console.client.shared.subsys.elytron.ElytronPresenter; import org.jboss.as.console.client.shared.subsys.elytron.ElytronSecurityRealmPresenter; +import org.jboss.as.console.client.shared.subsys.elytron.ElytronSettingsPresenter; import org.jboss.as.console.client.shared.subsys.generic.GenericSubsystemPresenter; import org.jboss.as.console.client.shared.subsys.iiopopenjdk.IiopOpenJdkPresenter; import org.jboss.as.console.client.shared.subsys.infinispan.v3.CacheFinderPresenter; @@ -301,6 +302,7 @@ public interface CoreUI { AsyncProvider getElytronFactoryPresenter(); AsyncProvider getElytronMapperPresenter(); AsyncProvider getElytronSecurityRealmPresenter(); + AsyncProvider getElytronSettingsPresenter(); AsyncProvider getElytronFinder(); AsyncProvider getLogFilesPresenter(); diff --git a/gui/src/main/java/org/jboss/as/console/client/core/gin/CoreUIModule.java b/gui/src/main/java/org/jboss/as/console/client/core/gin/CoreUIModule.java index 840003149..66ab594c6 100644 --- a/gui/src/main/java/org/jboss/as/console/client/core/gin/CoreUIModule.java +++ b/gui/src/main/java/org/jboss/as/console/client/core/gin/CoreUIModule.java @@ -198,7 +198,9 @@ import org.jboss.as.console.client.shared.subsys.elytron.ElytronMapperPresenter; import org.jboss.as.console.client.shared.subsys.elytron.ElytronPresenter; import org.jboss.as.console.client.shared.subsys.elytron.ElytronSecurityRealmPresenter; +import org.jboss.as.console.client.shared.subsys.elytron.ElytronSettingsPresenter; import org.jboss.as.console.client.shared.subsys.elytron.ui.ElytronSecurityRealmView; +import org.jboss.as.console.client.shared.subsys.elytron.ui.ElytronSettingsView; import org.jboss.as.console.client.shared.subsys.elytron.ui.ElytronView; import org.jboss.as.console.client.shared.subsys.elytron.ui.factory.ElytronFactoryView; import org.jboss.as.console.client.shared.subsys.elytron.ui.mapper.ElytronMapperView; @@ -494,6 +496,11 @@ protected void configure() { ElytronSecurityRealmView.class, ElytronSecurityRealmPresenter.MyProxy.class); + bindPresenter(ElytronSettingsPresenter.class, + ElytronSettingsPresenter.MyView.class, + ElytronSettingsView.class, + ElytronSettingsPresenter.MyProxy.class); + bindPresenter(ElytronRuntimePresenter.class, ElytronRuntimePresenter.MyView.class, ElytronRuntimeView.class, diff --git a/gui/src/main/java/org/jboss/as/console/client/preview/PreviewContent.java b/gui/src/main/java/org/jboss/as/console/client/preview/PreviewContent.java index 39efd25ca..1d36c4141 100644 --- a/gui/src/main/java/org/jboss/as/console/client/preview/PreviewContent.java +++ b/gui/src/main/java/org/jboss/as/console/client/preview/PreviewContent.java @@ -132,6 +132,9 @@ public interface PreviewContent extends ClientBundleWithLookup { @Source("content/elytron_mapper.html") ExternalTextResource elytron_mapper(); + @Source("content/elytron_other_settings.html") + ExternalTextResource elytron_other_settings(); + @Source("content/elytron_settings.html") ExternalTextResource elytron_settings(); diff --git a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings.html b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings.html new file mode 100644 index 000000000..c8d76ec7e --- /dev/null +++ b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings.html @@ -0,0 +1,21 @@ +
+

Other settings

+ Elytron settings for: +
    +
  • Key stores
  • +
  • Credential stores
  • +
  • Filtering key stores
  • +
  • Ldap key stores
  • +
  • Key managers
  • +
  • Server SSL contexts
  • +
  • Client SSL contexts
  • +
  • Trust managers
  • +
  • Security domains
  • +
  • Security properties
  • +
  • Audit Log
  • +
  • Aggregate Security Event Listener
  • +
  • Policy
  • +
  • Directory contexts (LDAP)
  • +
  • Provider Loader
  • +
+
diff --git a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings_de.html b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings_de.html new file mode 100644 index 000000000..c44e769f7 --- /dev/null +++ b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings_de.html @@ -0,0 +1,21 @@ +
+

Sonstige Einstellungen

+ Elytron-Einstellungen für: +
    +
  • Schlüsselspeicher
  • +
  • Anmeldedatenspeicher
  • +
  • Filterschlüsselspeicher
  • +
  • LDAP-Schlüsselspeicher
  • +
  • Schlüsselmanager
  • +
  • Server-SSL-Kontexte
  • +
  • Client-SSL-Kontexte
  • +
  • Trust-Manager
  • +
  • Sicherheitsdomains
  • +
  • Sicherheitseigenschaften
  • +
  • Audit-Protokoll
  • +
  • Aggregat-Sicherheitsereignis-Listener
  • +
  • Richtlinie
  • +
  • Verzeichniskontexte (LDAP)
  • +
  • Anbieter-Lader
  • +
+
diff --git a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings_es.html b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings_es.html new file mode 100644 index 000000000..b2f87d8e8 --- /dev/null +++ b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings_es.html @@ -0,0 +1,21 @@ +
+

Otros ajustes

+ La configuración de Elytron para: +
    +
  • Almacenes de claves
  • +
  • Almacenes de credenciales
  • +
  • Filtrado de almacenes de claves
  • +
  • Almacenes de claves de ldap
  • +
  • Gestores de claves
  • +
  • Contextos SSL del servidor
  • +
  • Contextos SSL del cliente
  • +
  • Gestores de confianza
  • +
  • Dominios de seguridad
  • +
  • Propiedades de seguridad
  • +
  • Registro de auditoría
  • +
  • Agregar oyente del evento de seguridad
  • +
  • Política
  • +
  • Contextos de directorio (LDAP)
  • +
  • Cargador del proveedor
  • +
+
diff --git a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings_fr.html b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings_fr.html new file mode 100644 index 000000000..bfd7f0aaf --- /dev/null +++ b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings_fr.html @@ -0,0 +1,21 @@ +
+

Autres paramètres

+ Paramètres Elytron pour : +
    +
  • Key stores
  • +
  • Stores d'identifiants
  • +
  • Filtrage de key stores
  • +
  • Key stores LDAP
  • +
  • Gestionnaires de clés
  • +
  • Contextes de serveur SSL
  • +
  • Contextes de client SSL
  • +
  • Gestionnaires de confiance
  • +
  • Domaines de sécurité
  • +
  • Propriétés de sécurité
  • +
  • Journal d'audit
  • +
  • Agrégat d'écouteur d'événement de sécurité
  • +
  • Stratégie
  • +
  • Contextes de référentiel (LDAP)
  • +
  • Chargeur de fournisseur
  • +
+
diff --git a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings_ja.html b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings_ja.html new file mode 100644 index 000000000..19606479b --- /dev/null +++ b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings_ja.html @@ -0,0 +1,21 @@ +
+

その他の設定

+ 次の Elytron 設定: +
    +
  • キーストア
  • +
  • クレデンシャルストア
  • +
  • フィルターキーストア
  • +
  • Ldap キーストア
  • +
  • キーマネージャー
  • +
  • サーバー SSL コンテキスト
  • +
  • クライアント SSL コンテキスト
  • +
  • トラストマネージャー
  • +
  • セキュリティードメイン
  • +
  • セキュリティープロパティー
  • +
  • 監査ログ
  • +
  • 総計セキュリティーイベントリスナー
  • +
  • ポリシー
  • +
  • ディレクトリーコンテキスト (LDAP)
  • +
  • プロバイダーローダー
  • +
+
diff --git a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings_pt-BR.html b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings_pt-BR.html new file mode 100644 index 000000000..61ec95649 --- /dev/null +++ b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings_pt-BR.html @@ -0,0 +1,21 @@ +
+

Outras configurações

+ Configurações do Elytron para: +
    +
  • Repositórios de chaves
  • +
  • Repositórios de credenciais
  • +
  • Filtragem de repositórios de chaves
  • +
  • Repositórios de chaves Ldap
  • +
  • Gerenciadores de chave
  • +
  • Contextos do SSL do servidor
  • +
  • Contextos do SSL do cliente
  • +
  • Gerenciadores de confiança
  • +
  • Domínios de segurança
  • +
  • Propriedades de segurança
  • +
  • Log de auditoria
  • +
  • Ouvinte de eventos de segurança agregado
  • +
  • Política
  • +
  • Contextos de diretório (LDAP)
  • +
  • Carregador de provedor
  • +
+
diff --git a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings_zh-Hans.html b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings_zh-Hans.html new file mode 100644 index 000000000..559774715 --- /dev/null +++ b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_other_settings_zh-Hans.html @@ -0,0 +1,21 @@ +
+

其他设置

+ 以下对象的 Elytron 设置: +
    +
  • 密钥库
  • +
  • 凭证库
  • +
  • 过滤密钥库
  • +
  • Ldap 密钥库
  • +
  • 密钥管理者
  • +
  • 服务器 SSL 上下文
  • +
  • 客户端 SSL 上下文
  • +
  • 信任管理者
  • +
  • 安全域
  • +
  • 安全属性
  • +
  • 审计日志
  • +
  • 聚合安全事件监听程序
  • +
  • 策略
  • +
  • 目录上下文 (LDAP)
  • +
  • 提供者加载器
  • +
+
diff --git a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings.html b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings.html index c8d76ec7e..a614136c8 100644 --- a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings.html +++ b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings.html @@ -1,21 +1,4 @@
-

Other settings

- Elytron settings for: -
    -
  • Key stores
  • -
  • Credential stores
  • -
  • Filtering key stores
  • -
  • Ldap key stores
  • -
  • Key managers
  • -
  • Server SSL contexts
  • -
  • Client SSL contexts
  • -
  • Trust managers
  • -
  • Security domains
  • -
  • Security properties
  • -
  • Audit Log
  • -
  • Aggregate Security Event Listener
  • -
  • Policy
  • -
  • Directory contexts (LDAP)
  • -
  • Provider Loader
  • -
+

Settings

+ Elytron settings
diff --git a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_de.html b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_de.html index c44e769f7..20b3aa0e0 100644 --- a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_de.html +++ b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_de.html @@ -1,21 +1,4 @@
-

Sonstige Einstellungen

- Elytron-Einstellungen für: -
    -
  • Schlüsselspeicher
  • -
  • Anmeldedatenspeicher
  • -
  • Filterschlüsselspeicher
  • -
  • LDAP-Schlüsselspeicher
  • -
  • Schlüsselmanager
  • -
  • Server-SSL-Kontexte
  • -
  • Client-SSL-Kontexte
  • -
  • Trust-Manager
  • -
  • Sicherheitsdomains
  • -
  • Sicherheitseigenschaften
  • -
  • Audit-Protokoll
  • -
  • Aggregat-Sicherheitsereignis-Listener
  • -
  • Richtlinie
  • -
  • Verzeichniskontexte (LDAP)
  • -
  • Anbieter-Lader
  • -
+

Einstellungen

+ Elytron-Einstellungen
diff --git a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_es.html b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_es.html index b2f87d8e8..596b336b8 100644 --- a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_es.html +++ b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_es.html @@ -1,21 +1,4 @@
-

Otros ajustes

- La configuración de Elytron para: -
    -
  • Almacenes de claves
  • -
  • Almacenes de credenciales
  • -
  • Filtrado de almacenes de claves
  • -
  • Almacenes de claves de ldap
  • -
  • Gestores de claves
  • -
  • Contextos SSL del servidor
  • -
  • Contextos SSL del cliente
  • -
  • Gestores de confianza
  • -
  • Dominios de seguridad
  • -
  • Propiedades de seguridad
  • -
  • Registro de auditoría
  • -
  • Agregar oyente del evento de seguridad
  • -
  • Política
  • -
  • Contextos de directorio (LDAP)
  • -
  • Cargador del proveedor
  • -
+

Ajustes

+ La configuración de Elytron
diff --git a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_fr.html b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_fr.html index bfd7f0aaf..062abc982 100644 --- a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_fr.html +++ b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_fr.html @@ -1,21 +1,4 @@
-

Autres paramètres

- Paramètres Elytron pour : -
    -
  • Key stores
  • -
  • Stores d'identifiants
  • -
  • Filtrage de key stores
  • -
  • Key stores LDAP
  • -
  • Gestionnaires de clés
  • -
  • Contextes de serveur SSL
  • -
  • Contextes de client SSL
  • -
  • Gestionnaires de confiance
  • -
  • Domaines de sécurité
  • -
  • Propriétés de sécurité
  • -
  • Journal d'audit
  • -
  • Agrégat d'écouteur d'événement de sécurité
  • -
  • Stratégie
  • -
  • Contextes de référentiel (LDAP)
  • -
  • Chargeur de fournisseur
  • -
+

Paramètres

+ Paramètres Elytron
diff --git a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_ja.html b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_ja.html index 19606479b..c868c8c49 100644 --- a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_ja.html +++ b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_ja.html @@ -1,21 +1,4 @@
-

その他の設定

- 次の Elytron 設定: -
    -
  • キーストア
  • -
  • クレデンシャルストア
  • -
  • フィルターキーストア
  • -
  • Ldap キーストア
  • -
  • キーマネージャー
  • -
  • サーバー SSL コンテキスト
  • -
  • クライアント SSL コンテキスト
  • -
  • トラストマネージャー
  • -
  • セキュリティードメイン
  • -
  • セキュリティープロパティー
  • -
  • 監査ログ
  • -
  • 総計セキュリティーイベントリスナー
  • -
  • ポリシー
  • -
  • ディレクトリーコンテキスト (LDAP)
  • -
  • プロバイダーローダー
  • -
+

設定

+ Elytron 設定
diff --git a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_pt-BR.html b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_pt-BR.html index 61ec95649..239996a5c 100644 --- a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_pt-BR.html +++ b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_pt-BR.html @@ -1,21 +1,4 @@
-

Outras configurações

- Configurações do Elytron para: -
    -
  • Repositórios de chaves
  • -
  • Repositórios de credenciais
  • -
  • Filtragem de repositórios de chaves
  • -
  • Repositórios de chaves Ldap
  • -
  • Gerenciadores de chave
  • -
  • Contextos do SSL do servidor
  • -
  • Contextos do SSL do cliente
  • -
  • Gerenciadores de confiança
  • -
  • Domínios de segurança
  • -
  • Propriedades de segurança
  • -
  • Log de auditoria
  • -
  • Ouvinte de eventos de segurança agregado
  • -
  • Política
  • -
  • Contextos de diretório (LDAP)
  • -
  • Carregador de provedor
  • -
+

Configurações

+ Configurações do Elytron
diff --git a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_zh-Hans.html b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_zh-Hans.html index 559774715..327c59666 100644 --- a/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_zh-Hans.html +++ b/gui/src/main/java/org/jboss/as/console/client/preview/content/elytron_settings_zh-Hans.html @@ -1,21 +1,4 @@
-

其他设置

- 以下对象的 Elytron 设置: -
    -
  • 密钥库
  • -
  • 凭证库
  • -
  • 过滤密钥库
  • -
  • Ldap 密钥库
  • -
  • 密钥管理者
  • -
  • 服务器 SSL 上下文
  • -
  • 客户端 SSL 上下文
  • -
  • 信任管理者
  • -
  • 安全域
  • -
  • 安全属性
  • -
  • 审计日志
  • -
  • 聚合安全事件监听程序
  • -
  • 策略
  • -
  • 目录上下文 (LDAP)
  • -
  • 提供者加载器
  • -
+

设置

+ Elytron 设置
diff --git a/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ElytronFinderView.java b/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ElytronFinderView.java index 833b9595c..bded405c2 100644 --- a/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ElytronFinderView.java +++ b/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ElytronFinderView.java @@ -52,6 +52,7 @@ public class ElytronFinderView extends SuspendableViewImpl implements ElytronFin public static final String MAPPER_DECODER = "Mapper / Decoder"; public static final String SECURITY_REALM = "Security Realm / Authentication"; public static final String OTHER = "Other"; + public static final String SETTINGS = "Settings"; private ElytronFinder presenter; private LayoutPanel previewCanvas; @@ -134,10 +135,13 @@ public void createPreview(final FinderItem data, final AsyncCallback c previewContentFactory.createContent(PreviewContent.INSTANCE.elytron_mapper(), callback); } else if (OTHER.equals(data.getTitle())) { - previewContentFactory.createContent(PreviewContent.INSTANCE.elytron_settings(), callback); + previewContentFactory.createContent(PreviewContent.INSTANCE.elytron_other_settings(), callback); } else if (SECURITY_REALM.equals(data.getTitle())) { previewContentFactory.createContent(PreviewContent.INSTANCE.elytron_security_realm(), callback); + + } else if (SETTINGS.equals(data.getTitle())) { + previewContentFactory.createContent(PreviewContent.INSTANCE.elytron_settings(), callback); } } }); @@ -173,6 +177,10 @@ public void createPreview(final FinderItem data, final AsyncCallback c settings.add(new FinderItem(SECURITY_REALM, () -> placeManager.revealRelativePlace(new PlaceRequest(NameTokens.ElytronSecurityRealmPresenter)), false)); + settings.add(new FinderItem(SETTINGS, () + -> placeManager.revealRelativePlace(new PlaceRequest(NameTokens.ElytronSettingsPresenter)), false)); + + links.updateFrom(settings); return layout; } diff --git a/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ElytronSecurityRealmPresenter.java b/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ElytronSecurityRealmPresenter.java index 98cd6f257..a5d6b8bf2 100644 --- a/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ElytronSecurityRealmPresenter.java +++ b/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ElytronSecurityRealmPresenter.java @@ -60,7 +60,6 @@ public interface MyProxy extends Proxy, Place {} public interface MyView extends View, HasPresenter { void initSecurityRealm( - ModelNode rootNode, List propertiesRealm, List filesystemRealm, List jdbcRealm, @@ -114,7 +113,6 @@ protected void onAction(Action action) { if (action instanceof ElytronConfigAction) { getView().initSecurityRealm( - store.getRootNode(), store.getPropertiesRealm(), store.getFilesystemRealm(), store.getJdbcRealm(), diff --git a/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ElytronSettingsPresenter.java b/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ElytronSettingsPresenter.java new file mode 100644 index 000000000..86274ee77 --- /dev/null +++ b/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ElytronSettingsPresenter.java @@ -0,0 +1,113 @@ +/* + * JBoss, Home of Professional Open Source. + * Copyright 2017, Red Hat, Inc., and individual contributors + * as indicated by the @author tags. See the copyright.txt file in the + * distribution for a full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package org.jboss.as.console.client.shared.subsys.elytron; + +import com.google.inject.Inject; +import com.google.web.bindery.event.shared.EventBus; +import com.gwtplatform.mvp.client.View; +import com.gwtplatform.mvp.client.annotations.NameToken; +import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit; +import com.gwtplatform.mvp.client.proxy.Place; +import com.gwtplatform.mvp.client.proxy.Proxy; +import org.jboss.as.console.client.core.CircuitPresenter; +import org.jboss.as.console.client.core.HasPresenter; +import org.jboss.as.console.client.core.NameTokens; +import org.jboss.as.console.client.rbac.SecurityFramework; +import org.jboss.as.console.client.shared.subsys.RevealStrategy; +import org.jboss.as.console.client.shared.subsys.elytron.store.ElytronConfigAction; +import org.jboss.as.console.client.shared.subsys.elytron.store.ElytronStore; +import org.jboss.as.console.client.shared.subsys.elytron.store.InitElytron; +import org.jboss.as.console.client.v3.ResourceDescriptionRegistry; +import org.jboss.as.console.spi.RequiredResources; +import org.jboss.dmr.client.ModelNode; +import org.jboss.gwt.circuit.Action; +import org.jboss.gwt.circuit.Dispatcher; + +/** + * Created by Marek Marusic on 10/4/17. + */ +public class ElytronSettingsPresenter extends + CircuitPresenter { + + // @formatter:off + @ProxyCodeSplit + @NameToken(NameTokens.ElytronSettingsPresenter) + @RequiredResources(resources = ElytronStore.ROOT) + public interface MyProxy extends Proxy, Place {} + + public interface MyView extends View, HasPresenter { + void initSettings(ModelNode rootNode); + } + // @formatter:on + + private final Dispatcher circuit; + private final RevealStrategy revealStrategy; + private final ElytronStore store; + private SecurityFramework securityFramework; + private ResourceDescriptionRegistry descriptionRegistry; + + @Inject + public ElytronSettingsPresenter(EventBus eventBus, ElytronSettingsPresenter.MyView view, ElytronSettingsPresenter.MyProxy proxy, + Dispatcher circuit, RevealStrategy revealStrategy, ElytronStore store, + SecurityFramework securityFramework, ResourceDescriptionRegistry descriptionRegistry) { + super(eventBus, view, proxy, circuit); + this.circuit = circuit; + this.revealStrategy = revealStrategy; + this.store = store; + this.securityFramework = securityFramework; + this.descriptionRegistry = descriptionRegistry; + } + + @Override + protected void onBind() { + super.onBind(); + addChangeHandler(store); + getView().setPresenter(this); + } + + @Override + protected void onAction(Action action) { + if (action instanceof ElytronConfigAction) { + getView().initSettings(store.getRootNode()); + } + } + + @Override + protected void revealInParent() { + revealStrategy.revealInParent(this); + } + + @Override + protected void onReset() { + super.onReset(); + circuit.dispatch(new InitElytron()); + } + + public SecurityFramework getSecurityFramework() { + return securityFramework; + } + + public ResourceDescriptionRegistry getDescriptionRegistry() { + return descriptionRegistry; + } +} diff --git a/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/AuthenticationView.java b/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/AuthenticationView.java index 2241d0cf1..e2604a64a 100644 --- a/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/AuthenticationView.java +++ b/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/AuthenticationView.java @@ -37,7 +37,6 @@ public class AuthenticationView { private ElytronResourceWithCredentialReferenceView authenticationConfigurationView; private AuthenticationContextView authenticationContextView; - private DefaultAuthenticationView defaultAuthenticationView; public AuthenticationView(final Dispatcher circuit, final ResourceDescription rootDescription, final SecurityContext securityFramework) { @@ -55,11 +54,8 @@ public Widget asWidget() { ElytronStore.AUTHENTICATION_CONF_ADDRESS); authenticationContextView = new AuthenticationContextView(circuit, authContextDescription, securityContext, "Authentication Context", ElytronStore.AUTHENTICATION_CONTEXT_ADDRESS); - defaultAuthenticationView = new DefaultAuthenticationView(circuit, rootDescription, securityContext, "Default Authentication Context", - ElytronStore.ROOT_ADDRESS); PagedView panel = new PagedView(true); - panel.addPage("Default Authentication Context", defaultAuthenticationView.asWidget()); panel.addPage("Authentication Configuration", authenticationConfigurationView.asWidget()); panel.addPage("Authentication Context", authenticationContextView.asWidget()); // default page @@ -68,10 +64,6 @@ public Widget asWidget() { return panel.asWidget(); } - public void updateDefaultAuthenticationContext(final ModelNode model) { - defaultAuthenticationView.update(model); - } - public void updateAuthenticationConfiguration(final List models) { authenticationConfigurationView.update(models); } diff --git a/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/ElytronSecurityRealmView.java b/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/ElytronSecurityRealmView.java index 223e189c9..dedc8cd2b 100644 --- a/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/ElytronSecurityRealmView.java +++ b/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/ElytronSecurityRealmView.java @@ -75,7 +75,7 @@ public Widget createWidget() { } @Override - public void initSecurityRealm(ModelNode rootNode, List propertiesRealm, List filesystemRealm, + public void initSecurityRealm(List propertiesRealm, List filesystemRealm, List jdbcRealm, List cachingRealm, List ldapRealm, List keystoreRealm, List aggregateRealm, List customModifiableRealm, List customRealm, List identityRealm, List tokenRealm, @@ -100,7 +100,6 @@ public void initSecurityRealm(ModelNode rootNode, List propertiesRealm securityRealmMapperView.updateCustomRealmMapper(customRealmMapper); securityRealmMapperView.updateConstantRealmMapper(constantRealmMapper); - authenticationView.updateDefaultAuthenticationContext(rootNode); authenticationView.updateAuthenticationConfiguration(authConfiguration); authenticationView.updateAuthenticationContext(authContext); } diff --git a/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/ElytronSettingsView.java b/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/ElytronSettingsView.java new file mode 100644 index 000000000..dcec0de13 --- /dev/null +++ b/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/ElytronSettingsView.java @@ -0,0 +1,75 @@ +/* + * JBoss, Home of Professional Open Source. + * Copyright 2017, Red Hat, Inc., and individual contributors + * as indicated by the @author tags. See the copyright.txt file in the + * distribution for a full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package org.jboss.as.console.client.shared.subsys.elytron.ui; + +import com.google.gwt.user.client.ui.Widget; +import com.google.inject.Inject; +import org.jboss.as.console.client.core.SuspendableViewImpl; +import org.jboss.as.console.client.rbac.SecurityFramework; +import org.jboss.as.console.client.shared.subsys.elytron.ElytronSettingsPresenter; +import org.jboss.as.console.client.shared.subsys.elytron.store.ElytronStore; +import org.jboss.as.console.client.v3.ResourceDescriptionRegistry; +import org.jboss.as.console.client.v3.dmr.ResourceDescription; +import org.jboss.ballroom.client.rbac.SecurityContext; +import org.jboss.dmr.client.ModelNode; +import org.jboss.gwt.circuit.Dispatcher; + +/** + * Created by Marek Marusic on 10/4/17. + */ +public class ElytronSettingsView extends SuspendableViewImpl implements ElytronSettingsPresenter.MyView { + private final Dispatcher circuit; + private final ResourceDescriptionRegistry resourceDescriptionRegistry; + private final SecurityFramework securityFramework; + private ElytronSettingsPresenter presenter; + + private SettingsView settingsView; + + @Inject + public ElytronSettingsView(final Dispatcher circuit, final ResourceDescriptionRegistry resourceDescriptionRegistry, + final SecurityFramework securityFramework) { + this.circuit = circuit; + this.resourceDescriptionRegistry = resourceDescriptionRegistry; + this.securityFramework = securityFramework; + } + + @Override + public void initSettings(ModelNode rootNode) { + settingsView.update(rootNode); + } + + @Override + public void setPresenter(final ElytronSettingsPresenter presenter) { + this.presenter = presenter; + } + + @Override + public Widget createWidget() { + SecurityContext securityContext = securityFramework.getSecurityContext(presenter.getProxy().getNameToken()); + ResourceDescription rootDescription = resourceDescriptionRegistry.lookup(ElytronStore.ROOT_ADDRESS); + + settingsView = new SettingsView(circuit, rootDescription, securityContext, "Settings", ElytronStore.ROOT_ADDRESS); + + return settingsView.asWidget(); + } +} diff --git a/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/DefaultAuthenticationView.java b/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/SettingsView.java similarity index 93% rename from gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/DefaultAuthenticationView.java rename to gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/SettingsView.java index de4aa53f0..e5d380805 100644 --- a/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/DefaultAuthenticationView.java +++ b/gui/src/main/java/org/jboss/as/console/client/shared/subsys/elytron/ui/SettingsView.java @@ -35,7 +35,7 @@ /** * @author Claudio Miranda */ -public class DefaultAuthenticationView { +public class SettingsView { protected final Dispatcher circuit; protected final ResourceDescription resourceDescription; @@ -45,8 +45,8 @@ public class DefaultAuthenticationView { protected ModelNodeFormBuilder.FormAssets formAssets; - public DefaultAuthenticationView(final Dispatcher circuit, final ResourceDescription resourceDescription, - final SecurityContext securityContext, String title, AddressTemplate addressTemplate) { + public SettingsView(final Dispatcher circuit, final ResourceDescription resourceDescription, + final SecurityContext securityContext, String title, AddressTemplate addressTemplate) { this.circuit = circuit; this.securityContext = securityContext; this.resourceDescription = resourceDescription;