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

📄 events.po

📁 hibernate-distribution-3.3.1.GA-dist.zip源码
💻 PO
📖 第 1 页 / 共 2 页
字号:
msgid """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 """본질적으로 <literal>Session</literal> 인터페이스의 모든 메소드들은 이벤트와 ""서로 관련되어 있다. 당신은 <literal>LoadEvent</literal>, ""<literal>FlushEvent</literal>, 등을 갖는다 (정의된 이벤트 타입들의 전체 리스""트에 대해서는 XML 구성 파일 DTD 또는 <literal>org.hibernate.event</literal> ""패키지를 참조하라). 하나의 요청이 이들 메소드들 중 하나에 의해 만들어질 때, ""Hibernate <literal>Session</literal>은 적절한 이벤트를 생성시키고 그것을 그 ""타입의 구성된 이벤트 리스너에게 전달한다. 박싱없이, 이들 리스너들은 그들 메소""드들이 항상 귀결되었던 동일한 프로세싱을 구현한다. 하지만 당신이 리스너 인터""페이스들 중 하나의 맞춤을 구현하는 것이 자유롭고(예를 들어 ""<literal>LoadEvent</literal>는 <literal>LoadEventListener</literal> 인터페이""스의 등록된 구현에 의해 처리된다), 그 경우에 그들 구현은 <literal>Session</""literal>에 대해 행해진 임의의 <literal>load()</literal> 요청들을 처리할 책임""이 있을 것이다."#. Tag: para#: events.xml:84#, no-c-formatmsgid """The listeners should be considered effectively singletons; meaning, they are ""shared between requests, and thus should not save any state as instance ""variables."msgstr """리스너들은 효율적이게끔 싱글톤(singleton)들로 간주되어야 할 것이다; 이것은 그""것들이 요청들 사이에서 공유되고, 따라서 임의의 상태를 인스턴스 변수들로서 저""장하지 말아야 함을 의미한다."#. Tag: para#: events.xml:89#, no-c-formatmsgid """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 """맞춤형 리스너는 그것이 편의적인 기저 클래스들(또는 리스너들이 이 용도로 final""이 아닌 것으로 선언되므로 Hibernate out-of-the-box에 의해 사용된 디폴트 이벤""트 리스너들) 중 하나를 처리하고/하거나 확장하고자 원하는 이벤트들에 대해 적절""한 인터페이스를 구현해야 한다. 맞춤형 리스너들은 <literal>Configuration</""literal> 객체를 통해 프로그램 상으로 등록될 수 있거나, Hibernate 구성 XML 속""에 지정될 수 있다 (properties 파일을 통한 선언적인 구성은 지원되지 않는다). ""다음은 맞춤형 load 이벤트 리스너에 대한 예제이다:"#. Tag: programlisting#: events.xml:99#, no-c-formatmsgid """<![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 ""#. Tag: para#: events.xml:101#, no-c-formatmsgid """You also need a configuration entry telling Hibernate to use the listener in ""addition to the default listener:"msgstr """당신은 또한 디폴트 리스너에 덧붙여 그 리스너를 사용하도록 Hibernate에게 알려""주는 구성 엔트리를 필요로 한다:"#. Tag: programlisting#: events.xml:106#, no-c-formatmsgid """<![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 ""#. Tag: para#: events.xml:108#, no-c-formatmsgid "Instead, you may register it programmatically:"msgstr "대신에 당신은 그것을 프로그래밍 방식으로 등록할 수도 있다:"#. Tag: programlisting#: events.xml:112#, no-c-formatmsgid """<![CDATA[Configuration cfg = new Configuration();\n""LoadEventListener[] stack = { new MyLoadListener(), new ""DefaultLoadEventListener() };\n""cfg.EventListeners().setLoadEventListeners(stack);]]>"msgstr ""#. Tag: para#: events.xml:114#, no-c-formatmsgid """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 """선언적으로 등록된 리스너들은 인스턴스들을 공유할 수 없다. 만일 동일한 클래스 ""이름이 여러 개의 <literal>&lt;listener/&gt;</literal> 요소들에서 사용될 경""우, 각각의 참조는 그 클래스에 대한 별도의 인스턴스로 귀결될 것이다. 만일 당신""이 리스너 타입들 사이에서 리스너 인스턴스들을 공유할 가용성을 필요로 할 경우 ""당신은 프로그래밍 방식의 등록 접근법을 사용해야 한다."#. Tag: para#: events.xml:122#, no-c-formatmsgid """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 """구성 동안에 왜 인터페이스를 구현하고 특정 타입을 지정하는가? 물론 리스너 구현""은 여러 개의 이벤트 리스너 인터페이스들을 구현할 수 있다. 등록 동안에 추가적""으로 타입을 정의하는 것은 컨피그레이션 동안에 맞춤형 리스너들의 사용 여부를 ""전환시키는 것을 더 쉽게 해준다."#. Tag: title#: events.xml:132#, no-c-formatmsgid "Hibernate declarative security"msgstr "Hibernate 선언적인 보안"#. Tag: para#: events.xml:133#, no-c-formatmsgid """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 """대개 Hibernate 어플리케이션들에서 선언적인 보안은 session facade 계층 내에서 ""관리된다. 이제, Hibernate3는 어떤 액션들이 JACC를 통해 퍼미션을 주어지고, ""JAAS를 통해 인가되는 것을 허용해준다. 이것은 모든 아키텍처의 상단에 빌드된 옵""션 기능이다."#. Tag: para#: events.xml:139#, no-c-formatmsgid """First, you must configure the appropriate event listeners, to enable the use ""of JAAS authorization."msgstr """먼저, 당신은 JAAS authorization 사용을 이용 가능하도록 하기 위해 적절한 이벤""트 리스터들을 구성해야 한다."#. Tag: programlisting#: events.xml:144#, no-c-formatmsgid """<![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 ""#. Tag: para#: events.xml:146#, no-c-formatmsgid """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 """<literal>&lt;listener type=\"...\" class=\"...\"/&gt;</literal>는 특정 이벤""트 타입에 대해 정확히 한 개의 리스너가 존재할 때 단지 <literal>&lt;event ""type=\"...\"&gt;&lt;listener class=\"...\"/&gt;&lt;/event&gt;</literal>의 단""축형임을 노트하라."#. Tag: para#: events.xml:152#, no-c-formatmsgid """Next, still in <literal>hibernate.cfg.xml</literal>, bind the permissions to ""roles:"msgstr """다음으로, 여전히 <literal>hibernate.cfg.xml</literal> 내에서 퍼미션들을 role""들에 바인드 시킨다 :"#. Tag: programlisting#: events.xml:156#, no-c-formatmsgid """<![CDATA[<grant role=\"admin\" entity-name=\"User\" actions=\"insert,update,""read\"/>\n""<grant role=\"su\" entity-name=\"User\" actions=\"*\"/>]]>"msgstr ""#. Tag: para#: events.xml:158#, no-c-formatmsgid "The role names are the roles understood by your JACC provider."msgstr """역할(role) 이름들은 당신의 JACC 프로바이더에 의해 인지된 역할(role)들이다."

⌨️ 快捷键说明

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