remote.setup(proto, octxt.getAuthenticatedUser(), octxt.isUsingAdminPrivileges(), mTypes, mSearchOrder, 0, mChunkSize, mMode);
remote.setup(proto, octxt.getAuthenticatedUser(), octxt.isUsingAdminPrivileges(), mParams.getTypes(), mParams.getSortBy(), 0, mChunkSize, mParams.getMode());
    public void executeRemoteOps(SoapProtocol proto, OperationContext octxt) throws ServiceException, IOException    {        if (mOp!= null) {            QueryTargetSet targets = mOp.getQueryTargets();            assert(mOp instanceof UnionQueryOperation || targets.countExplicitTargets() <=1);            MailboxIndex mbidx = mMbox.getMailboxIndex();            if (targets.size() > 1) {                UnionQueryOperation union = (UnionQueryOperation)mOp;                mOp = union.runRemoteSearches(proto, mMbox, octxt, mbidx, mTypes, mSearchOrder, 0, mChunkSize, mMode);            } else {                if (targets.hasExternalTargets()) {                    RemoteQueryOperation remote = new RemoteQueryOperation();                    remote.tryAddOredOperation(mOp);                    remote.setup(proto, octxt.getAuthenticatedUser(), octxt.isUsingAdminPrivileges(), mTypes, mSearchOrder, 0, mChunkSize, mMode);                    mOp = remote;                } else {                    // 1 local target...HACK: for now we'll temporarily wrap it in a UnionQueryOperation,                    // then call union.runRemoteSearches() --- that way we don't have to duplicate the                    // important code there (permissions checks).  FIXME!                    UnionQueryOperation union = new UnionQueryOperation();                    union.add(mOp);                    mOp = union.runRemoteSearches(proto, mMbox, octxt, mbidx, mTypes, mSearchOrder, 0, mChunkSize, mMode);                    mOp = mOp.optimize(mMbox);                }            }        }    }