/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.gateway.common.service.PublishedService
 *  com.l7tech.policy.variable.BuiltinVariables
 */
package com.l7tech.server.policy.variable;

import com.l7tech.gateway.common.service.PublishedService;
import com.l7tech.policy.variable.BuiltinVariables;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.server.policy.variable.bg;
import java.util.Set;

class cy
extends bg {
    cy() {
    }

    @Override
    public Object get(String string, PolicyEnforcementContext policyEnforcementContext) {
        PublishedService publishedService = policyEnforcementContext.getService();
        if (publishedService == null) {
            return null;
        }
        String string2 = BuiltinVariables.PREFIX_SERVICE + "." + BuiltinVariables.SERVICE_SUFFIX_PROPERTIES;
        String string3 = string.substring(string2.length());
        if (string3.length() == 0) {
            Set set = publishedService.getPropertyNames();
            return set.toArray(new String[set.size()]);
        }
        String string4 = string3.substring(1);
        return publishedService.getProperty(string4);
    }
}

