// Path: app/src/main/java/it/skarafaz/mercury/adapter/CommandListAdapter.java
// public class CommandListAdapter extends ArrayAdapter<Command> {
// 
//     public CommandListAdapter(Context context, List<Command> commands) {
//         super(context, R.layout.command_list_item, commands);
//     }
// 
//     @Override
//     public View getView(int position, View view, ViewGroup parent) {
//         ViewHolder holder;
//         if (view == null) {
//             LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
//             view = inflater.inflate(R.layout.command_list_item, parent, false);
//             holder = new ViewHolder(view);
//             view.setTag(holder);
//         } else {
//             holder = (ViewHolder) view.getTag();
//         }
// 
//         final Command command = getItem(position);
//         holder.name.setText(command.getName());
//         holder.info.setOnClickListener(new View.OnClickListener() {
//             @Override
//             public void onClick(View v) {
//                 new MaterialDialog.Builder(getContext())
//                         .title(command.getName())
//                         .content(command.getCmd())
//                         .show();
//             }
//         });
//         holder.row.setOnClickListener(new View.OnClickListener() {
//             @Override
//             public void onClick(View v) {
//                 new SshCommandRegular(command).start();
//             }
//         });
//         return view;
//     }
// 
//     static class ViewHolder {
//         @BindView(R.id.row)
//         RelativeLayout row;
//         @BindView(R.id.name)
//         TextView name;
//         @BindView(R.id.info)
//         ImageView info;
// 
//         public ViewHolder(View view) {
//             ButterKnife.bind(this, view);
//         }
//     }
// }
// 
// Path: app/src/main/java/it/skarafaz/mercury/model/config/Server.java
// @SuppressWarnings("unused")
// public class Server implements Serializable, Comparable<Server> {
//     private static final long serialVersionUID = 7247694914871605048L;
//     private String name;
//     private String host;
//     private Integer port;
//     private String user;
//     private String password;
//     private Boolean sudoNoPasswd;
//     private String sudoPath;
//     private String nohupPath;
//     private List<Command> commands;
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public String getHost() {
//         return host;
//     }
// 
//     public void setHost(String host) {
//         this.host = host;
//     }
// 
//     public Integer getPort() {
//         return port;
//     }
// 
//     public void setPort(Integer port) {
//         this.port = port;
//     }
// 
//     public String getUser() {
//         return user;
//     }
// 
//     public void setUser(String user) {
//         this.user = user;
//     }
// 
//     public String getPassword() {
//         return password;
//     }
// 
//     public void setPassword(String password) {
//         this.password = password;
//     }
// 
//     public Boolean getSudoNoPasswd() {
//         return sudoNoPasswd;
//     }
// 
//     public void setSudoNoPasswd(Boolean sudoNoPasswd) {
//         this.sudoNoPasswd = sudoNoPasswd;
//     }
// 
//     public String getSudoPath() {
//         return sudoPath;
//     }
// 
//     public void setSudoPath(String sudoPath) {
//         this.sudoPath = sudoPath;
//     }
// 
//     public String getNohupPath() {
//         return nohupPath;
//     }
// 
//     public void setNohupPath(String nohupPath) {
//         this.nohupPath = nohupPath;
//     }
// 
//     @JsonManagedReference
//     public List<Command> getCommands() {
//         return commands;
//     }
// 
//     public void setCommands(List<Command> commands) {
//         this.commands = commands;
//     }
// 
//     @Override
//     public int compareTo(@NonNull Server another) {
//         return name.toLowerCase().compareTo(another.getName().toLowerCase());
//     }
// }


import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import it.skarafaz.mercury.R;
import it.skarafaz.mercury.adapter.CommandListAdapter;
import it.skarafaz.mercury.model.config.Server;
/*
 * Mercury-SSH
 * Copyright (C) 2017 Skarafaz
 *
 * This file is part of Mercury-SSH.
 *
 * Mercury-SSH is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * Mercury-SSH is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Mercury-SSH.  If not, see <http://www.gnu.org/licenses/>.
 */

package it.skarafaz.mercury.fragment;


public class ServerFragment extends ListFragment {
    public static final String SERVER_ARG = "SERVER_ARG";
// Path: app/src/main/java/it/skarafaz/mercury/adapter/CommandListAdapter.java
// public class CommandListAdapter extends ArrayAdapter<Command> {
// 
//     public CommandListAdapter(Context context, List<Command> commands) {
//         super(context, R.layout.command_list_item, commands);
//     }
// 
//     @Override
//     public View getView(int position, View view, ViewGroup parent) {
//         ViewHolder holder;
//         if (view == null) {
//             LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
//             view = inflater.inflate(R.layout.command_list_item, parent, false);
//             holder = new ViewHolder(view);
//             view.setTag(holder);
//         } else {
//             holder = (ViewHolder) view.getTag();
//         }
// 
//         final Command command = getItem(position);
//         holder.name.setText(command.getName());
//         holder.info.setOnClickListener(new View.OnClickListener() {
//             @Override
//             public void onClick(View v) {
//                 new MaterialDialog.Builder(getContext())
//                         .title(command.getName())
//                         .content(command.getCmd())
//                         .show();
//             }
//         });
//         holder.row.setOnClickListener(new View.OnClickListener() {
//             @Override
//             public void onClick(View v) {
//                 new SshCommandRegular(command).start();
//             }
//         });
//         return view;
//     }
// 
//     static class ViewHolder {
//         @BindView(R.id.row)
//         RelativeLayout row;
//         @BindView(R.id.name)
//         TextView name;
//         @BindView(R.id.info)
//         ImageView info;
// 
//         public ViewHolder(View view) {
//             ButterKnife.bind(this, view);
//         }
//     }
// }
// 
// Path: app/src/main/java/it/skarafaz/mercury/model/config/Server.java
// @SuppressWarnings("unused")
// public class Server implements Serializable, Comparable<Server> {
//     private static final long serialVersionUID = 7247694914871605048L;
//     private String name;
//     private String host;
//     private Integer port;
//     private String user;
//     private String password;
//     private Boolean sudoNoPasswd;
//     private String sudoPath;
//     private String nohupPath;
//     private List<Command> commands;
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public String getHost() {
//         return host;
//     }
// 
//     public void setHost(String host) {
//         this.host = host;
//     }
// 
//     public Integer getPort() {
//         return port;
//     }
// 
//     public void setPort(Integer port) {
//         this.port = port;
//     }
// 
//     public String getUser() {
//         return user;
//     }
// 
//     public void setUser(String user) {
//         this.user = user;
//     }
// 
//     public String getPassword() {
//         return password;
//     }
// 
//     public void setPassword(String password) {
//         this.password = password;
//     }
// 
//     public Boolean getSudoNoPasswd() {
//         return sudoNoPasswd;
//     }
// 
//     public void setSudoNoPasswd(Boolean sudoNoPasswd) {
//         this.sudoNoPasswd = sudoNoPasswd;
//     }
// 
//     public String getSudoPath() {
//         return sudoPath;
//     }
// 
//     public void setSudoPath(String sudoPath) {
//         this.sudoPath = sudoPath;
//     }
// 
//     public String getNohupPath() {
//         return nohupPath;
//     }
// 
//     public void setNohupPath(String nohupPath) {
//         this.nohupPath = nohupPath;
//     }
// 
//     @JsonManagedReference
//     public List<Command> getCommands() {
//         return commands;
//     }
// 
//     public void setCommands(List<Command> commands) {
//         this.commands = commands;
//     }
// 
//     @Override
//     public int compareTo(@NonNull Server another) {
//         return name.toLowerCase().compareTo(another.getName().toLowerCase());
//     }
// }


// Path: app/src/main/java/it/skarafaz/mercury/fragment/ServerFragment.java
import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import it.skarafaz.mercury.R;
import it.skarafaz.mercury.adapter.CommandListAdapter;
import it.skarafaz.mercury.model.config.Server;

/*
 * Mercury-SSH
 * Copyright (C) 2017 Skarafaz
 *
 * This file is part of Mercury-SSH.
 *
 * Mercury-SSH is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * Mercury-SSH is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Mercury-SSH.  If not, see <http://www.gnu.org/licenses/>.
 */

package it.skarafaz.mercury.fragment;


public class ServerFragment extends ListFragment {
    public static final String SERVER_ARG = "SERVER_ARG";
    private Server server;