예제 #1
0
파일: base.py 프로젝트: xavinsky/tekio
    def __init__(self,ido,interfaces,path_f,path_r):
        self.id=ido

        self.path_entier=path_f+path_r
        self.path=path_f
        self.path_r=path_r

        self.interfaces=interfaces
        utilise_interface(self,interfaces)
        self.is_actu = False
        self.initialise()
예제 #2
0
파일: forge.py 프로젝트: xavinsky/tekio
    def create_piece(self,interfaces,id_piece_pere,name,proprietes={}):
        utilise_interface(self,interfaces)
        self.structure=self.get_dico_proprietes('struct')
        self.workflows=self.get_dico_proprietes('workflow',limit=1)
        self.log.debug("workflows moule %s" % self.id  )
        self.log.debug(str(self.workflows))

        id_type=52

        id_piece=create_element(self.glob,self.database,
                                id_type,id_piece_pere,
                                {'all':name,},proprietes)
        
        piece=get_instance_from_id(interfaces,id_piece)

        self.fs_svn.add_folder(piece.path)

        for (name,dico) in self.structure.items():
            etype=dico['type']
            title=dico.get('title',None)
            default=dico['default']
            cl=dico_type_classe[etype]
            obj=cl(interfaces,piece,name,title=title)
            if name=="id_user":
                default=self.datas.my_session.id_user
            obj.create(default)

        self.log.debug("workflows %s "% id_piece)
        self.log.debug(str(self.workflows))

        for (name,w) in self.workflows.items():
            piece.set_propriete('workflow.%s' % name,w)

        piece.set_propriete('modele', self.get_name())

        listfiles=self.fs_svn.listdir(self.path)
        listfiles.remove('.svn')


        for i in listfiles:
            fi=self.path+'/'+i
            ff=piece.path+'/'+i
            self.fs_svn.add_link(fi,ff)

        return id_piece
예제 #3
0
파일: tekiod.py 프로젝트: xavinsky/tekio
 def my_get_interfaces(self, socket_interface,objs):
     self.interfaces=self.my_interfaces(socket_interface,objs)
     utilise_interface(self,self.interfaces)