package org.kaaproject.kaa.server.verifiers.facebook.config;


import org.apache.avro.Schema;
import org.kaaproject.kaa.server.common.utils.CRC32Util;
import org.kaaproject.kaa.server.common.verifier.KaaUserVerifierConfig;
import org.kaaproject.kaa.server.common.verifier.UserVerifierConfig;
import org.kaaproject.kaa.server.verifiers.facebook.config.gen.FacebookAvroConfig;

@KaaUserVerifierConfig
public class FacebookVerifierConfig implements UserVerifierConfig {

    private static final String ORG_KAAPROJECT_KAA_SERVER_VERIFIERS_TRUSTFUL = "org.kaaproject.kaa.server.verifiers.facebook";

    @Override
    public int getId() {
        return CRC32Util.crc32(getName());
    }

    @Override
    public String getName() {
        return ORG_KAAPROJECT_KAA_SERVER_VERIFIERS_TRUSTFUL;
    }

    @Override
    public String getUserVerifierClass() {
        return "org.kaaproject.kaa.server.verifiers.trustful.TrustfulUserVerifier";
    }

    @Override
    public Schema getConfigSchema() {
        return FacebookAvroConfig.SCHEMA$;
    }
}

@@ -131,23 +131,30 @@
 mon.
-utils.CRC32Util
+plugin.KaaPluginConfig
 ;%0Aim
@@ -195,32 +195,21 @@
 mon.
-verifier.KaaUserVerifier
+plugin.Plugin
 Conf
@@ -256,35 +256,25 @@
 mon.
-verifier.UserVerifierConfig
+plugin.PluginType
 ;%0Aim
@@ -359,34 +359,67 @@
 g;%0A%0A@Kaa
-UserVerifierConfig
+PluginConfig(pluginType = PluginType.USER_VERIFIER)
 %0Apublic 
@@ -458,28 +458,22 @@
 lements 
-UserVerifier
+Plugin
 Config %7B
@@ -510,191 +510,53 @@
 ing 
-ORG_KAAPROJECT_KAA_SERVER_VERIFIERS_TRUSTFUL = %22org.kaaproject.kaa.server.verifiers.facebook%22;%0A%0A    @Override%0A    public int getId() %7B%0A        return CRC32Util.crc32(getName());%0A    %7D
+TRUSTFUL_VERIFIER_NAME = %22Facebook verifier%22;
 %0A%0A  
@@ -588,16 +588,26 @@
 ring get
+PluginType
 Name() %7B
@@ -626,52 +626,30 @@
 urn 
-ORG_KAAPROJECT_KAA_SERVER_VERIFIERS_TRUSTFUL
+TRUSTFUL_VERIFIER_NAME
 ;%0A  
@@ -692,25 +692,23 @@
  get
-UserVerifier
+Plugin
 Class
+Name
 () %7B
@@ -764,25 +764,25 @@
 ers.
-trustful.Trustful
+facebook.Facebook
 User
@@ -834,16 +834,22 @@
 hema get
+Plugin
 ConfigSc

update FacebookVerifierConfig in accordance with PluginConfig interface