You can simply this by calling LayoutLocalServiceUtil.addLayout(long, long, boolean, long, String, String, String, String, boolean, String, ServiceContext) method instead.