Package org.modeshape.common.i18n

Examples of org.modeshape.common.i18n.I18n.text()


        property = propsByName.remove("messageString");
        assertThat(property.getName(), is("messageString"));
        assertThat(property.getLabel(), is("Message String"));
        assertThat(property.getType().equals(String.class), is(true));
        assertThat(property.isReadOnly(), is(true));
        assertValue(reflection, problem, property, msg.text(params));

        property = propsByName.remove("parameters");
        assertThat(property.getName(), is("parameters"));
        assertThat(property.getLabel(), is("Parameters"));
        assertThat(property.getType().equals(Object[].class), is(true));
View Full Code Here


        // Check that the alias map contains exactly the same namespaces as the aliases ...
        Map<String, String> copyOfNamespaceUrisByAlias = new HashMap<String, String>(namespaceUrisByAlias);
        for (String aliasedNamespaceUri : this.aliaseNamespaceUriByPrefix.values()) {
            if (copyOfNamespaceUrisByAlias.remove(aliasedNamespaceUri) == null) {
                I18n msg = GraphI18n.namespaceAliasWasNotMappedToRealNamespace;
                throw new IllegalArgumentException(msg.text(aliasedNamespaceUri));
            }
        }
        if (!copyOfNamespaceUrisByAlias.isEmpty()) {
            I18n msg = GraphI18n.aliasesMappedToRealNamespacesButWereNotRegisteredInAliasNamespace;
            throw new IllegalArgumentException(msg.text(copyOfNamespaceUrisByAlias));
View Full Code Here

                throw new IllegalArgumentException(msg.text(aliasedNamespaceUri));
            }
        }
        if (!copyOfNamespaceUrisByAlias.isEmpty()) {
            I18n msg = GraphI18n.aliasesMappedToRealNamespacesButWereNotRegisteredInAliasNamespace;
            throw new IllegalArgumentException(msg.text(copyOfNamespaceUrisByAlias));
        }
    }

    @Override
    public String getDefaultNamespaceUri() {
View Full Code Here

                JcrPropertyDefinition propDefn = property.propertyDefinition();

                switch (propDefn.getOnParentVersion()) {
                    case OnParentVersionAction.ABORT:
                        I18n msg = JcrI18n.cannotCheckinNodeWithAbortProperty;
                        throw new VersionException(msg.text(property.getName(), node.getName()));
                    case OnParentVersionAction.COPY:
                    case OnParentVersionAction.VERSION:
                        props.add(prop);
                        break;
                    case OnParentVersionAction.INITIALIZE:
View Full Code Here

    @Override
    public void initialize( ServletContext context ) {
        repositoryName = context.getInitParameter(INIT_REPOSITORY_NAME);
        if (repositoryName == null) {
            I18n msg = WebdavI18n.requiredParameterMissing;
            throw new IllegalStateException(msg.text(INIT_REPOSITORY_NAME));
        }

        workspaceName = context.getInitParameter(INIT_WORKSPACE_NAME);
        if (workspaceName == null) {
            I18n msg = WebdavI18n.requiredParameterMissing;
View Full Code Here

        }

        workspaceName = context.getInitParameter(INIT_WORKSPACE_NAME);
        if (workspaceName == null) {
            I18n msg = WebdavI18n.requiredParameterMissing;
            throw new IllegalStateException(msg.text(INIT_WORKSPACE_NAME));
        }
    }

    @Override
    public ResolvedRequest resolve( HttpServletRequest request,
View Full Code Here

                    // Really trying to create a node under the root ...
                    resolvedParent = resolvedParent.withPath("/");
                } else {
                    // Can't create a workspace ...
                    I18n msg = WebdavI18n.cannotCreateWorkspaceInRepository;
                    throw new WebdavException(msg.text(resourceName, resolvedParent.getRepositoryName()));
                }
            }
            Node parentNode = nodeFor(transaction, resolvedParent);
            contentMapper.createFolder(parentNode, resourceName);
View Full Code Here

                    // Really trying to create a node under the root ...
                    resolvedParent = resolvedParent.withPath("/");
                } else {
                    // Can't create a workspace ...
                    I18n msg = WebdavI18n.cannotCreateWorkspaceInRepository;
                    throw new WebdavException(msg.text(resourceName, resolvedParent.getRepositoryName()));
                }
            }
            Node parentNode = nodeFor(transaction, resolvedParent);
            contentMapper.createFile(parentNode, resourceName);
View Full Code Here

        CheckArg.isNotNull(left, "left");
        CheckArg.isNotNull(right, "right");
        CheckArg.isNotNull(operation, "operation");
        if (!unionableColumns(left.columns(), right.columns())) {
            I18n msg = GraphI18n.leftAndRightQueriesInSetQueryMustHaveUnionableColumns;
            throw new IllegalArgumentException(msg.text(left.columns(), right.columns()));
        }
        this.left = left;
        this.right = right;
        this.operation = operation;
        this.all = all;
View Full Code Here

        CheckArg.isNotNull(left, "left");
        CheckArg.isNotNull(right, "right");
        CheckArg.isNotNull(operation, "operation");
        if (!unionableColumns(left.columns(), right.columns())) {
            I18n msg = GraphI18n.leftAndRightQueriesInSetQueryMustHaveUnionableColumns;
            throw new IllegalArgumentException(msg.text(left.columns(), right.columns()));
        }
        this.left = left;
        this.right = right;
        this.operation = operation;
        this.all = all;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.