Make ServerInfo accessible by plugins
The ServerInfo information provides information about the server configuration that is relevant for rendering the UI. UI plugins should be able to access it, e.g. they need the anonymous coward name to render user names the same way as Gerrit core does (use the anonymous coward name if the user has no full name). Change-Id: I272bcb96b5ce888007f6c4fa12f74ef750cc9862 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
// Copyright (C) 2015 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.info;
|
||||
|
||||
import com.google.gerrit.client.rpc.Natives;
|
||||
import com.google.gerrit.reviewdb.client.Account;
|
||||
import com.google.gerrit.reviewdb.client.AuthType;
|
||||
import com.google.gerrit.reviewdb.client.Account.FieldName;
|
||||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
import com.google.gwt.core.client.JsArrayString;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AuthInfo extends JavaScriptObject {
|
||||
public final AuthType authType() {
|
||||
return AuthType.valueOf(authTypeRaw());
|
||||
}
|
||||
|
||||
public final boolean isLdap() {
|
||||
return authType() == AuthType.LDAP || authType() == AuthType.LDAP_BIND;
|
||||
}
|
||||
public final boolean isOpenId() {
|
||||
return authType() == AuthType.OPENID;
|
||||
}
|
||||
|
||||
public final boolean isOAuth() {
|
||||
return authType() == AuthType.OAUTH;
|
||||
}
|
||||
|
||||
public final boolean isDev() {
|
||||
return authType() == AuthType.DEVELOPMENT_BECOME_ANY_ACCOUNT;
|
||||
}
|
||||
|
||||
public final boolean isClientSslCertLdap() {
|
||||
return authType() == AuthType.CLIENT_SSL_CERT_LDAP;
|
||||
}
|
||||
|
||||
public final boolean isCustomExtension() {
|
||||
return authType() == AuthType.CUSTOM_EXTENSION;
|
||||
}
|
||||
|
||||
public final boolean canEdit(Account.FieldName f) {
|
||||
return editableAccountFields().contains(f);
|
||||
}
|
||||
|
||||
public final List<Account.FieldName> editableAccountFields() {
|
||||
List<Account.FieldName> fields = new ArrayList<>();
|
||||
for (String f : Natives.asList(_editableAccountFields())) {
|
||||
fields.add(Account.FieldName.valueOf(f));
|
||||
}
|
||||
return fields;
|
||||
}
|
||||
|
||||
public final boolean siteHasUsernames() {
|
||||
if (isCustomExtension()
|
||||
&& httpPasswordUrl() != null
|
||||
&& !canEdit(FieldName.USER_NAME)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public final boolean isHttpPasswordSettingsEnabled() {
|
||||
if (isLdap() && isGitBasicAuth()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public final native boolean useContributorAgreements()
|
||||
/*-{ return this.use_contributor_agreements || false; }-*/;
|
||||
public final native String loginUrl() /*-{ return this.login_url; }-*/;
|
||||
public final native String loginText() /*-{ return this.login_text; }-*/;
|
||||
public final native String switchAccountUrl() /*-{ return this.switch_account_url; }-*/;
|
||||
public final native String registerUrl() /*-{ return this.register_url; }-*/;
|
||||
public final native String registerText() /*-{ return this.register_text; }-*/;
|
||||
public final native String editFullNameUrl() /*-{ return this.edit_full_name_url; }-*/;
|
||||
public final native String httpPasswordUrl() /*-{ return this.http_password_url; }-*/;
|
||||
public final native boolean isGitBasicAuth() /*-{ return this.is_git_basic_auth || false; }-*/;
|
||||
private final native String authTypeRaw() /*-{ return this.auth_type; }-*/;
|
||||
private final native JsArrayString _editableAccountFields()
|
||||
/*-{ return this.editable_account_fields; }-*/;
|
||||
|
||||
protected AuthInfo() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
// Copyright (C) 2015 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.info;
|
||||
|
||||
import com.google.gerrit.client.rpc.NativeMap;
|
||||
import com.google.gerrit.client.rpc.NativeString;
|
||||
import com.google.gerrit.client.rpc.Natives;
|
||||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
import com.google.gwt.core.client.JsArrayString;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class DownloadInfo extends JavaScriptObject {
|
||||
public final Set<String> schemes() {
|
||||
return Natives.keys(_schemes());
|
||||
}
|
||||
|
||||
public final List<String> archives() {
|
||||
List<String> archives = new ArrayList<>();
|
||||
for (String f : Natives.asList(_archives())) {
|
||||
archives.add(f);
|
||||
}
|
||||
return archives;
|
||||
}
|
||||
|
||||
public final native DownloadSchemeInfo scheme(String n) /*-{ return this.schemes[n]; }-*/;
|
||||
private final native NativeMap<DownloadSchemeInfo> _schemes() /*-{ return this.schemes; }-*/;
|
||||
private final native JsArrayString _archives() /*-{ return this.archives; }-*/;
|
||||
|
||||
protected DownloadInfo() {
|
||||
}
|
||||
|
||||
public static class DownloadSchemeInfo extends JavaScriptObject {
|
||||
public final Set<String> commandNames() {
|
||||
return Natives.keys(_commands());
|
||||
}
|
||||
|
||||
public final Set<DownloadCommandInfo> commands(String project) {
|
||||
Set<DownloadCommandInfo> commands = new HashSet<>();
|
||||
for (String commandName : commandNames()) {
|
||||
commands.add(new DownloadCommandInfo(commandName, command(commandName,
|
||||
project)));
|
||||
}
|
||||
return commands;
|
||||
}
|
||||
|
||||
public final String command(String commandName, String project) {
|
||||
return command(commandName).replaceAll("\\$\\{project\\}", project);
|
||||
}
|
||||
|
||||
private static String projectBaseName(String project) {
|
||||
return project.substring(project.lastIndexOf('/') + 1);
|
||||
}
|
||||
|
||||
public final Set<String> cloneCommandNames() {
|
||||
return Natives.keys(_cloneCommands());
|
||||
}
|
||||
|
||||
public final Set<DownloadCommandInfo> cloneCommands(String project) {
|
||||
Set<DownloadCommandInfo> commands = new HashSet<>();
|
||||
for (String commandName : cloneCommandNames()) {
|
||||
commands.add(new DownloadCommandInfo(commandName, cloneCommand(
|
||||
commandName, project)));
|
||||
}
|
||||
return commands;
|
||||
}
|
||||
|
||||
public final String cloneCommand(String commandName, String project) {
|
||||
return cloneCommand(commandName).replaceAll("\\$\\{project\\}", project)
|
||||
.replaceAll("\\$\\{project-base-name\\}", projectBaseName(project));
|
||||
}
|
||||
|
||||
public final String getUrl(String project) {
|
||||
return url().replaceAll("\\$\\{project\\}", project);
|
||||
}
|
||||
|
||||
public final native String name() /*-{ return this.name; }-*/;
|
||||
public final native String url() /*-{ return this.url; }-*/;
|
||||
public final native boolean isAuthRequired() /*-{ return this.is_auth_required || false; }-*/;
|
||||
public final native boolean isAuthSupported() /*-{ return this.is_auth_supported || false; }-*/;
|
||||
public final native String command(String n) /*-{ return this.commands[n]; }-*/;
|
||||
public final native String cloneCommand(String n) /*-{ return this.clone_commands[n]; }-*/;
|
||||
private final native NativeMap<NativeString> _commands() /*-{ return this.commands; }-*/;
|
||||
private final native NativeMap<NativeString> _cloneCommands() /*-{ return this.clone_commands; }-*/;
|
||||
|
||||
protected DownloadSchemeInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
public static class DownloadCommandInfo {
|
||||
private final String name;
|
||||
private final String command;
|
||||
|
||||
DownloadCommandInfo(String name, String command) {
|
||||
this.name = name;
|
||||
this.command = command;
|
||||
}
|
||||
|
||||
public String name() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String command() {
|
||||
return command;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
// Copyright (C) 2015 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.info;
|
||||
|
||||
import com.google.gerrit.reviewdb.client.Project;
|
||||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
|
||||
public class GerritInfo extends JavaScriptObject {
|
||||
public final Project.NameKey allProjectsNameKey() {
|
||||
return new Project.NameKey(allProjects());
|
||||
}
|
||||
|
||||
public final boolean isAllProjects(Project.NameKey p) {
|
||||
return allProjectsNameKey().equals(p);
|
||||
}
|
||||
|
||||
public final Project.NameKey allUsersNameKey() {
|
||||
return new Project.NameKey(allUsers());
|
||||
}
|
||||
|
||||
public final boolean isAllUsers(Project.NameKey p) {
|
||||
return allUsersNameKey().equals(p);
|
||||
}
|
||||
|
||||
public final native String allProjects() /*-{ return this.all_projects; }-*/;
|
||||
public final native String allUsers() /*-{ return this.all_users; }-*/;
|
||||
public final native String docUrl() /*-{ return this.doc_url; }-*/;
|
||||
public final native String reportBugUrl() /*-{ return this.report_bug_url; }-*/;
|
||||
public final native String reportBugText() /*-{ return this.report_bug_text; }-*/;
|
||||
|
||||
protected GerritInfo() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
// Copyright (C) 2008 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.info;
|
||||
|
||||
import com.google.gerrit.client.info.ChangeInfo.RevisionInfo;
|
||||
import com.google.gerrit.common.data.ParameterizedString;
|
||||
import com.google.gerrit.reviewdb.client.Branch;
|
||||
import com.google.gerrit.reviewdb.client.PatchSet;
|
||||
import com.google.gerrit.reviewdb.client.Project;
|
||||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
import com.google.gwt.http.client.URL;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class GitwebInfo extends JavaScriptObject {
|
||||
public final native String url() /*-{ return this.url; }-*/;
|
||||
public final native GitwebTypeInfo type() /*-{ return this.type; }-*/;
|
||||
|
||||
/**
|
||||
* Checks whether the given patch set can be linked.
|
||||
*
|
||||
* Draft patch sets can only be linked if linking of drafts was enabled by
|
||||
* configuration.
|
||||
*
|
||||
* @param ps patch set to check whether it can be linked
|
||||
* @return true if the patch set can be linked, otherwise false
|
||||
*/
|
||||
public final boolean canLink(PatchSet ps) {
|
||||
return !ps.isDraft() || type().linkDrafts();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given revision can be linked.
|
||||
*
|
||||
* Draft revisions can only be linked if linking of drafts was enabled by
|
||||
* configuration.
|
||||
*
|
||||
* @param revision revision to check whether it can be linked
|
||||
* @return true if the revision can be linked, otherwise false
|
||||
*/
|
||||
public final boolean canLink(RevisionInfo revision) {
|
||||
return revision.draft() || type().linkDrafts();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name for gitweb links.
|
||||
*
|
||||
* @return the name for gitweb links
|
||||
*/
|
||||
public final String getLinkName() {
|
||||
return "(" + type().name() + ")";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the gitweb link to a revision.
|
||||
*
|
||||
* @param project the name of the project
|
||||
* @param commit the commit ID
|
||||
* @return gitweb link to a revision
|
||||
*/
|
||||
public final String toRevision(String project, String commit) {
|
||||
ParameterizedString pattern = new ParameterizedString(type().revision());
|
||||
Map<String, String> p = new HashMap<>();
|
||||
p.put("project", encode(project));
|
||||
p.put("commit", encode(commit));
|
||||
return url() + pattern.replace(p);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the gitweb link to a revision.
|
||||
*
|
||||
* @param project the name of the project
|
||||
* @param ps the patch set
|
||||
* @return gitweb link to a revision
|
||||
*/
|
||||
public final String toRevision(Project.NameKey project, PatchSet ps) {
|
||||
return toRevision(project.get(), ps.getRevision().get());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the gitweb link to a project.
|
||||
*
|
||||
* @param project the project name key
|
||||
* @return gitweb link to a project
|
||||
*/
|
||||
public final String toProject(Project.NameKey project) {
|
||||
ParameterizedString pattern = new ParameterizedString(type().project());
|
||||
|
||||
Map<String, String> p = new HashMap<>();
|
||||
p.put("project", encode(project.get()));
|
||||
return url() + pattern.replace(p);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the gitweb link to a branch.
|
||||
*
|
||||
* @param branch the branch name key
|
||||
* @return gitweb link to a branch
|
||||
*/
|
||||
public final String toBranch(Branch.NameKey branch) {
|
||||
ParameterizedString pattern = new ParameterizedString(type().branch());
|
||||
|
||||
Map<String, String> p = new HashMap<>();
|
||||
p.put("project", encode(branch.getParentKey().get()));
|
||||
p.put("branch", encode(branch.get()));
|
||||
return url() + pattern.replace(p);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the gitweb link to a file.
|
||||
*
|
||||
* @param project the branch name key
|
||||
* @param commit the commit ID
|
||||
* @param file the path of the file
|
||||
* @return gitweb link to a file
|
||||
*/
|
||||
public final String toFile(String project, String commit, String file) {
|
||||
Map<String, String> p = new HashMap<>();
|
||||
p.put("project", encode(project));
|
||||
p.put("commit", encode(commit));
|
||||
p.put("file", encode(file));
|
||||
|
||||
ParameterizedString pattern = (file == null || file.isEmpty())
|
||||
? new ParameterizedString(type().rootTree())
|
||||
: new ParameterizedString(type().file());
|
||||
return url() + pattern.replace(p);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the gitweb link to a file history.
|
||||
*
|
||||
* @param branch the branch name key
|
||||
* @param file the path of the file
|
||||
* @return gitweb link to a file history
|
||||
*/
|
||||
public final String toFileHistory(Branch.NameKey branch, String file) {
|
||||
ParameterizedString pattern = new ParameterizedString(type().fileHistory());
|
||||
|
||||
Map<String, String> p = new HashMap<>();
|
||||
p.put("project", encode(branch.getParentKey().get()));
|
||||
p.put("branch", encode(branch.get()));
|
||||
p.put("file", encode(file));
|
||||
return url() + pattern.replace(p);
|
||||
}
|
||||
|
||||
private final String encode(String segment) {
|
||||
if (type().urlEncode()) {
|
||||
return URL.encodeQueryString(type().replacePathSeparator(segment));
|
||||
} else {
|
||||
return segment;
|
||||
}
|
||||
}
|
||||
|
||||
protected GitwebInfo() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
// Copyright (C) 2015 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.info;
|
||||
|
||||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
|
||||
public class GitwebTypeInfo extends JavaScriptObject {
|
||||
/**
|
||||
* Replace the standard path separator ('/') in a branch name or project
|
||||
* name with a custom path separator configured by the property
|
||||
* gitweb.pathSeparator.
|
||||
* @param urlSegment The branch or project to replace the path separator in
|
||||
* @return the urlSegment with the standard path separator replaced by the
|
||||
* custom path separator
|
||||
*/
|
||||
public final String replacePathSeparator(String urlSegment) {
|
||||
if (!"/".equals(pathSeparator())) {
|
||||
return urlSegment.replace("/", pathSeparator());
|
||||
}
|
||||
return urlSegment;
|
||||
}
|
||||
|
||||
public final native String name() /*-{ return this.name; }-*/;
|
||||
public final native String revision() /*-{ return this.revision; }-*/;
|
||||
public final native String project() /*-{ return this.project; }-*/;
|
||||
public final native String branch() /*-{ return this.branch; }-*/;
|
||||
public final native String rootTree() /*-{ return this.root_tree; }-*/;
|
||||
public final native String file() /*-{ return this.file; }-*/;
|
||||
public final native String fileHistory() /*-{ return this.file_history; }-*/;
|
||||
public final native String pathSeparator() /*-{ return this.path_separator; }-*/;
|
||||
public final native boolean linkDrafts() /*-{ return this.link_drafts || false; }-*/;
|
||||
public final native boolean urlEncode() /*-{ return this.url_encode || false; }-*/;
|
||||
|
||||
protected GitwebTypeInfo() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
// Copyright (C) 2015 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.client.info;
|
||||
|
||||
import com.google.gerrit.client.rpc.NativeMap;
|
||||
import com.google.gerrit.client.rpc.NativeString;
|
||||
import com.google.gerrit.client.rpc.Natives;
|
||||
import com.google.gwt.core.client.JavaScriptObject;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class ServerInfo extends JavaScriptObject {
|
||||
public final native AuthInfo auth() /*-{ return this.auth; }-*/;
|
||||
public final native ChangeConfigInfo change() /*-{ return this.change; }-*/;
|
||||
public final native ContactStoreInfo contactStore() /*-{ return this.contact_store; }-*/;
|
||||
public final native DownloadInfo download() /*-{ return this.download; }-*/;
|
||||
public final native GerritInfo gerrit() /*-{ return this.gerrit; }-*/;
|
||||
public final native GitwebInfo gitweb() /*-{ return this.gitweb; }-*/;
|
||||
public final native PluginConfigInfo plugin() /*-{ return this.plugin; }-*/;
|
||||
public final native SshdInfo sshd() /*-{ return this.sshd; }-*/;
|
||||
public final native SuggestInfo suggest() /*-{ return this.suggest; }-*/;
|
||||
public final native UserConfigInfo user() /*-{ return this.user; }-*/;
|
||||
public final native ReceiveInfo receive() /*-{ return this.receive; }-*/;
|
||||
|
||||
public final Map<String, String> urlAliases() {
|
||||
Map<String, String> urlAliases = new HashMap<>();
|
||||
for (String k : Natives.keys(_urlAliases())) {
|
||||
urlAliases.put(k, urlAliasToken(k));
|
||||
}
|
||||
return urlAliases;
|
||||
}
|
||||
|
||||
public final native String urlAliasToken(String n) /*-{ return this.url_aliases[n]; }-*/;
|
||||
private final native NativeMap<NativeString> _urlAliases() /*-{ return this.url_aliases; }-*/;
|
||||
|
||||
|
||||
public final boolean hasContactStore() {
|
||||
return contactStore() != null;
|
||||
}
|
||||
|
||||
public final boolean hasSshd() {
|
||||
return sshd() != null;
|
||||
}
|
||||
|
||||
protected ServerInfo() {
|
||||
}
|
||||
|
||||
public static class ChangeConfigInfo extends JavaScriptObject {
|
||||
public final native boolean allowDrafts() /*-{ return this.allow_drafts || false; }-*/;
|
||||
public final native int largeChange() /*-{ return this.large_change || 0; }-*/;
|
||||
public final native String replyLabel() /*-{ return this.reply_label; }-*/;
|
||||
public final native String replyTooltip() /*-{ return this.reply_tooltip; }-*/;
|
||||
public final native int updateDelay() /*-{ return this.update_delay || 0; }-*/;
|
||||
public final native boolean isSubmitWholeTopicEnabled() /*-{
|
||||
return this.submit_whole_topic; }-*/;
|
||||
|
||||
protected ChangeConfigInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
public static class ContactStoreInfo extends JavaScriptObject {
|
||||
public final native String url() /*-{ return this.url; }-*/;
|
||||
|
||||
protected ContactStoreInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
public static class PluginConfigInfo extends JavaScriptObject {
|
||||
public final native boolean hasAvatars() /*-{ return this.has_avatars || false; }-*/;
|
||||
|
||||
protected PluginConfigInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
public static class SshdInfo extends JavaScriptObject {
|
||||
protected SshdInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
public static class SuggestInfo extends JavaScriptObject {
|
||||
public final native int from() /*-{ return this.from || 0; }-*/;
|
||||
|
||||
protected SuggestInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
public static class UserConfigInfo extends JavaScriptObject {
|
||||
public final native String anonymousCowardName() /*-{ return this.anonymous_coward_name; }-*/;
|
||||
|
||||
protected UserConfigInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
public static class ReceiveInfo extends JavaScriptObject {
|
||||
public final native boolean enableSignedPush()
|
||||
/*-{ return this.enable_signed_push || false; }-*/;
|
||||
|
||||
protected ReceiveInfo() {
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user