Examples of ForbiddenException


Examples of org.apache.isis.viewer.scimpi.dispatcher.ForbiddenException

        request.setBlockContent(parameterBlock);
        request.processUtilCloseTag();
        final ObjectAdapter[] parameters = parameterBlock.getParameters(request);

        if (!MethodsUtils.isVisibleAndUsable(object, action)) {
            throw new ForbiddenException(action, ForbiddenException.VISIBLE_AND_USABLE);
        }

        // swap null parameter of the object's type to run a contributed method
        if (action.isContributed()) {
            final List<ObjectActionParameter> parameterSpecs = action.getParameters();
View Full Code Here

Examples of org.apache.isis.viewer.scimpi.dispatcher.ForbiddenException

            final ObjectAssociation field = adapter.getSpecification().getAssociation(fieldName);
            if (field == null) {
                throw new ScimpiException("No field " + fieldName + " in " + adapter.getSpecification().getFullIdentifier());
            }
            if (field.isVisible(IsisContext.getAuthenticationSession(), adapter).isVetoed()) {
                throw new ForbiddenException(field, ForbiddenException.VISIBLE);
            }
            IsisContext.getPersistenceSession().resolveField(adapter, field);
            adapter = field.get(adapter);
            if (adapter != null) {
                objectId = context.mapObject(adapter, Scope.INTERACTION);
View Full Code Here

Examples of org.apache.slide.macro.ForbiddenException

        try {
            UriHandler rUh = UriHandler.getUriHandler( resourcePath );
            if( VERSIONCONTROL_EXCLUDEPATH != null && VERSIONCONTROL_EXCLUDEPATH.length() > 0 ) {
                UriHandler exUh = UriHandler.getUriHandler( VERSIONCONTROL_EXCLUDEPATH );
                if( exUh.isAncestorOf(rUh) )
                    throw new ForbiddenException(
                        resourcePath,
                        new Exception("The resource path has been excluded from version-control") );
            }
           
            VersioningHelper vh = VersioningHelper.getVersioningHelper(
View Full Code Here

Examples of org.apache.slide.macro.ForbiddenException

        }
       
        try {
            UriHandler rUh = UriHandler.getUriHandler( resourcePath );
            if (isExcludedForVersionControl(resourcePath)) {
                throw new ForbiddenException(
                    resourcePath,
                    new Exception("The resource path has been excluded from version-control") );
            }
            if ( WebdavEvent.VERSION_CONTROL.isEnabled() ) EventDispatcher.getInstance().fireVetoableEvent(WebdavEvent.VERSION_CONTROL, new WebdavEvent(this));
View Full Code Here

Examples of org.apache.slide.macro.ForbiddenException

        try {
            UriHandler rUh = UriHandler.getUriHandler( resourcePath );
            if( VERSIONCONTROL_EXCLUDEPATH != null && VERSIONCONTROL_EXCLUDEPATH.length() > 0 ) {
                UriHandler exUh = UriHandler.getUriHandler( VERSIONCONTROL_EXCLUDEPATH );
                if( exUh.isAncestorOf(rUh) )
                    throw new ForbiddenException(
                        resourcePath,
                        new Exception("The resource path has been excluded from version-control") );
            }
           
            VersioningHelper vh = VersioningHelper.getVersioningHelper(
View Full Code Here

Examples of org.candlepin.common.exceptions.ForbiddenException

        ghost.setId("ghost-pool");
        key1.addPool(ghost, 10L);

        Consumer consumer = new Consumer("sys.example.com", null, null, system);
        when(entitler.bindByPool(eq(ghost.getId()), eq(consumer), eq(10)))
            .thenThrow(new ForbiddenException("fail"));
        consumerBindUtil.handleActivationKeys(consumer, keys);
    }
View Full Code Here

Examples of org.jivesoftware.openfire.muc.ForbiddenException

                role = MUCRole.Role.participant;
                affiliation = MUCRole.Affiliation.member;
            }
            else if (outcasts.contains(user.getAddress().toBareJID())) {
                // The user is an outcast. Raise a "Forbidden" exception.
                throw new ForbiddenException();
            }
            else {
                // The user has no affiliation (i.e. NONE). Set the role accordingly.
                if (isMembersOnly()) {
                    // The room is members-only and the user is not a member. Raise a
View Full Code Here

Examples of org.jivesoftware.openfire.muc.ForbiddenException

    }

    public void sendPublicMessage(Message message, MUCRole senderRole) throws ForbiddenException {
        // Check that if the room is moderated then the sender of the message has to have voice
        if (isModerated() && senderRole.getRole().compareTo(MUCRole.Role.participant) > 0) {
            throw new ForbiddenException();
        }
        // Send the message to all occupants
        message.setFrom(senderRole.getRoleAddress());
        send(message);
        // Fire event that message was receibed by the room
View Full Code Here

Examples of org.jivesoftware.openfire.muc.ForbiddenException

    public List<Presence> addOwner(JID jid, MUCRole sendRole) throws ForbiddenException {
        lock.writeLock().lock();
        try {
            MUCRole.Affiliation oldAffiliation = MUCRole.Affiliation.none;
            if (MUCRole.Affiliation.owner != sendRole.getAffiliation()) {
                throw new ForbiddenException();
            }
            // Check if user is already an owner
            if (owners.contains(jid.toBareJID())) {
                // Do nothing
                return Collections.emptyList();
View Full Code Here

Examples of org.jivesoftware.openfire.muc.ForbiddenException

            ConflictException {
        lock.writeLock().lock();
        try {
            MUCRole.Affiliation oldAffiliation = MUCRole.Affiliation.none;
            if (MUCRole.Affiliation.owner != sendRole.getAffiliation()) {
                throw new ForbiddenException();
            }
            // Check that the room always has an owner
            if (owners.contains(jid.toBareJID()) && owners.size() == 1) {
                throw new ConflictException();
            }
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.