Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MaxKey单点登录官方(MaxKeyTop)
MaxKey
提交
804bdd39
MaxKey
项目概览
MaxKey单点登录官方(MaxKeyTop)
/
MaxKey
12 个月 前同步成功
通知
76
Star
3
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MaxKey
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
804bdd39
编写于
6月 19, 2020
作者:
MaxKey单点登录官方
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
scim domain init
scim domain init
上级
a3ca2170
变更
28
显示空白变更内容
内联
并排
Showing
28 changed file
with
562 addition
and
125 deletion
+562
-125
maxkey-connectors/maxkey-connector-activedirectory/src/main/resources/application.properties
...activedirectory/src/main/resources/application.properties
+1
-1
maxkey-connectors/maxkey-connector-ldap/src/main/resources/application.properties
...-connector-ldap/src/main/resources/application.properties
+1
-1
maxkey-core/src/main/java/org/maxkey/json/JsonDateDeserializer.java
...e/src/main/java/org/maxkey/json/JsonDateDeserializer.java
+33
-0
maxkey-core/src/main/java/org/maxkey/json/JsonDateSerializer.java
...ore/src/main/java/org/maxkey/json/JsonDateSerializer.java
+16
-14
maxkey-core/src/main/java/org/maxkey/json/JsonDateTimeDeserializer.java
...c/main/java/org/maxkey/json/JsonDateTimeDeserializer.java
+19
-18
maxkey-core/src/main/java/org/maxkey/json/JsonDateTimeSerializer.java
...src/main/java/org/maxkey/json/JsonDateTimeSerializer.java
+16
-16
maxkey-core/src/main/java/org/maxkey/json/JsonISODateDeserializer.java
...rc/main/java/org/maxkey/json/JsonISODateDeserializer.java
+21
-34
maxkey-core/src/main/java/org/maxkey/json/JsonISODateSerializer.java
.../src/main/java/org/maxkey/json/JsonISODateSerializer.java
+14
-28
maxkey-identitys/maxkey-identity-scim/.classpath
maxkey-identitys/maxkey-identity-scim/.classpath
+14
-0
maxkey-identitys/maxkey-identity-scim/.settings/org.eclipse.wst.common.component
...-identity-scim/.settings/org.eclipse.wst.common.component
+3
-2
maxkey-identitys/maxkey-identity-scim/src/main/java/org/maxkey/identity/scim/resources/Enterprise.java
...n/java/org/maxkey/identity/scim/resources/Enterprise.java
+1
-4
maxkey-identitys/maxkey-identity-scim/src/main/java/org/maxkey/identity/scim/resources/EnterpriseUser.java
...va/org/maxkey/identity/scim/resources/EnterpriseUser.java
+16
-3
maxkey-identitys/maxkey-identity-scim/src/main/java/org/maxkey/identity/scim/resources/Group.java
...c/main/java/org/maxkey/identity/scim/resources/Group.java
+8
-2
maxkey-identitys/maxkey-identity-scim/src/main/java/org/maxkey/identity/scim/resources/Meta.java
...rc/main/java/org/maxkey/identity/scim/resources/Meta.java
+15
-0
maxkey-identitys/maxkey-identity-scim/src/main/java/org/maxkey/identity/scim/resources/MultiValuedAttribute.java
.../maxkey/identity/scim/resources/MultiValuedAttribute.java
+5
-0
maxkey-identitys/maxkey-identity-scim/src/main/java/org/maxkey/identity/scim/resources/Resource.java
...ain/java/org/maxkey/identity/scim/resources/Resource.java
+2
-1
maxkey-identitys/maxkey-identity-scim/src/main/java/org/maxkey/identity/scim/resources/User.java
...rc/main/java/org/maxkey/identity/scim/resources/User.java
+3
-0
maxkey-identitys/maxkey-identity-scim/src/main/java/org/maxkey/identity/scim/resources/UserPhoneNumber.java
...a/org/maxkey/identity/scim/resources/UserPhoneNumber.java
+1
-1
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ReadJson2String.java
...a/org/maxkey/identity/scim/resources/ReadJson2String.java
+24
-0
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ScimEnterpriseUserJsonString.json
...identity/scim/resources/ScimEnterpriseUserJsonString.json
+48
-0
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ScimEnterpriseUserJsonString2ObjectTest.java
...im/resources/ScimEnterpriseUserJsonString2ObjectTest.java
+18
-0
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ScimEnterpriseUserJsonTest.java
...y/identity/scim/resources/ScimEnterpriseUserJsonTest.java
+67
-0
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ScimGroupJsonString.json
...g/maxkey/identity/scim/resources/ScimGroupJsonString.json
+33
-0
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ScimGroupJsonString2ObjectTest.java
...entity/scim/resources/ScimGroupJsonString2ObjectTest.java
+19
-0
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ScimGroupJsonTest.java
...org/maxkey/identity/scim/resources/ScimGroupJsonTest.java
+46
-0
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ScimUserJsonString.json
...rg/maxkey/identity/scim/resources/ScimUserJsonString.json
+42
-0
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ScimUserJsonString2ObjectTest.java
...dentity/scim/resources/ScimUserJsonString2ObjectTest.java
+16
-0
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ScimUserJsonTest.java
.../org/maxkey/identity/scim/resources/ScimUserJsonTest.java
+60
-0
未找到文件。
maxkey-connectors/maxkey-connector-activedirectory/src/main/resources/application.properties
浏览文件 @
804bdd39
...
@@ -15,7 +15,7 @@ spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
...
@@ -15,7 +15,7 @@ spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.kafka.bootstrap-servers
=
localhost:9092
spring.kafka.bootstrap-servers
=
localhost:9092
###########【初始化消费者配置】###########
###########【初始化消费者配置】###########
# 默认的消费组ID
# 默认的消费组ID
spring.kafka.consumer.properties.group.id
=
default
ConsumerGroup
spring.kafka.consumer.properties.group.id
=
ActiveDirectory
ConsumerGroup
# 是否自动提交offset
# 是否自动提交offset
spring.kafka.consumer.enable-auto-commit
=
true
spring.kafka.consumer.enable-auto-commit
=
true
# 提交offset延时(接收到消息后多久提交offset)
# 提交offset延时(接收到消息后多久提交offset)
...
...
maxkey-connectors/maxkey-connector-ldap/src/main/resources/application.properties
浏览文件 @
804bdd39
...
@@ -17,7 +17,7 @@ spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
...
@@ -17,7 +17,7 @@ spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.kafka.bootstrap-servers
=
localhost:9092
spring.kafka.bootstrap-servers
=
localhost:9092
###########【初始化消费者配置】###########
###########【初始化消费者配置】###########
# 默认的消费组ID
# 默认的消费组ID
spring.kafka.consumer.properties.group.id
=
test-consumer-g
roup
spring.kafka.consumer.properties.group.id
=
LdapConsumerG
roup
# 是否自动提交offset
# 是否自动提交offset
spring.kafka.consumer.enable-auto-commit
=
true
spring.kafka.consumer.enable-auto-commit
=
true
# 提交offset延时(接收到消息后多久提交offset)
# 提交offset延时(接收到消息后多久提交offset)
...
...
maxkey-core/src/main/java/org/maxkey/json/JsonDateDeserializer.java
0 → 100644
浏览文件 @
804bdd39
package
org.maxkey.json
;
import
com.fasterxml.jackson.core.JsonParseException
;
import
com.fasterxml.jackson.core.JsonParser
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.DeserializationContext
;
import
com.fasterxml.jackson.databind.JsonDeserializer
;
import
java.io.IOException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
/**
* JSON deserializer for Jackson to handle regular date instances as timestamps
* in ISO format.
*
*/
public
class
JsonDateDeserializer
extends
JsonDeserializer
<
Date
>
{
private
static
final
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
@Override
public
Date
deserialize
(
JsonParser
parser
,
DeserializationContext
context
)
throws
IOException
,
JsonProcessingException
{
try
{
return
dateFormat
.
parse
(
parser
.
getText
());
}
catch
(
ParseException
e
)
{
throw
new
JsonParseException
(
parser
,
"Could not parse date"
,
e
);
}
}
}
\ No newline at end of file
maxkey-core/src/main/java/org/maxkey/json/JsonDateSerializer.java
浏览文件 @
804bdd39
package
org.maxkey.json
;
package
org.maxkey.json
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
org.springframework.stereotype.Component
;
import
com.fasterxml.jackson.core.JsonGenerator
;
import
com.fasterxml.jackson.core.JsonGenerator
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.JsonSerializer
;
import
com.fasterxml.jackson.databind.JsonSerializer
;
import
com.fasterxml.jackson.databind.SerializerProvider
;
import
com.fasterxml.jackson.databind.SerializerProvider
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
org.springframework.stereotype.Component
;
/**
/**
* 日期json序列化格式
* 日期json序列化格式.
*
* @author Crystal.Sea
* @author Crystal.Sea
*
*
*/
*/
@Component
@Component
public
class
JsonDateSerializer
extends
JsonSerializer
<
Date
>{
public
class
JsonDateSerializer
extends
JsonSerializer
<
Date
>
{
private
static
final
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
private
static
final
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
@Override
@Override
public
void
serialize
(
Date
date
,
JsonGenerator
gen
,
SerializerProvider
provider
)
public
void
serialize
(
Date
date
,
JsonGenerator
gen
,
SerializerProvider
provider
)
...
...
maxkey-core/src/main/java/org/maxkey/json/JsonDateTimeDeserializer.java
浏览文件 @
804bdd39
package
org.maxkey.json
;
package
org.maxkey.json
;
import
com.fasterxml.jackson.core.JsonParseException
;
import
com.fasterxml.jackson.core.JsonParser
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.DeserializationContext
;
import
com.fasterxml.jackson.databind.JsonDeserializer
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
com.fasterxml.jackson.core.JsonParser
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.DeserializationContext
;
import
com.fasterxml.jackson.databind.JsonDeserializer
;
@Component
@Component
public
class
JsonDateTimeDeserializer
extends
JsonDeserializer
<
Date
>{
public
class
JsonDateTimeDeserializer
extends
JsonDeserializer
<
Date
>
{
private
static
final
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
private
static
final
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
@Override
@Override
public
Date
deserialize
(
JsonParser
jsonP
arser
,
DeserializationContext
dc
)
public
Date
deserialize
(
JsonParser
p
arser
,
DeserializationContext
dc
)
throws
IOException
,
JsonProcessingException
{
throws
IOException
,
JsonProcessingException
{
Date
parserDate
=
null
;
Date
parserDate
=
null
;
try
{
try
{
parserDate
=
dateFormat
.
parse
(
jsonP
arser
.
getText
());
parserDate
=
dateFormat
.
parse
(
p
arser
.
getText
());
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
throw
new
JsonParseException
(
parser
,
"Could not parse date"
,
e
);
e
.
printStackTrace
();
}
}
return
parserDate
;
return
parserDate
;
}
}
...
...
maxkey-core/src/main/java/org/maxkey/json/JsonDateTimeSerializer.java
浏览文件 @
804bdd39
package
org.maxkey.json
;
package
org.maxkey.json
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
org.springframework.stereotype.Component
;
import
com.fasterxml.jackson.core.JsonGenerator
;
import
com.fasterxml.jackson.core.JsonGenerator
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.JsonSerializer
;
import
com.fasterxml.jackson.databind.JsonSerializer
;
import
com.fasterxml.jackson.databind.SerializerProvider
;
import
com.fasterxml.jackson.databind.SerializerProvider
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
org.springframework.stereotype.Component
;
/**
/**
* 日期时间json序列化格式
* 日期时间json序列化格式.
*
* @author Crystal.Sea
* @author Crystal.Sea
*
*
*/
*/
@Component
@Component
public
class
JsonDateTimeSerializer
extends
JsonSerializer
<
Date
>
{
public
class
JsonDateTimeSerializer
extends
JsonSerializer
<
Date
>
{
private
static
final
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
private
static
final
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
@Override
@Override
...
...
maxkey-core/src/main/java/org/maxkey/json/JsonISODateDeserializer.java
浏览文件 @
804bdd39
/*
* Cloud Foundry 2012.02.03 Beta
* Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
*
* This product is licensed to you under the Apache License, Version 2.0 (the "License").
* You may not use this product except in compliance with the License.
*
* This product includes a number of subcomponents with
* separate copyright notices and license terms. Your use of these
* subcomponents is subject to the terms and conditions of the
* subcomponent's license, as noted in the LICENSE file.
*/
package
org.maxkey.json
;
package
org.maxkey.json
;
import
java.io.IOException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
com.fasterxml.jackson.core.JsonParseException
;
import
com.fasterxml.jackson.core.JsonParseException
;
import
com.fasterxml.jackson.core.JsonParser
;
import
com.fasterxml.jackson.core.JsonParser
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.DeserializationContext
;
import
com.fasterxml.jackson.databind.DeserializationContext
;
import
com.fasterxml.jackson.databind.JsonDeserializer
;
import
com.fasterxml.jackson.databind.JsonDeserializer
;
import
java.io.IOException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
/**
/**
* JSON deserializer for Jackson to handle regular date instances as timestamps in ISO format.
* JSON deserializer for Jackson to handle regular date instances as timestamps
*
* in ISO format.
* @author Dave Syer
*
*
*/
*/
public
class
JsonISODateDeserializer
extends
JsonDeserializer
<
Date
>
{
public
class
JsonISODateDeserializer
extends
JsonDeserializer
<
Date
>
{
private
static
final
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
);
private
static
final
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
);
@Override
@Override
public
Date
deserialize
(
JsonParser
parser
,
DeserializationContext
context
)
throws
IOException
,
JsonProcessingException
{
public
Date
deserialize
(
JsonParser
parser
,
DeserializationContext
context
)
throws
IOException
,
JsonProcessingException
{
try
{
try
{
return
dateFormat
.
parse
(
parser
.
getText
());
return
dateFormat
.
parse
(
parser
.
getText
());
}
}
catch
(
ParseException
e
)
{
catch
(
ParseException
e
)
{
throw
new
JsonParseException
(
parser
,
"Could not parse date"
,
e
);
throw
new
JsonParseException
(
"Could not parse date"
,
parser
.
getCurrentLocation
(),
e
);
}
}
}
}
...
...
maxkey-core/src/main/java/org/maxkey/json/JsonISODateSerializer.java
浏览文件 @
804bdd39
/*
* Cloud Foundry 2012.02.03 Beta
* Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved.
*
* This product is licensed to you under the Apache License, Version 2.0 (the "License").
* You may not use this product except in compliance with the License.
*
* This product includes a number of subcomponents with
* separate copyright notices and license terms. Your use of these
* subcomponents is subject to the terms and conditions of the
* subcomponent's license, as noted in the LICENSE file.
*/
package
org.maxkey.json
;
package
org.maxkey.json
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
com.fasterxml.jackson.core.JsonGenerator
;
import
com.fasterxml.jackson.core.JsonGenerator
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.JsonSerializer
;
import
com.fasterxml.jackson.databind.JsonSerializer
;
import
com.fasterxml.jackson.databind.SerializerProvider
;
import
com.fasterxml.jackson.databind.SerializerProvider
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
/**
/**
* JSON serializer for Jackson to handle regular date instances as timestamps in ISO format.
* JSON serializer for Jackson to handle regular date instances as timestamps in
*
* ISO format.
* @author Dave Syer
*
*/
*/
public
class
JsonISODateSerializer
extends
JsonSerializer
<
Date
>
{
public
class
JsonISODateSerializer
extends
JsonSerializer
<
Date
>
{
private
static
final
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
);
private
static
final
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
);
@Override
@Override
public
void
serialize
(
Date
date
,
JsonGenerator
generator
,
SerializerProvider
provider
)
throws
IOException
,
public
void
serialize
(
Date
date
,
JsonGenerator
generator
,
SerializerProvider
provider
)
JsonProcessingException
{
throws
IOException
,
JsonProcessingException
{
String
formatted
=
dateFormat
.
format
(
date
);
String
formatted
=
dateFormat
.
format
(
date
);
generator
.
writeString
(
formatted
);
generator
.
writeString
(
formatted
);
}
}
...
...
maxkey-identitys/maxkey-identity-scim/.classpath
浏览文件 @
804bdd39
...
@@ -12,6 +12,20 @@
...
@@ -12,6 +12,20 @@
<attribute
name=
"gradle_used_by_scope"
value=
"main,test"
/>
<attribute
name=
"gradle_used_by_scope"
value=
"main,test"
/>
</attributes>
</attributes>
</classpathentry>
</classpathentry>
<classpathentry
kind=
"src"
output=
"bin/test"
path=
"src/test/java"
>
<attributes>
<attribute
name=
"gradle_scope"
value=
"test"
/>
<attribute
name=
"gradle_used_by_scope"
value=
"test"
/>
<attribute
name=
"test"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"src"
output=
"bin/test"
path=
"src/test/resources"
>
<attributes>
<attribute
name=
"gradle_scope"
value=
"test"
/>
<attribute
name=
"gradle_used_by_scope"
value=
"test"
/>
<attribute
name=
"test"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.buildship.core.gradleclasspathcontainer"
>
<classpathentry
kind=
"con"
path=
"org.eclipse.buildship.core.gradleclasspathcontainer"
>
<attributes>
<attributes>
...
...
maxkey-identitys/maxkey-identity-scim/.settings/org.eclipse.wst.common.component
浏览文件 @
804bdd39
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project-modules
id=
"moduleCoreId"
project-version=
"1.5.0"
>
<project-modules
id=
"moduleCoreId"
project-version=
"1.5.0"
>
<wb-module
deploy-name=
"maxkey-identity-scim"
>
<wb-module
deploy-name=
"maxkey-identity-scim"
>
<wb-resource
deploy-path=
"/"
source-path=
"src/main/resources"
/>
<wb-resource
deploy-path=
"/"
source-path=
"src/main/resources"
/>
<wb-resource
deploy-path=
"/"
source-path=
"src/main/java"
/>
<wb-resource
deploy-path=
"/"
source-path=
"src/main/java"
/>
<wb-resource
deploy-path=
"/"
source-path=
"/src/test/java"
/>
<wb-resource
deploy-path=
"/"
source-path=
"/src/test/resources"
/>
<dependent-module
deploy-path=
"../"
handle=
"module:/resource/maxkey-core/maxkey-core"
>
<dependent-module
deploy-path=
"../"
handle=
"module:/resource/maxkey-core/maxkey-core"
>
<dependency-type>
uses
</dependency-type>
<dependency-type>
uses
</dependency-type>
</dependent-module>
</dependent-module>
...
...
maxkey-identitys/maxkey-identity-scim/src/main/java/org/maxkey/identity/scim/resources/Enterprise.java
浏览文件 @
804bdd39
...
@@ -3,11 +3,8 @@ package org.maxkey.identity.scim.resources;
...
@@ -3,11 +3,8 @@ package org.maxkey.identity.scim.resources;
import
java.io.Serializable
;
import
java.io.Serializable
;
public
class
Enterprise
implements
Serializable
{
public
class
Enterprise
implements
Serializable
{
/**
*
*/
private
static
final
long
serialVersionUID
=
-
204619629148409697L
;
private
static
final
long
serialVersionUID
=
-
204619629148409697L
;
private
String
employeeNumber
;
private
String
employeeNumber
;
private
String
costCenter
;
private
String
costCenter
;
private
String
organization
;
private
String
organization
;
...
...
maxkey-identitys/maxkey-identity-scim/src/main/java/org/maxkey/identity/scim/resources/EnterpriseUser.java
浏览文件 @
804bdd39
package
org.maxkey.identity.scim.resources
;
package
org.maxkey.identity.scim.resources
;
import
java.util.HashSet
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
public
class
EnterpriseUser
extends
User
{
public
class
EnterpriseUser
extends
User
{
/**
*
*/
private
static
final
long
serialVersionUID
=
3212312511630459427L
;
private
static
final
long
serialVersionUID
=
3212312511630459427L
;
public
static
final
String
SCHEMA
=
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
;
public
static
final
String
SCHEMA
=
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
;
@JsonProperty
(
SCHEMA
)
Enterprise
enterprise
;
Enterprise
enterprise
;
public
EnterpriseUser
()
{
public
EnterpriseUser
()
{
schemas
=
new
HashSet
<
String
>();
schemas
.
add
(
User
.
SCHEMA
);
schemas
.
add
(
SCHEMA
);
}
public
Enterprise
getEnterprise
()
{
return
enterprise
;
}
public
void
setEnterprise
(
Enterprise
enterprise
)
{
this
.
enterprise
=
enterprise
;
}
}
...
...
maxkey-identitys/maxkey-identity-scim/src/main/java/org/maxkey/identity/scim/resources/Group.java
浏览文件 @
804bdd39
package
org.maxkey.identity.scim.resources
;
package
org.maxkey.identity.scim.resources
;
import
java.util.HashSet
;
import
java.util.Set
;
import
java.util.Set
;
public
class
Group
{
public
class
Group
extends
Resource
{
private
static
final
long
serialVersionUID
=
404613567384513866L
;
public
static
final
String
SCHEMA
=
"urn:ietf:params:scim:schemas:core:2.0:Group"
;
public
static
final
String
SCHEMA
=
"urn:ietf:params:scim:schemas:core:2.0:Group"
;
private
String
displayName
;
private
String
displayName
;
private
Set
<
MemberRef
>
members
;
private
Set
<
MemberRef
>
members
;
public
String
getDisplayName
()
{
public
String
getDisplayName
()
{
return
displayName
;
return
displayName
;
}
}
...
@@ -20,7 +23,10 @@ public class Group {
...
@@ -20,7 +23,10 @@ public class Group {
public
void
setMembers
(
Set
<
MemberRef
>
members
)
{
public
void
setMembers
(
Set
<
MemberRef
>
members
)
{
this
.
members
=
members
;
this
.
members
=
members
;
}
}
public
Group
()
{
public
Group
()
{
schemas
=
new
HashSet
<
String
>();
schemas
.
add
(
SCHEMA
);
}
}
}
}
maxkey-identitys/maxkey-identity-scim/src/main/java/org/maxkey/identity/scim/resources/Meta.java
浏览文件 @
804bdd39
...
@@ -4,6 +4,11 @@ import java.io.Serializable;
...
@@ -4,6 +4,11 @@ import java.io.Serializable;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Set
;
import
java.util.Set
;
import
org.maxkey.json.*
;
import
com.fasterxml.jackson.databind.annotation.JsonDeserialize
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
public
class
Meta
implements
Serializable
{
public
class
Meta
implements
Serializable
{
/**
/**
...
@@ -12,10 +17,20 @@ public class Meta implements Serializable {
...
@@ -12,10 +17,20 @@ public class Meta implements Serializable {
private
static
final
long
serialVersionUID
=
-
2244662962968933591L
;
private
static
final
long
serialVersionUID
=
-
2244662962968933591L
;
private
String
resourceType
;
private
String
resourceType
;
@JsonSerialize
(
using
=
JsonISODateSerializer
.
class
)
@JsonDeserialize
(
using
=
JsonISODateDeserializer
.
class
)
private
Date
created
;
private
Date
created
;
@JsonSerialize
(
using
=
JsonISODateSerializer
.
class
)
@JsonDeserialize
(
using
=
JsonISODateDeserializer
.
class
)
private
Date
lastModified
;
private
Date
lastModified
;
private
String
location
;
private
String
location
;
private
String
version
;
private
String
version
;
private
Set
<
String
>
attributes
;
private
Set
<
String
>
attributes
;
...
...
maxkey-identitys/maxkey-identity-scim/src/main/java/org/maxkey/identity/scim/resources/MultiValuedAttribute.java
浏览文件 @
804bdd39
...
@@ -2,11 +2,16 @@ package org.maxkey.identity.scim.resources;
...
@@ -2,11 +2,16 @@ package org.maxkey.identity.scim.resources;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
public
class
MultiValuedAttribute
implements
Serializable
{
public
class
MultiValuedAttribute
implements
Serializable
{
private
static
final
long
serialVersionUID
=
6878912593878245947L
;
private
static
final
long
serialVersionUID
=
6878912593878245947L
;
String
value
;
String
value
;
String
display
;
String
display
;
boolean
primary
;
boolean
primary
;
@JsonProperty
(
"$ref"
)
String
reference
;
String
reference
;
String
type
;
String
type
;
...
...
maxkey-identitys/maxkey-identity-scim/src/main/java/org/maxkey/identity/scim/resources/Resource.java
浏览文件 @
804bdd39
...
@@ -9,10 +9,11 @@ public class Resource implements Serializable {
...
@@ -9,10 +9,11 @@ public class Resource implements Serializable {
*
*
*/
*/
private
static
final
long
serialVersionUID
=
-
5159743553948621024L
;
private
static
final
long
serialVersionUID
=
-
5159743553948621024L
;
protected
Set
<
String
>
schemas
;
private
String
id
;
private
String
id
;
private
String
externalId
;
private
String
externalId
;
private
Meta
meta
;
private
Meta
meta
;
private
Set
<
String
>
schemas
;
public
Resource
()
{
public
Resource
()
{
}
}
...
...
maxkey-identitys/maxkey-identity-scim/src/main/java/org/maxkey/identity/scim/resources/User.java
浏览文件 @
804bdd39
package
org.maxkey.identity.scim.resources
;
package
org.maxkey.identity.scim.resources
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -176,6 +177,8 @@ public class User extends Resource{
...
@@ -176,6 +177,8 @@ public class User extends Resource{
this
.
extensions
=
extensions
;
this
.
extensions
=
extensions
;
}
}
public
User
()
{
public
User
()
{
schemas
=
new
HashSet
<
String
>();
schemas
.
add
(
SCHEMA
);
}
}
...
...
maxkey-identitys/maxkey-identity-scim/src/main/java/org/maxkey/identity/scim/resources/UserPhoneNumber.java
浏览文件 @
804bdd39
...
@@ -2,7 +2,7 @@ package org.maxkey.identity.scim.resources;
...
@@ -2,7 +2,7 @@ package org.maxkey.identity.scim.resources;
import
java.io.Serializable
;
import
java.io.Serializable
;
public
class
UserPhoneNumber
implements
Serializable
{
public
class
UserPhoneNumber
extends
MultiValuedAttribute
implements
Serializable
{
/**
/**
*
*
...
...
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ReadJson2String.java
0 → 100644
浏览文件 @
804bdd39
package
org.maxkey.identity.scim.resources
;
import
java.io.File
;
import
java.util.List
;
import
org.apache.commons.io.FileUtils
;
public
class
ReadJson2String
{
public
static
String
read
(
String
jsonFileName
)
{
try
{
List
<
String
>
list
=
FileUtils
.
readLines
(
new
File
(
ReadJson2String
.
class
.
getResource
(
jsonFileName
).
getFile
()),
"UTF-8"
);
StringBuilder
sb
=
new
StringBuilder
();
for
(
String
ss
:
list
)
{
sb
.
append
(
ss
);
}
System
.
out
.
println
(
sb
.
toString
());
return
sb
.
toString
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
}
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ScimEnterpriseUserJsonString.json
0 → 100644
浏览文件 @
804bdd39
{
"schemas"
:
[
"urn:ietf:params:scim:schemas:core:2.0:User"
,
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
],
"id"
:
"1111111111111"
,
"externalId"
:
"UserName"
,
"meta"
:
{
"resourceType"
:
"User"
,
"created"
:
"2020-06-15T23:06:00.129Z"
,
"lastModified"
:
"2020-06-15T23:06:00.129Z"
,
"location"
:
"https://example.com/v2/Users/2819c223..."
,
"version"
:
"W
\\
/
\"
f250dd84f0671c3
\"
"
},
"userName"
:
"UserName"
,
"name"
:
{
"formatted"
:
"Ms. Barbara J Jensen, III"
,
"familyName"
:
"Jensen"
,
"givenName"
:
"Barbara"
,
"middleName"
:
"Jane"
,
"honorificPrefix"
:
"Ms."
,
"honorificSuffix"
:
"III"
},
"emails"
:
[
{
"value"
:
"bjensen@example.com"
,
"primary"
:
false
,
"type"
:
"work"
}
],
"phoneNumbers"
:
[
{
"value"
:
"555-555-8377"
,
"primary"
:
false
,
"type"
:
"home"
},
{
"value"
:
"555-555-8377"
,
"primary"
:
false
,
"type"
:
"work"
}
],
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
:
{
"employeeNumber"
:
"k200908"
,
"costCenter"
:
"1111"
,
"department"
:
"de"
}
}
\ No newline at end of file
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ScimEnterpriseUserJsonString2ObjectTest.java
0 → 100644
浏览文件 @
804bdd39
package
org.maxkey.identity.scim.resources
;
import
org.maxkey.pretty.impl.JsonPretty
;
import
org.maxkey.util.JsonUtils
;
public
class
ScimEnterpriseUserJsonString2ObjectTest
{
public
static
void
main
(
String
[]
args
)
{
String
userJsonString
=
ReadJson2String
.
read
(
"ScimEnterpriseUserJsonString.json"
);
EnterpriseUser
u
=
JsonUtils
.
json2Object
(
userJsonString
,
EnterpriseUser
.
class
);
System
.
out
.
println
(
(
new
JsonPretty
()).
format
(
JsonUtils
.
object2Json
(
u
)));
System
.
out
.
println
(
u
.
getEnterprise
().
getCostCenter
());
}
}
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ScimEnterpriseUserJsonTest.java
0 → 100644
浏览文件 @
804bdd39
package
org.maxkey.identity.scim.resources
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
org.maxkey.pretty.impl.JsonPretty
;
import
org.maxkey.util.JsonUtils
;
public
class
ScimEnterpriseUserJsonTest
{
public
static
void
main
(
String
[]
args
)
{
// TODO Auto-generated method stub
EnterpriseUser
u
=
new
EnterpriseUser
();
u
.
setUserName
(
"UserName"
);
u
.
setExternalId
(
"UserName"
);
u
.
setId
(
"1111111111111"
);
Meta
meta
=
new
Meta
();
meta
.
setVersion
(
"W\\/\"f250dd84f0671c3\""
);
meta
.
setCreated
(
new
Date
());
meta
.
setLocation
(
"https://example.com/v2/Users/2819c223..."
);
meta
.
setResourceType
(
"User"
);
meta
.
setLastModified
(
new
Date
());
u
.
setMeta
(
meta
);
UserName
un
=
new
UserName
();
un
.
setFamilyName
(
"Jensen"
);
un
.
setFormatted
(
"Ms. Barbara J Jensen, III"
);
un
.
setGivenName
(
"Barbara"
);
un
.
setHonorificPrefix
(
"Ms."
);
un
.
setHonorificSuffix
(
"III"
);
un
.
setMiddleName
(
"Jane"
);
u
.
setName
(
un
);
List
<
UserPhoneNumber
>
UserPhoneNumberList
=
new
ArrayList
<
UserPhoneNumber
>();
UserPhoneNumber
pn
=
new
UserPhoneNumber
();
pn
.
setValue
(
"555-555-8377"
);
pn
.
setType
(
UserPhoneNumber
.
UserPhoneNumberType
.
WORK
);
UserPhoneNumber
pnh
=
new
UserPhoneNumber
();
pnh
.
setValue
(
"555-555-8377"
);
pnh
.
setType
(
UserPhoneNumber
.
UserPhoneNumberType
.
HOME
);
UserPhoneNumberList
.
add
(
pnh
);
UserPhoneNumberList
.
add
(
pn
);
u
.
setPhoneNumbers
(
UserPhoneNumberList
);
List
<
UserEmail
>
ueList
=
new
ArrayList
<
UserEmail
>();
UserEmail
ue
=
new
UserEmail
();
ue
.
setValue
(
"bjensen@example.com"
);
ue
.
setType
(
UserEmail
.
UserEmailType
.
WORK
);
ueList
.
add
(
ue
);
u
.
setEmails
(
ueList
);
Enterprise
ent
=
new
Enterprise
();
ent
.
setCostCenter
(
"1111"
);
ent
.
setDepartment
(
"de"
);
ent
.
setEmployeeNumber
(
"k200908"
);
u
.
setEnterprise
(
ent
);
System
.
out
.
println
(
(
new
JsonPretty
()).
format
(
JsonUtils
.
object2Json
(
u
)));
}
}
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ScimGroupJsonString.json
0 → 100644
浏览文件 @
804bdd39
{
"schemas"
:
[
"urn:ietf:params:scim:schemas:core:2.0:Group"
],
"meta"
:
{
"resourceType"
:
"User"
,
"created"
:
"2020-06-15T23:08:50.698Z"
,
"lastModified"
:
"2020-06-15T23:08:50.698Z"
,
"location"
:
"https://example.com/v2/Users/2819c223..."
,
"version"
:
"W
\\
/
\"
f250dd84f0671c3
\"
"
},
"displayName"
:
"Tour Guides"
,
"members"
:
[
{
"value"
:
"2819c223-7f76-453a-919d-413861904646"
,
"display"
:
"Babs Jensen"
,
"primary"
:
false
,
"$ref"
:
"https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646"
},
{
"value"
:
"2819c223-7f76-453a-919d-413861904646"
,
"display"
:
"Babs Jensen"
,
"primary"
:
false
,
"$ref"
:
"https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646"
},
{
"value"
:
"2819c223-7f76-453a-919d-413861904646"
,
"display"
:
"Babs Jensen"
,
"primary"
:
false
,
"$ref"
:
"https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646"
}
]
}
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ScimGroupJsonString2ObjectTest.java
0 → 100644
浏览文件 @
804bdd39
package
org.maxkey.identity.scim.resources
;
import
java.util.Date
;
import
java.util.HashSet
;
import
java.util.Set
;
import
org.maxkey.pretty.impl.JsonPretty
;
import
org.maxkey.util.JsonUtils
;
public
class
ScimGroupJsonString2ObjectTest
{
public
static
void
main
(
String
[]
args
)
{
String
userJsonString
=
ReadJson2String
.
read
(
"ScimGroupJsonString.json"
);
Group
g
=
JsonUtils
.
json2Object
(
userJsonString
,
Group
.
class
);
System
.
out
.
println
(
(
new
JsonPretty
()).
format
(
JsonUtils
.
object2Json
(
g
)));
}
}
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ScimGroupJsonTest.java
0 → 100644
浏览文件 @
804bdd39
package
org.maxkey.identity.scim.resources
;
import
java.util.Date
;
import
java.util.HashSet
;
import
java.util.Set
;
import
org.maxkey.pretty.impl.JsonPretty
;
import
org.maxkey.util.JsonUtils
;
public
class
ScimGroupJsonTest
{
public
static
void
main
(
String
[]
args
)
{
Group
g
=
new
Group
();
Meta
meta
=
new
Meta
();
meta
.
setVersion
(
"W\\/\"f250dd84f0671c3\""
);
meta
.
setCreated
(
new
Date
());
meta
.
setLocation
(
"https://example.com/v2/Users/2819c223..."
);
meta
.
setResourceType
(
"User"
);
meta
.
setLastModified
(
new
Date
());
g
.
setMeta
(
meta
);
g
.
setDisplayName
(
"Tour Guides"
);
Set
<
MemberRef
>
mrSet
=
new
HashSet
<
MemberRef
>();
MemberRef
mr1
=
new
MemberRef
();
mr1
.
setReference
(
"https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646"
);
mr1
.
setValue
(
"2819c223-7f76-453a-919d-413861904646"
);
mr1
.
setDisplay
(
"Babs Jensen"
);
MemberRef
mr2
=
new
MemberRef
();
mr2
.
setReference
(
"https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646"
);
mr2
.
setValue
(
"2819c223-7f76-453a-919d-413861904646"
);
mr2
.
setDisplay
(
"Babs Jensen"
);
MemberRef
mr3
=
new
MemberRef
();
mr3
.
setReference
(
"https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646"
);
mr3
.
setValue
(
"2819c223-7f76-453a-919d-413861904646"
);
mr3
.
setDisplay
(
"Babs Jensen"
);
mrSet
.
add
(
mr1
);
mrSet
.
add
(
mr2
);
mrSet
.
add
(
mr3
);
g
.
setMembers
(
mrSet
);
System
.
out
.
println
(
(
new
JsonPretty
()).
format
(
JsonUtils
.
object2Json
(
g
)));
}
}
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ScimUserJsonString.json
0 → 100644
浏览文件 @
804bdd39
{
"schemas"
:
[
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"id"
:
"1111111111111"
,
"externalId"
:
"UserName"
,
"meta"
:
{
"resourceType"
:
"User"
,
"created"
:
"2020-06-15T23:09:30.763Z"
,
"lastModified"
:
"2020-06-15T23:09:30.763Z"
,
"location"
:
"https://example.com/v2/Users/2819c223..."
,
"version"
:
"W
\\
/
\"
f250dd84f0671c3
\"
"
},
"userName"
:
"UserName"
,
"name"
:
{
"formatted"
:
"Ms. Barbara J Jensen, III"
,
"familyName"
:
"Jensen"
,
"givenName"
:
"Barbara"
,
"middleName"
:
"Jane"
,
"honorificPrefix"
:
"Ms."
,
"honorificSuffix"
:
"III"
},
"emails"
:
[
{
"value"
:
"bjensen@example.com"
,
"primary"
:
false
,
"type"
:
"work"
}
],
"phoneNumbers"
:
[
{
"value"
:
"555-555-8377"
,
"primary"
:
false
,
"type"
:
"home"
},
{
"value"
:
"555-555-8377"
,
"primary"
:
false
,
"type"
:
"work"
}
]
}
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ScimUserJsonString2ObjectTest.java
0 → 100644
浏览文件 @
804bdd39
package
org.maxkey.identity.scim.resources
;
import
org.maxkey.pretty.impl.JsonPretty
;
import
org.maxkey.util.JsonUtils
;
public
class
ScimUserJsonString2ObjectTest
{
public
static
void
main
(
String
[]
args
)
{
String
userJsonString
=
ReadJson2String
.
read
(
"ScimUserJsonString.json"
);
User
u
=
JsonUtils
.
json2Object
(
userJsonString
,
User
.
class
);
System
.
out
.
println
(
(
new
JsonPretty
()).
format
(
JsonUtils
.
object2Json
(
u
)));
}
}
maxkey-identitys/maxkey-identity-scim/src/test/java/org/maxkey/identity/scim/resources/ScimUserJsonTest.java
0 → 100644
浏览文件 @
804bdd39
package
org.maxkey.identity.scim.resources
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
org.maxkey.pretty.impl.JsonPretty
;
import
org.maxkey.util.JsonUtils
;
public
class
ScimUserJsonTest
{
public
static
void
main
(
String
[]
args
)
{
// TODO Auto-generated method stub
User
u
=
new
User
();
u
.
setUserName
(
"UserName"
);
u
.
setExternalId
(
"UserName"
);
u
.
setId
(
"1111111111111"
);
Meta
meta
=
new
Meta
();
meta
.
setVersion
(
"W\\/\"f250dd84f0671c3\""
);
meta
.
setCreated
(
new
Date
());
meta
.
setLocation
(
"https://example.com/v2/Users/2819c223..."
);
meta
.
setResourceType
(
"User"
);
meta
.
setLastModified
(
new
Date
());
u
.
setMeta
(
meta
);
UserName
un
=
new
UserName
();
un
.
setFamilyName
(
"Jensen"
);
un
.
setFormatted
(
"Ms. Barbara J Jensen, III"
);
un
.
setGivenName
(
"Barbara"
);
un
.
setHonorificPrefix
(
"Ms."
);
un
.
setHonorificSuffix
(
"III"
);
un
.
setMiddleName
(
"Jane"
);
u
.
setName
(
un
);
List
<
UserPhoneNumber
>
UserPhoneNumberList
=
new
ArrayList
<
UserPhoneNumber
>();
UserPhoneNumber
pn
=
new
UserPhoneNumber
();
pn
.
setValue
(
"555-555-8377"
);
pn
.
setType
(
UserPhoneNumber
.
UserPhoneNumberType
.
WORK
);
UserPhoneNumber
pnh
=
new
UserPhoneNumber
();
pnh
.
setValue
(
"555-555-8377"
);
pnh
.
setType
(
UserPhoneNumber
.
UserPhoneNumberType
.
HOME
);
UserPhoneNumberList
.
add
(
pnh
);
UserPhoneNumberList
.
add
(
pn
);
u
.
setPhoneNumbers
(
UserPhoneNumberList
);
List
<
UserEmail
>
ueList
=
new
ArrayList
<
UserEmail
>();
UserEmail
ue
=
new
UserEmail
();
ue
.
setValue
(
"bjensen@example.com"
);
ue
.
setType
(
UserEmail
.
UserEmailType
.
WORK
);
ueList
.
add
(
ue
);
u
.
setEmails
(
ueList
);
System
.
out
.
println
(
(
new
JsonPretty
()).
format
(
JsonUtils
.
object2Json
(
u
)));
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录