⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 events.po

📁 hibernate-distribution-3.3.1.GA-dist.zip源码
💻 PO
📖 第 1 页 / 共 2 页
字号:
msgstr """<![CDATA[new Configuration().setInterceptor( new AuditInterceptor() );]]>"#: index.docbook:61msgid "Event system"msgstr "Sistema de eventos"#: index.docbook:63msgid """If you have to react to particular events in your persistence layer, you may ""also use the Hibernate3 <emphasis>event</emphasis> architecture. The event ""system can be used in addition or as a replacement for interceptors."msgstr """Si tienes que reaccionar a eventos particulares en tu capa de persistencia, ""puedes tambi&#x00e9;n la arquitectura de <emphasis>eventos</emphasis> de ""Hibernate3. El sistema de eventos puede ser usado en adici&#x00f3;n o como ""un remplazo a los interceptores."#: index.docbook:69msgid """Essentially all of the methods of the <literal>Session</literal> interface ""correlate to an event. You have a <literal>LoadEvent</literal>, a ""<literal>FlushEvent</literal>, etc (consult the XML configuration-file DTD ""or the <literal>org.hibernate.event</literal> package for the full list of ""defined event types). When a request is made of one of these methods, the ""Hibernate <literal>Session</literal> generates an appropriate event and ""passes it to the configured event listeners for that type. Out-of-the-box, ""these listeners implement the same processing in which those methods always ""resulted. However, you are free to implement a customization of one of the ""listener interfaces (i.e., the <literal>LoadEvent</literal> is processed by ""the registered implemenation of the <literal>LoadEventListener</literal> ""interface), in which case their implementation would be responsible for ""processing any <literal>load()</literal> requests made of the ""<literal>Session</literal>."msgstr """Esencialmente todos los m&#x00e9;todos de la interface <literal>Session</""literal> se correlacionan con un evento. Tienes un <literal>LoadEvent</""literal>, un <literal>FlushEvent</literal>, etc (consulta el DTD del fichero ""de configuraci&#x00f3;n XML o el paquete <literal>org.hibernate.event</""literal> para la lista completa de tipos de evento definidos). Cuando se ""hace una petici&#x00f3;n de uno de estos m&#x00e9;todos, la ""<literal>Session</literal> de Hibernate genera un evento apropiado y se lo ""pasa al oyente (listener) de eventos configurado para ese tipo. De f&#x00e1;""brica, estos oyentes implementan el mismo procesamiento en los que siempre ""resultan aquellos m&#x00e9;todos. Sin embargo, eres libre de implementar una ""personalizaci&#x00f3;n de una de las interfaces oyentes (es decir, el ""<literal>LoadEvent</literal> es procesado por la implementaci&#x00f3;n ""registrada de la interface <literal>LoadEventListener</literal>), en cuyo ""caso su implementaci&#x00f3;n ser&#x00ed;a responsable de procesar cualquier ""petici&#x00f3;n <literal>load()</literal> hecha a la <literal>Session</""literal>."#: index.docbook:84msgid """The listeners should be considered effectively singletons; meaning, they are ""shared between requests, and thus should not save any state as instance ""variables."msgstr """Los oyentes deben ser considerados efectivamente singletons; quiere decir, ""que son compartidos entre las peticiones, y por lo tanto no guardan ""ning&#x00fa;n estado en variables de instancia."#: index.docbook:89msgid """A custom listener should implement the appropriate interface for the event ""it wants to process and/or extend one of the convenience base classes (or ""even the default event listeners used by Hibernate out-of-the-box as these ""are declared non-final for this purpose). Custom listeners can either be ""registered programmatically through the <literal>Configuration</literal> ""object, or specified in the Hibernate configuration XML (declarative ""configuration through the properties file is not supported). Here's an ""example of a custom load event listener:"msgstr """Un oyente personalizado debe implementar la interface apropiada para el ""evento que quiere procesar y/o extender una de las clases base de ""conveniencia (o incluso los oyentes de eventos por defecto usados por ""Hibernate de f&#x00e1;brica al ser &#x00e9;stos declarados non-final para ""este prop&#x00f3;sito). Los oyentes personalizados pueden ser registrados ""program&#x00e1;ticamente a trav&#x00e9;s del objeto <literal>Configuration</""literal>, o especificados en el XML de configuraci&#x00f3;n de Hibernate (la ""declaraci&#x00f3;n declarativa a trav&#x00e9;s del fichero de propiedades no ""est&#x00e1; soportada). He aqu&#x00ed; un ejemplo de un oyente personalizado ""de eventos load:"#: index.docbook:99msgid """<![CDATA[public class MyLoadListener implements LoadEventListener {\n""    // this is the single method defined by the LoadEventListener interface\n""    public void onLoad(LoadEvent event, LoadEventListener.LoadType ""loadType)\n""            throws HibernateException {\n""        if ( !MySecurity.isAuthorized( event.getEntityClassName(), event.""getEntityId() ) ) {\n""            throw MySecurityException(\"Unauthorized access\");\n""        }\n""    }\n""}]]>"msgstr """<![CDATA[public class MyLoadListener extends DefaultLoadEventListener {\n""    // this is the single method defined by the LoadEventListener interface\n""    public Object onLoad(LoadEvent event, LoadEventListener.LoadType ""loadType)\n""            throws HibernateException {\n""        if ( !MySecurity.isAuthorized( event.getEntityClassName(), event.""getEntityId() ) ) {\n""            throw MySecurityException(\"Unauthorized access\");\n""        }\n""        return super.onLoad(event, loadType);\n""    }\n""}]]>"#: index.docbook:101msgid """You also need a configuration entry telling Hibernate to use the listener in ""addition to the default listener:"msgstr """Necesitas adem&#x00e1;s una entrada de configuraci&#x00f3;n dici&#x00e9;""ndole a Hibernate que use el oyente en vez del oyente por defecto:"#: index.docbook:106msgid """<![CDATA[<hibernate-configuration>\n""    <session-factory>\n""        ...\n""        <event type=\"load\">\n""            <listener class=\"com.eg.MyLoadListener\"/>\n""            <listener class=\"org.hibernate.event.def.""DefaultLoadEventListener\"/>\n""        </event>\n""    </session-factory>\n""</hibernate-configuration>]]>"msgstr """<![CDATA[<hibernate-configuration>\n""    <session-factory>\n""        ...\n""        <listener type=\"load\" class=\"MyLoadListener\"/>\n""    </session-factory>\n""</hibernate-configuration>]]>"#: index.docbook:108msgid "Instead, you may register it programmatically:"msgstr "En cambio, puedes registrarlo program&#x00e1;ticamente:"#: index.docbook:112msgid """<![CDATA[Configuration cfg = new Configuration();\n""LoadEventListener[] stack = { new MyLoadListener(), new ""DefaultLoadEventListener() };\n""cfg.EventListeners().setLoadEventListeners(stack);]]>"msgstr """<![CDATA[Configuration cfg = new Configuration();\n""cfg.getSessionEventListenerConfig().setLoadEventListener( new MyLoadListener""() );]]>"#: index.docbook:114msgid """Listeners registered declaratively cannot share instances. If the same class ""name is used in multiple <literal>&lt;listener/&gt;</literal> elements, each ""reference will result in a separate instance of that class. If you need the ""capability to share listener instances between listener types you must use ""the programmatic registration approach."msgstr """Los oyentes registrados declarativamente no pueden compartir instancias. Si ""el mismo nombre de clase es usado en m&#x00fa;ltiples elementos <literal>&lt;""listener/&gt;</literal>, cada referencia resultar&#x00e1; en una instancia ""separada de esa clase. Si necesitas la capacidad de compartir instancias de ""oyentes entre tipos de oyente debes usar el enfoque de registraci&#x00f3;n ""program&#x00e1;tica."#: index.docbook:122msgid """Why implement an interface and define the specific type during ""configuration? Well, a listener implementation could implement multiple ""event listener interfaces. Having the type additionally defined during ""registration makes it easier to turn custom listeners on or off during ""configuration."msgstr """&#x00bf;Por qu&#x00e9; implementar una interface y definir el tipo ""espc&#x00ed;fico durante la configuraci&#x00f3;n? Bueno, una ""implementaci&#x00f3;n de oyente podr&#x00ed;a implementar m&#x00fa;ltiples ""interfaces de oyente de eventos. Teniendo el tipo definido adicionalmente ""durante la registraci&#x00f3;n lo hace m&#x00e1;s f&#x00e1;cil para activar ""o desactivar oyentes personalizados durante la configuraci&#x00f3;n."#: index.docbook:132msgid "Hibernate declarative security"msgstr "Seguridad declarativa de Hibernate"#: index.docbook:133msgid """Usually, declarative security in Hibernate applications is managed in a ""session facade layer. Now, Hibernate3 allows certain actions to be ""permissioned via JACC, and authorized via JAAS. This is optional ""functionality built on top of the event architecture."msgstr """Usualmente, la seguridad declarativa en aplicaciones Hibernate es manejada ""en una capa de fachada de sesi&#x00f3;n. Ahora, Hibernate3 permite que ""ciertas acciones sean permitidas v&#x00ed;a JACC, y autorizadas v&#x00ed;a ""JAAS. Esta en una funcionalidad opcional constru&#x00ed;da encima de la ""arquitectura de eventos."#: index.docbook:139msgid """First, you must configure the appropriate event listeners, to enable the use ""of JAAS authorization."msgstr """Primero, debes configurar los oyentes de eventos apropiados, para habilitar ""el uso de autorizaci&#x00f3;n JAAS."#: index.docbook:144msgid """<![CDATA[<listener type=\"pre-delete\" class=\"org.hibernate.secure.""JACCPreDeleteEventListener\"/>\n""<listener type=\"pre-update\" class=\"org.hibernate.secure.""JACCPreUpdateEventListener\"/>\n""<listener type=\"pre-insert\" class=\"org.hibernate.secure.""JACCPreInsertEventListener\"/>\n""<listener type=\"pre-load\" class=\"org.hibernate.secure.""JACCPreLoadEventListener\"/>]]>"msgstr """<![CDATA[<listener type=\"pre-delete\" class=\"org.hibernate.secure.""JACCPreDeleteEventListener\"/>\n""<listener type=\"pre-update\" class=\"org.hibernate.secure.""JACCPreUpdateEventListener\"/>\n""<listener type=\"pre-insert\" class=\"org.hibernate.secure.""JACCPreInsertEventListener\"/>\n""<listener type=\"pre-load\" class=\"org.hibernate.secure.""JACCPreLoadEventListener\"/>]]>"#: index.docbook:146msgid """Note that <literal>&lt;listener type=\"...\" class=\"...\"/&gt;</literal> is ""just a shorthand for <literal>&lt;event type=\"...\"&gt;&lt;listener class=""\"...\"/&gt;&lt;/event&gt;</literal> when there is exactly one listener for ""a particular event type."msgstr """UNTRANSLATED! Note that <literal>&lt;listener type=\"...\" class=\"...\"/&gt;""</literal> is just a shorthand for <literal>&lt;event type=\"...\"&gt;&lt;""listener class=\"...\"/&gt;&lt;/event&gt;</literal> when there is exactly ""one listener for a particular event type."#: index.docbook:152msgid """Next, still in <literal>hibernate.cfg.xml</literal>, bind the permissions to ""roles:"msgstr """Seguido, a&#x00fa;n en <literal>hibernate.cfg.xml</literal>, liga los ""permisos a roles:"#: index.docbook:156msgid """<![CDATA[<grant role=\"admin\" entity-name=\"User\" actions=\"insert,update,""read\"/>\n""<grant role=\"su\" entity-name=\"User\" actions=\"*\"/>]]>"msgstr """<![CDATA[<grant role=\"admin\" entity-name=\"User\" actions=\"insert,update,""read\"/>\n""<grant role=\"su\" entity-name=\"User\" actions=\"*\"/>]]>"#: index.docbook:158msgid "The role names are the roles understood by your JACC provider."msgstr "Los nombres de role son los roles entendidos por tu proveedor de JACC."msgid "ROLES_OF_TRANSLATORS"msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"msgid "CREDIT_FOR_TRANSLATORS"msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -