本文整理了Java中org.wso2.carbon.registry.api.Resource.getProperty
方法的一些代码示例,展示了Resource.getProperty
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Resource.getProperty
方法的具体详情如下:
包路径:org.wso2.carbon.registry.api.Resource
类名称:Resource
方法名:getProperty
暂无
代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.identity.entitlement
policyIds = list.toArray(new String[list.size()]);
String version = resource.getProperty("version");
if (version != null) {
this.version = version;
String action = resource.getProperty("action");
if (action != null) {
this.action = action;
String order = resource.getProperty("order");
if (order != null) {
this.order = Integer.parseInt(order);
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.user.mgt
private UIPermissionNode getUIPermissionNode(Resource resource,
boolean isSelected) throws RegistryException {
String displayName = resource.getProperty(UserMgtConstants.DISPLAY_NAME);
return new UIPermissionNode(resource.getPath(), displayName, isSelected);
}
代码示例来源:origin: wso2/carbon-identity-framework
private UIPermissionNode getUIPermissionNode(Resource resource,
boolean isSelected) throws RegistryException {
String displayName = resource.getProperty(UserMgtConstants.DISPLAY_NAME);
return new UIPermissionNode(resource.getPath(), displayName, isSelected);
}
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.entitlement
policyIds = list.toArray(new String[list.size()]);
String version = resource.getProperty("version");
if (version != null) {
this.version = version;
String action = resource.getProperty("action");
if (action != null) {
this.action = action;
String order = resource.getProperty("order");
if (order != null) {
this.order = Integer.parseInt(order);
代码示例来源:origin: wso2/carbon-identity-framework
/**
* Check if resource has expired and delete.
*
* @param registry Registry instance to use.
* @param resourcePath Path of resource to be deleted.
* @throws RegistryException
*/
private static void checkAndDeleteRegistryResource (Registry registry, String resourcePath) throws
RegistryException {
Resource resource = registry.get(resourcePath);
long currentEpochTime = System.currentTimeMillis();
long resourceExpireTime = Long.parseLong(resource.getProperty(EXPIRE_TIME_PROPERTY));
if (currentEpochTime > resourceExpireTime) {
registry.delete(resource.getId());
}
}
代码示例来源:origin: wso2/carbon-identity-framework
policyIds = list.toArray(new String[list.size()]);
String version = resource.getProperty("version");
if (version != null) {
this.version = version;
String action = resource.getProperty("action");
if (action != null) {
this.action = action;
String order = resource.getProperty("order");
if (order != null) {
this.order = Integer.parseInt(order);
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.mgt
/**
* Check if resource has expired and delete.
*
* @param registry Registry instance to use.
* @param resourcePath Path of resource to be deleted.
* @throws RegistryException
*/
private static void checkAndDeleteRegistryResource (Registry registry, String resourcePath) throws
RegistryException {
Resource resource = registry.get(resourcePath);
long currentEpochTime = System.currentTimeMillis();
long resourceExpireTime = Long.parseLong(resource.getProperty(EXPIRE_TIME_PROPERTY));
if (currentEpochTime > resourceExpireTime) {
registry.delete(resource.getId());
}
}
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.sts.passive
Resource resource = registry.get(resourcePath);
ClaimDTO claimDTO = new ClaimDTO();
claimDTO.setRealm(resource.getProperty(REALM_NAME).replace(SLASH_REPLACE_CHARACTER, "/"));
String claims = resource.getProperty(CLAIMS);
if (claims.startsWith("[")) {
claims = claims.replaceFirst("\\[", "");
claimDTO.setClaimDialect(resource.getProperty(CLAIM_DIALECT));
代码示例来源:origin: org.wso2.carbon.identity.inbound.auth.sts/org.wso2.carbon.identity.sts.passive
Resource resource = registry.get(resourcePath);
ClaimDTO claimDTO = new ClaimDTO();
claimDTO.setRealm(resource.getProperty(REALM_NAME).replace(SLASH_REPLACE_CHARACTER, "/"));
String claims = resource.getProperty(CLAIMS);
if (claims.startsWith("[")) {
claims = claims.replaceFirst("\\[", "");
claimDTO.setClaimDialect(resource.getProperty(CLAIM_DIALECT));
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.oauth
String supportedScope = (String) supporetdScopes.nextElement();
if (supportedScope.equals(requestedScope)) {
requestedScopeClaims = resource.getProperty(requestedScope);
if (requestedScopeClaims.contains(",")) {
arrRequestedScopeClaims = requestedScopeClaims.split(",");
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.sts.passive
ClaimDTO claimDTO = new ClaimDTO();
claimDTO.setRealm(realmName.replace(SLASH_REPLACE_CHARACTER, "/"));
String claims = resource.getProperty(CLAIMS);
claimDTO.setClaimDialect(resource.getProperty(CLAIM_DIALECT));
return claimDTO;
} catch (RegistryException e) {
代码示例来源:origin: org.wso2.carbon.identity.inbound.auth.sts/org.wso2.carbon.identity.sts.passive
ClaimDTO claimDTO = new ClaimDTO();
claimDTO.setRealm(realmName.replace(SLASH_REPLACE_CHARACTER, "/"));
String claims = resource.getProperty(CLAIMS);
claimDTO.setClaimDialect(resource.getProperty(CLAIM_DIALECT));
return claimDTO;
} catch (RegistryException e) {
代码示例来源:origin: org.wso2.carbon.identity.inbound.auth.oauth2/org.wso2.carbon.identity.oauth
private Properties getOIDCScopeProperties(String spTenantDomain) {
Resource oidcScopesResource = null;
try {
int tenantId = IdentityTenantUtil.getTenantId(spTenantDomain);
startTenantFlow(spTenantDomain, tenantId);
RegistryService registryService = OAuth2ServiceComponentHolder.getRegistryService();
if (registryService == null) {
throw new RegistryException("Registry Service not set in OAuth2 Component. Component may not have " +
"initialized correctly.");
}
oidcScopesResource = registryService.getConfigSystemRegistry(tenantId).get(SCOPE_RESOURCE_PATH);
} catch (RegistryException e) {
log.error("Error while obtaining registry collection from registry path:" + SCOPE_RESOURCE_PATH, e);
} finally {
PrivilegedCarbonContext.endTenantFlow();
}
Properties propertiesToReturn = new Properties();
if (oidcScopesResource != null) {
for (Object scopeProperty : oidcScopesResource.getProperties().keySet()) {
String propertyKey = (String) scopeProperty;
propertiesToReturn.setProperty(propertyKey, oidcScopesResource.getProperty(propertyKey));
}
} else {
log.error("OIDC scope resource cannot be found at " + SCOPE_RESOURCE_PATH + " for tenantDomain: "
+ spTenantDomain);
}
return propertiesToReturn;
}
代码示例来源:origin: wso2/carbon-identity-framework
if (registry.resourceExists(uiPermission.getResourceId())) {
Resource existingResource = registry.get(uiPermission.getResourceId());
if (existingResource.getProperty(UserMgtConstants.DISPLAY_NAME) == null) {
existingResource.setProperty(UserMgtConstants.DISPLAY_NAME, uiPermission.getDisplayName());
registry.put(uiPermission.getResourceId(), existingResource);
内容来源于网络,如有侵权,请联系作者删除!