All Downloads are FREE. Search and download functionalities are using the official Maven repository.

prerna.auth.utils.reactors.admin.AdminReloadSocialPropertiesReactor Maven / Gradle / Ivy

The newest version!
package prerna.auth.utils.reactors.admin;

import prerna.auth.User;
import prerna.auth.utils.SecurityAdminUtils;
import prerna.reactor.AbstractReactor;
import prerna.sablecc2.om.PixelDataType;
import prerna.sablecc2.om.nounmeta.NounMetadata;
import prerna.util.SocialPropertiesUtil;

public class AdminReloadSocialPropertiesReactor extends AbstractReactor {

	@Override
	public NounMetadata execute() {
		User user = this.insight.getUser();
		SecurityAdminUtils adminUtils = SecurityAdminUtils.getInstance(user);
		if(adminUtils == null) {
			throw new IllegalArgumentException("User must be an admin to perform this function");
		}
		
		SocialPropertiesUtil.getInstance().reloadProps();
		return new NounMetadata(true, PixelDataType.BOOLEAN);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy