Package org.apache.isis.core.commons.exceptions

Examples of org.apache.isis.core.commons.exceptions.IsisException


    }

    private String getProperty(final String name, final String defaultValue) {
        final String key = referedToAs(name);
        if (key.indexOf("..") >= 0) {
            throw new IsisException("property names should not have '..' within them: " + name);
        }
        String property = properties.getProperty(key, defaultValue);
        property = property != null ? property.trim() : null;
        LOG.debug("get property: '" + key + "' =  '" + property + "'");
        return property;
View Full Code Here


            final Class<?> cls = loadBuiltIn(className);
            return internalLoadSpecification(cls);
        } catch (final ClassNotFoundException e) {
            final ObjectSpecification spec = getCache().get(className);
            if (spec == null) {
                throw new IsisException("No such class available: " + className);
            }
            return spec;
        }
    }
View Full Code Here

            if (spec != null) {
                return spec;
            }
            final ObjectSpecification specification = createSpecification(type);
            if (specification == null) {
                throw new IsisException("Failed to create specification for class " + typeName);
            }

            // put into the cache prior to introspecting, to prevent
            // infinite loops
            specificationCache.cache(typeName, specification);
View Full Code Here

    }

    private void findResources() {
        whiteListInputResource = resourceStreamSource.readResource(whiteListResourceName);
        if (whiteListInputResource == null) {
            throw new IsisException("Cannot read whitelist authorization file: " + whiteListResourceName);
        }

        if (blackListResourceName.length() > 0) {
            this.blackListInputResource = resourceStreamSource.readResource(blackListResourceName);
            if (blackListInputResource == null) {
                throw new IsisException("Blacklist authorization file exists, but it cannot be read: "
                    + blackListResourceName);
            }
        } else {
            blackListInputResource = null;
        }
View Full Code Here

            for (String line; (line = buffReader.readLine()) != null;) {
                tokenizeLine(map, line);
            }
            buffReader.close();
        } catch (final Exception e) {
            throw new IsisException(e);
        }
    }
View Full Code Here

            }
            buffWriter.flush();
            buffWriter.close();

        } catch (final IOException e) {
            throw new IsisException(e);
        }
    }
View Full Code Here

        }
       
        try {
            return getObjectInstantiator().instantiate(getCorrespondingClass());
        } catch (final ObjectInstantiationException e) {
            throw new IsisException("Failed to create instance of type " + getFullIdentifier(), e);
        }
    }
View Full Code Here

    }

    @Override
    public void dragTo(final InternalDrag drag) {
        if (drag.getOverlay() == null) {
            throw new IsisException("No overlay for drag: " + drag);
        }
        int newWidth = drag.getOverlay().getSize().getWidth();
        newWidth = Math.max(70, newWidth);
        getViewManager().getSpy().addAction("Resize column to " + newWidth);
View Full Code Here

        if (!to.exists()) {
            to.mkdirs();
        }
        if (to.isFile()) {
            throw new IsisException("To directory is actually a file " + to.getAbsolutePath());
        }

        final String list[] = from.list();
        for (final String element : list) {
            copyFile(new File(from, element), new File(to, element));
View Full Code Here

            int len = 0;
            while ((len = bis.read(buffer)) > 0) {
                bos.write(buffer, 0, len);
            }
        } catch (final IOException e) {
            throw new IsisException("Error copying file " + from.getAbsolutePath() + " to " + to.getAbsolutePath(), e);
        } finally {
            if (bis != null) {
                try {
                    bis.close();
                } catch (final IOException ignore) {
View Full Code Here

TOP

Related Classes of org.apache.isis.core.commons.exceptions.IsisException

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.