-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
849 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
.../src/main/java/com/ctrip/framework/apollo/portal/enricher/AdditionalUserInfoEnricher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright 2021 Apollo Authors | ||
* | ||
* 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.ctrip.framework.apollo.portal.enricher; | ||
|
||
import com.ctrip.framework.apollo.portal.enricher.adapter.UserInfoEnrichedAdapter; | ||
import com.ctrip.framework.apollo.portal.entity.bo.UserInfo; | ||
import java.util.Map; | ||
|
||
/** | ||
* @author vdisk <[email protected]> | ||
*/ | ||
public interface AdditionalUserInfoEnricher { | ||
|
||
/** | ||
* enrich an additional user info for the dto list | ||
* | ||
* @param adapter enrich adapter | ||
* @param userInfoMap userInfo map | ||
*/ | ||
void enrichAdditionalUserInfo(UserInfoEnrichedAdapter adapter, Map<String, UserInfo> userInfoMap); | ||
} |
61 changes: 61 additions & 0 deletions
61
...ava/com/ctrip/framework/apollo/portal/enricher/adapter/AppDtoUserInfoEnrichedAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* Copyright 2021 Apollo Authors | ||
* | ||
* 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.ctrip.framework.apollo.portal.enricher.adapter; | ||
|
||
import com.ctrip.framework.apollo.common.dto.AppDTO; | ||
|
||
/** | ||
* @author vdisk <[email protected]> | ||
*/ | ||
public class AppDtoUserInfoEnrichedAdapter implements UserInfoEnrichedAdapter { | ||
|
||
private final AppDTO dto; | ||
|
||
public AppDtoUserInfoEnrichedAdapter(AppDTO dto) { | ||
this.dto = dto; | ||
} | ||
|
||
@Override | ||
public final String getFirstUserId() { | ||
return this.dto.getDataChangeCreatedBy(); | ||
} | ||
|
||
@Override | ||
public final void setFirstUserDisplayName(String userDisplayName) { | ||
this.dto.setDataChangeCreatedByDisplayName(userDisplayName); | ||
} | ||
|
||
@Override | ||
public final String getSecondUserId() { | ||
return this.dto.getDataChangeLastModifiedBy(); | ||
} | ||
|
||
@Override | ||
public final void setSecondUserDisplayName(String userDisplayName) { | ||
this.dto.setDataChangeLastModifiedByDisplayName(userDisplayName); | ||
} | ||
|
||
@Override | ||
public final String getThirdUserId() { | ||
return this.dto.getOwnerName(); | ||
} | ||
|
||
@Override | ||
public final void setThirdUserDisplayName(String userDisplayName) { | ||
this.dto.setOwnerDisplayName(userDisplayName); | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
...va/com/ctrip/framework/apollo/portal/enricher/adapter/BaseDtoUserInfoEnrichedAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright 2021 Apollo Authors | ||
* | ||
* 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.ctrip.framework.apollo.portal.enricher.adapter; | ||
|
||
import com.ctrip.framework.apollo.common.dto.BaseDTO; | ||
|
||
/** | ||
* @author vdisk <[email protected]> | ||
*/ | ||
public class BaseDtoUserInfoEnrichedAdapter implements UserInfoEnrichedAdapter { | ||
|
||
private final BaseDTO dto; | ||
|
||
public BaseDtoUserInfoEnrichedAdapter(BaseDTO dto) { | ||
this.dto = dto; | ||
} | ||
|
||
@Override | ||
public final String getFirstUserId() { | ||
return this.dto.getDataChangeCreatedBy(); | ||
} | ||
|
||
@Override | ||
public final void setFirstUserDisplayName(String userDisplayName) { | ||
this.dto.setDataChangeCreatedByDisplayName(userDisplayName); | ||
} | ||
|
||
@Override | ||
public final String getSecondUserId() { | ||
return this.dto.getDataChangeLastModifiedBy(); | ||
} | ||
|
||
@Override | ||
public final void setSecondUserDisplayName(String userDisplayName) { | ||
this.dto.setDataChangeLastModifiedByDisplayName(userDisplayName); | ||
} | ||
} |
Oops, something went wrong.