当前位置: 首页>>代码示例>>Java>>正文


Java BaseMappingException类代码示例

本文整理汇总了Java中org.gluu.persist.exception.mapping.BaseMappingException的典型用法代码示例。如果您正苦于以下问题:Java BaseMappingException类的具体用法?Java BaseMappingException怎么用?Java BaseMappingException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BaseMappingException类属于org.gluu.persist.exception.mapping包,在下文中一共展示了BaseMappingException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateTargetEntriesViaVDS

import org.gluu.persist.exception.mapping.BaseMappingException; //导入依赖的package包/类
private List<String> updateTargetEntriesViaVDS(CacheRefreshConfiguration cacheRefreshConfiguration, LdapServerConnection targetServerConnection, Set<String> changedInums) {
	List<String> result = new ArrayList<String>();

	LdapEntryManager targetLdapEntryManager = targetServerConnection.getLdapEntryManager();
	Filter filter = cacheRefreshService.createObjectClassPresenceFilter();
	for (String changedInum : changedInums) {
		String baseDn = "action=synchronizecache," + personService.getDnForPerson(changedInum);
		try {
			targetLdapEntryManager.findEntries(baseDn, GluuDummyEntry.class, filter, SearchScope.SUB, null, 0, cacheRefreshConfiguration.getLdapSearchSizeLimit());
			result.add(changedInum);
			log.debug("Updated entry with inum {}", changedInum);
		} catch (BaseMappingException ex) {
			log.error("Failed to update entry with inum '{}' using baseDN {}", changedInum, baseDn, ex);
		}
	}

	return result;
}
 
开发者ID:GluuFederation,项目名称:oxTrust,代码行数:19,代码来源:CacheRefreshTimer.java

示例2: delete

import org.gluu.persist.exception.mapping.BaseMappingException; //导入依赖的package包/类
public String delete() throws Exception {
	if (update) {
		// Remove client
		try {
			clientService.removeClient(this.client);

			facesMessages.add(FacesMessage.SEVERITY_INFO, "Client '#{updateClientAction.client.displayName}' removed successfully");
			conversationService.endConversation();

			return OxTrustConstants.RESULT_SUCCESS;
		} catch (BaseMappingException ex) {
			log.error("Failed to remove client {}", this.inum, ex);
		}
	}

	facesMessages.add(FacesMessage.SEVERITY_ERROR, "Failed to remove client '#{updateClientAction.client.displayName}'");

	return OxTrustConstants.RESULT_FAILURE;
}
 
开发者ID:GluuFederation,项目名称:oxTrust,代码行数:20,代码来源:UpdateClientAction.java

示例3: loadAttribute

import org.gluu.persist.exception.mapping.BaseMappingException; //导入依赖的package包/类
private boolean loadAttribute(String inum) {
	try {
		this.attribute = attributeService.getAttributeByInum(inum);
	} catch (BaseMappingException ex) {
		log.error("Failed to find attribute {}", inum, ex);
	}

	if (this.attribute == null) {
		return false;
	}

	initAttribute();

	this.canEdit = isAllowEdit();

	return true;
}
 
开发者ID:GluuFederation,项目名称:oxTrust,代码行数:18,代码来源:UpdateAttributeAction.java

示例4: add

import org.gluu.persist.exception.mapping.BaseMappingException; //导入依赖的package包/类
public String add() throws Exception {
     if (this.sectorIdentifier != null) {
         return OxTrustConstants.RESULT_SUCCESS;
     }

     this.update = false;
     this.sectorIdentifier = new OxAuthSectorIdentifier();

     try {
         this.loginUris = getNonEmptyStringList(sectorIdentifier.getRedirectUris());
         if(sectorIdentifier.getClientIds() != null && sectorIdentifier.getClientIds().size()>0)
         	this.loginUris.addAll(clientRedirectUriList(sectorIdentifier.getClientIds()));
         this.clientDisplayNameEntries = loadClientDisplayNameEntries();
     } catch (BaseMappingException ex) {
         log.error("Failed to load login Uris", ex);

         facesMessages.add(FacesMessage.SEVERITY_ERROR, "Failed to add new sector identifier");
conversationService.endConversation();

         return OxTrustConstants.RESULT_FAILURE;
     }

     return OxTrustConstants.RESULT_SUCCESS;
 }
 
开发者ID:GluuFederation,项目名称:oxTrust,代码行数:25,代码来源:UpdateSectorIdentifierAction.java

示例5: delete

import org.gluu.persist.exception.mapping.BaseMappingException; //导入依赖的package包/类
public String delete() throws Exception {
    if (update) {
        // Remove sectorIdentifier
        try {
            sectorIdentifierService.removeSectorIdentifier(this.sectorIdentifier);

            facesMessages.add(FacesMessage.SEVERITY_INFO, "Sector identifier '#{updateSectorIdentifierAction.sectorIdentifier.inum}' removed successfully");
conversationService.endConversation();

return OxTrustConstants.RESULT_SUCCESS;
        } catch (BaseMappingException ex) {
            log.error("Failed to remove sector identifier {}", this.sectorIdentifier.getInum(), ex);
        }
    }

    facesMessages.add(FacesMessage.SEVERITY_ERROR, "Failed to remove sector identifier '#{updateSectorIdentifierAction.sectorIdentifier.inum}'");

    return OxTrustConstants.RESULT_FAILURE;
}
 
开发者ID:GluuFederation,项目名称:oxTrust,代码行数:20,代码来源:UpdateSectorIdentifierAction.java

示例6: markAsInactive

import org.gluu.persist.exception.mapping.BaseMappingException; //导入依赖的package包/类
private void markAsInactive() {
	// Mark this configuration as not active because we don't have correct
	// files in meta-data folder
	if (update) {
		try {
			GluuSAMLTrustRelationship tmpTrustRelationship = trustService.getRelationshipByInum(this.trustRelationship.getInum());
			tmpTrustRelationship.setStatus(GluuStatus.INACTIVE);
			saveTR(update);
		} catch (BaseMappingException ex) {
			log.error("Failed to update trust relationship {}", inum, ex);
		}
	} else {
		// Remove file name to generate new one during new save attempt.
		// Cover case when somebody else added new one simultaneously
		this.trustRelationship.setSpMetaDataFN(null);
		this.trustRelationship.setInum(null);
	}
}
 
开发者ID:GluuFederation,项目名称:oxTrust,代码行数:19,代码来源:UpdateTrustRelationshipAction.java

示例7: update

import org.gluu.persist.exception.mapping.BaseMappingException; //导入依赖的package包/类
private String update() {
	log.debug("Loading UMA resource set '{}'", this.oxId);
	try {
		String resourceDn = umaResourcesService.getDnForResource(this.oxId);
		this.resource = umaResourcesService.getResourceByDn(resourceDn);
	} catch (BaseMappingException ex) {
		log.error("Failed to find resource set '{}'", this.oxId, ex);
		return OxTrustConstants.RESULT_FAILURE;
	}

	if (this.resource == null) {
		log.error("Resource set is null");
		return OxTrustConstants.RESULT_FAILURE;
	}

	this.scopes = getScopesDisplayNameEntries();
	this.clients = getClientDisplayNameEntries();

	if (this.resource.getResources() == null) {
		this.resources = new ArrayList<String>();
	} else {
		this.resources = new ArrayList<String>(this.resource.getResources());
	}

	return OxTrustConstants.RESULT_SUCCESS;
}
 
开发者ID:GluuFederation,项目名称:oxTrust,代码行数:27,代码来源:UpdateResourceAction.java

示例8: delete

import org.gluu.persist.exception.mapping.BaseMappingException; //导入依赖的package包/类
public String delete() {
	if (update) {
		// Remove resource set
		try {
			umaResourcesService.removeResource(this.resource);

			facesMessages.add(FacesMessage.SEVERITY_INFO, "UMA resource '#{updateResourceAction.resource.name}' removed successfully");
			conversationService.endConversation();

			return OxTrustConstants.RESULT_SUCCESS;
		} catch (BaseMappingException ex) {
			log.error("Failed to remove resource set {}", this.resource.getInum(), ex);
		}
	}

	facesMessages.add(FacesMessage.SEVERITY_ERROR, "Failed to remove UMA resource '#{updateResourceAction.resource.name}'");

	return OxTrustConstants.RESULT_FAILURE;
}
 
开发者ID:GluuFederation,项目名称:oxTrust,代码行数:20,代码来源:UpdateResourceAction.java

示例9: update

import org.gluu.persist.exception.mapping.BaseMappingException; //导入依赖的package包/类
private String update() {
	if (this.scopeDescription != null) {
		return OxTrustConstants.RESULT_SUCCESS;
	}

	log.debug("Loading UMA resource '{}'", this.scopeInum);
	try {
		String scopeDn = scopeDescriptionService.getDnForScopeDescription(this.scopeInum);
		this.scopeDescription = scopeDescriptionService.getScopeDescriptionByDn(scopeDn);
		this.authorizationPolicies = getInitialAuthorizationPolicies();
	} catch (BaseMappingException ex) {
		log.error("Failed to find scope description '{}'", this.scopeInum, ex);
		return OxTrustConstants.RESULT_FAILURE;
	}

	if (this.scopeDescription == null) {
		log.error("Scope description is null");
		return OxTrustConstants.RESULT_FAILURE;
	}

	initIconImage();

	return OxTrustConstants.RESULT_SUCCESS;
}
 
开发者ID:GluuFederation,项目名称:oxTrust,代码行数:25,代码来源:UpdateScopeDescriptionAction.java

示例10: delete

import org.gluu.persist.exception.mapping.BaseMappingException; //导入依赖的package包/类
public String delete() {
	if (update) {
		// Remove scope description
		try {
			scopeDescriptionService.removeScopeDescription(this.scopeDescription);

			facesMessages.add(FacesMessage.SEVERITY_INFO, "UMA resource '#{updateScopeDescriptionAction.scopeDescription.displayName}' removed successfully");
			conversationService.endConversation();

			return OxTrustConstants.RESULT_SUCCESS;
		} catch (BaseMappingException ex) {
			log.error("Failed to remove scope description {}", this.scopeDescription.getId(), ex);
		}
	}

	facesMessages.add(FacesMessage.SEVERITY_ERROR, "Failed to remove UMA resource '#{updateScopeDescriptionAction.scopeDescription.displayName}'");

	return OxTrustConstants.RESULT_FAILURE;
}
 
开发者ID:GluuFederation,项目名称:oxTrust,代码行数:20,代码来源:UpdateScopeDescriptionAction.java

示例11: searchAvailableAuthorizationPolicies

import org.gluu.persist.exception.mapping.BaseMappingException; //导入依赖的package包/类
public void searchAvailableAuthorizationPolicies() {
	if (this.availableAuthorizationPolicies != null) {
		selectAddedAuthorizationPolicies();
		return;
	}

	try {
		List<CustomScript> availableScripts = customScriptService.findCustomScripts(Arrays.asList(CustomScriptType.UMA_RPT_POLICY), CUSTOM_SCRIPT_RETURN_ATTRIBUTES);

		List<SelectableEntity<CustomScript>> tmpAvailableAuthorizationPolicies = new ArrayList<SelectableEntity<CustomScript>>();
		for (CustomScript authorizationPolicy : availableScripts) {
			tmpAvailableAuthorizationPolicies.add(new SelectableEntity<CustomScript>(authorizationPolicy));
		}
		
		this.availableAuthorizationPolicies = tmpAvailableAuthorizationPolicies;
		selectAddedAuthorizationPolicies();
	} catch (BaseMappingException ex) {
		log.error("Failed to find available authorization policies", ex);
	}

}
 
开发者ID:GluuFederation,项目名称:oxTrust,代码行数:22,代码来源:UpdateScopeDescriptionAction.java

示例12: delete

import org.gluu.persist.exception.mapping.BaseMappingException; //导入依赖的package包/类
public String delete() throws Exception {
	if (update) {
		// Remove scope
		try {
			scopeService.removeScope(this.scope);

			facesMessages.add(FacesMessage.SEVERITY_INFO, "Scope '#{updateScopeAction.scope.displayName}' removed successfully");

			conversationService.endConversation();

			return OxTrustConstants.RESULT_SUCCESS;
		} catch (BaseMappingException ex) {
			log.error("Failed to remove scope {}", this.scope.getInum(), ex);

		}
	}

	return OxTrustConstants.RESULT_FAILURE;
}
 
开发者ID:GluuFederation,项目名称:oxTrust,代码行数:20,代码来源:UpdateScopeAction.java

示例13: searchAvailableDynamicScripts

import org.gluu.persist.exception.mapping.BaseMappingException; //导入依赖的package包/类
public void searchAvailableDynamicScripts() {
	if (this.availableDynamicScripts != null) {
		selectAddedDynamicScripts();
		return;
	}

	try {
		List<CustomScript> availableScripts = customScriptService.findCustomScripts(Arrays.asList(CustomScriptType.DYNAMIC_SCOPE), CUSTOM_SCRIPT_RETURN_ATTRIBUTES);

		List<SelectableEntity<CustomScript>> tmpAvailableDynamicScripts = new ArrayList<SelectableEntity<CustomScript>>();
		for (CustomScript dynamicScript : availableScripts) {
			if(dynamicScript.isEnabled()){
				tmpAvailableDynamicScripts.add(new SelectableEntity<CustomScript>(dynamicScript));
			}
		}
		
		this.availableDynamicScripts = tmpAvailableDynamicScripts;
		selectAddedDynamicScripts();
	} catch (BaseMappingException ex) {
		log.error("Failed to find available authorization policies", ex);
	}

}
 
开发者ID:GluuFederation,项目名称:oxTrust,代码行数:24,代码来源:UpdateScopeAction.java

示例14: add

import org.gluu.persist.exception.mapping.BaseMappingException; //导入依赖的package包/类
public String add() throws Exception {
	if (this.group != null) {
		return OxTrustConstants.RESULT_SUCCESS;
	}

	this.update = false;
	this.group = new GluuGroup();
	this.group.setOwner(currentPerson.getDn());
	this.group.setOrganization(organizationService.getOrganization().getDn());

	try {
		this.members = getMemberDisplayNameEntiries();
	} catch (BaseMappingException ex) {
		log.error("Failed to prepare lists", ex);

		facesMessages.add(FacesMessage.SEVERITY_ERROR, "Failed to add new group");
		conversationService.endConversation();

		return OxTrustConstants.RESULT_FAILURE;
	}

	return OxTrustConstants.RESULT_SUCCESS;
}
 
开发者ID:GluuFederation,项目名称:oxTrust,代码行数:24,代码来源:UpdateGroupAction.java

示例15: delete

import org.gluu.persist.exception.mapping.BaseMappingException; //导入依赖的package包/类
public String delete() throws Exception {
	if (update) {
		// Remove group
		try {
			groupService.removeGroup(this.group);

			facesMessages.add(FacesMessage.SEVERITY_INFO, "Group '#{updateGroupAction.group.displayName}' removed successfully");
			conversationService.endConversation();

			return OxTrustConstants.RESULT_SUCCESS;
		} catch (BaseMappingException ex) {
			log.error("Failed to remove group {}", this.group.getInum(), ex);
		}
	}

	facesMessages.add(FacesMessage.SEVERITY_ERROR, "Failed to remove group '#{updateGroupAction.group.displayName}'");

	return OxTrustConstants.RESULT_FAILURE;
}
 
开发者ID:GluuFederation,项目名称:oxTrust,代码行数:20,代码来源:UpdateGroupAction.java


注:本文中的org.gluu.persist.exception.mapping.BaseMappingException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。