8000 [ISSUE#12979] Redefine some configuration model to support admin API and maintainer client. by KomachiSion · Pull Request #13100 · alibaba/nacos · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[ISSUE#12979] Redefine some configuration model to support admin API and maintainer client. #13100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
/*
* Copyright 1999-2025 Alibaba Group Holding Ltd.
*
* 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.alibaba.nacos.api.config.model;

import java.io.Serializable;

/**
* Nacos configuration basic information.
*
* @author xiweng.yy
*/
public class ConfigBasicInfo implements Serializable {

private static final long serialVersionUID = 2662049844183052399L;

/**
* The actual storage identity of the configuration, which no actual meanings for usage.
*
* <p>
* Different storage datasource will have different id. Such as Relational Database the id is auto-generated table ids.
* </p>
*/
private Long id;

private String namespaceId;

private String groupName;

private String dataId;

private String md5;

private String type;

private String appName;

private long createTime;

private long modifyTime;

public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}

public String getNamespaceId() {
return namespaceId;
}

public void setNamespaceId(String namespaceId) {
this.namespaceId = namespaceId;
}

public String getGroupName() {
return groupName;
}

public void setGroupName(String groupName) {
this.groupName = groupName;
}

public String getDataId() {
return dataId;
}

public void setDataId(String dataId) {
this.dataId = dataId;
}

public String getMd5() {
return md5;
}

public void setMd5(String md5) {
this.md5 = md5;
}

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

public String getAppName() {
return appName;
}

public void setAppName(String appName) {
this.appName = appName;
}

public long getCreateTime() {
return createTime;
}

public void setCreateTime(long createTime) {
this.createTime = createTime;
}

public long getModifyTime() {
return modifyTime;
}

public void setModifyTime(long modifyTime) {
this.modifyTime = modifyTime;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* Copyright 1999-2025 Alibaba Group Holding Ltd.
*
* 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.alibaba.nacos.api.config.model;

import java.io.Serializable;

/**
* Nacos configuration cloned information.
*
* @author xiweng.yy
*/
public class ConfigCloneInfo implements Serializable {

private static final long serialVersionUID = -53761233218121703L;

/**
* The id of need to be cloned configuration, which is the actual 10000 storage id not data id. Get from {@link ConfigBasicInfo#getId()}.
*/
private Long configId;

/**
* The new group name of configuration after cloned. Optional, if not set, will use the original group name.
*/
private String targetGroupName;

/**
* The new data id of configuration after cloned. Optional, if not set, will use the original group name.
*/
private String targetDataId;

public Long getConfigId() {
return configId;
}

public void setConfigId(Long configId) {
this.configId = configId;
}

public String getTargetGroupName() {
return targetGroupName;
}

public void setTargetGroupName(String targetGroupName) {
this.targetGroupName = targetGroupName;
}

public String getTargetDataId() {
return targetDataId;
}

public void setTargetDataId(String targetDataId) {
this.targetDataId = targetDataId;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
* Copyright 1999-2025 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,52 +14,51 @@
* limitations under the License.
*/

package com.alibaba.nacos.maintainer.client.model.config;
package com.alibaba.nacos.api.config.model;

/**
* ConfigAllInfo.
* Nacos configuration detail information.
*
* @author Nacos
* @author xiweng.yy
*/
public class ConfigAllInfo extends ConfigInfo {
public class ConfigDetailInfo extends ConfigBasicInfo {

private static final long serialVersionUID = 6492506189833320596L;
private static final long serialVersionUID = -6659977504609721215L;

private long createTime;

private long modifyTime;

private String createUser;

private String createIp;
private String content;

private String desc;

private String use;
private String encryptedDataKey;

private String effect;
private String createUser;

private String schema;
private String createIp;

private String configTags;

public ConfigAllInfo() {
public String getContent() {
return content;
}

public long getCreateTime() {
return createTime;
public void setContent(String content) {
this.content = content;
}

public void setCreateTime(long createTime) {
this.createTime = createTime;
public String getDesc() {
return desc;
}

public long getModifyTime() {
return modifyTime;
public void setDesc(String desc) {
this.desc = desc;
}

public String getEncryptedDataKey() {
return encryptedDataKey;
}

public void setModifyTime(long modifyTime) {
this.modifyTime = modifyTime;
public void setEncryptedDataKey(String encryptedDataKey) {
this.encryptedDataKey = encryptedDataKey;
}

public String getCreateUser() {
Expand All @@ -78,53 +77,11 @@ public void setCreateIp(String createIp) {
this.createIp = createIp;
}

public String getDesc() {
return desc;
}

public void setDesc(String desc) {
this.desc = desc;
}

public String getUse() {
return use;
}

public void setUse(String use) {
this.use = use;
}

public String getEffect() {
return effect;
}

public void setEffect(String effect) {
this.effect = effect;
}

public String getSchema() {
return schema;
}

public void setSchema(String schema) {
this.schema = schema;
}

public String getConfigTags() {
return configTags;
}

public void setConfigTags(String configTags) {
this.configTags = configTags;
}

@Override
public int hashCode() {
return super.hashCode();
}

@Override
public boolean equals(Object obj) {
return super.equals(obj);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Copyright 1999-2025 Alibaba Group Holding Ltd.
*
* 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.alibaba.nacos.api.config.model;

/**
* Nacos configuration gray information.
*
* @author xiweng.yy
*/
public class ConfigGrayInfo extends ConfigDetailInfo {

private static final long serialVersionUID = 4462719176825261439L;

private String grayName;

private String grayRule;

public String getGrayName() {
return grayName;
}

public void setGrayName(String grayName) {
this.grayName = grayName;
}

public String getGrayRule() {
return grayRule;
}

public void setGrayRule(String grayRule) {
this.grayRule = grayRule;
}
}
Loading
0