package com.bagri.server.hazelcast.task.query; import java.util.Collection; import org.springframework.beans.factory.annotation.Autowired; import com.bagri.core.server.api.QueryManagement; import com.bagri.core.system.Permission; import com.bagri.server.hazelcast.impl.SchemaRepositoryImpl; import com.hazelcast.spring.context.SpringAware; @SpringAware public class XMLBuilder extends com.bagri.client.hazelcast.task.query.XMLBuilder { private transient QueryManagement queryMgr; @Autowired public void setQueryManager(QueryManagement queryMgr) { this.queryMgr = queryMgr; } @Autowired public void setRepository(SchemaRepositoryImpl repo) { this.repo = repo; } @Override public Collection<String> call() throws Exception { ((SchemaRepositoryImpl) repo).getXQProcessor(clientId); checkPermission(Permission.Value.read); return queryMgr.getContent(exp, template, params); } }