Package javassist

Examples of javassist.NotFoundException


        // get the specified connector.
        ConnectorInfo info;
        try {
            info = connBundleManager.getConnectorManager().findConnectorInfo(key);
            if (info == null) {
                throw new NotFoundException("Connector Info for key " + key);
            }
        } catch (MissingConfKeyException e) {
            throw new NotFoundException("Connector Info for key " + key, e);
        }

        // create default configuration
        APIConfiguration apiConfig = info.createDefaultAPIConfiguration();

        if (apiConfig == null) {
            throw new NotFoundException("Default API configuration");
        }

        // retrieve the ConfigurationProperties.
        final ConfigurationProperties properties = apiConfig.getConfigurationProperties();

        if (properties == null) {
            throw new NotFoundException("Configuration properties");
        }

        // Print out what the properties are (not necessary)
        if (LOG.isDebugEnabled()) {
            for (String propName : properties.getPropertyNames()) {
                LOG.debug("\nProperty Name: {}\nProperty Type: {}", properties.getProperty(propName).getName(),
                        properties.getProperty(propName).getType());
            }
        }

        // Set all of the ConfigurationProperties needed by the connector.
        for (ConnConfProperty property : connInstance.getConfiguration()) {
            final Object propertyValue = getPropertyValue(property);
            if (propertyValue != null) {
                properties.setPropertyValue(property.getSchema().getName(), propertyValue);
            }
        }

        // Use the ConnectorFacadeFactory's newInstance() method to get
        // a new connector.
        connector = ConnectorFacadeFactory.getInstance().newInstance(apiConfig);

        if (connector == null) {
            throw new NotFoundException("Connector");
        }

        // Make sure we have set up the Configuration properly
        connector.validate();
    }
View Full Code Here


    private SyncopeUser getSyncopeUser(final Long userId)
            throws NotFoundException {

        SyncopeUser user = userDAO.find(userId);
        if (user == null) {
            throw new NotFoundException("User " + userId);
        }

        return user;
    }
View Full Code Here

    public void createTasks(final WorkflowResult<Long> wfResult)
            throws NotFoundException {

        SyncopeUser user = userDAO.find(wfResult.getResult());
        if (user == null) {
            throw new NotFoundException("User " + wfResult.getResult());
        }

        for (Notification notification : notificationDAO.findAll()) {
            if (searchDAO.matches(user, notification.getAbout())) {
                Set<String> events = new HashSet<String>(notification.getEvents());
View Full Code Here

    public void createTasks(final WorkflowResult<Long> wfResult)
            throws NotFoundException {

        SyncopeUser user = userDAO.find(wfResult.getResult());
        if (user == null) {
            throw new NotFoundException("User " + wfResult.getResult());
        }

        for (Notification notification : notificationDAO.findAll()) {
            if (searchDAO.matches(user, notification.getAbout())) {
                Set<String> events = new HashSet<String>(notification.getEvents());
View Full Code Here

        LOG.debug("Role update request: {}", resourceTO);

        ExternalResource resource = resourceDAO.find(resourceTO.getName());
        if (resource == null) {
            throw new NotFoundException("Resource '" + resourceTO.getName() + "'");
        }

        resource = binder.update(resource, resourceTO);
        resource = resourceDAO.save(resource);
View Full Code Here

    public ResourceTO delete(@PathVariable("resourceName") final String resourceName)
            throws NotFoundException {

        ExternalResource resource = resourceDAO.find(resourceName);
        if (resource == null) {
            throw new NotFoundException("Resource '" + resourceName + "'");
        }

        ResourceTO resourceToDelete = binder.getResourceTO(resource);

        auditManager.audit(Category.resource, ResourceSubCategory.delete, Result.success,
View Full Code Here

    public ResourceTO read(@PathVariable("resourceName") final String resourceName)
            throws NotFoundException {

        ExternalResource resource = resourceDAO.find(resourceName);
        if (resource == null) {
            throw new NotFoundException("Resource '" + resourceName + "'");
        }

        auditManager.audit(Category.resource, ResourceSubCategory.read, Result.success,
                "Successfully read resource: " + resource.getName());
View Full Code Here

    public List<SchemaMappingTO> getRoleResourcesMapping(@PathVariable("roleId") final Long roleId)
            throws NotFoundException {

        SyncopeRole role = roleDAO.find(roleId);
        if (role == null) {
            throw new NotFoundException("Role '" + roleId + "'");
        }

        List<SchemaMappingTO> roleMappings = new ArrayList<SchemaMappingTO>();

        for (ExternalResource resource : role.getResources()) {
View Full Code Here

            @PathVariable("objectId") final String objectId)
            throws NotFoundException {

        ExternalResource resource = resourceDAO.find(resourceName);
        if (resource == null) {
            throw new NotFoundException("Resource '" + resourceName + "'");
        }

        final ConnectorFacadeProxy connector = connLoader.getConnector(resource);

        final ConnectorObject connectorObject = connector.getObject(ObjectClass.ACCOUNT, new Uid(objectId), connector.
                getOperationOptions(resource));

        if (connectorObject == null) {
            throw new NotFoundException("Object " + objectId + " not found on resource " + resourceName);
        }

        final Set<Attribute> attributes = connectorObject.getAttributes();

        if (AttributeUtil.find(Uid.NAME, attributes) == null) {
View Full Code Here

    @Transactional(readOnly = true)
    public SyncopeUser getUserFromId(final Long userId)
            throws NotFoundException, UnauthorizedRoleException {

        if (userId == null) {
            throw new NotFoundException("Null user id");
        }

        SyncopeUser user = userDAO.find(userId);
        if (user == null) {
            throw new NotFoundException("User " + userId);
        }

        Set<Long> roleIds = user.getRoleIds();
        Set<Long> adminRoleIds = EntitlementUtil.getRoleIds(EntitlementUtil.getOwnedEntitlementNames());
        roleIds.removeAll(adminRoleIds);
View Full Code Here

TOP

Related Classes of javassist.NotFoundException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.