2011 년 Tridion 2011에 저장소 확장을 쓰려고하는데 JPAComponentPresentationDAO
을 확장하고 ComponentPresentationDAO
을 구현합니다. 위의 예제 코드에서 Component 프레젠테이션 저장소 확장에 Component 개체를 얻는 방법
public void create(ComponentPresentation itemToCreate, ComponentPresentationTypeEnum componentPresentationType) throws StorageException
{
super.create(itemToCreate,componentPresentationType);
String tcmURI = Integer.toString(itemToCreate.getComponentId());
Component compObject // I want Component object to get the schema ID
PublishActionDAO publishActionDAO = (PublishActionDAO) StorageManagerFactory.getDefaultDAO("PublishAction");
PublishAction publishAction = new PublishAction();
publishAction.setAction("ADD");
publishAction.setTcmUri(tcmURI);
publishActionDAO.store(publishAction);
}
나는 내 데이터베이스 테이블에 데이터를 저장할 내 엔티티 클래스에 유용한 내용을 전달할 수 있도록 내가, 구성 요소 ID를 얻을 수
itemToCreate.getComponentId()
를 사용하여 구성 요소 개체를 만들고 싶어.
에서 compid 게시자 ID를 통과해야합니다. 이 코드 내에서'Component's에 대한 DAO를 얻는 방법을 알고 싶습니까? –
예, actullay 게시 된 게시되지 않은 구성 요소의 스키마 ID를 얻을 수 있도록 여기에 Component 객체를 가져 오려고 구성 요소 게시 및 게시 취소를 처리하려고합니다. –