ColorProfileServicePOA.java 3.49 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.colorprofile;

import com.adobe.colorprofile.*;
import org.omg.CORBA.BAD_OPERATION;
import org.omg.CORBA.ORB;
import org.omg.CORBA.SystemException;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.InvokeHandler;
import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.ResponseHandler;
import org.omg.PortableServer.POA;
import org.omg.PortableServer.Servant;

import java.util.Hashtable;

public abstract class ColorProfileServicePOA
extends Servant
implements InvokeHandler,
ColorProfileServiceOperations {
    private static final Hashtable m_opsHash = new Hashtable();
    private String[] ids = new String[]{"IDL:com/adobe/colorprofile/ColorProfileService:1.0"};

    public ColorProfileService _this() {
        return ColorProfileServiceHelper.narrow(this._this_object());
    }

    public ColorProfileService _this(ORB orb) {
        return ColorProfileServiceHelper.narrow(this._this_object(orb));
    }

    public OutputStream _invoke(String method, InputStream _input, ResponseHandler handler) throws SystemException {
        OutputStream _out = null;
        Integer opsIndex = (Integer)m_opsHash.get(method);
        if (null == opsIndex) {
            throw new BAD_OPERATION(method + " not found");
        }
        switch (opsIndex) {
            case 0: {
                try {
                    String[] _arg0 = ProfileFileNamesHelper.read(_input);
                    String _arg1 = _input.read_wstring();
                    _out = handler.createReply();
                    AvailableColorProfilesHelper.write(_out, this.getColorProfiles(_arg0, _arg1));
                }
                catch (ColorProfileFailureException _ex0) {
                    _out = handler.createExceptionReply();
                    ColorProfileFailureExceptionHelper.write(_out, _ex0);
                }
                break;
            }
            case 1: {
                String _arg0 = _input.read_wstring();
                String _arg1 = _input.read_wstring();
                String _arg2 = _input.read_wstring();
                _out = handler.createReply();
                _out.write_boolean(this.validateUserCredentials(_arg0, _arg1, _arg2));
                break;
            }
            case 2: {
                try {
                    _out = handler.createReply();
                    AvailableSettingsFilesHelper.write(_out, this.getCSFAndEmbeddedProfiles());
                }
                catch (ColorProfileFailureException _ex0) {
                    _out = handler.createExceptionReply();
                    ColorProfileFailureExceptionHelper.write(_out, _ex0);
                }
                break;
            }
            case 3: {
                String _arg0 = _input.read_wstring();
                String _arg1 = _input.read_wstring();
                String _arg2 = _input.read_wstring();
                String _arg3 = _input.read_wstring();
                _out = handler.createReply();
                _out.write_wstring(this.getRegistryKeyValue(_arg0, _arg1, _arg2, _arg3));
                break;
            }
        }
        return _out;
    }

    public String[] _all_interfaces(POA poa, byte[] obj_id) {
        return this.ids;
    }

    static {
        m_opsHash.put("getColorProfiles", new Integer(0));
        m_opsHash.put("validateUserCredentials", new Integer(1));
        m_opsHash.put("getCSFAndEmbeddedProfiles", new Integer(2));
        m_opsHash.put("getRegistryKeyValue", new Integer(3));
    }
}