diff --git a/opt/ahenk/base/model/PluginBean.py b/opt/ahenk/base/model/PluginBean.py new file mode 100644 index 0000000..1f139ae --- /dev/null +++ b/opt/ahenk/base/model/PluginBean.py @@ -0,0 +1,94 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# Author: Volkan Şahin +import json + + +class PluginBean(object): + """docstring for PluginBean""" + + def __init__(self, p_id=None, active=None, create_date=None, deleted=None, description=None, machine_oriented=None, modify_date=None, name=None, policy_plugin=None, profiles=None, user_oriented=None, version=None): + self.id = p_id + self.active = active + self.create_date = create_date + self.deleted = deleted + self.description = description + self.machine_oriented = machine_oriented + self.modify_date = modify_date + self.name = name + self.policy_plugin = policy_plugin + self.profiles = profiles + self.user_oriented = user_oriented + self.version = version + + def get_user_oriented(self): + return self.user_oriented + + def set_user_oriented(self, user_oriented): + self.user_oriented = user_oriented + + def get_profiles(self): + return self.profiles + + def set_profiles(self, profiles): + self.profiles = profiles + + def get_policy_plugin(self): + return self.policy_plugin + + def set_policy_plugin(self, policy_plugin): + self.policy_plugin = policy_plugin + + def get_machine_oriented(self): + return self.machine_oriented + + def set_machine_oriented(self, machine_oriented): + self.machine_oriented = machine_oriented + + def get_modify_date(self): + return self.modify_date + + def set_modify_date(self, modify_date): + self.modify_date = modify_date + + def get_create_date(self): + return self.create_date + + def set_create_date(self, create_date): + self.create_date = create_date + + def get_deleted(self): + return self.deleted + + def set_deleted(self, deleted): + self.deleted = deleted + + def get_description(self): + return self.description + + def set_description(self, description): + self.description = description + + def get_active(self): + return self.active + + def set_active(self, active): + self.active = active + + def get_id(self): + return self.id + + def set_id(self, p_id): + self.id = p_id + + def get_name(self): + return self.name + + def set_name(self, name): + self.name = name + + def get_version(self): + return self.version + + def set_version(self, version): + self.version = version diff --git a/opt/ahenk/base/model/ProfileBean.py b/opt/ahenk/base/model/ProfileBean.py index d0cacd8..09d185b 100644 --- a/opt/ahenk/base/model/ProfileBean.py +++ b/opt/ahenk/base/model/ProfileBean.py @@ -3,13 +3,13 @@ # Author: Volkan Şahin import json -from base.model.Plugin import Plugin +from base.model.PluginBean import PluginBean class ProfileBean(object): """docstring for Profile""" - def __init__(self, p_id, create_date, label, description, overridable, active, deleted, profile_data, modify_date, plugin, username=None): + def __init__(self, p_id=None, create_date=None, label=None, description=None, overridable=None, active=None, deleted=None, profile_data=None, modify_date=None, plugin=None, username=None): self.id = p_id self.create_date = create_date self.modify_date = modify_date @@ -19,7 +19,7 @@ class ProfileBean(object): self.active = active self.deleted = deleted self.profile_data = profile_data - self.plugin = Plugin(plugin) + self.plugin = plugin self.username = username def get_id(self): @@ -34,7 +34,7 @@ class ProfileBean(object): def set_create_date(self, create_date): self.create_date = create_date - def get_modify_dateself(self): + def get_modify_date(self): return self.modify_date def set_modify_date(self, modify_date): @@ -80,10 +80,14 @@ class ProfileBean(object): return self.plugin def set_plugin(self, plugin): - self.plugin = Plugin(plugin) + self.plugin = plugin def get_username(self): return self.username def set_username(self, username): - self.username = username \ No newline at end of file + self.username = username + + @property + def obj_name(self): + return "PROFILE" \ No newline at end of file