Introduction

This user manual is to help you maintain, update and use the relevant application easily and quickly. You’ll find detailed screenshots, explanations and instructions on how to manage your application.

After you’ve tried it a couple of times, you’ll find it’s easy to use and you may not need this guide any longer, but it is here as a reference.

Version 1.0.0.Draft

aripd.com

Features

  • Customer Management
    • Reports
  • User and Role Management
    • User Management
    • Role Management
  • Multi-Language
    • English US (Default)
    • Türkçe TR
  • Backoffice
    • EDI module
    • ETL module
    • MCKS Integration
    • MCKS Server Trace module
  • Reporting
    • Advanced Reports
    • Advanced Logging

Installation

Prerequisites

  • Debian is a free operating system (OS) for your computer. Download Debian

Debian

  • Java Platform is to develop and deploy Java applications on desktops and servers. Download Java SDK

Java

GlassFish

MySQL

  • MySQL Connector/J is the official JDBC driver for MySQL. Download MySQL Connector/J
  • KNSOFT - You can obtain the latest version of the software from here.

Install

  • Update and upgrade Debian
# update the list of available packages and their versions, it does not install or upgrade any packages.
$ apt-get update
# install newer versions of the installed packages
$ apt-get upgrade
  • Install Java
# install jdk
$ apt-get install default-jdk
# check java version
$ java -version
  • Install Glassfish
# Install unzip tools
$ apt-get install unzip
# Download Glassfish
$ curl http://download.oracle.com/glassfish/5.0/release/glassfish-5.0.zip -O
# Unzip Glassfish
$ unzip glassfish-5.0.zip -d /opt
  • Install MySQL
# Install MySQL
$ apt-get install mysql-server
# Improve MySQL installation security
$ mysql_secure_installation
  • Install MySQL Connector/J
# Download MySQL Connector/J and copy it to Glassfish external libraries directory
$ curl http://central.maven.org/maven2/mysql/mysql-connector-java/5.1.45/mysql-connector-java-5.1.45.jar -O glassfish/lib/ext/mysql-connector-java-5.1.45.jar
  • Install KNSOFT
# Download KNSOFT and deploy
$ curl http://knsoft.aripd.com/knsoft.war -O glassfish/domains/domain1/autodeploy/knsoft.war

Setup

CREATE DATABASE knsoft CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER knsoft@localhost IDENTIFIED BY 'P@ssword1';
GRANT ALL PRIVILEGES ON knsoft.* TO knsoft@localhost;
FLUSH PRIVILEGES;
  • Create MySQL tables
$ mysql -u knsoft -p knsoft < /path/to/knsoft.sql
  • Define resources to Glassfish using asadmin tool
    • Create a JDBC resource with the specified JNDI name

      $ asadmin> help create-jdbc-resource for help

        $ asadmin> create-jdbc-resource --connectionpoolid knsoft_pool --enabled=true jdbc/knsoft
        Command create-jdbc-resource executed successfully.
      
    • Register a JDBC connection pool

      $ asadmin> help create-jdbc-connection-pool for help

        $ asadmin> create-jdbc-connection-pool
        --datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlXADataSource --restype javax.sql.XADataSource
        --property portNumber=3306:password=P@ssword1:user=knsoft:serverName=localhost:databaseName=knsoft:connectionAttributes=\;create\\=true knsoft_pool
        Command create-jdbc-connection-pool executed successfully.
      
  • Add the named authentication realm to Glassfish using asadmin tool

$ asadmin> help create-auth-realm for help

$ asadmin> create-auth-realm --classname com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm --property jaas-context="jdbcRealm":datasource-jndi="jdbc/knsoft":user-table="USERENTITY":user-name-column="EMAIL":password-column="PASSWORD":group-table="USERENTITY":group-name-column="USERGROUP":digest-algorithm="none":digestrealm-password-enc-algorithm="none" "jdbcknsoft"

Support

Supporting Languages

Currently we support two languages. Default one is English US. For further languages support please contact with us.

  • English US (default)
  • Türkçe TR

Technologies

Below are core technologies that we use for this project.

  • Operating System: Debian/CentOS
  • Development Platform: Java Enterprise Edition
  • User Interface Framework: Java Server Faces
  • Deployment Server: Oracle Glassfish
  • Database Compatibility: MySQL
  • Reporting Engine: JasperReports

Reports

TBD

Creating a project

Creating a Project is simply to upload IMEI list to the system. It will create tasks for each IMEI under relevant project.

The following shows the content of the XLSX file.

IMEI
String(15)
123456789012345
123456789012346
123456789012347
etc

The system will create the project and tasks automatically after uploading XLSX file if there is no any structural error in the file. If any error, the system will throw an excel file contains error description in relevant cells. The system verifies the followings for now.

  • IMEI Luhn Algorithm check

MCKS

MCKS Hakkında

MCKS - Mobil Cihaz Kayıt Sistemi

CEIR - Central Equipment Identity Register

According to the rules related to 5392 numbered law, the necessary regulations were done about not giving electronic communication service for lost, fugitive, stolen equipments, and in Authority’s CEIR the equipments that IMEI number changed.

This regulation will prevent usage of non-registered mobile phones and by the way tax loss, also prevent many mobile phone users to be submitted hijacking and the automation of processes about importation will be established. By the way, separation of legal and illegal equipments that enter our country can be done.

Also has brought engagement to operators about not giving electronic communication service to lost, fugitive, stolen equipments and the equipments IMEI has changed in Telecommunication Authority’s database that will be established. For these equipments not connecting to electronic communication service, necessary regulations has done by Authority and operators and by completing CEIR-EIR connections application process has started.

After starting the application process, for handling problems and completing the deficiency of the system, Authority and GSM operators gathered, held meetings, and long ways has stepped about taking necessary precautions.

Beside there are similar systems in the world, first and uniquely, the established system has property of blocking the non-registered and fugitive mobile phones. By the way, it is aimed at preventing not only stolen phones market and also the fugitive mobile phones causing tax loss and causing unfair competition in the sector.

For system’s working fast and efficient, parallel working many systems gathered, high operated big system occurred. With this system, created for special aims, millions of data can be evaluated truely and fast.

Kayıt ve Eşleştirme İşlemleri

Toplu İthalat

TAC Kodlarının Bildirimi

Sistemimizde kayıtlı olmayan TAC kodlarının bildirimi üretici firmadan ya da üretici firmanın TAC kodu bildirimi için yetkilendirdiği distribütörden alınacak olan ıslak imzalı belge ile yapılacaktır.

Söz konusu belge (bildirilen cihazın TAC kodu, marka ve model bilgilerinin de belirtildiği) bir dilekçe ekinde Kurumumuza sunulmalıdır.

24.03.2008 Tarihi itibari ile yapılan TAC başvurularının sisteme kayıt yapılabilmesi için cihazların tek ya da çift sim kartlı olduğu bilgisinin kurumumuza sunulması gerekmektedir. İthalatı yapılan cihazın çift sim kartlı olduğu orjinal kullanım kılavuzu veya ıslak imza ve mühürlü üretici belgesi ile belgelendirilmelidir. Aksi takdirde sisteme tanımlanması mümkün olmayacaktır .

Web Servis ve Web Sitesi Kullanımı

Toplu ithalat ve imalat sonucu kayıt altına alınması istenen cihazlara ait IMEI numaralarının bildirimi web sitemiz üzerinden yapılmaktadır. Web sitesine girişler nitelikli elektronik imza ile yapılabilmektedir.

Firmaların sisteme kayıt işlemleri web sitesi üzerinden yapılmakta olup sistem tarafından oluşturulan dilekçe noter onaylı imza sirküleri ile birlikte 30 gün içinde Kuruma sunulmalıdır.

Sistem üzerinden yapılmayan yeni firma başvuruları kabul edilmeyecektir.

Web Sitesi Erişim Adresi

https://ithalat-ws.mcks.gov.tr

Web Sitesi Erişim Kılavuzu

Web sitesine erişirken sorun yaşanması durumunda takip edilmesi gereken adımlar için kılavuza buradan erişebilirsiniz.

Elektronik Kimlik Bilgisini Haiz Cihazların Kayıt Altına Alınması

18.10.2006 tarih ve 2006/İK-13650 sayılı Kurul Kararıyla kayıt işlemi sadece elektronik kimlik bilgisine haiz cihazlar için uygulanacak olup; diğer ürünler için kayıt işlemi yapılmayacaktır.

IMEI Kayıt Ücreti

Halk Bankası Anıt Şubesi IBAN: TR28 0001 2009 4110 0005 0000 32 (Hesap No: 0411-05000032) hesabına yatırılması gerekmektedir. Banka dekontu üzerinde “IMEI Kayıt Ücreti” açıklayıcı ibaresinin bulunması ve talep edilen IMEI miktarı (….adet IMEI Kayıt Ücreti) şeklinde belirtilmesi gerekmektedir. Ödemeler sadece Halkbank şubeleri üzerinden yapılabilmektedir. EFT ve internet bankacılığı ile ödeme kabul edilmemektedir.

Logging

This tutorial will help you know how to do logging with SLF4J and Logback.

SLF4J

SLF4J, the Simple Logging Facade for Java, serves as a simple facade or abstraction for many logging frameworks above. The layer we apply logging is independent from logging implementation.

Logback

Logback, designed by Log4j‘s founder, is intended as a successor to the popular Log4j project. It builds upon a decade of experience gained in designing industrial-strength logging systems. So, Logback is faster and has a smaller footprint than all existing logging systems.

Add Dependencies

<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.7.25</version>
</dependency>
<dependency>
    <groupId>ch.qos.logback</groupId>
    <artifactId>logback-classic</artifactId>
    <version>1.2.3</version>
</dependency>

Create XML Configuration for Logback

Using SLF4J is easy, we get a logger, and log messages at some logging levels (TRACE, DEBUG, INFO, WARN, ERROR). Because we set level=”DEBUG”, so the logger only appends these logging levels: DEBUG, INFO, WARN, ERROR.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    
    <appender name="consoleAppender" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <Pattern>%d{HH:mm:ss.SSS} >> %-3relative [%thread] %-5level	%logger{25} - %msg %n</Pattern>
        </encoder>
    </appender>
 
    <appender name="rollingFileAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <File>/Users/dev/work/backup/tmpLog/logback.log</File>
 
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <FileNamePattern>/Users/dev/work/backup/tmpLog/logback-%d{yyyy-MM-dd---HH-mm}.log</FileNamePattern>
            <maxHistory>10</maxHistory>
        </rollingPolicy>
 
        <encoder>
            <Pattern>%d{HH:mm:ss} [%thread] %-5level %logger - %msg %n</Pattern>
        </encoder>
    </appender>
 
    <logger name="com.aripd.knsoft.logback" level="DEBUG" additivity="false">
        <appender-ref ref="consoleAppender" />
        <appender-ref ref="rollingFileAppender" />
    </logger>
 
</configuration>

Result

There are rolling log files in /Users/dev/work/backup/tmpLog/ directory.

logback-slf4j-folder

Open /Users/dev/work/backup/tmpLog/logback.log file you will see lines like below.

We use the Common Log Format (CLF), also known as the NCSA Common log format, that is a standardized text file format used by web servers when generating server log files. Because the format is standardized, the files can be readily analyzed by a variety of web analysis programs, for example Webalizer and Analog.

Each line in a file stored in the Common Log Format has the following syntax:

216.67.1.91 - leon [01/Jul/2002:12:11:52 +0000] "GET /index.html HTTP/1.1" 200 431

19:41:18 [main] INFO  com.aripd.knsoft.view.LoginBean - <info> Logged in
19:41:18 [main] ERROR com.aripd.knsoft.view.LoginBean - <error> Error occured 

The following are the fields in Common log format:

host rfc931 username date:time request statuscode bytes

Issues

Issues Tracker

We use GitHub as our issue tracker, at:

https://github.com/aripd/knsoft/issues

Reporting Bugs

Bug reports are incredibly helpful, so take time to report bugs and request features in our ticket tracker. We’re always grateful for patches to the system code. Indeed, bug reports with attached patches will get fixed far quickly than those without any.

Please include as much relevant information as possible including the exact version you’re using and a code snippet that reproduces the problem.

Don’t have too many expectations. Unless the bug is really a serious ‘everything is broken’ thing, you’re creating a ticket to start a discussion. Having a patch (or a branch on Github we can pull from) is better, but then again we’ll only pull high-quality branches that make sense to be in the core of the system.

Decleration

Creating a declaration

Creating a Declaration is simply to upload EDI file to the server.

EDI files are simple csv (Comma Separated Values) files that contain the necessary information to create a declaration. Currently the following EDI files are supported.

  • csvscm095
  • csvscmxxx

The system will create the declaration automatically after uploading EDI file if there is no any structural error in the file. If any error, the system will throw an excel file contains error description in relevant cells. The system verifies the followings for now.

  • Serial number existence check
  • IMEI number existence check
  • IMEI Luhn Algorithm check
  • Null value check
  • String type check

csvscm095

This format is special to a customer.

csvscmxxx

This format is a generic format for customers.

Carrier Shipment Invoice no Invoice line no Part no Serial no IMEI Customs Clearance Ref
String String String String String String String(15) String