This repository has been archived by the owner on Jul 29, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create default group for api and apps
- Loading branch information
1 parent
a22aa1f
commit ef333eb
Showing
4 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
...in/java/io/gravitee/repository/mongodb/management/internal/model/GroupEventRuleMongo.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,39 @@ | ||
/** | ||
* Copyright (C) 2015 The Gravitee team (http://gravitee.io) | ||
* | ||
* 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 io.gravitee.repository.mongodb.management.internal.model; | ||
|
||
/** | ||
* @author Nicolas GERAUD (nicolas.geraud at graviteesource.com) | ||
* @author GraviteeSource Team | ||
*/ | ||
public class GroupEventRuleMongo { | ||
private String event; | ||
|
||
public String getEvent() { | ||
return event; | ||
} | ||
|
||
public void setEvent(String event) { | ||
this.event = event; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "GroupEventRule{" + | ||
", event='" + event + '\'' + | ||
"}"; | ||
} | ||
} |
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
51 changes: 51 additions & 0 deletions
51
...ain/java/io/gravitee/repository/mongodb/management/mapper/RepositoryDozerClassLoader.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 (C) 2015 The Gravitee team (http://gravitee.io) | ||
* | ||
* 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 io.gravitee.repository.mongodb.management.mapper; | ||
|
||
import org.apache.commons.lang3.ClassUtils; | ||
import org.dozer.util.DozerClassLoader; | ||
import org.dozer.util.MappingUtils; | ||
import org.dozer.util.ResourceLoader; | ||
|
||
import java.net.URL; | ||
|
||
/** | ||
* @author David BRASSELY (david.brassely at graviteesource.com) | ||
* @author GraviteeSource Team | ||
*/ | ||
public class RepositoryDozerClassLoader implements DozerClassLoader { | ||
|
||
private final ResourceLoader resourceLoader = new ResourceLoader(); | ||
private final ClassLoader classLoader = this.getClass().getClassLoader(); | ||
|
||
public RepositoryDozerClassLoader() {} | ||
|
||
public Class<?> loadClass(String className) { | ||
Class result = null; | ||
|
||
try { | ||
result = ClassUtils.getClass(classLoader, className); | ||
} catch (ClassNotFoundException var4) { | ||
MappingUtils.throwMappingException(var4); | ||
} | ||
|
||
return result; | ||
} | ||
|
||
public URL loadResource(String uri) { | ||
return this.resourceLoader.getResource(uri); | ||
} | ||
} |